Ubantu16.04安装显卡驱动遇到的坑

在Ubantu下安装显卡驱动,步骤相对较繁琐,但本文经过博主的亲身实践,非常有效

首先我们先要查看版本驱动:https://www.nvidia.com/Download/index.aspx?lang=en-us

1.下载Linux下的显卡驱动,保存到home文件夹下。

2. 卸载原有的驱动,对于第一次安装应该可以省略此步骤

#for case1: original driver installed by apt-get:
sudo apt-get remove --purge nvidia*
 
#for case2: original driver installed by runfile:
sudo chmod +x *.run
sudo ./NVIDIA-Linux-x86_64-xxx.xx.run --uninstall
3.禁用nouveau

sudo gedit /etc/modprobe.d/blacklist.conf

在文件的最后一行添加 : blacklist nouveau

之后执行命令:  sudo update-initramfs -u

重启后执行 :lsmod | grep nouveau #没有输出,即说明安装成功

即:

 

4.安装驱动:

(1)进入tty模式:Ctrl+Alt+F1 输入用户名和密码登录即可。

(2)给驱动run文件赋予执行权限(若出现[sudo] 计算机名 ◆ ◆ ◆ ◆,这是因为安装了中文的ubuntu,输入登录密码即可)

由于run文件放在了home文件夹下,故

cd ./ 注意空格

sudo chmod a+x NVIDIA-Linux-x86_64-xxx.xx.run

(3)安装:cd ./
sudo sh ./NVIDIA-Linux-x86_64-410.78.run -no-x-check -no-nouveau-check -no-opengl-files
//只有禁用opengl这样安装才不会出现循环登陆的问题
-no-x-check:安装驱动时关闭X服务
-no-nouveau-check:安装驱动时禁用nouveau
-no-opengl-files:只安装驱动文件,不安装OpenGL文件

(4)安装过程中的一些选项:The distribution-provided pre-install script failed! Are you sure you want to continue?
选择 yes 继续。
Would you like to register the kernel module souces with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later?
选择 No 继续。
问题没记住,选项是:install without signing
问题大概是:Nvidia’s 32-bit compatibility libraries? 选择 No 继续。
Would you like to run the nvidia-xconfigutility to automatically update your x configuration so that the NVIDIA x driver will be used when you restart x? Any pre-existing x confile will be backed up.
选择 Yes 继续。这些问题并不是每个人都能碰到,碰到某个,按上面的提示做即可。

4.检查驱动是否安装成功

modprobe nvidia    挂载驱动
nvidia-smi     检查驱动是否安装成功
如果出现如下提示,则说明安装成功:

5.重启机器即可 reboot

本文借鉴了两篇博主的文章,有兴趣的可以查看

https://blog.csdn.net/weixin_42546496/article/details/88640174

https://blog.csdn.net/ghw15221836342/article/details/79571559

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要在Ubuntu 16.04安装Qt,您可以按照以下步骤操作: 1. 首先,将Qt的安装程序文件“qt-creator-opensource-linux-x86_64-4.0.2.run”复制到您的Ubuntu 16.04系统。 2. 解决在Ubuntu 16.04安装网易云音乐的问题,您可以获取Ubuntu 16.04下的网易云音乐软件压缩包,以便在安装过程遇到问题时进行使用。 3. 修改配置文件,将其的路径替换为您刚刚安装的Qt的路径。您可以使用以下命令打开配置文件:vim /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf 这样,您就可以在Ubuntu 16.04上成功安装Qt了。请确保按照上述步骤进行操作,并根据需要进行其他设置和配置。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [ubuntu16.04安装QT、QT Creator](https://blog.csdn.net/qq_24835087/article/details/104378917)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [网易云 Linux Ubantu16.04](https://download.csdn.net/download/m0_46444097/12353841)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值