Ubuntu 16.04 nvidia-304 专有驱动程序通过 Nvidia ppa 安装并更新(适用于 GT 620)
该系统运行良好,已运行 6 个月,但最近出现故障(无法通过登录屏幕),nvidia-304 更新无法构建。任何有关如何修复此问题的建议都将不胜感激
apt purge nvidia* && apt install nvidia-304
.........
[output truncated for clarity]
Loading new nvidia-304-304.137 DKMS files...
First Installation: checking all kernels...
Building only for 4.15.0-24-generic
Building for architecture x86_64
Building initial module for 4.15.0-24-generic
Error! Bad return status for module build on kernel: 4.15.0-24-generic (x86_64)
Consult /var/lib/dkms/nvidia-304/304.137/build/make.log for more information.
Setting up nvidia-opencl-icd-304 (304.137-0ubuntu0~gpu16.04.1) ...
Setting up nvidia-settings (396.24-0ubuntu0~gpu16.04.1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for initramfs-tools (0.122ubuntu8.11) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-24-generic
tail -20 /var/crash/nvidia-304.0.crash
nvl->rc_timer.data = (unsigned long) nv;
^
cc1: some warnings being treated as errors
scripts/Makefile.build:332: recipe for target '/var/lib/dkms/nvidia-304/304.137/build/nv.o' failed
make[3]: *** [/var/lib/dkms/nvidia-304/304.137/build/nv.o] Error 1
Makefile:1552: recipe for target '_module_/var/lib/dkms/nvidia-304/304.137/build' failed
make[2]: *** [_module_/var/lib/dkms/nvidia-304/304.137/build] Error 2
NVIDIA: left KBUILD.
nvidia.ko failed to build!
Makefile:261: recipe for target 'module' failed
make[1]: *** [module] Error 1
makefile:59: recipe for target 'module' failed
make: *** [module] Error 2
DKMSKernelVersion: 4.15.0-24-generic
Date: Fri Jul 6 23:06:48 2018
DuplicateSignature: dkms:nvidia-304:304.137-0ubuntu0~gpu16.04.1:/var/lib/dkms/nvidia-304/304.137/build/nv.c:3032:5: error: implicit declaration of function ‘init_timer’ [-Werror=implicit-function-declaration]
Package: nvidia-304 304.137-0ubuntu0~gpu16.04.1
PackageVersion: 304.137-0ubuntu0~gpu16.04.1
SourcePackage: nvidia-graphics-drivers-304
Title: nvidia-304 304.137-0ubuntu0~gpu16.04.1: nvidia-304 kernel module failed to build
tail -20 /var/lib/dkms/nvidia-304/304.137/build/make.log
/var/lib/dkms/nvidia-304/304.137/build/nv.c:3032:5: error: implicit declaration of function ‘init_timer’ [-Werror=implicit-function-declaration]
init_timer(&nvl->rc_timer);
^
/var/lib/dkms/nvidia-304/304.137/build/nv.c:3033:28: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
nvl->rc_timer.function = nv_kern_rc_timer;
^
/var/lib/dkms/nvidia-304/304.137/build/nv.c:3034:18: error: ‘struct timer_list’ has no member named ‘data’
nvl->rc_timer.data = (unsigned long) nv;
^
cc1: some warnings being treated as errors
scripts/Makefile.build:332: recipe for target '/var/lib/dkms/nvidia-304/304.137/build/nv.o' failed
make[3]: *** [/var/lib/dkms/nvidia-304/304.137/build/nv.o] Error 1
Makefile:1552: recipe for target '_module_/var/lib/dkms/nvidia-304/304.137/build' failed
make[2]: *** [_module_/var/lib/dkms/nvidia-304/304.137/build] Error 2
NVIDIA: left KBUILD.
nvidia.ko failed to build!
Makefile:261: recipe for target 'module' failed
make[1]: *** [module] Error 1
makefile:59: recipe for target 'module' failed
make: *** [module] Error 2
答案1
从来没有找到答案,只是这是一个相当普遍的问题。清除 nvidia 驱动程序,以便重新使用开源 nouveau 驱动程序,系统就可以恢复运行
答案2
有类似的问题. 您需要为 Bionic 修补驱动程序。
事实证明该驱动程序被标记为 20.04 fossa 的 EOL。
对于 NV4x 和 G7x GPU,请使用
nvidia-304
(304.137) 生命周期结束版本!
因此,如果您拥有该系列的显卡,我也建议不要使用最新的 Linux。对我来说,最新的是内核 4.15,它随 Ubuntu Bionic Beaver 18.04 一起提供。如果您安装 18.04,默认内核是 5.4,因此必须降级。
以下资源对于进一步研究最有帮助:
https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-304/+bug/1737750
链接对我帮助很大
- https://adufray.com/blog/2018/06/02/nvidia-304-127-on-bionic
- https://www.if-not-true-then-false.com/2015/fedora-nvidia-guide/4/
创建我自己的修补二进制文件。如果您需要它而又不想了解太多细节 - 可以在这里找到 https://sites.google.com/view/tpanj/files/nvidia-legacy