Ubuntu1804重启后nvidia显卡驱动没了

本来电脑好好的,显卡驱动有的,tensorflow之类的gpu版也有,开机后发现:

1.显示器分辨率小了很多(就是图标大了很多)

2.nvidia-smi发现没了显卡驱动

 

处理:

1.找适合的显卡驱动:

ubuntu-drivers devices

Ubuntu1804重启后nvidia显卡驱动没了_第1张图片

选nvidia驱动440下载,http://www.nvidia.cn/page/home.html

2.由于电脑本来就装好了驱动,所以一般的显卡驱动那些禁用自带驱动之类的就不用做了,直接给权限和安装驱动:

chmod 777  ./NVIDIA-Linux-x86_64-440.82.run

sudo ./NVIDIA-Linux-x86_64-440.82.run

安装过程中的选项:{

The distribution-provided pre-install script failed! Are you sure you want to continue? 选择 yes 继续。
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?  选择 No 继续。
问题没记住,选项是:install without signing
问题大概是:Nvidia's 32-bit compatibility libraries? 选择 No 继续。
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  继续
}

3.安装时候提示cc版本不对,apt-get install gcc 也提示是最新版本,因为原本的gcc是4.8,现在主要7.5,就软连接到7.5上:

rm /usr/bin/cc

ln -s /usr/bin/gcc-7 /usr/bin/cc

4.然后继续安装,再重启就行了

 

解决这个问题中查过的链接:

https://blog.csdn.net/zuo232100/article/details/87863069

https://blog.csdn.net/zuo232100/article/details/87863069

https://zhuanlan.zhihu.com/p/115755960

你可能感兴趣的:(Ubuntu1804重启后nvidia显卡驱动没了)