You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Gentoo Wayland环境下GDM登录界面指定显示器(Nvidia GTX3060)问题求助

Gentoo Wayland环境下GDM登录界面指定显示器(Nvidia GTX3060)问题求助

各位大佬好,我最近被GDM登录界面的显示器选择问题搞疯了,想请教下有没有解决思路!

先说说我的环境:

  • 系统:Gentoo Linux
  • 显卡:Nvidia GTX3060
  • 显示器配置:三台显示器,其中两台用DP连接,一台用HDMI连接
  • 桌面环境:Wayland下的Gnome,显示管理器是GDM

问题描述

GDM总是把登录界面显示在我用来偶尔看电视的DP-1显示器上,我想把它换到其他显示器(比如设置为primary的HDMI-2),但试了各种方法都没效果!

我的xrandr --query输出如下:

DP-2 connected 2560x1080+0+0 (normal left inverted right x axis y axis) 800mm x 340mm

HDMI-2 connected primary 2560x1440+2560+0 (normal left inverted right x axis y axis) 600mm x 340mm

DP-1 connected 3840x2160+5120+0 (normal left inverted right x axis y axis) 600mm x 340mm

我的需求很简单:不要让GDM登录界面显示在DP-1上。

已经尝试过的方法(全部无效)

  • 复制monitors.xml到GDM配置目录:在Gnome桌面里配置禁用DP-1显示器后,把~/.config/monitors.xml复制到/var/lib/gdm/.config/monitors.xml,还特意检查了文件权限,但GDM完全没反应。我的monitors.xml内容如下:
<monitors version="2">
<configuration>
<logicalmonitor>
<x>0</x>
<y>0</y>
<scale>1</scale>
<monitor>
<monitorspec>
<connector>DP-2</connector>
<vendor>GSM</vendor>
<product>34GL750</product>
<serial>0x0000c474</serial>
</monitorspec>
<mode>
<width>2560</width>
<height>1080</height>
<rate>144.001</rate>
</mode>
</monitor>
</logicalmonitor>
<logicalmonitor>
<x>2560</x>
<y>0</y>
<scale>1</scale>
<primary>yes</primary>
<monitor>
<monitorspec>
<connector>HDMI-2</connector>
<vendor>SAM</vendor>
<product>S27H85x</product>
<serial>H4ZM300189</serial>
</monitorspec>
<mode>
<width>2560</width>
<height>1440</height>
<rate>59.951</rate>
</mode>
</monitor>
</logicalmonitor>
<disabled>
<monitorspec>
<connector>DP-1</connector>
<vendor>GSM</vendor>
<product>LG HDR 4K</product>
<serial>0x00047985</serial>
</monitorspec>
</disabled>
</configuration>
</monitors>

可以看到里面已经明确把DP-1标记为禁用了,但GDM根本不鸟这个配置。

  • 编辑GDM初始化脚本:尝试修改/etc/gdm/Init/Default,添加xrandr --output DP-1 --off,但后来反应过来我用的是Wayland,xrandr是Xorg的工具,所以这个方法没用也在意料之中。

  • 更换显示器接口:把DP-1的显示器换接到显卡的其他DP或HDMI接口,但GDM还是认准了这个显示器,登录界面依然显示在上面。

  • 查看GDM调试日志:已经开启了GDM的调试模式,但日志里完全没看到任何关于monitors.xml的错误提示,甚至连加载这个文件的痕迹都没有。

求助

有没有大佬遇到过类似的问题?或者有没有其他我没尝试过的方法可以解决这个问题?任何建议都非常感谢!

备注:内容来源于stack exchange,提问作者ufk

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.21 09:03:03