[systemd-devel] [multiseat] Attach virtual input to seat1

LuKaRo lists at lrose.de
Sat Sep 2 22:46:55 UTC 2023


Hi everyone,

been following this list for a while now, and I'm glad to see that I'm 
not the only one using multiseat nowadays. That makes me wonder if this 
could be the right place to get help with an issue I'm trying to solve 
for months now.

It burns down to attaching a virtual input to a different seat than 
seat0. For example, loginctl seat-status seat0 shows me this:

$ loginctl --no-pager seat-status seat0
seat0
     Sessions: *c3
      Devices:
           [...]
           ├─/sys/devices/virtual/input/input21
           │ input:input21 "Logitech Wireless Mouse PID:4038"
           ├─/sys/devices/virtual/input/input22
           │ input:input22 "Touchscreen passthrough"
           ├─/sys/devices/virtual/input/input23
           │ input:input23 "Keyboard passthrough"
           ├─/sys/devices/virtual/input/input42
           │ input:input42 "Logitech Wireless Mouse PID:4038"
           ├─/sys/devices/virtual/input/input43
           │ input:input43 "Touchscreen passthrough"
           ├─/sys/devices/virtual/input/input44
           │ input:input44 "Keyboard passthrough"
           [...]

And seat1 is freshly created by attaching a MASTER device, having no 
input devices at all:

$ loginctl --no-pager seat-status seat1
seat1
     Sessions: *c2
      Devices:
└─/sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card1
             [MASTER] drm:card1
├─/sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card1/card1-DP-1
             │ [MASTER] drm:card1-DP-1
             │ 
└─/sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card1/card1-DP-1/i2c-7/i2c-dev/i2c-7
             │   i2c-dev:i2c-7 "AMDGPU DM aux hw bus 0"
├─/sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card1/card1-DP-2
             │ [MASTER] drm:card1-DP-2
             │ 
└─/sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card1/card1-DP-2/i2c-8/i2c-dev/i2c-8
             │   i2c-dev:i2c-8 "AMDGPU DM aux hw bus 1"
├─/sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card1/card1-DP-3
             │ [MASTER] drm:card1-DP-3
             │ 
└─/sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card1/card1-DP-3/i2c-9/i2c-dev/i2c-9
             │   i2c-dev:i2c-9 "AMDGPU DM aux hw bus 2"
└─/sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card1/card1-HDMI-A-1
               [MASTER] drm:card1-HDMI-A-1

However, attaching the virtual input to seat1 always fails, although I 
do it exactly the same way as I attached the GPU:

$ sudo loginctl attach seat1 /sys/devices/virtual/input/input43
Could not attach device: No such device
$ sudo loginctl attach seat1 /sys/devices/virtual/input/input44
Could not attach device: No such device
$ sudo loginctl attach seat1 /sys/devices/virtual/input/input23
Could not attach device: No such device
$ sudo loginctl attach seat1 /sys/devices/virtual/input/input22
Could not attach device: No such device
$ sudo loginctl attach seat1 /sys/devices/virtual/input/input21
Could not attach device: No such device

Any idea why all of them fail, and what could be a possible workaround?

Thanks in advance!

lukaro

Some background for those interested: This is a gaming desktop machine 
I'm using to stream games with sunshine (server) and moonlight (client), 
basically VNC for video content. sunshine creates a video stream of the 
desktop, moonlight plays it back in fullscreen and sends user input in 
return. sunshine creates virtual devices for each input sent by 
moonlight. This works flawlessly on seat0, where the virtual input gets 
attached automatically, but I want to allow a second person to play on 
that machine, so I need seat1 to work as well. When seat1 is controlled 
using USB input devices, everything works fine, but when both seats are 
remote, input of both sessions ends up in seat0, with seat1 not 
receiving input at all.



More information about the systemd-devel mailing list