![安装主线内核 3.4.3 后,为什么我无法构建 AMD 图形二进制模块?](https://linux22.com/image/820128/%E5%AE%89%E8%A3%85%E4%B8%BB%E7%BA%BF%E5%86%85%E6%A0%B8%203.4.3%20%E5%90%8E%EF%BC%8C%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E6%97%A0%E6%B3%95%E6%9E%84%E5%BB%BA%20AMD%20%E5%9B%BE%E5%BD%A2%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%A8%A1%E5%9D%97%EF%BC%9F.png)
我最近将 Ubuntu 12.04 内核更新为 3.4.3-generic,现在我的 ATI/AMD 驱动程序无法正确安装。AMD Catalyst Control Center 在那里,我可以正常打开它,但它只显示 2D 图形已启用。我的显卡是 Radeon HD 7770,在我的旧内核 (2.5.xx) 上运行完全正常。当我尝试安装 AMD 的最新驱动程序时,我得到了以下输出(错误发生在安装过程的一半多一点):
Selecting previously unselected package fglrx.
(Reading database ... 261454 files and directories currently installed.)
Unpacking fglrx (from fglrx_8.961-0ubuntu1_amd64.deb) ...
restore of system environment completed
Error! There are no instances of module: fglrx
8.961 located in the DKMS tree.
Errors during DKMS module removal
Uninstall fglrx driver complete.
For detailed log of uninstall, please see /etc/ati/fglrx-uninstall.log
System must be rebooted to avoid system instability and potential data loss.
Selecting previously unselected package fglrx-amdcccle.
Unpacking fglrx-amdcccle (from fglrx-amdcccle_8.961-0ubuntu1_amd64.deb) ...
Selecting previously unselected package fglrx-dev.
Unpacking fglrx-dev (from fglrx-dev_8.961-0ubuntu1_amd64.deb) ...
Setting up fglrx (2:8.961-0ubuntu1) ...
update-alternatives: using /usr/lib/fglrx/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in auto mode.
update-alternatives: warning: skip creation of /etc/OpenCL/vendors/amdocl32.icd because associated file /usr/lib/fglrx/etc/OpenCL/vendors/amdocl32.icd (of link group x86_64-linux-gnu_gl_conf) doesn't exist.
update-alternatives: warning: forcing reinstallation of alternative /usr/lib/fglrx/ld.so.conf because link group x86_64-linux-gnu_gl_conf is broken.
update-alternatives: warning: skip creation of /etc/OpenCL/vendors/amdocl32.icd because associated file /usr/lib/fglrx/etc/OpenCL/vendors/amdocl32.icd (of link group x86_64-linux-gnu_gl_conf) doesn't exist.
update-alternatives: using /usr/lib/fglrx/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in auto mode.
update-initramfs: deferring update (trigger activated)
Loading new fglrx-8.961 DKMS files...
First Installation: checking all kernels...
Building only for 3.4.3-030403-generic
Building for architecture x86_64
Building initial module for 3.4.3-030403-generic
ERROR (dkms apport): kernel package linux-headers-3.4.3-030403-generic is not supported
Error! Bad return status for module build on kernel: 3.4.3-030403-generic (x86_64)
Consult /var/lib/dkms/fglrx/8.961/build/make.log for more information.
update-initramfs: deferring update (trigger activated)
Processing triggers for ureadahead ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Setting up fglrx-amdcccle (2:8.961-0ubuntu1) ...
Setting up fglrx-dev (2:8.961-0ubuntu1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.4.3-030403-generic
在命令行中运行 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
基本上,看起来安装程序在尝试为内核 3.4.3 构建时失败了...我能做些什么吗,还是必须等待 AMD 发布更新的驱动程序?
最后,这是记录在 /var/lib/dkms/fglrx/8.961/build/make.log 中的输出:
DKMS make.log for fglrx-8.961 for kernel 3.4.3-030403-generic (x86_64)
Tue Jun 19 23:40:17 CDT 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.3-030403-generic/build SUBDIRS=/var/lib/dkms/fglrx/8.961/build/2.6.x modules
make[1]: Entering directory `/usr/src/linux-headers-3.4.3-030403-generic'
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]
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.3-030403-generic'
make: *** [kmod_build] Error 2
build failed with return value 2
有人知道我能做些什么吗?提前谢谢!
答案1
欢迎来到没有稳定内核 API 的世界。
无论如何,听起来它会在 Catalyst 12.5 中得到修复,或者如果你需要一个解决方法: http://forums.opensuse.org/english/get-technical-help-here/tumbleweed/475575-warning-kernel-3-4-amd-catalyst-12-4-not-compatible.html