相当于 xorg.conf 语法中 xrandr 中的 --same-as(作为另一个的镜像进行监控)

相当于 xorg.conf 语法中 xrandr 中的 --same-as(作为另一个的镜像进行监控)

我想将一台显示器复制为另一台显示器的镜像。xrandr所有操作均有效,但更改不是永久性的。我尝试写入文件/usr/share/X11/xorg.conf.d/10-monitor.conf以应用永久更改。因此,问题是

xrandr --output "HDMI-0" --auto --same-as "DVI-D-0"

在 xorg.conf 中。

这:

Section "Monitor"
    Identifier  "DVI-D-0"
    Option      "Primary" "true"
EndSection

Section "Monitor"
    Identifier  "HDMI-0"
    Option      "SameAs" "VGA1"
EndSection

似乎不起作用。在 Xorg 的文档中,我看到了"LeftOf""RightOf",但没有"SameAs"

答案1

尝试一下这个提示:

Section "Screen"
    Identifier      "DVI"
    Device          "xxx"
    Monitor         "DVI-D-0"
EndSection

Section "Screen"
    Identifier      "HDMI"
    Device          "xxx"
    Monitor         "HDMI-0"
EndSection

Section "Monitor"
    Identifier  "DVI-D-0"
EndSection

Section "Monitor"
    Identifier  "HDMI-0"
EndSection

Section "ServerLayout"
    Screen         0 "DVI" 0 0
    Screen         1 "HDMI" 0 0
EndSection

答案2

查看两个屏幕部分和两个显示器部分的解决方案,然后……我一直在用头撞显示器,直到我尝试了这个奇怪的技巧xorg.conf,它对我有用!注意选项"LeftOf",一切都与它们有关。

Section "Monitor"
    Identifier  "eDP1_m"
    Option      "LeftOf" "HDMI1_m"
EndSection

Section "Monitor"
    Identifier  "HDMI1_m"
    Option      "LeftOf" "eDP1_m"
EndSection

Section "Screen"
    Identifier      "Screen0"
    Device          "Card0"
    Monitor         "eDP1_m"
EndSection

Section "Screen"
    Identifier      "Screen1"
    Device          "Card0"
    Monitor         "HDMI1_m"
EndSection

Section "Device"
    Identifier "Card0"
    Driver     "Intel"
    BusID      "PCI:0:2:0"
EndSection

Section "ServerLayout"
    Identifier     "Weird layout"
    Screen         0 "Screen0" 0 0
    Screen         1 "Screen1" 0 0
EndSection

答案3

这对我有用:

Section "Monitor"
    Identifier  "DVI-D-0"
    Option      "Primary" "true"
EndSection

Section "Monitor"
    Identifier  "HDMI-0"
    Option      "Position" "0 0"
EndSection

相关内容