问题:Nvidia 驱动程序已安装,但nvidia-smi
命令失败。
命令输出dkms status
:
nvidia, 520.61.05: added
命令输出lsmod | grep nvidia
:
nvidiafb 61440 0
vgastate 20480 1 nvidiafb
fb_ddc 16384 1 nvidiafb
i2c_algo_bit 16384 2 nvidiafb,i915
命令输出nvidia-settings
:
ERROR: NVIDIA driver is not loaded
(nvidia-settings:8427): GLib-GObject-CRITICAL **: 15:16:13.799: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** (nvidia-settings:8427): CRITICAL **: 15:16:13.800: ctk_powermode_new: assertion '(ctrl_target != NULL) && (ctrl_target->h != NULL)' failed
ERROR: nvidia-settings could not find the registry key file or the X server is not accessible. This file should have been installed along with this driver at
/usr/share/nvidia/nvidia-application-profiles-key-documentation. The application profiles will continue to work, but values cannot be prepopulated or validated, and will not be listed in the help
text. Please see the README for possible values and descriptions.
发行版:Ubuntu 20.04
内核版本:5.19.0-051900-generic
显卡:Nvidia RTX 3050
使用以下命令安装驱动程序:sudo apt install nvidia-driver-520
命令输出dpkg -l | grep nvidia
:
ii libnvidia-cfg1-520:amd64 520.61.05-0ubuntu1 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-520 520.61.05-0ubuntu1 all Shared files used by the NVIDIA libraries
ii libnvidia-compute-520:amd64 520.61.05-0ubuntu1 amd64 NVIDIA libcompute package
ii libnvidia-compute-520:i386 520.61.05-0ubuntu1 i386 NVIDIA libcompute package
ii libnvidia-decode-520:amd64 520.61.05-0ubuntu1 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-520:i386 520.61.05-0ubuntu1 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-encode-520:amd64 520.61.05-0ubuntu1 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-520:i386 520.61.05-0ubuntu1 i386 NVENC Video Encoding runtime library
ii libnvidia-extra-520:amd64 520.61.05-0ubuntu1 amd64 Extra libraries for the NVIDIA driver
ii libnvidia-fbc1-520:amd64 520.61.05-0ubuntu1 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-fbc1-520:i386 520.61.05-0ubuntu1 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-520:amd64 520.61.05-0ubuntu1 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-gl-520:i386 520.61.05-0ubuntu1 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii nvidia-compute-utils-520 520.61.05-0ubuntu1 amd64 NVIDIA compute utilities
ii nvidia-dkms-520 520.61.05-0ubuntu1 amd64 NVIDIA DKMS package
ii nvidia-driver-520 520.61.05-0ubuntu1 amd64 NVIDIA driver metapackage
ii nvidia-kernel-common-520 520.61.05-0ubuntu1 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-520 520.61.05-0ubuntu1 amd64 NVIDIA kernel source package
ii nvidia-prime 0.8.16~0.20.04.2 all Tools to enable NVIDIA's Prime
ii nvidia-settings 520.61.05-0ubuntu1 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-utils-520 520.61.05-0ubuntu1 amd64 NVIDIA driver support binaries
ii screen-resolution-extra 0.18build1 all Extension for the nvidia-settings control panel
ii xserver-xorg-video-nvidia-520 520.61.05-0ubuntu1 amd64 NVIDIA binary Xorg driver
答案1
就我而言,重启有帮助。有时我不得不将驱动程序版本降级一个/几个版本。不幸的是,我找不到任何无需重启即可重新启动 GPU 的方法。目前,515
如果您不必完全依赖最新版本,请尝试使用驱动程序版本。Linux 在硬件电源管理方面反复出现问题,有些设备在启动、休眠、睡眠等后无法正常唤醒。例如,我的网卡也遇到了同样的问题,但在这种情况下,删除内核模块有所帮助。
另外你似乎在 ubuntu 20 上运行内核 5.19......我预计会出现不稳定的行为。