Ubuntu 15.10 | Xserver 无法启动 | 使用 NVIDIA 驱动程序后系统以低图形模式运行 | 重写 xorg.conf

Ubuntu 15.10 | Xserver 无法启动 | 使用 NVIDIA 驱动程序后系统以低图形模式运行 | 重写 xorg.conf

我对 Linux 的调试还比较陌生,

我确实知道这可能只是另一次重复,但一个月以来我已经尝试了几乎所有可能的解决方案,因此又出现了新的问题。

我有华硕 Q550LF,配备 Windows 10 和 Ubuntu 15.10 双启动,集成英特尔高清显卡和 Nvidia Geforce [GT 745M] 2GB 独立显卡。

这一切始于我尝试从其网站安装 nvidia 驱动程序并卸载 nouveau 驱动程序时。

所以目前的问题是,每当我启动 Ubuntu 时,都会出现系统在低图形模式下运行的错误。xorg 日志显示以下错误

[    51.287] 
X.Org X Server 1.17.2
Release Date: 2015-06-16
[    51.288] X Protocol Version 11, Revision 0
[    51.288] Build Operating System: Linux 3.13.0-68-generic x86_64 Ubuntu
[    51.288] Current Operating System: Linux jitesh 4.3.0-040300-generic #201511020949 SMP Mon Nov 2 14:50:44 UTC 2015 x86_64
[    51.288] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.3.0-040300-generic root=UUID=69910f62-d547-4968-868d-382bd929acff ro quiet splash vt.handoff=7
[    51.288] Build Date: 12 November 2015  05:33:29PM
[    51.288] xorg-server 2:1.17.2-1ubuntu9.1 (For technical support please see http://www.ubuntu.com/support) 
[    51.288] Current version of pixman: 0.32.6
[    51.288]    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[    51.288] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    51.288] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Feb 25 08:01:58 2016
[    51.288] (==) Using config file: "/etc/X11/xorg.conf"
[    51.288] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    51.289] Data incomplete in file /etc/X11/xorg.conf
    Undefined Screen "nvidia" referenced by ServerLayout "layout".
[    51.289] (EE) Problem parsing the config file
[    51.289] (EE) Error parsing the config file
[    51.290] (EE) 
Fatal server error:
[    51.290] (EE) no screens found(EE) 
[    51.290] (EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
[    51.290] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    51.290] (EE) 
[    51.290] (EE) Server terminated with error (1). Closing log file.

据我所知,我的 xorg.conf 文件在每次启动时都会被重写,重写的文件如下所示:

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0@0:2:0"
    Option "AccelMethod" "None"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

我尝试安装、重新安装、卸载 nvidia 驱动程序和 xserver-xorg,但似乎没有任何作用。

安装 nvidia-current 或 bumblebee-nvidia 后,xconfig 有时会在连接到服务器时给出错误,说在 pkg 路径中​​未找到 xorg-xserver。

当我尝试删除 xorg.conf 时,nvidia-xconfig 会创建新的 xorg.conf,如下所示

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 304.131  (buildmeister@swio-display-x64-rhel04-16)  Sun Nov  8 22:48:17 PST 2015

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

但它又被重写为早期版本,数据不完整。我尝试完全删除 nvidia 驱动程序并使用默认驱动程序,一次又一次地安装 xserver-xorg 和其他东西并重新安装 ubuntu-desktop,但似乎没有任何效果。

我还将显示管理器从 lightdm 更改为 gdm,但没有效果。

从 tty1 重新启动 lig​​htdm 后,Ctrl+Al+f7 总是进入黑屏

任何帮助或指点都将非常有用。

答案1

我刚刚知道这件事,但希望它能有所帮助。

http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu/pool/main/p/prime-indicator/

Prime-Indicator 可帮助您轻松地从 INTEL 切换到 NVIDIA 或反之亦然。

另外,尝试使用 nvidia-355 + nvidia-prime,效果最好。

sudo apt-get purge nvida-*
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-355 nvidia-prime
sudo service lightdm restart

如果您的 VCARD 与 nvidia-355 兼容性不太好,请尝试较低的版本。

另外,nvidia 有时候在双启动时会很痛苦(随机冻结),你可能需要将这一行添加到你的 GRUB(/etc/default/grub)中

nouveau.modeset=0

然后重新加载 grub 配置

sudo update-grub

相关内容