我已经运行了多个xrandr命令来设置所有我想要的监视器设置。然后,我使用autorandr将状态保存到此处打印的配置文件:
hanke@debian ~ » cat .config/autorandr/3-displays/config
output DP-1
off
output DP-2
off
output DP-3
off
output DP-4
off
output DP-5
off
output DVI-D-0
crtc 1
mode 1600x900
pos 3840x0
rate 59.98
rotate left
output DP-0
crtc 0
mode 1920x1080
pos 1920x191
primary
rate 144.00
output HDMI-0
crtc 2
mode 1920x1080
pos 0x260
rate 60.00我一直在我的窗口管理器启动脚本中使用autorandr --change 3-displays来配置显示,但是如果我启用lightdm来获得greeter/login屏幕(在我的窗口管理器之前运行,并且在我的监视器被正确配置之前),我会遇到问题。因此,登录屏幕以错误的分辨率和方向显示在错误的监视器上。
因此,我现在希望将这些设置转移到/etc/X11/xorg.conf配置文件中。
以下是我迄今为止的尝试:
Section "Monitor"
Identifier "DP-0"
Option "Position" "1920 191"
Option "Primary" "true"
Option "PreferredMode" "1920x1080_144.00"
Option "Enable" "true"
EndSection
Section "Monitor"
Identifier "HDMI-0"
Option "Position" "0 260"
Option "PreferredMode" "1920x1080_60.00"
Option "Enable" "true"
EndSection
Section "Monitor"
Identifier "DVI D-0"
Option "Rotate" "left"
Option "Position" "3840 900"
Option "PreferredMode" "1600x900_59.98"
Option "Enable" "true"
EndSection
Section "Monitor"
Identifier "DP-1"
Option "Enable" "false"
EndSection
Section "Monitor"
Identifier "DP-2"
Option "Enable" "false"
EndSection
Section "Monitor"
Identifier "DP-3"
Option "Enable" "false"
EndSection
Section "Monitor"
Identifier "DP-4"
Option "Enable" "false"
EndSection
Section "Monitor"
Identifier "DP-5"
Option "Enable" "false"
EndSection可悲的是,这似乎行不通。我的游戏显示没有设置为144赫兹刷新率,我的DVI屏幕上的方向都是错误的,位置似乎也被忽略了。
我以前曾因为坏的startx值而导致xorg.conf失败,但是使用这个配置时它不会崩溃。
我是不是漏掉了什么?我只想让我的屏幕以一种良好和声明的方式正确配置。
在脚本中运行一堆xrandr命令感觉很烦人。xorg.conf文件似乎是正确的方法,但我未能使它正常工作。
任何帮助都是非常感谢的。
发布于 2022-06-06 22:42:59
这并不是您想要的,但是Xorg -configure应该设置一些东西,然后您可能只需要更改一些事情的顺序。进度xorg.conf缺少布局部分,并且有一些东西在错误的位置,但是如果您运行命令,它将为您编写所有这些。
该命令默认为"RightOf“Screen0样式语法,但看起来您需要更改它。所以就像
从…
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" "RightOf" Screen0
Screen 2 "Screen2" "RightOf" Screen1至
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" 1600 0
Screen 2 "Screen2" 3520 0https://unix.stackexchange.com/questions/689564
复制相似问题