在 Ubuntu 13.10 32 位上安装 Catalyst 13.12 时出错

在 Ubuntu 13.10 32 位上安装 Catalyst 13.12 时出错

我已经从 amd 网站下载了 Catalyst 驱动程序,解压并创建了一个包

$ sudo ./amd-catalyst-13.12-linux-x86.x86_64.run --buildpkg Ubuntu/saucy
Created directory fglrx-install.FLGUtu
Verifying archive integrity... All good.
Uncompressing AMD Catalyst(TM) Proprietary Driver-13.251......................................................................................................................................................
..............................................................................................................................................................................................................
..............................................................................................................................................................................................................
=====================================================================
 AMD Catalyst(TM) Proprietary Driver Installer/Packager 
=====================================================================
Generating package: Ubuntu/saucy
1Package /home/XXX/Downloads/drivers_13.251/fglrx_13.251-0ubuntu1_i386.deb has been successfully generated
Package /home/XXX/Downloads/drivers_13.251/fglrx-dev_13.251-0ubuntu1_i386.deb has been successfully generated
Package /home/XXX/Downloads/drivers_13.251/fglrx-amdcccle_13.251-0ubuntu1_i386.deb has been successfully generated
Removing temporary directory: fglrx-install.FLGUtu

之后我尝试安装这些软件包但得到:

$ sudo dpkg -i fglrx_13.251-0ubuntu1_i386.deb fglrx-amdcccle_13.251-0ubuntu1_i386.deb fglrx-dev_13.251-0ubuntu1_i386.deb 
Selecting previously unselected package fglrx.
(Reading database ... 171591 files and directories currently installed.)
Unpacking fglrx (from fglrx_13.251-0ubuntu1_i386.deb) ...
Selecting previously unselected package fglrx-amdcccle.
Unpacking fglrx-amdcccle (from fglrx-amdcccle_13.251-0ubuntu1_i386.deb) ...
Selecting previously unselected package fglrx-dev.
Unpacking fglrx-dev (from fglrx-dev_13.251-0ubuntu1_i386.deb) ...
Setting up fglrx (2:13.251-0ubuntu1) ...
update-alternatives: using /usr/lib/fglrx/ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in auto mode
update-alternatives: warning: skip creation of /usr/lib32/libaticalcl.so because associated file /usr/lib32/fglrx/libaticalcl.so (of link group i386-linux-gnu_gl_conf) doesn't exist
update-alternatives: warning: skip creation of /usr/lib32/libaticalrt.so because associated file /usr/lib32/fglrx/libaticalrt.so (of link group i386-linux-gnu_gl_conf) doesn't exist
update-alternatives: warning: forcing reinstallation of alternative /usr/lib/fglrx/ld.so.conf because link group i386-linux-gnu_gl_conf is broken
update-alternatives: warning: skip creation of /usr/lib32/libaticalcl.so because associated file /usr/lib32/fglrx/libaticalcl.so (of link group i386-linux-gnu_gl_conf) doesn't exist
update-alternatives: warning: skip creation of /usr/lib32/libaticalrt.so because associated file /usr/lib32/fglrx/libaticalrt.so (of link group i386-linux-gnu_gl_conf) doesn't exist
update-alternatives: using /usr/lib/fglrx/alt_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-initramfs: deferring update (trigger activated)
Loading new fglrx-13.251 DKMS files...
First Installation: checking all kernels...
Building only for 3.11.0-17-generic
Building for architecture i686
Building initial module for 3.11.0-17-generic
Error! Bad return status for module build on kernel: 3.11.0-17-generic (i686)
Consult /var/lib/dkms/fglrx/13.251/build/make.log for more information.
update-initramfs: deferring update (trigger activated)
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf-2.index...
Setting up fglrx-amdcccle (2:13.251-0ubuntu1) ...
Setting up fglrx-dev (2:13.251-0ubuntu1) ...
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.11.0-17-generic
Processing triggers for libc-bin ...
-------------------------------------

在日志中

$ cat /var/lib/dkms/fglrx/13.251/build/make.log
DKMS make.log for fglrx-13.251 for kernel 3.11.0-17-generic (i686)
nie, 2 mar 2014, 15:10:53 CET
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.11.0-17-generic/build SUBDIRS=/var/lib/dkms/fglrx/13.251/build/2.6.x modules
make[1]: Entering directory `/usr/src/linux-headers-3.11.0-17-generic'
  CC [M]  /var/lib/dkms/fglrx/13.251/build/2.6.x/firegl_public.o
  CC [M]  /var/lib/dkms/fglrx/13.251/build/2.6.x/kcl_acpi.o
/var/lib/dkms/fglrx/13.251/build/2.6.x/kcl_acpi.c: In function ‘KCL_ACPI_ParseTable’:
/var/lib/dkms/fglrx/13.251/build/2.6.x/kcl_acpi.c:999:5: warning: passing argument 1 of ‘(acpi_status (*)(u32,  void *, void *))handler’ makes integer from pointer without a cast [enabled by default]
     ((acpi_table_handler)handler)(hdr);
     ^
/var/lib/dkms/fglrx/13.251/build/2.6.x/kcl_acpi.c:999:5: note: expected ‘u32’ but argument is of type ‘struct acpi_table_header *’
/var/lib/dkms/fglrx/13.251/build/2.6.x/kcl_acpi.c:999:5: error: too few arguments to function ‘(acpi_status (*)(u32,  void *, void *))handler’
make[2]: *** [/var/lib/dkms/fglrx/13.251/build/2.6.x/kcl_acpi.o] Error 1
make[1]: *** [_module_/var/lib/dkms/fglrx/13.251/build/2.6.x] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.11.0-17-generic'
make: *** [kmod_build] Error 2
build failed with return value 2

错误所在是:

    /var/lib/dkms/fglrx/13.251/build/2.6.x/kcl_acpi.c:999:5: error: too few arguments to function ‘(acpi_status (*)(u32,  void *, void *))handler’

答案1

知道了! :-)

sudo gedit /usr/src/fglrx-13.251/kcl_acpi.c

删除文件中的最后三行:

     ((acpi_table_handler)handler)(hdr);
     return KCL_ACPI_OK;
}

替换为:

#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,1)
    ((acpi_tbl_table_handler)handler)(hdr);
#else
    ((acpi_table_handler)handler)(hdr);
#endif
    return KCL_ACPI_OK;
}

然后运行:

sudo dkms install -m fglrx -v 13.251 -k 3.11.0-17-generic

然后重启。对我来说已经成功了 - 现在可以使用内核 3.11 和 fglrx 了!

(我从这个页面得出了这一结论:https://gist.github.com/moldcraft/8116528

由于您尚未正确安装驱动程序,因此您必须编辑catalyst/common/lib/modules/fglrx/build_mod/kcl_acpi.c上述 URL 中的解压文件...

如果你想 +1 我的其他问题,请随意 ;-)

答案2

我想我遇到了完全相同的问题,但从另一个角度来说 - 即我已经使用内核 3.8 成功安装了驱动程序 13.12,但随后通过 12.04.4 lts 堆栈升级到内核 3.11。失败的命令是:sudo dkms install -m fglrx -v 13.251 -k 3.11.0-17-generic。我的问题详述如下:

内核升级后如何修复 ATI fglrx 驱动程序

(抱歉,我把这作为答案而不是评论,但非常愚蠢的“评分”系统目前不允许我添加评论。)

相关内容