Files
Sunshine/packaging/linux/Arch/sunshine.install
T
ReenigneArcher 50c54196ef Fix udev rules for virtual gamepad nodes
Extend udev rule reloading to cover hidraw and input subsystems so permissions are applied to dynamically created libvirtualhid gamepad child nodes, not just /dev/uinput and /dev/uhid.

Also:
- Always install the udev rules file regardless of whether libudev is detected at build time
- Add Homebrew postinst support to copy rules to host-monitored directories
- Trigger udevadm reload on rule removal (AppImage, Flatpak)
- Update comments to say "gamepad emulation" instead of "DS5 emulation"
- Add docs clarifying that manual chmod/setfacl changes are lost on reconnect and how to reload rules
2026-08-29 17:46:07 -04:00

28 lines
541 B
Plaintext

# shellcheck shell=bash
do_setcap() {
setcap cap_sys_admin,cap_sys_nice+p "$(readlink -f usr/bin/sunshine)"
}
do_udev_reload() {
udevadm control --reload-rules
udevadm trigger --property-match=DEVNAME=/dev/uinput
udevadm trigger --property-match=DEVNAME=/dev/uhid
udevadm trigger --subsystem-match=hidraw
udevadm trigger --subsystem-match=input
modprobe uinput || true
modprobe uhid || true
}
post_install() {
do_setcap
do_udev_reload
modprobe uhid
}
post_upgrade() {
do_setcap
do_udev_reload
modprobe uhid
}