Nvidia X 伺服器設定在啟動\喚醒\登入時恢復

Nvidia X 伺服器設定在啟動\喚醒\登入時恢復

我在 ubuntu 20 上使用 nvidia-driver-450,具有 3 個螢幕設置,2 個水平 27" 1 個垂直 24" 螢幕。每次會話開始時,垂直螢幕的設定都會恢復為水平螢幕,以及我嘗試過的其他更改,例如在設定為 16:10 時恢復為 16:9。

更改將保存到 xorg.conf

有任何想法嗎?

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 440.82

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 450.57

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"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Samsung S27H65x"
    HorizSync       30.0 - 81.0
    VertRefresh     50.0 - 75.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce RTX 2070"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-5"
    Option         "metamodes" "DP-0: nvidia-auto-select +3000+124 {ForceCompositionPipeline=On, AllowGSYNCCompatible=On}, DP-4: nvidia-auto-select +1080+124 {ForceCompositionPipeline=On, AllowGSYNCCompatible=On}, HDMI-0: nvidia-auto-select +0+0 {rotation=right, ForceCompositionPipeline=On, AllowGSYNCCompatible=On}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

答案1

解決方法很簡單,複製文件即可監視器.xml進入目錄〜gdm/.config/monitors.xml使用命令:

sudo cp ~/.config/monitors.xml ~gdm/.config/monitors.xml

相關內容