终端 ping 127.0.0.1 确认本地TCP/IP网络协议正常. 测试网卡和网卡驱动
ping 202.108.22.5 测试是否连通外网(百度IP)
ping www.baidu.com 测试DNS解析是否正常,这一步不正常的话在右上角网络管理中编辑网络连接,添加额外的DNS服务器地址8.8.8.8.断开网络重启,检查是否能够上网。
推荐读一下这个instruction (https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#handle-uninstallation)
2.7. Handle Conflicting Installation Methods Before installing CUDA, any previously installations that could conflict should be uninstalled. This will not affect systems which have not had CUDA installed previously, or systems where the installation method has been preserved (RPM/Deb vs. Runfile). See the following charts for specifics.
Use the following command to uninstall a Toolkit runfile installation: $ sudo /usr/local/cuda-X.Y/bin/uninstall_cuda_X.Y.pl Use the following command to uninstall a Driver runfile installation: $ sudo /usr/bin/nvidia-uninstall Use the following commands to uninstall a RPM/Deb installation:
$ sudo yum remove <package_name> # Redhat/CentOS $ sudo dnf remove <package_name> # Fedora $ sudo zypper remove <package_name> # OpenSUSE/SLES $ sudo apt-get --purge remove <package_name> # Ubuntulightdm stop 似乎是因为使用了集成显卡的原因,不使用这一句可能出严重错误。 (http://www.linuxidc.com/Linux/2017-01/139313.htm)
然后 Ctrl+Alt+F6/F7回到桌面, 应该已经安装好Nvidia驱动了。
Nvidia安装有用的测试指令:
nvidia-smi (NVIDIA System Management Interface program) 给出GPU相关信息
nvidia-settings 设置图形相关选项的GUI.
仍在tty1内,安装Nvidia驱动的另一组指令
sudo apt-get purge nvidia-* # 删除现有驱动 sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt-get update sudo apt-get install nvidia-375 # nvidia-后面的数字是版本号 sudo reboot # 重启后续的使用经历中,经常出现开机后系统卡在登录界面循环的情况,有可能是内核更新的问题,可以试一下卸载显卡驱动并重新安装一遍。
如果遇到The nouveau kernel driver is currently in use 导致安装过程中途报错退出,可以参照这个解决办法
# Remove the installed NVIDIA drivers: sudo apt-get purge "nvidia*" # Create a new file named /etc/modprobe.d/disable-nouveau.conf with the following lines: blacklist nouveau options nouveau modeset=0 # Update the boot environment for your kernel: sudo update-initramfs -u # Now reboot and you should get a low resolution GUI which indicates that Nouveau graphics driver is not being used.PPA源 NVIDIA驱动维护组主页: https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa 可以在此查阅长期支持的稳定版本号。
如果之前加过nomodeset,之后需要修改grub
sudo gedit /etc/default/grub # Delete 'nomodeset' in the file sudo update-grub不重新修改grub可能后续会出现意想不到的错误
如果是双系统,已经安装windows后想要修改开机默认启动系统仍然是Windows,在开机的紫色Grub引导界面记下windows是从0开始数的第几个条目,仍然通过修改grub文件实现:
sudo gedit /etc/default/grub # 修改以下内容,等待时间可以不用改 GRUB_DEFAULT=2 # 如果你的windows条目是引导菜单中的第3条,从0计数的第2条 GRUB_TIMEOUT=5 # 引导界面的等待时间 sudo update-grub/dev/sda是什么