Ubuntu 18.04安裝N卡驅動

感謝地心引力 2022-01-08 06:02:29 阅读数:72

ubuntu

1.原來,是英特爾的集顯
在這裏插入圖片描述
2.添加N卡驅動

  1. 檢查是否有GPU顯卡,我電腦一張集顯,一張獨顯,很清楚。如果不清楚的可以用 lspci | grep -i nvidia查看:
[email protected]:~$ lspci | grep -i nvidia
01:00.0 VGA compatible controller: NVIDIA Corporation GP106M [GeForce GTX 1060 Mobile] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GP106 High Definition Audio Controller (rev a1)
[email protected]:~$
  1. 檢測推薦的驅動ubuntu-drivers devices
[email protected]:~$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0 ==
modalias : pci:v00008086d000024FDsv00008086sd00009010bc02sc80i00
vendor : Intel Corporation
model : Wireless 8265 / 8275
manual_install: True
driver : backport-iwlwifi-dkms - distro free
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001C20sv00001D72sd00001706bc03sc00i00
vendor : NVIDIA Corporation
model : GP106M [GeForce GTX 1060 Mobile]
driver : nvidia-driver-460 - distro non-free
driver : nvidia-driver-390 - distro non-free
driver : nvidia-driver-450-server - distro non-free
driver : nvidia-driver-460-server - distro non-free recommended
driver : nvidia-driver-418-server - distro non-free
driver : nvidia-driver-450 - distro non-free
driver : xserver-xorg-video-nouveau - distro free builtin
  1. 安裝驅動
    (1)自動安裝合適的版本

sudo ubuntu-drivers autoinstall

(2) 安裝指定版本
如:

sudo apt-get install nvidia-driver-390

  1. 重啟
    安裝成功

在這裏插入圖片描述
查看詳細信息:

[email protected]:~$ nvidia-smi
Fri May 14 11:24:15 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.73.01 Driver Version: 460.73.01 CUDA Version: 11.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 GeForce GTX 1060 Off | 00000000:01:00.0 Off | N/A |
| N/A 46C P3 17W / N/A | 241MiB / 6078MiB | 1% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 2181 G /usr/lib/xorg/Xorg 120MiB |
| 0 N/A N/A 3032 G /usr/bin/gnome-shell 47MiB |
| 0 N/A N/A 3895 G ...AAAAAAAAA= --shared-files 68MiB |
+-----------------------------------------------------------------------------+
版权声明:本文为[感謝地心引力]所创,转载请带上原文链接,感谢。 https://gsmany.com/2022/01/202201080602289907.html