nvidia驱动与linux最新内核不兼容的解决办法

前几天更新了一下Ubuntu的最新Linux内核,我发现原先的显卡驱动又不能正常工作了。其实这都已经习惯了,因为使用nVidia官方的驱动后更新内核总是要重装的。不过这一次重装以后,却没有出现熟悉的nVidia大Logo,而是以下的错误。

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.


最开始的时候以为是官方驱动的兼容性不够好,就试着安装了Ubuntu自带的闭源驱动,但結果依旧不行,而且查看log发现显示的是找不到显卡硬件。上网Google了一阵,原来是最新的内核启用了nouveau模块,造成了显卡驱动的不兼容。

知道原因,解决方法就容易找到了。需要做的就是先禁用掉内核自带的显卡模块,然后重启安装官方驱动即可,具体方法如下:

  1. 到官方网站下载对应的驱动。
  2. 以管理员权限打开/etc/modprobe.d/blacklist.conf,增加如下几行

    blacklist vga16fb
    blacklist nouveau
    blacklist rivafb
    blacklist nvidiafb
    blacklist rivatv

  3. 保存退出后删除原有驱动

    sudo apt-get –purge remove nvidia-*

  4. 重启后停止GDM再安装驱动即可

    sudo /etc/init.d/gdm stop

    sudo sh NVIDIA-LINUX*.run

    sudo /etc/init.d/gdm start

然后,好好感受新内核下的Ubuntu吧。
其实对于我来说,用新内核所带来的提升是体会不到的,倒是以前的Compiz配置全没了
参考:
http://ubuntuforums.org/showthread.php?t=1467074

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: