ubuntu 显卡驱动

nouveau驱动给禁止。

ll /etc/modprobe.d/blacklist.conf
sudo vi /etc/modprobe.d/blacklist.conf

在文件末尾添加如下几行:(o是插入,esc是退出编辑模式,:qw是保存)

blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist rivatv
blacklist nvidiafb

sudo update-initramfs -u

重启系统确认nouveau是已经被屏蔽掉,使用lsmod命令查看:
lsmod | grep nouveau
注:如果没反映说明你成功了!

   45  sudo add-apt-repository ppa:graphics-drivers
   46  sudo apt-get update
   47  sudo apt-cache search nvidia
   48  ll
   49  sudo apt-get install nvidia-driver-450 nvidia-settings nvidia-prime
   50  nvidia-smi 
   51  reboot

cuda10.1 问题解决 gcc
sudo apt -y install gcc-8 g++-8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 8
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 8

sudo ./cuda_10.1.243_418.87.00_linux.run 


-   PATH includes /usr/local/cuda-10.1/bin
-   LD_LIBRARY_PATH includes /usr/local/cuda-10.1/lib64, or, add /usr/local/cuda-10.1/lib64 to /etc/ld.so.conf and run ldconfig as root