18.04ubuntu安装nvidia显卡

ubuntu安装nvidia显卡

一.先禁用 nouveau

 sudo gedit /etc/modprobe.d/blacklist-nouveau.conf或者
 sudo vi /etc/modprobe.d/blacklist-nouveau.conf

在文件最后加入:

blacklist nouveau

options nouveau modeset=0

二.写入并保存后,更新使禁用nouveau生效:

sudo update-initramfs -u

三.重启系统然后验证

lsmod | grep nouveau

没有信息显示,说明nouveau已被禁用,
四.接下来可以安装nvidia驱动。

官网 https://www.nvidia.com/Download/index.aspx?lang=en-us 下载显卡驱动
在这里插入图片下载描述
下载完之后在下载好的NVIDIA-Linux-x86_64-535.129.03.run 目录中打开终端执行以下命令

sudo chmod  a+x NVIDIA-Linux-x86_64-535.129.03.run
sudo sh NVIDIA-Linux-x86_64-535.129.03.run  -no-x-check -no-nouveau-check -no-opengl-files

按照NVIDIA 如下步骤安装

(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.
 然后这里也没什么事,直接继续就可以了
(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

参考https://blog.csdn.net/qq_40806289/article/details/82683034

https://blog.csdn.net/qq_37424778/article/details/123380322

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值