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,结果居然一点问题都没有,编译成功。这种情况黑锅该谁来背?