ubuntu安装Nvidia 驱动

  1. 查看一下显卡设备
ubuntu-drivers devices

== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001C03sv0000103Csd00008439bc03sc00i00
vendor   : NVIDIA Corporation
driver   : nvidia-410 - third-party free
driver   : nvidia-418 - third-party free
driver   : xserver-xorg-video-nouveau - distro free builtin
driver   : nvidia-430 - third-party free recommended
driver   : nvidia-415 - third-party free
driver   : nvidia-384 - distro non-free

2.添加源并更新

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update

3.安装并验证

#安装
sudo ubuntu-drivers autoinstall
#验证
nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.64       Driver Version: 430.64       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 106...  Off  | 00000000:01:00.0  On |                  N/A |
| 37%   34C    P8     5W / 120W |    485MiB /  6075MiB |     16%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1710      G   /usr/lib/xorg/Xorg                           303MiB |
|    0      3231      G   compiz                                       179MiB |
+-----------------------------------------------------------------------------+

posted @ 2022-04-26 13:31  tccxy  阅读(299)  评论(0编辑  收藏  举报