Alienware15 在Ubuntu18.04上安装Nvidia最新显卡驱动

简介

今天突然想起来,为自己的Alien笔记本装下驱动。后面开始使用笔记本进行部分点云处理,台式机还是抱着不舒服。
废话不多说。目前安装就遇到两个坑。一个是关闭Nouveau,另外一个是关于32位相关库的错误提示。现记录一下解决方案。

驱动安装方式

方式一 :使用PPA仓库自动安装,步骤如下。

Step 1: 添加ppa:graphics-drivers/ppa 仓库到你的系统

$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo apt update

Step2: 识别和获取你的NVIDIA推荐驱动

$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd000013D9sv00001028sd00000685bc03sc02i00
vendor   : NVIDIA Corporation
model    : GM204M [GeForce GTX 965M]
manual_install: True
driver   : nvidia-driver-415 - third-party free
driver   : nvidia-driver-390 - distro non-free
driver   : nvidia-driver-396 - third-party free
driver   : nvidia-driver-410 - third-party free
driver   : nvidia-driver-418 - third-party free
driver   : nvidia-driver-430 - third-party free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

Step3: 自动安装相关依赖

$ sudo ubuntu-drivers autoinstall

Step4: 根据推荐安装对应驱动

$ sudo apt-get install nvidia-driver-430

Step5: Reboot

$ sudo reboot

方式二:手动安装

Step1: 获取你的电脑驱动型号

$  lshw -numeric -C display
或者
$ lspci -vnn | grep VGA

Step2: 去官网下载对应驱动

如下图:
选择自己对应的显卡类型
点击search即可

Step3: 安装

$ sudo ./NVIDIA-Linux-x86_64-430.34.run

你可能遇到的坑

1 系统默认使用Nouveau,这个东西默认安装于各个系统,虽然比不上NVIDIA的驱动,但可以让具有独立显卡的机器有不错的效果,厂商默认会安装。

ERROR: The Nouveau kernel driver is currently in use by your system.  This driver is incompatible with the NVIDIA driver, and must be disabled before proceeding.  Please consult the NVIDIA driver README and  
         your Linux distribution's documentation for details on how to correctly disable the Nouveau kernel driver.

解决方案如下:

Step1: 关闭Nouveau
$ sudo vim /etc/modprobe.d/blacklist.conf
在文件末尾添加下面两句:
blacklist nouveau
options nouveau modeset=0
Step2: 更新配置重启即可
$ sudo update-initramfs -u
$ sudo reboot

问题2:这个可能在手动安装过程中会出现,可以忽略,但若安装驱动用于一些游戏平台必须安装,解决方案如下。

WARNING: Unable to find suitable destination to install 32-bit compatibility libraries

Step 1:

$ sudo dpkg --add-architecture i386
$ sudo apt update
$ sudo apt install libc6:i386

Step2: 再装一次即可

$ sudo ./NVIDIA-Linux-x86_64-430.34.run

后记

不知不觉,已然进入CSDN5年了,有点惭愧,写的东西比较少,最近考试终于考完了,我也想沉下心多做一些研究,多输出一些优质文章,和大家一起分享,一起进步。
有什么问题欢迎联系,有趣的灵魂总会相遇。
[1]: https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-18-04-bionic-beaver-linux

猜你喜欢

转载自blog.csdn.net/ckkboy/article/details/97000276
今日推荐