Ubuntu 12.04 无法升级到内核 3.4

udi*_*ers 8 upgrade kernel fglrx 12.04

昨晚我打算将我的内核从 3.2 0-24 升级到 3.4 ......我按照这个指令我可以在默认的 Ubuntu apppart 中安装 Linux 内核吗?.

首先,我在此http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.4-precise/上下载了内核 deb 文件

然后在终端上运行第一个命令

sudo dpkg -i linux-headers-3.4.0-030400_3.4.0-030400.201205210521_all.deb
Run Code Online (Sandbox Code Playgroud)

很可能它成功了,这是输出:

(Reading database ... 402527 files and directories currently installed.)
Preparing to replace linux-headers-3.4.0-030400 3.4.0-030400.201205210521 (using linux-headers-3.4.0-030400_3.4.0-030400.201205210521_all.deb) ...
Unpacking replacement linux-headers-3.4.0-030400 ...
Setting up linux-headers-3.4.0-030400 (3.4.0-030400.201205210521) ...
Run Code Online (Sandbox Code Playgroud)

然后我运行第二个命令

sudo dpkg -i linux-headers-3.4.0-030400-generic-pae_3.4.0-030400.201205210521_i386.deb
Run Code Online (Sandbox Code Playgroud)

输出在这里:

(Reading database ... 402527 files and directories currently installed.)
Preparing to replace linux-headers-3.4.0-030400-generic-pae 3.4.0-030400.201205210521 (using linux-headers-3.4.0-030400-generic-pae_3.4.0-030400.201205210521_i386.deb) ...
Unpacking replacement linux-headers-3.4.0-030400-generic-pae ...
Setting up linux-headers-3.4.0-030400-generic-pae (3.4.0-030400.201205210521) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.4.0-030400-generic-pae /boot/vmlinuz-3.4.0-030400-generic-pae
ERROR (dkms apport): kernel package linux-headers-3.4.0-030400-generic-pae is not supported
Error! Bad return status for module build on kernel: 3.4.0-030400-generic-pae (i686)
Consult /var/lib/dkms/fglrx-updates/8.960/build/make.log for more information.
Run Code Online (Sandbox Code Playgroud)

看到输出中的错误,我停止了继续……我已经在 Google 先生、这个网站、ubuntu 论坛和任何与此问题相关的博客上进行了搜索,但我还没有找到任何解决方案……唯一的线索可能是我的 ati fglrx 驱动程序不能与内核 3.4 一起使用

我仍然打算将内核升级到 3.4 版本,因为即使在 Windows 7 上使用笔记本模式工具、jupiter、添加内核启动选项 acpi_osi=Linux 等做了一些解决方法之后,我仍然觉得我的笔记本电脑仍然使用内核 3.2 发热操作系统我的笔记本电脑运行得更酷了..

有人可以为我的问题提出解决方案吗?如何正确解决这个问题?

供您参考,这是我的笔记本电脑规格:

  • 华硕 A42JK 搭配 Intel® Core™ i3 CPU M 350 @ 2.27GHz × 4
  • 2GB内存
  • ATI Mobility Radeon HD 5145

如果我运行 fglrxinfo,则安装的 fglrx 驱动程序版本

display: :0.0  screen: 0
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: ATI Mobility Radeon HD 4500 Series
OpenGL version string: 3.3.11627 Compatibility Profile Context
Run Code Online (Sandbox Code Playgroud)

此外,这是 /var/lib/dkms/fglrx-updates/8.960/build/make.log 的内容:

DKMS make.log for fglrx-updates-8.960 for kernel 3.4.0-030400-generic-pae (i686)
Kam Jun  7 17:04:31 WIT 2012
/usr/sbin/dkms: line 73: cd: /var/lib/dkms/fglrx/8.960/build: No such file or directory
AMD kernel module generator version 2.1
doing Makefile based build for kernel 2.6.x and higher
rm -rf *.c *.h *.o *.ko *.a .??* *.symvers
make -C /lib/modules/3.4.0-030400-generic-pae/build SUBDIRS=/var/lib/dkms/fglrx-updates/8.960/build/2.6.x modules
make[1]: Entering directory `/usr/src/linux-headers-3.4.0-030400-generic-pae'
  CC [M]  /var/lib/dkms/fglrx-updates/8.960/build/2.6.x/firegl_public.o
/var/lib/dkms/fglrx-updates/8.960/build/2.6.x/firegl_public.c: In function ‘kasInitExecutionLevels’:
/var/lib/dkms/fglrx-updates/8.960/build/2.6.x/firegl_public.c:4184:5: error: ‘cpu_possible_map’ undeclared (first use in this function)
/var/lib/dkms/fglrx-updates/8.960/build/2.6.x/firegl_public.c:4184:5: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/fglrx-updates/8.960/build/2.6.x/firegl_public.c:4184:5: warning: left-hand operand of comma expression has no effect [-Wunused-value]
/var/lib/dkms/fglrx-updates/8.960/build/2.6.x/firegl_public.c: In function ‘KCL_fpu_begin’:
/var/lib/dkms/fglrx-updates/8.960/build/2.6.x/firegl_public.c:5839:5: error: implicit declaration of function ‘__thread_has_fpu’ [-Werror=implicit-function-declaration]
/var/lib/dkms/fglrx-updates/8.960/build/2.6.x/firegl_public.c:5840:9: error: implicit declaration of function ‘__save_init_fpu’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[2]: *** [/var/lib/dkms/fglrx-updates/8.960/build/2.6.x/firegl_public.o] Error 1
make[1]: *** [_module_/var/lib/dkms/fglrx-updates/8.960/build/2.6.x] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.4.0-030400-generic-pae'
make: *** [kmod_build] Error 2
build failed with return value 2
Run Code Online (Sandbox Code Playgroud)

谢谢=D

更新

@John S Gruber:嗨,John,昨晚我尝试了你的建议,我先删除了 fglrx 驱动程序,然后成功升级到 3.4,但后来我的 ati 显卡出现了另一个问题。在重新启动之前,我尝试安装免费的开源驱动程序从使用 jockey gtk 的 repo,首先我尝试安装发布后更新但失败,然后我尝试第二个,似乎成功并且没有错误,所以我重新启动 .. 重新启动后,普利茅斯没有出现,并在登录后在我的桌面更改为统一 2D,所以我检查了 fglrx

fglrxinfo
X Error of failed request:  BadRequest (invalid request code or no such operation)
Major opcode of failed request:  138 (ATIFGLEXTENSION)
Minor opcode of failed request:  66 ()
Serial number of failed request:  13
Current serial number in output stream:  13
Run Code Online (Sandbox Code Playgroud)

所以看起来我的 ati 驱动程序没有正确安装,我的笔记本电脑变得像 70 摄氏度一样热,并且继续变热......然后我尝试从 AMD 网站安装 ATI 驱动程序,但失败并最终就像我尝试安装时一样3.4 内核,内核不支持二进制驱动。然后我从这里使用指南删除 fglrx http://wiki.cchtml.com/index.php/Ubuntu_Oneiric_Installation_Guide#Removing_Catalyst.2Ffglrx并运行这些命令

sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev*
sudo apt-get remove --purge xserver-xorg-video-ati xserver-xorg-video-radeon
sudo apt-get install xserver-xorg-video-ati
sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
sudo rm -rf /etc/ati
Run Code Online (Sandbox Code Playgroud)

重新启动,我的 3D 在没有 fglrx 驱动程序的情况下再次工作,只是使用 mesa 驱动程序,但我的笔记本电脑一直在升温......我在谷歌上搜索并到达了这个链接http://ubuntuforums.org/showthread.php?t=1988444那里说是一个可以使 fglrx 在内核 3.4 上工作的补丁,我尝试了解决方案,但内核仍然拒绝安装 fglrx 驱动程序,即使使用来自此链接http://ati.cchtml.com/attachment.cgi?id 的补丁=464 我再次尝试安装驱动程序几次,多次清除和几次重新启动仍然相同,总是在 /var/lib/dkms/fglrx/8.961/build/make.log 上出现此错误

DKMS make.log for fglrx-8.961 for kernel 3.4.0-030400-generic-pae (i686)
Sab Jun 16 07:21:16 WIT 2012
AMD kernel module generator version 2.1
doing Makefile based build for kernel 2.6.x and higher
rm -rf *.c *.h *.o *.ko *.a .??* *.symvers
make -C /lib/modules/3.4.0-030400-generic-pae/build SUBDIRS=/var/lib/dkms/fglrx/8.961/build/2.6.x modules
make[1]: Entering directory `/usr/src/linux-headers-3.4.0-030400-generic-pae'
  CC [M]  /var/lib/dkms/fglrx/8.961/build/2.6.x/firegl_public.o
/var/lib/dkms/fglrx/8.961/build/2.6.x/firegl_public.c: In function ‘kasInitExecutionLevels’:
/var/lib/dkms/fglrx/8.961/build/2.6.x/firegl_public.c:4157:5: error: ‘cpu_possible_map’ undeclared (first use in this function)
/var/lib/dkms/fglrx/8.961/build/2.6.x/firegl_public.c:4157:5: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/fglrx/8.961/build/2.6.x/firegl_public.c:4157:5: warning: left-hand operand of comma expression has no effect [-Wunused-value]
/var/lib/dkms/fglrx/8.961/build/2.6.x/firegl_public.c: In function ‘KCL_fpu_begin’:
/var/lib/dkms/fglrx/8.961/build/2.6.x/firegl_public.c:5812:5: error: implicit declaration of function ‘__thread_has_fpu’ [-Werror=implicit-function-declaration]
/var/lib/dkms/fglrx/8.961/build/2.6.x/firegl_public.c:5813:9: error: implicit declaration of function ‘__save_init_fpu’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[2]: *** [/var/lib/dkms/fglrx/8.961/build/2.6.x/firegl_public.o] Error 1
make[1]: *** [_module_/var/lib/dkms/fglrx/8.961/build/2.6.x] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.4.0-030400-generic-pae'
make: *** [kmod_build] Error 2
build failed with return value 2
Run Code Online (Sandbox Code Playgroud)

在那漫长的一夜之后,我没有得到任何解决方案,我切换回内核 3.2... 没有人可以给我内核 3.4 的解决方案吗??抱歉给带 * 的链接带来不便,我只能发布 2 个超链接.. 感谢您的关注,我很感激..

Joh*_*ber 6

在我看来,它是专有的 ATI 二进制驱动程序 fglrx,它与 3.4 内核不兼容。dkms 正在尝试处理与它交互的标头。我假设它试图编译一个接口模块。

这在一定程度上是有意义的,因为 Ubuntu 在新版本的开发周期中的某个时候获得了新的供应商驱动程序,而 3.4 不在生产 Ubuntu 版本中。我相信 Ubuntu 内核团队的网站提到二进制驱动程序可能与这些软件包不兼容。

由于您正在试验,我建议您删除 fglrx 驱动程序并使用当前系统中的默认 radeon 驱动程序,然后再次尝试升级。如果没有安装 fglrx,就不应该有一个 dkms 钩子来重建任何与 fglrx 相关的东西。

完成后,您可能会查看 quantal 档案以获取与 3.4 内核兼容的更新的 fglrx 包。然后你将真正处于最前沿(或真正处于困境)。

您可能还会看到Nvidia 驱动程序无法与使用 nvidia 专有驱动程序的人所做的主线内核一起工作

如果有什么鼓励的话,我可以在上周升级到 3.5 一段时间,但是我没有运行 fglrx。我确实必须重新安装 libllvm 包以保持 unity-3d 正常工作,但从未发现原因。