目录
报错 Unable to load the kernel module ‘nvidia.ko’
ubuntu安装显卡驱动
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo ubuntu-drivers autoinstall
报错 Unable to load the kernel module ‘nvidia.ko’
ERROR: Unable to load the kernel module ‘nvidia.ko’. This happens most frequently when this kernel module was built against the wrong or improperly configured kernel sources, with a version of gcc that differs from the one used to build the target kernel, or if a driver such as rivafb/nvidiafb is present and prevents the NVIDIA kernel module from obtaining ownership of the NVIDIA graphics device(s), or NVIDIA GPU installed in this system is not supported by this NVIDIA Linux graphics driver release.
使用以下步骤可修复上述错误。
1. 在这里下载最新版 的nVidia驱动;
2. 以管理员身份打开blacklist模块;
vim /etc/modprobe.d/blacklist.conf
添加以下部分并保存:
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
3. 删除所有之前所安装的nVidia驱动:
sudo apt-get --purge remove nvidia-*
4. 重启电脑;
5. 当弹出错误信息提示Ubuntu无法加载nVidia驱动时,选择进入终端选项;
6. 登陆并进入保存刚才所下载驱动的文件夹;
7. 安装驱动:
sudo sh NVIDIA-Linux-x86_64-195.36.24-pkg2.run