赞
踩
1.系统:Ubuntu 22.04.3 LTS(64-bit)
2.问题:昨天还能正常使用,可查看显卡版本。今天就提示版本不匹配,怀疑是昨天装了cuda?但是cuda应该不会影响显卡驱动。
于是,查看了驱动版本dpkg -l | grep nvidia
- (base) fzx@fzx-System-Product-Name:~$ dpkg -l | grep nvidia
- ii libnvidia-cfg1-530:amd64 530.30.02-0ubuntu1 amd64 NVIDIA binary OpenGL/GLX configuration library
- ii libnvidia-common-530 530.30.02-0ubuntu1 all Shared files used by the NVIDIA libraries
- ii libnvidia-compute-530:amd64 530.30.02-0ubuntu1 amd64 NVIDIA libcompute package
- ii libnvidia-compute-530:i386 530.30.02-0ubuntu1 i386 NVIDIA libcompute package
- rc libnvidia-compute-535:amd64 535.113.01-0ubuntu0.22.04.3 amd64 NVIDIA libcompute package
- ii libnvidia-decode-530:amd64 530.30.02-0ubuntu1 amd64 NVIDIA Video Decoding runtime libraries
- ii libnvidia-decode-530:i386 530.30.02-0ubuntu1 i386 NVIDIA Video Decoding runtime libraries
- ii libnvidia-encode-530:amd64 530.30.02-0ubuntu1 amd64 NVENC Video Encoding runtime library
- ii libnvidia-encode-530:i386 530.30.02-0ubuntu1 i386 NVENC Video Encoding runtime library
- ii libnvidia-extra-530:amd64 530.30.02-0ubuntu1 amd64 Extra libraries for the NVIDIA driver
- ii libnvidia-fbc1-530:amd64 530.30.02-0ubuntu1 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
- ii libnvidia-fbc1-530:i386 530.30.02-0ubuntu1 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
- ii libnvidia-gl-530:amd64 530.30.02-0ubuntu1 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
- ii libnvidia-gl-530:i386 530.30.02-0ubuntu1 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
- rc linux-modules-nvidia-535-6.2.0-26-generic 6.2.0-26.26~22.04.1+2 amd64 Linux kernel nvidia modules for version 6.2.0-26
- rc linux-modules-nvidia-535-6.2.0-35-generic 6.2.0-35.35~22.04.1 amd64 Linux kernel nvidia modules for version 6.2.0-35
- ii linux-objects-nvidia-535-6.2.0-26-generic 6.2.0-26.26~22.04.1+2 amd64 Linux kernel nvidia modules for version 6.2.0-26 (objects)
- ii linux-objects-nvidia-535-6.2.0-35-generic 6.2.0-35.35~22.04.1 amd64 Linux kernel nvidia modules for version 6.2.0-35 (objects)
- ii linux-signatures-nvidia-6.2.0-26-generic 6.2.0-26.26~22.04.1+2 amd64 Linux kernel signatures for nvidia modules for version 6.2.0-26-generic
- ii linux-signatures-nvidia-6.2.0-35-generic 6.2.0-35.35~22.04.1 amd64 Linux kernel signatures for nvidia modules for version 6.2.0-35-generic
- ii nvidia-compute-utils-530 530.30.02-0ubuntu1 amd64 NVIDIA compute utilities
- rc nvidia-compute-utils-535 535.113.01-0ubuntu0.22.04.3 amd64 NVIDIA compute utilities
- ii nvidia-dkms-530 530.30.02-0ubuntu1 amd64 NVIDIA DKMS package
- ii nvidia-driver-530 530.30.02-0ubuntu1 amd64 NVIDIA driver metapackage
- ii nvidia-firmware-535-535.113.01 535.113.01-0ubuntu0.22.04.3 amd64 Firmware files used by the kernel module
- ii nvidia-firmware-535-535.86.05 535.86.05-0ubuntu0.22.04.1 amd64 Firmware files used by the kernel module
- ii nvidia-kernel-common-530 530.30.02-0ubuntu1 amd64 Shared files used with the kernel module
- rc nvidia-kernel-common-535 535.113.01-0ubuntu0.22.04.3 amd64 Shared files used with the kernel module
- ii nvidia-kernel-source-530 530.30.02-0ubuntu1 amd64 NVIDIA kernel source package
- ii nvidia-modprobe 530.30.02-0ubuntu1 amd64 Load the NVIDIA kernel driver and create device files
- ii nvidia-prime 0.8.17.1 all Tools to enable NVIDIA's Prime
- ii nvidia-settings 530.30.02-0ubuntu1 amd64 Tool for configuring the NVIDIA graphics driver
- ii nvidia-utils-530 530.30.02-0ubuntu1 amd64 NVIDIA driver support binaries
- ii screen-resolution-extra 0.18.2 all Extension for the nvidia-settings control panel
- ii xserver-xorg-video-nvidia-530 530.30.02-0ubuntu1 amd64 NVIDIA binary Xorg driver
可以看出驱动版本是530.30.02
内核版本是 535.113.01
- (base) fzx@fzx-System-Product-Name:~$ cat /proc/driver/nvidia/version
- NVRM version: NVIDIA UNIX x86_64 Kernel Module 535.113.01 Tue Sep 12 19:41:24 UTC 2023
- GCC version:
查看系统驱动日志,确实有更新
- (base) fzx@fzx-System-Product-Name:~$ cat /var/log/dpkg.log | grep nvidia
- 2023-10-22 01:20:29 install nvidia-prime:all <none> 0.8.17.1
- 2023-10-22 01:20:29 status half-installed nvidia-prime:all 0.8.17.1
- 2023-10-22 01:20:29 status unpacked nvidia-prime:all 0.8.17.1
- 2023-10-22 01:20:29 configure nvidia-prime:all 0.8.17.1 <none>
- 2023-10-22 01:20:29 status unpacked nvidia-prime:all 0.8.17.1
- 2023-10-22 01:20:29 status half-configured nvidia-prime:all 0.8.17.1
- 2023-10-22 01:20:29 status installed nvidia-prime:all 0.8.17.1
- 2023-10-22 18:04:57 status installed nvidia-driver-535:amd64 535.113.01-0ubuntu0.22.04.3
- 2023-10-22 18:04:57 remove nvidia-driver-535:amd64 535.113.01-0ubuntu0.22.04.3 <none>
- 2023-10-22 18:04:57 status half-configured nvidia-driver-535:amd64 535.113.01-0ubuntu0.22.04.3
- 2023-10-22 18:04:57 status half-installed nvidia-driver-535:amd64 535.113.01-0ubuntu0.22.04.3
- 2023-10-22 18:04:57 status config-files nvidia-driver-535:amd64 535.113.01-0ubuntu0.22.04.3
- 2023-10-22 18:04:57 status not-installed nvidia-driver-535:amd64 <none>
- 2023-10-22 18:04:57 status installed xserver-xorg-video-nvidia-535:amd64 535.113.01-0ubuntu0.22.04.3
- 2023-10-22 18:04:57 remove xserver-xorg-video-nvidia-535:amd64 535.113.01-0ubuntu0.22.04.3 <none>
- 2023-10-22 18:04:57 status half-configured xserver-xorg-video-nvidia-535:amd64 535.113.01-0ubuntu0.22.04.3
- 2023-10-22 18:04:57 status half-installed xserver-xorg-video-nvidia-535:amd64 535.113.01-0ubuntu0.22.04.3
- 2023-10-22 18:04:57 status config-files xserver-xorg-video-nvidia-535:amd64 535.113.01-0ubuntu0.22.04.3
3.原因:内核驱动更新导致的版本不一致
4.解决方案:
卸载驱动,重新安装
(1)卸载命令,全部粘贴,执行,一直输入y,直到执行完毕。
- sudo /usr/bin/nvidia-uninstall
- sudo apt-get --purge remove nvidia-*
- sudo apt-get purge nvidia*
- sudo apt-get purge libnvidia*
(2)查看显卡还剩余的驱动,sudo dpkg --list | grep nvidia-* 或者dpkg -l | grep nvidia,按当前版本重新安装
- (base) fzx@fzx-System-Product-Name:/$ sudo dpkg --list | grep nvidia-*
- ii libnvidia-compute-530:i386 530.30.02-0ubuntu1 i386 NVIDIA libcompute package
- ii libnvidia-decode-530:i386 530.30.02-0ubuntu1 i386 NVIDIA Video Decoding runtime libraries
- ii libnvidia-encode-530:i386 530.30.02-0ubuntu1 i386 NVENC Video Encoding runtime library
- ii libnvidia-fbc1-530:i386 530.30.02-0ubuntu1 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
- rc linux-modules-nvidia-535-6.2.0-26-generic 6.2.0-26.26~22.04.1+2 amd64 Linux kernel nvidia modules for version 6.2.0-26
- rc linux-modules-nvidia-535-6.2.0-35-generic 6.2.0-35.35~22.04.1 amd64 Linux kernel nvidia modules for version 6.2.0-35
- ii linux-objects-nvidia-535-6.2.0-26-generic 6.2.0-26.26~22.04.1+2 amd64 Linux kernel nvidia modules for version 6.2.0-26 (objects)
- ii linux-objects-nvidia-535-6.2.0-35-generic 6.2.0-35.35~22.04.1 amd64 Linux kernel nvidia modules for version 6.2.0-35 (objects)
- ii linux-signatures-nvidia-6.2.0-26-generic 6.2.0-26.26~22.04.1+2 amd64 Linux kernel signatures for nvidia modules for version 6.2.0-26-generic
- ii linux-signatures-nvidia-6.2.0-35-generic 6.2.0-35.35~22.04.1 amd64 Linux kernel signatures for nvidia modules for version 6.2.0-35-generic
- ii screen-resolution-extra 0.18.2 all Extension for the nvidia-settings control panel
(3)驱动下载链接:旧版下载地址:https://www.nvidia.cn/Download/Find.aspx?lang=cn
选择对应版本下载
(4)安装新驱动
bash NVIDIA-Linux-x86_64-530.30.02.run
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。