在ubuntu18.04下nvidia driver的安装
安装方法简单来说就一步:
sudo ubuntu-drivers autoinstall
但是如果你要是想要知道自己细节可以继续看
ubuntu-drivers devices
你可能看到的结果是这样的
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001180sv00001458sd0000353Cbc03sc00i00
vendor : NVIDIA Corporation
model : GP106 [GeForce GTX 1060 6GB]
driver : nvidia-304 - distro non-free
driver : nvidia-340 - distro non-free
driver : nvidia-390 - distro non-free recommended
driver : xserver-xorg-video-nouveau - distro free builtin
== cpu-microcode.py ==
driver : intel-microcode - distro free
sudo ubuntu-drivers autoinstall
或者
sudo apt install nvidia-340
然后应该重启一下就好了,
需要先增加一个ppa
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
然后
ubuntu-drivers devices
这里会列出一些新的NVIDIA驱动
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001C03sv00001043sd000085ABbc03sc00i00
vendor : NVIDIA Corporation
model : GP106 [GeForce GTX 1060 6GB]
driver : nvidia-driver-390 - third-party free
driver : nvidia-driver-410 - third-party free recommended
driver : nvidia-driver-396 - third-party free
driver : xserver-xorg-video-nouveau - distro free builtin
安装最新的驱动
sudo apt install nvidia-410
nvidis-smi