使用nVidia X Server Settings关闭了内置显示屏。

我搞砸了。 我使用的是HP Pavilion dv6000笔记本电脑,配备有nVidia GeForce 8400M GS显卡。我遇到了外部显示器分辨率的问题,Ubuntu显示管理器无法识别正确的显示器分辨率,所以我开始在nVidia X服务器设置中进行调整。我添加了X Screen 1并保存到X配置文件中。不知道怎么回事,我不小心关闭了内置显示器,现在无法再打开它。之后,我更新了显卡驱动程序,但问题仍然存在。
nvidia-smi输出:
+------------------------------------------------------+
| NVIDIA-SMI 340.102    Driver Version: 340.102        |
|----------------------------+-------------------+----------------------+
| GPU  Name     Persistence-M| Bus-Id     Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap|      Memory-Usage | GPU-Util  Compute M. |
|============================+===================+======================|
| 0  GeForce 8400M GS   Off  | 0000:01:00.0  N/A |                  N/A |
| N/A  65C   P0   N/A /  N/A |  234MiB /  255MiB |     N/A      Default |
+----------------------------+-------------------+----------------------+

+-----------------------------------------------------------------------+
| Compute processes:                                         GPU Memory |
|  GPU       PID  Process name                               Usage      |
|=======================================================================|
|    0            Not Supported                                         |
+-----------------------------------------------------------------------+

xorg.conf

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 361.42  (buildd@lgw01-18)  Tue Apr  5 14:33:28 UTC 2016


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
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"

    # HorizSync source: builtin, VertRefresh source: builtin
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "CRT-0"
    HorizSync       28.0 - 55.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Monitor"

    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "AU Optronics Corporation"
    HorizSync       30.0 - 75.0
    VertRefresh     60.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 8400M GS"
    BusID          "PCI:1:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 8400M GS"
    BusID          "PCI:1:0:0"
    Screen          1
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "CRT-0"
    Option         "metamodes" "VGA-0: 1360x768 +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "metamodes" "LVDS-0: nvidia-auto-select +0+0 {viewportin=1440x900}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

我的猜测是我应该从xorg.conf中删除对Screen 1的所有引用,或者恢复此文件为原始文件。然而,xorg.conf.backup文件也不是原始文件,因为在解决这个问题时我多次重启了系统。
有任何想法如何修复这个问题,或者在哪里找到GeForce 8400M GS的原始xorg.conf文件吗?
1个回答

使用 strg + alt + f1 切换到 tty1,登录并删除 /etc/X11/xorg.conf

然后运行 sudo systemctl restart display-manager.service

这将重置您的设置,您可以开始重新配置。

在重新启动显示管理器之前,您也可以运行 nvidia-xconfig,它会为 nvidia 创建一个默认配置。


谢谢,它起作用了。现在我需要面对外部显示器的荒谬分辨率。 :D - Dune