Ubuntu18.04安装NAVIDIA驱动

Ubuntu18.04安装NAVIDIA驱动

一.下载GPU显卡驱动

1.linux服务器上查看显卡(nvidia)型号和下载,

NAVIDIA驱动

服务器查看显卡型号版本:

lspci | grep -i nvidia 

如:

2.在http://pci-ids.ucw.cz/mods/PC/10de?action=help?help=pci 的网址输入2206

二.安装准备

2.1.打开终端,先删除旧的驱动

sudo apt-get purge nvidia*

2.2.禁用自带的 nouveau nvidia驱动

创建一个文件通过命令 :sudo vim /etc/modprobe.d/blacklist-nouveau.conf

并添加如下内容:

blacklist nouveau
options nouveau modeset=0

再更新一下 :

sudo update-initramfs -u

修改后需要重启系统。

确认下Nouveau是已经被禁用

lsmod | grep nouveau

没有输出什么东西,说明已经成功关闭了 !

2.2.关闭X-window服务

重启系统至文本模式,也可先进入图形桌面再进入文本模式,再安装下载的驱动就无问题。首先我们需要结束x-window的服务,否则驱动将无法正常安装;关闭X-Window。

sudo service lightdm stop

然后切换到tty1控制台:使用Ctrl+Alt+F1即可。

2.3.安装依赖库

sudo apt install make
sudo apt install gcc

三.安装

需要以管理员身份运行下载的文件。如果选择从官网下载驱动,这里的文件名需要根据下载的文件进行改变。

sudo bash NVIDA-Linux-x86_64-460.56.run

按照如下步骤安装

(1)Accept

(2)contiuned install

(3) Unable to find a suitable destination to install 32-bit compatibility libraries. Your system may not be set up for 32-bit compatibility. 32-bit compatibility files will not be installed; if you wish to install them, re-run the installation and set a valid directory with the --compat32-libdir option.

然后这里也没什么事,直接继续就可以了,想要解决的话,也可以尝试一下安装下面的东西(没试过)

sudo optitude install ia32-libs

(4)would you like to run the nvidia-xconfig utility to automatically update your X configuration file so that the NVIDIA X driver will be used when you restart X ? Any pre-existing X configuration file will be backed up

直接选择 NO,意思是安装驱动时不检查X服务

(5) Installation of the NVIDIA Accelerated Graphics Driver for Linux-x86_64(version:390.25) is now complete.  Please update your XF86Config or xorg.conf file as appropriate;see the file

/usr/share/doc/NVIDIA_GLX-1.0/README.txt for details.

只有一个选项,选择Ok就行了。

然后键入重启

sudo reboot

四.检查

nvidia-smi 
nvidia-settings --help

显示东西说明安装成功了

posted @ 2021-06-24 10:03  憨憨青年  阅读(196)  评论(0编辑  收藏  举报
// 侧边栏目录 // https://blog-static.cnblogs.com/files/douzujun/marvin.nav.my1502.css