Ubuntu 12.04 无法升级到内核 3.4

Ubuntu 12.04 无法升级到内核 3.4

昨晚我打算将内核从 3.2 0-24 升级到 3.4...我按照此说明进行操作除了默认内核之外,我可以在 Ubuntu 中安装 Linux 内核吗?

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

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

sudo dpkg -i linux-headers-3.4.0-030400_3.4.0-030400.201205210521_all.deb

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

(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) ...

然后我运行第二个命令

sudo dpkg -i linux-headers-3.4.0-030400-generic-pae_3.4.0-030400.201205210521_i386.deb

输出如下:

(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.

看到输出中的错误后,我停止了继续...我已经在 Mr.Google、本网站、ubuntu 论坛和任何与此问题相关的博客上搜索过,但我还没有找到任何解决方案...唯一的线索是或许我的 ati fglrx 驱动程序无法与内核 3.4 配合使用

我仍然打算将内核升级到 3.4 版本,因为我觉得我的笔记本电脑在使用内核 3.2 时仍然很热,即使通过使用 laptop-mode-tools、jupiter、添加内核启动选项 acpi_osi=Linux 等方法解决了这个问题,在 Windows 7 操作系统上,我的笔记本电脑运行时温度要低得多。

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

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

  • 华硕 A42JK 搭载英特尔® 酷睿™ 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

此外,这是 /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

谢谢 =D

更新

@John S Gruber:嗨,John,昨晚我尝试了你的建议,我先删除了 fglrx 驱动程序,然后成功升级到 3.4,但我的 ati 显卡又出现了问题。重启之前,我尝试使用 jockey gtk 从 repo 安装免费的开源驱动程序,首先我尝试安装发布后更新但失败了,然后我尝试第二个,似乎成功了,也没有错误,所以我重启了。重启后,plymouth 没有出现,登录后我的桌面变成了 unity 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

看来我的 ati 驱动程序没有正确安装,我的笔记本电脑变得很热,大约 70 摄氏度,并且温度越来越高……然后我尝试从 AMD 网站安装 ATI 驱动程序,但失败了,就像我尝试安装 3.4 内核时一样,内核无法与二进制驱动程序配合使用。然后我使用此处的指南删除了 fglrxhttp://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

重启后我的 3D 又可以工作了,没有 fglrx 驱动,只用 mesa 驱动,但我的笔记本电脑一直在发热……我在 google 上搜索,找到了这个链接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

经过那个漫长的夜晚,我还是没有找到解决办法,于是我又换回了内核 3.2... 难道没有人能给我提供内核 3.4 的解决方案吗??抱歉,带 * 的链接给您带来不便,我只能发布 2 个超链接。。谢谢您的关心,我很感激。。

答案1

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

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

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

启动后,您可能会在量子档案中查找与 3.4 内核兼容的更新的 fglrx 包。这样您就真正处于最前沿(或真正处于困境)。

您可能还会看到Nvidia 驱动程序不适用于主线内核对于使用 nvidia 专有驱动程序的人所做的事情。

如果这能给你一些鼓励的话,上周我能够升级到 3.5 一段时间,但我没有运行 fglrx。我确实必须重新安装 libllvm 包才能让 unity-3d 继续工作,但一直不知道原因。

答案2

据我所知,AMD 最近发布了催化剂驱动程序版本 12.6(3-4 天前),该版本与 3.4 内核兼容。因此我建议您尝试卸载当前的“fglrx”驱动程序,升级内核,然后安装最新内核。请发布您的发现,因为我也在寻找解决过热问题的方法。听说内核 3.4 具有一些自动 CPU 缩放功能

答案3

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)

你的电脑似乎不兼容 PAE,所以你需要自己编译 Linux 内核。这个链接可能对你有帮助:http://verahill.blogspot.com.es/2012/05/compiling-kernel-34-on-debian.html

答案4

你已经找到了答案:kernel package linux-headers-3.4.0-030400-generic-pae is not supported

相关内容