使用 nVidia X 服务器设置关闭内置显示器

使用 nVidia X 服务器设置关闭内置显示器

我搞砸了。我使用的是 HP Pavilion dv6000 笔记本电脑,配有 nVidia GeForce 8400M GS 显卡。我的外接显示器分辨率有问题,Ubuntu 显示管理器没有看到正确的显示器分辨率,所以我开始在 nVidia X 服务器设置中进行设置。我添加了 X 屏幕 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配置文件

# 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 中删除对屏幕 1 的所有引用,或者将此文件恢复为原始文件。但是 xorg.conf.backup 文件也不是原始文件,因为我在解决这个问题时多次重启了系统。

有什么想法可以修复此问题或在哪里可以找到 GeForce 8400M GS 的原始 xorg.conf 文件?

答案1

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

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

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

您还可以nvidia-xconfig在重新启动显示管理器之前运行,这将为 nvidia 创建默认配置。

相关内容