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