Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(packaging): apply udev rules for uhid #3041

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packaging/linux/AppImage/AppRun
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function install() {
cat "$SUNSHINE_SHARE_HERE/udev/rules.d/60-sunshine.rules" | sudo tee /etc/udev/rules.d/60-sunshine.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --property-match=DEVNAME=/dev/uinput
sudo udevadm trigger --property-match=DEVNAME=/dev/uhid

# sunshine service
mkdir -p ~/.config/systemd/user
Expand Down
2 changes: 2 additions & 0 deletions packaging/linux/Arch/sunshine.install
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ do_setcap() {
do_udev_reload() {
udevadm control --reload-rules
udevadm trigger --property-match=DEVNAME=/dev/uinput
udevadm trigger --property-match=DEVNAME=/dev/uhid
modprobe uinput || true
modprobe uhid || true
}

post_install() {
Expand Down
3 changes: 2 additions & 1 deletion src_assets/linux/misc/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ if [ -x "$path_to_setcap" ] ; then
$path_to_setcap cap_sys_admin+p $path_to_sunshine
fi

# Trigger udev rule reload for /dev/uinput
# Trigger udev rule reload for /dev/uinput and /dev/uhid
path_to_udevadm=$(which udevadm)
if [ -x "$path_to_udevadm" ] ; then
$path_to_udevadm control --reload-rules
$path_to_udevadm trigger --property-match=DEVNAME=/dev/uinput
$path_to_udevadm trigger --property-match=DEVNAME=/dev/uhid
fi
Loading