个人笔记Nvidia GPU驱动安装教程(A10)
1,官方下载驱动
下载好的驱动文件:NVIDIA-Linux-x86_64-525.105.17.run
2,屏蔽nouveau驱动
sudo vim /etc/modprobe.d/blacklist.conf最后一行添加以下几行语句,保存退出
blacklist nouveauoptions nouveau modeset=0更新文件
sudo update-initramfs -u重启
sudo reboot验证屏蔽是否成功
lsmod | grep nouveau # 没有信息显示,说明nouveau已被禁用3,安装驱动
命令行安装,退出ubunt图像化界面,改为命令行
修改驱动文件权限
sudo chmod a+x NVIDIA-Linux-x86_64-525.105.17.run执行安装
sudo ./NVIDIA-Linux-x86_64-xxx.run -no-x-check -no-nouveau-check -no-opengl-files # -no-x-check:安装驱动时关闭X服务# -no-nouveau-check:安装驱动时禁用nouveau# -no-opengl-files:只安装驱动文件,不安装OpenGL文件安装过程选项:
The distribution-provided pre-install script failed! Are you sure you want to continue?Continue installation Abort installation (选择 Cotinue)Would you like to register the kernel module sources with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later.Yes No (选 No)Install NVIDIA’s 32-bit compatibility libraries?Yes No (选 No)Installation of the kernel module for the NVIDIA Accelerated Graphics Driver for Linux-x86_64 (version 390.42) is now complete.OK检查驱动是否安装成功:
nvidia-smi4,驱动卸载
sudo apt-get --purge remove nvidia*sudo apt-get --purge remove "*nvidia*"sudo apt autoremovesudo apt-get --purge remove "*cublas*" "cuda*" # remove CUDA Toolkit