显示不使用 xorg.conf?

显示不使用 xorg.conf?

我如何强制我的 PC 使用 xorg.conf 文件?我已正确设置它,它位于 etc/x11/xorg.conf,但它在启动时被忽略,我知道该文件是有效的,因为我使用 nvidia-settings 创建了它。我只是不知道为什么它被忽略了。

谢谢你的帮助

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
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"

    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Vestel 40 FHD_LCD-TV"
    HorizSync       15.0 - 46.0
    VertRefresh     49.0 - 61.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 650"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "1920x1080_60 +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

答案1

我在 Gnome Shell 3.8 / 3.10 / 3.12 中也遇到了同样的问题:

这个答案

如果此方法无效,则说明有其他程序正在覆盖您的设置。可能是您的桌面环境。作为解决方法,您可以使用此脚本:

#!/bin/bash

sleep 10
xrandr --output DVI-D-0 --mode 1920x1080 
echo "Script was run" 

需要sleep确保在脚本运行之前桌面环境已完成启动。这样,您就知道它将运行DE 已重新配置您的屏幕。使脚本可执行并将其添加到您的启动应用程序中。这应该可以解决问题。

相关内容