ubuntu下 Nvidia显卡驱动错误的解决

在安装beryl 和 Nvidia 官方驱动的时候并没有清除原来的旧驱动,也可能是

This confuses nvidia-installer into thinking that your X server is very old and it installs the X modules in the wrong place. To work around this problem, use the following options:

# sh NVIDIA-Linux-version.run --x-module-path=`X -showDefaultModulePath 2>&1 | cut -d, -f1` --x-library-path=`X -showDefaultLibPath 2>&1`

总之,症状为每次重启电脑都需要重新编译 Nvidia 驱动才能进入 GDM(x win)。错误日志内容为:

Error: API mismatch: this NVIDIA driver component has version 100.14.11, but the NVIDIA kernel module's version does not match.Please make sure that the kernel module and all NVIDIA driver components have the same version.

我做了如下步骤(不是很清楚到底是那步起了作用还是都需要,你自己参考)

sudo apt-get remove nvidia-glx --purge

完全删除 nvidia-glx

删除 /etc/init.d/nvidia-glx 和 /etc/init.d/nvidia-kernel

修改 /etc/default/linux-restricted-modules-common 文件,加入

DISABLED_MODULES="nv nvidia_new"

我觉得很可能这步才是关键的!

倒霉的是我的声卡是 Conexant(nVidia Corporation MCP51 High Definition Audio),于是乎,声音没有啦...

可以参考此文,部分内容如下:
the nvidia-glx package has been uninstalled with the --purge option and the files /etc/init.d/nvidia-glx and /etc/init.d/nvidia-kernel do not exist

You need to delete the legacy driver within /lib/modules directory
once you delete those, then install the nvidia drivers, and you'll be ok.

If you use Ubuntu, please also ensure that the linux-restricted-modules or linux-restricted-modules-common packages have been uninstalled. Alternatively, you can edit the /etc/default/linux-restricted-modules or /etc/default/linux-restricted-modules-common configuration file and disable the NVIDIA linux-restricted kernel modules (nvidia, nvidia_legacy) via:

DISABLED_MODULES="nv nvidia_new"

Additionally, delete the following file if it exists:

rm -f /lib/linux-restricted-modules/.nvidia_new_installed

Please note: unfortunately, it has become difficult to keep track of the pre-/post-installation steps required for [K]Ubuntu, and the above instructions may be incomplete. If in doubt, it is recommended that you use your distributor's NVIDIA Linux graphics driver packages, exclusively.

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/eddf465be271b814347ba9d2d6f5a657.html