无法加载nvidia驱动

(icylemon00) #1

TL;DR: bbswitch不要和任何版本的suse-prime一起用


modprobe nvidia -vv
modprobe: INFO: custom logging function 0x5627f17b91a0 registered
install PATH=$PATH:/bin:/usr/bin; if /sbin/modprobe --ignore-install nvidia; then   if /sbin/modprobe nvidia_uvm; then     if [ ! -c /dev/nvidia-uvm ]; then       mknod -m 660 /dev/nvidia-uvm c $(cat /proc/devices | while read major device; do if [ "$device" == "nvidia-uvm" ]; then echo $major; break; fi ; done) 0;        chown :video /dev/nvidia-uvm;     fi;   fi;   if [ ! -c /dev/nvidiactl ]; then     mknod -m 660 /dev/nvidiactl c 195 255;     chown :video /dev/nvidiactl;   fi;   devid=-1;   for dev in $(ls -d /sys/bus/pci/devices/*); do      vendorid=$(cat $dev/vendor);     if [ "$vendorid" == "0x10de" ]; then       class=$(cat $dev/class);       classid=${class%%00};       if [ "$classid" == "0x0300" -o "$classid" == "0x0302" ]; then          devid=$((devid+1));         if [ ! -c /dev/nvidia${devid} ]; then            mknod -m 660 /dev/nvidia${devid} c 195 ${devid};            chown :video /dev/nvidia${devid};         fi;       fi;     fi;   done;   /sbin/modprobe nvidia_drm;   if [ ! -c /dev/nvidia-modeset ]; then     mknod -m 660 /dev/nvidia-modeset c 195 254;     chown :video /dev/nvidia-modeset;   fi; fi  NVreg_DynamicPowerManagement=0x02 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=482 NVreg_DeviceFileMode=0660 
modprobe: INFO: custom logging function 0x561d852b61a0 registered
insmod /lib/modules/5.3.6-1-default/updates/nvidia.ko NVreg_DynamicPowerManagement=0x02 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=482 NVreg_DeviceFileMode=0660 
modprobe: INFO: Failed to insert module '/lib/modules/5.3.6-1-default/updates/nvidia.ko': No such device
modprobe: ERROR: could not insert 'nvidia': No such device
modprobe: INFO: context 0x561d86963440 released
modprobe: INFO: context 0x5627f2d586f0 released

dmesg | grep NVRM:

# dmesg | grep NVRM
[    6.620628] NVRM: This is a 64-bit BAR mapped above 4GB by the system
               NVRM: BIOS or the Linux kernel, but the PCI bridge
               NVRM: immediately upstream of this GPU does not define
               NVRM: a matching prefetchable memory window.
[    6.620629] NVRM: This may be due to a known Linux kernel bug.  Please
               NVRM: see the README section on 64-bit BARs for additional
               NVRM: information.
[    6.620652] NVRM: The NVIDIA probe routine failed for 1 device(s).
[    6.620653] NVRM: None of the NVIDIA devices were initialized.
[    7.162464] NVRM: This is a 64-bit BAR mapped above 4GB by the system
               NVRM: BIOS or the Linux kernel, but the PCI bridge
               NVRM: immediately upstream of this GPU does not define
               NVRM: a matching prefetchable memory window.
[    7.162465] NVRM: This may be due to a known Linux kernel bug.  Please
               NVRM: see the README section on 64-bit BARs for additional
               NVRM: information.
[    7.162478] NVRM: The NVIDIA probe routine failed for 1 device(s).
[    7.162479] NVRM: None of the NVIDIA devices were initialized.
[ 1118.945279] NVRM: This is a 64-bit BAR mapped above 4GB by the system
               NVRM: BIOS or the Linux kernel, but the PCI bridge
               NVRM: immediately upstream of this GPU does not define
               NVRM: a matching prefetchable memory window.
[ 1118.945279] NVRM: This may be due to a known Linux kernel bug.  Please
               NVRM: see the README section on 64-bit BARs for additional
               NVRM: information.
[ 1118.945289] NVRM: The NVIDIA probe routine failed for 1 device(s).
[ 1118.945290] NVRM: None of the NVIDIA devices were initialized.
[ 1532.890319] NVRM: This is a 64-bit BAR mapped above 4GB by the system
               NVRM: BIOS or the Linux kernel, but the PCI bridge
               NVRM: immediately upstream of this GPU does not define
               NVRM: a matching prefetchable memory window.
[ 1532.890320] NVRM: This may be due to a known Linux kernel bug.  Please
               NVRM: see the README section on 64-bit BARs for additional
               NVRM: information.
[ 1532.890338] NVRM: The NVIDIA probe routine failed for 1 device(s).
[ 1532.890338] NVRM: None of the NVIDIA devices were initialized.

dmesg | grep nvidia:

# dmesg | grep nvidia
[    5.837812] audit: type=1400 audit(1572059645.600:6): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe" pid=593 comm="apparmor_parser"
[    5.837813] audit: type=1400 audit(1572059645.600:7): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" pid=593 comm="apparmor_parser"
[    6.302809] nvidia: module license 'NVIDIA' taints kernel.
[    6.321638] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    6.332582] nvidia-nvlink: Nvlink Core is being initialized, major device number 240
[    6.620515] nvidia 0000:01:00.0: Refused to change power state, currently in D3
[    6.620636] nvidia: probe of 0000:01:00.0 failed with error -1
[    6.620815] nvidia-nvlink: Unregistered the Nvlink Core, major device number 240
[    7.035085] nvidia_modeset: Unknown symbol nvidia_register_module (err -2)
[    7.035128] nvidia_modeset: Unknown symbol nvidia_get_rm_ops (err -2)
[    7.035178] nvidia_modeset: Unknown symbol nvidia_unregister_module (err -2)
[    7.158457] nvidia-nvlink: Nvlink Core is being initialized, major device number 240
[    7.162468] nvidia: probe of 0000:01:00.0 failed with error -1
[    7.163679] nvidia-nvlink: Unregistered the Nvlink Core, major device number 240
[ 1118.945081] nvidia-nvlink: Nvlink Core is being initialized, major device number 239
[ 1118.945282] nvidia: probe of 0000:01:00.0 failed with error -1
[ 1118.945433] nvidia-nvlink: Unregistered the Nvlink Core, major device number 239
[ 1532.889944] nvidia-nvlink: Nvlink Core is being initialized, major device number 239
[ 1532.890323] nvidia: probe of 0000:01:00.0 failed with error -1
[ 1532.890614] nvidia-nvlink: Unregistered the Nvlink Core, major device number 239

如上,加载不了nvidia驱动。
系统是tw20191023,nvidia驱动是今天新装的

(gmg137) #2

胆真肥,用 tw 还敢折腾 nvidia

(icylemon00) #3

???
我之前在tw上用了三年NVIDIA驱动了
这次是重装之后出的问题

#4

换个版本安装,驱动版本和内核版本是不是不对应

(流浪猫) #5

关注 opensuse-factory 邮件列表,里面就有提及这个问题。Nvidia现在支持prime比较还了,我也转到这个驱动上了。

(icylemon00) #6

好了……问题解决
从dmesg里面grep了bbswitch的记录,发现bbswitch在启动很早期的阶段就会影响显卡的状态
独显被bbswitch关掉之后,modprobe就加载不了驱动了

bbswitch和suse-prime不能同时使用
bbswitch的状态总是关闭
尝试了suse-prime-bbswitch,仍然不行
最后卸载了bbswitch,一切正常了

(system) 于关闭 #7

本主题在最后一个回复创建后60分钟后自动锁定。不再允许添加新回复。