Plasma Wayland doesnt have anything like this... right?

https://youtu.be/WO2L_ihO_rI

::: spoiler Video Transcript Two keyboard and mice collaboratively share a single output on the Weston compositor. This is shown as two independent pointers on the screen. They each open weston-terminal and can independently and concurrently move around and type in the windows. :::


The plan is to install Linux for my brother this week!

He is excited, but one thing I'm trying to figure out is how best to make multi-seat work.

His use-case is a bit special: he turns his 2nd monitor into a 2nd seat when he invites a friend over to play games.

There seem to be 4 main ways to get this to work

  1. Using systemd-logind
  2. Using virtual machines with usb passthrough
  3. Using Xorg
  4. Using a supported Wayland compositor

Solution 1 doesn't work because the PC has a single GPU. Plasma wayland also needs a workaround to recognize other logind seats.

Solution 2 is not ideal because the PC is not very high-spec. It's a bit tedious, but it is straightforward and well supported.

Solution 3 is not ideal because Xorg is dead. I wasn't able to test this because at some point my Xorg installation broke, but apparently Xorg does support multi-cursor with xinput. (Note that it does not necessarily work in Xwayland, because Xwayland exposes wayland seats, not udev devices.)

Solution 4 is where I lack knowledge. I know the core Wayland protocol supports multi-seat, and clearly Weston implemented this feature. Does Plasma Wayland support this in any way? Even if it was configuring a seat and giving it exclusive access to a client? Or maybe it's possible to run a lightweight compositor underneath which understands multi-seat, and run two nested compositors on top of it?

Sigh

8 points · 1 comments · view on lemmy.world

1 Comments

tuna@discuss.tchncs.de · 2 pts · 1y

I dug even deeper and installed Weston to see how seats are configured. Turns out this is done by attaching a udev property to the device called WL_SEAT, which libinput uses to make logical seats, which Weston uses for seat management. See: https://wayland.freedesktop.org/libinput/doc/latest/device-configuration-via-udev.html

Note: your udev filter (the ones with ==) matters!! I thought I could re-use the filter generated from loginctl (i.e. ENV{ID_FOR_SEAT}=="..."). This led to several confusing hours where I could set ENV{ID_SEAT} but not ENV{WL_SEAT}. Follow the docs above and you'll be fine.

Once I got it working in Weston, I tried it on Plasma, and got my answer: no, Plasma Wayland does not currently support multi-cursor.

It looks like the best solution in our case will be to use the Plasma X11 session. I was able to reinstall the x11 session on my pc and tested multi-cursor there, and it seemed to work as expected.

If the X11 session is too unstable, I guess Weston is there as a backup.