Fix remote input: give the compositor a libinput backend
The stream rendered but ignored keyboard and mouse. Sunshine injects input through uinput exclusively — it has no support for the Wayland virtual keyboard/pointer protocols — so the compositor has to have a libinput backend to see those devices. WLR_BACKENDS=headless creates only the headless backend, so sway had zero input devices against the kernel's 24. libinput needs a seat, and a systemd --user service belongs to no logind session, so libseat needs seatd. seatd is now enabled on this host. Its socket defaults to group `seat`, which does not help here: the user manager's group list is fixed when it starts, Linger=yes means that is at boot, and so adding connor to `seat` would not take effect until a reboot — re-logging in changes nothing. The drop-in points seatd at `video`, a group connor already holds for GPU access, which makes this deterministic instead of dependent on group-propagation timing. sway now reports 7 input devices including libvirtualhid Mouse and Keyboard, which are Sunshine's. hosts/mainframe/etc/ is a new tree for system-level config; install flags it the same way it flags sbin.
This commit is contained in:
1 parent
425893d516
commit
8ec2955c2e
3 files changed
+28
-2
No files matched your search
@@ -0,0 +1,11 @@
|
|||||||
|
# seatd's socket defaults to group `seat`. The compositor runs as a systemd
|
||||||
|
# --user service, and that manager's group list is fixed at the moment it
|
||||||
|
# starts — with Linger=yes it starts at boot, so adding connor to `seat` does
|
||||||
|
# not reach it until a reboot, and re-logging in changes nothing.
|
||||||
|
#
|
||||||
|
# `video` is a group connor already holds (it is required for GPU access
|
||||||
|
# anyway), so pointing seatd at it makes seat access deterministic rather than
|
||||||
|
# dependent on group-propagation timing.
|
||||||
|
[Service]
|
||||||
|
ExecStart=
|
||||||
|
ExecStart=/usr/bin/seatd -g video
|
||||||
@@ -5,8 +5,18 @@ ConditionHost=mainframe
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
# headless backend: no seat, no input devices, one virtual output.
|
# headless for the virtual output, libinput so there is an input backend at
|
||||||
Environment=WLR_BACKENDS=headless
|
# all. With WLR_BACKENDS=headless alone wlroots creates no libinput backend,
|
||||||
|
# so the compositor has zero input devices and Sunshine's uinput keyboard and
|
||||||
|
# mouse are never picked up — the stream shows the desktop and ignores you.
|
||||||
|
#
|
||||||
|
# libinput needs a seat, and a systemd --user service sits in no logind
|
||||||
|
# session, so libseat falls back to seatd. That is why seatd.service is enabled
|
||||||
|
# on this host and connor is in the seat group.
|
||||||
|
Environment=WLR_BACKENDS=headless,libinput
|
||||||
|
Environment=LIBSEAT_BACKEND=seatd
|
||||||
|
# Do not fail to start when no input device is present yet; Sunshine creates
|
||||||
|
# its virtual ones only once a client connects.
|
||||||
Environment=WLR_LIBINPUT_NO_DEVICES=1
|
Environment=WLR_LIBINPUT_NO_DEVICES=1
|
||||||
# Pin the compositor to the NVIDIA card (card0 = 01:00.0, renderD129), which is
|
# Pin the compositor to the NVIDIA card (card0 = 01:00.0, renderD129), which is
|
||||||
# also what sunshine.conf names as its encoder. Without this wlroots picks the
|
# also what sunshine.conf names as its encoder. Without this wlroots picks the
|
||||||
|
|||||||
@@ -48,3 +48,8 @@ if [[ -d "hosts/${HOST}/sbin" ]] && [[ -n "$(ls -A "hosts/${HOST}/sbin" 2>/dev/n
|
|||||||
echo "note: this host has system scripts needing root:"
|
echo "note: this host has system scripts needing root:"
|
||||||
echo " sudo install -m755 hosts/${HOST}/sbin/* /usr/local/bin/"
|
echo " sudo install -m755 hosts/${HOST}/sbin/* /usr/local/bin/"
|
||||||
fi
|
fi
|
||||||
|
if [[ -d "hosts/${HOST}/etc" ]]; then
|
||||||
|
echo
|
||||||
|
echo "note: this host has system config needing root:"
|
||||||
|
echo " sudo cp -r hosts/${HOST}/etc/. /etc/ && sudo systemctl daemon-reload"
|
||||||
|
fi
|
||||||
Reference in new issue
Block a user