Ubuntu安裝nvidia顯卡驅動
1.安裝前安裝必要的依賴
sudo apt-get install build-essential
sudo apt-get install g++
sudo apt-get install make
2.到官網下載對應驅動
https://www.nvidia.cn/Download/index.aspx?lang=cn
3.卸載原有驅動
sudo apt-get remove --purge nvidia*
4.禁用nouveau
sudo gedit /etc/modprobe.d/blacklist.conf//在末尾添加
blacklist nouveau
options nouveau modeset=0sudo update-initramfs -u
sudo reboot
5.安裝驅動
sudo telinit 3
//進入放驅動的目錄
sudo chmod 777 .
sudo ./NVIDIA-Linux-xxx.run –no-opengl-files
1.The distribution-provided pre-install script failed! Are you sure you want to continue?
continue installation2.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?
No3.Nvidia's 32-bit compatibility libraries?
No4.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
6.安裝完畢
//回到圖形化
sudo service gdm3 start
//查看GPU信息
nvidia-smi