NVIDIA笔记本显卡驱动安装问题

openSUSE Tumbleweed, 使用的驱动是这个repo里的: https://http.download.nvidia.com/opensuse/

安装时看Additional rpm output发现有问题:

Checking for file conflicts: .....................................................................................................................[done]
(1/4) Installing: nvidia-gfxG05-kmp-default-410.93_k4.19.11_1-7.1.x86_64 .........................................................................[done]
Additional rpm output:
depmod: ERROR: fstatat(5, nvidia-drm.ko): No such file or directory                                                                                     
depmod: ERROR: fstatat(5, nvidia-modeset.ko): No such file or directory                                                                                 
depmod: ERROR: fstatat(5, nvidia-uvm.ko): No such file or directory                                                                                     
depmod: ERROR: fstatat(5, nvidia.ko): No such file or directory                                                                                         
depmod: ERROR: fstatat(5, nvidia-drm.ko): No such file or directory                                                                                     
depmod: ERROR: fstatat(5, nvidia-modeset.ko): No such file or directory                                                                                 
depmod: ERROR: fstatat(5, nvidia-uvm.ko): No such file or directory                                                                                     
depmod: ERROR: fstatat(5, nvidia.ko): No such file or directory                                                                                         
/usr/src/kernel-modules/nvidia-410.93-default /                                                                                                         
rm -f -r conftest                                                                                                                                       
make[1]: Entering directory '/usr/src/linux-4.20.0-1'                                                                                                   
make[2]: Entering directory '/usr/src/linux-4.20.0-1-obj/x86_64/default'                                                                                
make[2]: Leaving directory '/usr/src/linux-4.20.0-1-obj/x86_64/default'                                                                                 
make[1]: Leaving directory '/usr/src/linux-4.20.0-1'                                                                                                    
/                                                                                                                                                       
make: *** /usr/src/linux-obj/x86_64/default: No such file or directory.  Stop.                                                                          
make: *** /usr/src/linux-obj/x86_64/default: No such file or directory.  Stop.                                                                          
/usr/src/kernel-modules/nvidia-410.93-default /                                                                                                         
make[1]: *** /lib/modules//source: No such file or directory.  Stop.                                                                                    
make: *** [Makefile:79: modules] Error 2                                                                                                                
/                                                                                                                                                       
install: cannot stat '/usr/src/kernel-modules/nvidia-410.93-default/nvidia*.ko': No such file or directory                                              

Modprobe blacklist files have been created at /etc/modprobe.d to prevent Nouveau from loading. This can be reverted by deleting /etc/modprobe.d/nvidia-*.conf.                                                                                                                                                  

*** Reboot your computer and verify that the NVIDIA graphics driver can be loaded. ***                                                                  

grep: /etc/sysconfig/kernel: No such file or directory                                                                                                  
Creating initrd: /boot/initrd-4.19.12-1-default                                                                                                         
dracut: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force /boot/initrd-4.19.12-1-default 4.19.12-1-default                       
dracut: dracut module 'plymouth' will not be installed, because it's in the list to be omitted!                                                         
dracut: *** Including module: bash ***                                                                                                                  
dracut: *** Including module: systemd *** 
................................

这里可以看出在编译的时候明显是有问题的,重启以后用prime-select确实查不出信息也无法切换显卡。

> sudo prime-select nvidia

ERROR: Unable to query GPU information

PCI BusID of NVIDIA card could not be detected!

出于好奇,我把nvidia-gfxG05-kmp-default-410.93_k4.19.11_1-7.1.x86_64.rpm解包了一下然后试着直接进去make,结果居然一点问题都没有,编译成功。这种情况黑锅该谁来背?

谁来背锅这个问题,我是当然不知道了。

另外注意,现在 Tumbleweed 的内核版本是 4.20,但是源提供的 nvidia 驱动版本是提供给 4.19 的,出错也就理所应当。

关于你进去编译,这个我不知道,看看有没有谁知道。不过你是如何安装上这个版本的 nvidia 驱动?强行安装?

个人觉得,用 Bumblebee 吧,看看官方提供的 wiki 文档,很容易就搞定了。

现在 Nvidia 官方打包的驱动尚未支持内核4.20,只能等或者 the hard way

fuck nvidia就完事了

1赞