我破坏了 X,可能是因为安装了专有的 NVIDIA 驱动程序。我怎样才能恢复我的 X 服务器?

Jon*_*han 6 nvidia xorg

当我启动我的电脑时,我得到一个文本登录——它甚至没有加载 lightdm。Dmesg 给了我这个:

[   42.367035] NVRM: API mismatch: the client has the version 304.43, but
[   42.367038] NVRM: this kernel module has the version 310.14.  Please
[   42.367040] NVRM: make sure that this kernel module and all NVIDIA driver
[   42.367041] NVRM: components have the same version.
[   42.619472] init: lightdm main process (1235) terminated with status 1
[   48.041960] vboxdrv: Found 1 processor cores.
[   48.044418] vboxdrv: TSC mode is 'synchronous', kernel timer mode is 'normal'.
[   48.044422] vboxdrv: Successfully loaded version 4.1.12_Ubuntu (interface 0x00190000).
[   48.459287] vboxpci: IOMMU not found (not registered)
[   50.544026] wlan0: no IPv6 routers present
[   52.729171] init: Failed to spawn vsftpd main process: unable to execute: No such file or directory
[   58.435781] init: plymouth-stop pre-start process (2306) terminated with status 1
[   59.169528] init: failsafe-x main process (1429) terminated with status 1
Run Code Online (Sandbox Code Playgroud)

我不知道这有多少相关性。我认为这个问题是在我尝试安装新的专有 NVIDIA 驱动程序时开始的。

我怎样才能找回X?我会使用 Additional Drivers 程序安装较旧的驱动程序,但我无法启动任何版本的 X。

小智 3

我也有同样的问题。这是由于 310 版本的 nvidia 驱动程序安装失败引起的。我用它修复了

apt-get remove nvidia-experimental-310
Run Code Online (Sandbox Code Playgroud)

之后我就可以启动X了。


MiJ*_*Jyn 3

重要的!在尝试之前请阅读整篇文章!

CTRL+ ALT+转至终端F3。登录并输入以下命令:

sudo apt-get purge nvidia-*
Run Code Online (Sandbox Code Playgroud)

这将删除专有驱动程序。完成后,备份您的 Xorg.conf,如下所示:

sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak~
Run Code Online (Sandbox Code Playgroud)

然后运行这个:

sudo update-initramfs -u
Run Code Online (Sandbox Code Playgroud)

这会更新 RAMFS,这似乎有帮助(虽然忘记了原因,抱歉)。然后使用以下命令重新启动:

sudo reboot
Run Code Online (Sandbox Code Playgroud)