[toc]
一.禁用 Nouveau
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
sudo vim /etc/modprobe.d/blacklist-nouveau.conf
在文件最后加入以下内容:
blacklist nouveau
options nouveau modeset=0
更新使其生效
sudo update-initramfs -u
重启机器
reboot
检查是否禁用成功
lspci | grep nouveau
没有内容输出,说明禁用成功。
|
二.官网下载驱动
https://www.nvidia.cn/Download/index.aspx?lang=cn
选择自己系统对应的驱动,并点击 “搜索” 下载进行下载。
不推荐使用 sudo apt install nvidia-driver-440 方式安装。
1
2
3
4
5
|
进入终端模式,并且输入下面命令关闭显示管理:
sudo service lightdm stop
在命令行终端运行刚才下载的驱动:
sudo ./NVIDIA-Linux-x86_64-460.67.run --no-opengl-files
|
三.检查安装结果
重启机器后,输入 nvidia-smi
查看输出显示类似下面,就说明已经安装成功。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
$ nvidia-smi
Thu Aug 5 02:08:44 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.67 Driver Version: 460.67 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 RTX 3090 Off | 00000000:81:00.0 Off | N/A |
| 63% 41C P8 17W / 420W | 2MiB / 24268MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
$
|
四.开启持久模式
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
$ nvidia-smi -pm 1
$ nvidia-smi
Thu Aug 5 02:08:44 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.67 Driver Version: 460.67 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 RTX 3090 On | 00000000:81:00.0 Off | N/A |
| 63% 41C P8 17W / 420W | 2MiB / 24268MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
|