码迷,mamicode.com
首页 > 系统相关 > 详细

记录ubuntu安装nvidia-drivers简单的做法

时间:2020-09-17 22:23:44      阅读:64      评论:0      收藏:0      [点我收藏+]

标签:proc   --   vendor   ati   run   过程   rem   osi   graphics   

开始安装
添加PPA,过程中回车确认询问的信息

sudo add-apt-repository ppa:graphics-drivers/ppa
依次执行以下命令更新下载源

sudo apt update
检查可用驱动

ubuntu-drivers devices
根据下列结果,可见 nvidia-driver-430 为推荐驱动安装版本

== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001C07sv00001462sd00008C99bc03sc02i00
vendor : NVIDIA Corporation
model : GP106 [P106-100]
driver : nvidia-driver-415 - third-party free
driver : nvidia-driver-430 - third-party free recommended
driver : nvidia-driver-410 - third-party free
driver : nvidia-driver-390 - distro non-free
driver : nvidia-driver-396 - third-party free
driver : nvidia-driver-418 - third-party free
driver : xserver-xorg-video-nouveau - distro free builtin
直接安装最新驱动,安装完成后重启电脑

sudo apt install nvidia-driver-430
重启后用命令 nvidia-smi 检查显卡是否被正常识别:显卡P106-100,显存6G,驱动430.26,CUDA10.2

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.26 Driver Version: 430.26 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|=++==============|
| 0 P106-100 Off | 00000000:01:00.0 Off | N/A |
| 39% 40C P0 27W / 120W | 0MiB / 6080MiB | 4% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
错误处理
如果安装 nvidia-driver-410 或以上版本提示 packages 无法安装,请执行以下步骤:

移除已添加的 PPA

sudo apt-add-repository -r ppa:graphics-drivers/ppa
更新 apt

sudo apt update
移除 NVIDIA 显卡驱动文件

sudo apt remove nvidia*
执行自动清理

sudo apt autoremove
然后重新回到本文初步骤重新安装

记录ubuntu安装nvidia-drivers简单的做法

标签:proc   --   vendor   ati   run   过程   rem   osi   graphics   

原文地址:https://www.cnblogs.com/superfly123/p/13654618.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!