ubuntu 20.04 更新显卡驱动程序
最编程
2024-04-18 20:42:39
...
1. 问题描述
$ watch -n 1 nvidia-smi
画面不动
而且运行 pytorch 代码时出现问题:
UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 11070). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:108.)
return torch._C._cuda_getDeviceCount() > 0
2. 查看适合的显卡驱动
$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00002520sv00001558sd000050E2bc03sc00i00
vendor : NVIDIA Corporation
manual_install: True
driver : nvidia-driver-470 - distro non-free
driver : nvidia-driver-545-open - third-party non-free
driver : nvidia-driver-535 - distro non-free
driver : nvidia-driver-535-server - distro non-free
driver : nvidia-driver-550 - third-party non-free recommended
driver : nvidia-driver-535-open - distro non-free
driver : nvidia-driver-535-server-open - distro non-free
driver : nvidia-driver-470-server - distro non-free
driver : nvidia-driver-550-open - third-party non-free
driver : nvidia-driver-545 - third-party non-free
driver : xserver-xorg-video-nouveau - distro free builtin
安装 nvidia-driver-535
3. 显卡驱动下载
NVIDIA 显卡驱动官网 : https://www.nvidia.cn/geforce/drivers/
选择自己的显卡型号:
选择想要的版本下载:
安装过程参考:
Ubuntu20.04显卡驱动安装
4. 安装出现的问题
An NVIDIA kernel module ‘nvidia-drm‘
参考:
- 安装NVIDIA驱动出现: An NVIDIA kernel module ‘nvidia-drm‘
- 安装 NVIDIA 显卡驱动时报错:An NVIDIA kernel module ‘nvidia-drm‘ appears to already be load
5. 安装成功
$ watch -n 1 nvidia-smi
推荐阅读
-
(更新)双显卡 Ubuntu 18.04 GDM3 无法发现外接屏幕 解决方案
-
雷神 911Target(双显卡)双系统 Ubuntu 图形驱动程序和 CUDA 的安装
-
ubuntu 20.04 更新显卡驱动程序
-
Ubuntu 14.04 安装 A-Card HD7750 官方封闭源代码显卡驱动程序
-
如何更新 AMD 独立显卡的电脑驱动程序?安装官方驱动程序的方法在此!
-
Ubuntu 20.04 有线网络无法连接(安装有线网卡驱动程序)
-
Ubuntu 20.04 手动安装 Nvidia 驱动程序
-
Ubuntu 安装 Nvidia 显卡驱动程序
-
Sony Z13 系列笔记本更新为 NVIDIA 官方最新版显卡驱动程序