强制 SeatN 显示 :N

强制 SeatN 显示 :N

我有一个使用 3 个 GPU 的多座设置,loginctl而且lightdm它基本上可以正常工作。有两个小区域没有,那就是蓝牙音频设备和sshX 转发在我未开机:0或至少与上次登录时的显示号码不同时行为不当。

❯ ps axo pid,user,args | grep xorg
   6279 root     /usr/lib/Xorg :1 -seat seat0 -auth /run/lightdm/root/:1 -nolisten tcp vt7 -novtswitch
   6284 root     /usr/lib/Xorg :0 -seat seat2 -auth /run/lightdm/root/:0 -nolisten tcp
   6285 root     /usr/lib/Xorg :2 -seat seat1 -auth /run/lightdm/root/:2 -nolisten tcp

...代替...

❯ ps axo pid,user,args | grep xorg
   6279 root     /usr/lib/Xorg :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
   6284 root     /usr/lib/Xorg :1 -seat seat2 -auth /run/lightdm/root/:1 -nolisten tcp
   6285 root     /usr/lib/Xorg :2 -seat seat1 -auth /run/lightdm/root/:2 -nolisten tcp

放...

# Force seatN to run on display :N
[Seat:seat0]
xserver-command=/usr/lib/Xorg :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch #

[Seat:seat1]
xserver-command=/usr/lib/Xorg :1 -seat seat1 -auth /run/lightdm/root/:1 -nolisten tcp #

[Seat:seat2]
xserver-command=/usr/lib/Xorg :2 -seat seat2 -auth /run/lightdm/root/:2 -nolisten tcp #

.../etc/lightdm.conf.d/71-seatdisplays.conf当我以应该登录的方式登录时,事情变得非常混乱seat0。我最终会在显示器上显示:0,但要么要么seat0,尽管 GPU 以及鼠标和键盘 USB 端口为该显示器提供信号绑定到:seat1seat2seat0

❯ echo $DISPLAY
:0
❯ ps axo pid,user,args | grep xorg
   6711 root     /usr/lib/Xorg :1 -seat seat1 -auth /run/lightdm/root/:1 -nolisten tcp
   6713 root     /usr/lib/Xorg :2 -seat seat2 -auth /run/lightdm/root/:2 -nolisten tcp
   6731 root     /usr/lib/Xorg :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
❯ loginctl list-sessions
SESSION  UID USER    SEAT  TTY
      3 1000 myuser  seat1
     c1  958 lightdm seat2
     c2  958 lightdm seat0

3 sessions listed.

#如果我从行尾删除注释xserver-command,我最终会得到正确seat0但不一定显示的结果:0。它会自动将实际发生的情况附加到手动设置的命令中,当我最终得到正确的座位号时,显示又是随机的:

❯ echo $DISPLAY
:2
❯ ps axo pid,user,args | grep xorg
   6423 root     /usr/lib/Xorg :1 -seat seat1 -auth /run/lightdm/root/:1 -nolisten tcp :0 -seat seat1 -auth /run/lightdm/root/:0 -nolisten tcp
   6428 root     /usr/lib/Xorg :2 -seat seat2 -auth /run/lightdm/root/:2 -nolisten tcp :1 -seat seat2 -auth /run/lightdm/root/:1 -nolisten tcp
   6437 root     /usr/lib/Xorg :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch :2 -seat seat0 -auth /run/lightdm/root/:2 -nolisten tcp vt7 -novtswitch
❯ loginctl list-sessions
SESSION  UID USER    SEAT  TTY
      3 1000 myuser  seat0
     c1  958 lightdm seat1
     c2  958 lightdm seat2

3 sessions listed.

因为它看起来只是在命令中附加了它想要的任何内容,所以我尝试设置为像for andxserver-command这样的愚蠢的东西,但这只是打破了and :sleep 1; /usr/lib/Xorgseat12seat12

❯ echo $DISPLAY
:0
❯ ps axo pid,user,args | grep xorg
   6064 root     /usr/lib/Xorg :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
❯ loginctl list-sessions
SESSION  UID USER   SEAT  TTY
      3 1000 myuser seat0

1 sessions listed.

我只能假设它只是执行或完成的任何命令首先得到 :0 等等。

有没有办法强制seat0显示:0seat1显示、:1显示?seat2:2

或者,有没有办法延迟启动seat12始终seat0首先解决:0

答案1

我也有同样的愿望……混淆了我很烦恼!我创建:https://github.com/canonical/lightdm/pull/350

希望我们能尽快合并它,一切都会有!

相关内容