在 Ubuntu bionic 18.04 上为 Multiseat 无头 xserver-xorg-video-dummy 驱动程序添加额外的 loginctl 席位时出现问题?

Problem adding extra loginctl seat for a Multiseat headless xserver-xorg-video-dummy driver on Ubuntu bionic 18.04?

我正在尝试添加一个额外的无头 seat/session 以允许 LightDM 为 VNC 用户提供无头登录页面,而不会干扰使用桌面的人。我尝试了几种配置(日志中没有明显的错误),类似于以下针对 nVidia 卡和另一个适配器的教程:

https://techoverflow.net/2019/02/23/how-to-run-x-server-using-xserver-xorg-video-dummy-driver-on-ubuntu/

https://wiki.archlinux.org/index.php/Xorg_multiseat

https://wiki.ubuntu.com/MultiseatTeam/Instructions

然而,到目前为止,较新的 systemd 相关 Xorg 配置过程忽略了示例中的 Xorg“dummy”驱动程序(对于分离的单独用户登录下的 VNC 桌面)。值得注意的是,为检测到的 nVidia [Seat:card0] 设置加载了 lightDM 设置,但由于 [Seat:seat4] 从未被 loginctl 轮询,因此它的 conf 从未应用于 LightDM。

$ls -l /tmp/.X11-unix/
srwxrwxrwx 1 root root 0 Jun 16 23:09 X0

$loginctl list-seats
SEAT            
seat0           
1 seats listed.

$loginctl
   SESSION        UID USER             SEAT             TTY             
         2       1000 pi                                                
        c1        118 lightdm          seat0  

$ps aux | grep X
root      6732  5.1  0.2 263360 48232 ?        Sl   23:09   0:01 /usr/lib/xorg/Xorg -s 0 -dpms -keeptty :0 -config /etc/X11/xorg.conf -layout Layout0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch

$ls -l /sys/class/graphics
lrwxrwxrwx 1 root root 0 Jun 16 23:09 fb0 -> ../../devices/platform/vesa-framebuffer.0/graphics/fb0
lrwxrwxrwx 1 root root 0 Jun 16 23:09 fbcon -> ../../devices/virtual/graphics/fbcon

手动设置:

$sudo nvidia-xconfig
$sudo nano  /usr/share/X11/xorg.conf.d/10-Dummy.conf
Section "Device"
  Identifier "Card4"
    Driver      "dummy"
  VideoRam 32768
  Option "NoDDC" "true"
  Option "IgnoreEDID" "true"
EndSection

Section "Monitor"
  Identifier "Monitor4"
  Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -hsync +vsync
  Modeline "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
  Modeline "1024x768_60.00"   63.50  1024 1072 1176 1328  768 771 775 798 -hsync +vsync
  Option      "Primary" "true"
EndSection

Section "Screen"
  Identifier "Screen4"
  Device "Card4"
  Monitor "Monitor4"
    DefaultDepth 24
    SubSection "Display"
    Depth 24
    Modes "1920x1080_60.00"  "1280x1024_60.00" "1024x768_60.00"
    EndSubSection
EndSection

$sudo nano  /usr/share/X11/xorg.conf.d/10-Dummy-seat4.conf
Section "ServerLayout"
Identifier     "Dummy4"
Screen       4 "Screen4"
Option   "Seat" "seat4"
Option   "Xinerama" "0"
Option          "SingleCard" "on"
EndSection

我通过使用带有新座位 udev 规则的电源开关解决了这个问题: TAG=="座位", ENV{ID_FOR_SEAT}=="input-acpi-LNXPWRBN_00", ENV{ID_SEAT}="seat-9",TAG+="master-of-seat" =10=]