class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="2"> class="hljs-ln-code"> class="hljs-ln-line">options nouveau modeset=0 class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}" onclick="hljs.signin(event)">
3、输入以下命令使禁用生效然后重启
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="1"> class="hljs-ln-code"> class="hljs-ln-line">$ sudo update-initramfs -u
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="2"> class="hljs-ln-code"> class="hljs-ln-line">$ sudo reboot
class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}" onclick="hljs.signin(event)">
4、重启后验证
lsmod | grep nouveau
class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}" onclick="hljs.signin(event)">
如果回车后无反应,则禁用成功
2、安装显卡驱动
先完全卸载之前安装的显卡驱动:
ppa源文件卸载:
$ sudo apt-get remove --purge nvidia*
class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}" onclick="hljs.signin(event)">
runfile源文件卸载:
$ sudo ./NVIDIA-Linux-x86_64-384.59.run --uninstall
class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}" onclick="hljs.signin(event)">
现在介绍最简单的安装方法----ppa源驱动安装
查询电脑最适合的显卡驱动版本
ubuntu-drivers devices
class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}" onclick="hljs.signin(event)">
class="kdocs-line-container" style="display:flex;">
class="kdocs-img" style="flex-direction:column;max-width:100%;display:flex;width:772px;justify-content:center;align-items:center;height:auto;">
class="kdocs-img" style="padding-top:40.15544%;height:0;">
如图,我的电脑最佳显卡驱动版本为nvidia-driver-525
随后用命令行进行安装
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="1"> class="hljs-ln-code"> class="hljs-ln-line">$ sudo add-apt-repository ppa:graphics-drivers/ppa
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="2"> class="hljs-ln-code"> class="hljs-ln-line">$ sudo apt-get update
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="3"> class="hljs-ln-code"> class="hljs-ln-line">$ sudo apt-get install nvidia-driver-525 #此处数字要对应上面查询到的版本号
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="4"> class="hljs-ln-code"> class="hljs-ln-line">$ sudo apt-get install mesa-common-dev
class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}" onclick="hljs.signin(event)">
注意: 如果前面没有禁用secure boot,则在安装过程中会提示设置一个密码,在重启时需要输入密码验证以禁用secure boot,重启后会出现蓝屏,这时候不能直接选择continue,而应该按下按键,选择Enroll MOK, 确认后在下一个选项中选择continue,接着输入安装驱动时设置的密码,开机。
安装完成后重启
$ sudo reboot
class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}" onclick="hljs.signin(event)">
重启后在终端验证
$ nvidia-smi
class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}" onclick="hljs.signin(event)">
若出现GPU列表,则安装成功
>>
评论记录:
回复评论: