From e9b39e4c1590a770d1a26d21e4f78dc34409ac73 Mon Sep 17 00:00:00 2001 From: jbellionjourdan <85109066+jbellionjourdan@users.noreply.github.com> Date: Wed, 7 May 2025 16:41:01 +0200 Subject: [PATCH] fix(linux/input): improve input rules (#3857) --- docs/getting_started.md | 1 + src_assets/linux/misc/60-sunshine.rules | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/getting_started.md b/docs/getting_started.md index adc7a1712..88f408445 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -494,6 +494,7 @@ All shortcuts start with `Ctrl+Alt+Shift`, just like Moonlight. instead it simply starts a stream. If you removed it and would like to get it back, just add a new application with the name "Desktop" and "desktop.png" as the image path. * For the Linux flatpak you must prepend commands with `flatpak-spawn --host`. +* If inputs (mouse, keyboard, gamepads...) aren't working after connecting, add the user running sunshine to the `input` group. ### HDR Support Streaming HDR content is officially supported on Windows hosts and experimentally supported for Linux hosts. diff --git a/src_assets/linux/misc/60-sunshine.rules b/src_assets/linux/misc/60-sunshine.rules index 52e53345e..27144ca55 100644 --- a/src_assets/linux/misc/60-sunshine.rules +++ b/src_assets/linux/misc/60-sunshine.rules @@ -1,11 +1,11 @@ # Allows Sunshine to acces /dev/uinput -KERNEL=="uinput", SUBSYSTEM=="misc", OPTIONS+="static_node=uinput", TAG+="uaccess" +KERNEL=="uinput", SUBSYSTEM=="misc", OPTIONS+="static_node=uinput", GROUP="input", MODE="0660", TAG+="uaccess" # Allows Sunshine to access /dev/uhid -KERNEL=="uhid", TAG+="uaccess" +KERNEL=="uhid", GROUP="input", MODE="0660", TAG+="uaccess" # Joypads -KERNEL=="hidraw*" ATTRS{name}=="Sunshine PS5 (virtual) pad" MODE="0660", TAG+="uaccess" -SUBSYSTEMS=="input", ATTRS{name}=="Sunshine X-Box One (virtual) pad", MODE="0660", TAG+="uaccess" -SUBSYSTEMS=="input", ATTRS{name}=="Sunshine gamepad (virtual) motion sensors", MODE="0660", TAG+="uaccess" -SUBSYSTEMS=="input", ATTRS{name}=="Sunshine Nintendo (virtual) pad", MODE="0660", TAG+="uaccess" +KERNEL=="hidraw*" ATTRS{name}=="Sunshine PS5 (virtual) pad" GROUP="input", MODE="0660", TAG+="uaccess" +SUBSYSTEMS=="input", ATTRS{name}=="Sunshine X-Box One (virtual) pad", GROUP="input", MODE="0660", TAG+="uaccess" +SUBSYSTEMS=="input", ATTRS{name}=="Sunshine gamepad (virtual) motion sensors", GROUP="input", MODE="0660", TAG+="uaccess" +SUBSYSTEMS=="input", ATTRS{name}=="Sunshine Nintendo (virtual) pad", GROUP="input", MODE="0660", TAG+="uaccess"