在自己的机器上装了个ubuntu,发现Nvidia的显卡驱动可以通过包管理器安装,非常的方便
首先输入
ubuntu-drivers devices
即可看到所有的待装驱动的设备,我这里只剩这个显卡了
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010xxxxxxxxxxxxDEsd000012A0bc03sc00i00
vendor : NVIDIA Corporation
model : xxxx [Quadro RTX xxxx]
driver : nvidia-driver-525-server - distro non-free
driver : nvidia-driver-515-open - distro non-free
driver : nvidia-driver-530 - third-party non-free
driver : nvidia-driver-470-server - distro non-free
driver : nvidia-driver-418-server - distro non-free
driver : nvidia-driver-510 - distro non-free
driver : nvidia-driver-515-server - distro non-free
driver : nvidia-driver-515 - distro non-free
driver : nvidia-driver-470 - distro non-free
driver : nvidia-driver-525-open - distro non-free recommended
driver : nvidia-driver-450-server - distro non-free
driver : nvidia-driver-525 - distro non-free
driver : xserver-xorg-video-nouveau - distro free builtin
可以看到中间的Nvidia-driver-*都是可以安装的驱动,其中还有一个在后面给你贴心的提示了**recommended**
接下来可以让他自行安装:
sudo ubuntu-drivers autoinstall
也可以手动安装。我安装了推荐的那个
sudo apt install nvidia-driver-525-open
最后需要重启一下再进行测试
nvidia-smi