commit 7e182b5669b72105631ff2be5b1c96f73c49ddf3
Author: Simone Caronni <negativo17(a)gmail.com>
Date: Wed Jun 30 11:36:42 2021 +0200
Use upstream udev rules
60-steam-input.rules | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++
60-steam-vr.rules | 25 +++++++++++
steam.spec | 8 +++-
3 files changed, 146 insertions(+), 1 deletion(-)
---
diff --git a/60-steam-input.rules b/60-steam-input.rules
new file mode 100644
index 0000000..ad967c5
--- /dev/null
+++ b/60-steam-input.rules
@@ -0,0 +1,114 @@
+# Valve USB devices
+SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0660",
TAG+="uaccess"
+
+# Steam Controller udev write access
+KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess",
OPTIONS+="static_node=uinput"
+
+# Valve HID devices over USB hidraw
+KERNEL=="hidraw*", ATTRS{idVendor}=="28de", MODE="0660",
TAG+="uaccess"
+
+# Valve HID devices over bluetooth hidraw
+KERNEL=="hidraw*", KERNELS=="*28DE:*", MODE="0660",
TAG+="uaccess"
+
+# DualShock 4 over USB hidraw
+KERNEL=="hidraw*", ATTRS{idVendor}=="054c",
ATTRS{idProduct}=="05c4", MODE="0660", TAG+="uaccess"
+
+# DualShock 4 wireless adapter over USB hidraw
+KERNEL=="hidraw*", ATTRS{idVendor}=="054c",
ATTRS{idProduct}=="0ba0", MODE="0660", TAG+="uaccess"
+
+# DualShock 4 Slim over USB hidraw
+KERNEL=="hidraw*", ATTRS{idVendor}=="054c",
ATTRS{idProduct}=="09cc", MODE="0660", TAG+="uaccess"
+
+# DualShock 4 over bluetooth hidraw
+KERNEL=="hidraw*", KERNELS=="*054C:05C4*", MODE="0660",
TAG+="uaccess"
+
+# DualShock 4 Slim over bluetooth hidraw
+KERNEL=="hidraw*", KERNELS=="*054C:09CC*", MODE="0660",
TAG+="uaccess"
+
+# PS5 DualSense controller over USB hidraw
+KERNEL=="hidraw*", ATTRS{idVendor}=="054c",
ATTRS{idProduct}=="0ce6", MODE="0660", TAG+="uaccess"
+
+# PS5 DualSense controller over bluetooth hidraw
+KERNEL=="hidraw*", KERNELS=="*054C:0CE6*", MODE="0660",
TAG+="uaccess"
+
+# Nintendo Switch Pro Controller over USB hidraw
+KERNEL=="hidraw*", ATTRS{idVendor}=="057e",
ATTRS{idProduct}=="2009", MODE="0660", TAG+="uaccess"
+
+# Nintendo Switch Pro Controller over bluetooth hidraw
+KERNEL=="hidraw*", KERNELS=="*057E:2009*", MODE="0660",
TAG+="uaccess"
+
+# Faceoff Wired Pro Controller for Nintendo Switch
+KERNEL=="hidraw*", ATTRS{idVendor}=="0e6f",
ATTRS{idProduct}=="0180", MODE="0660", TAG+="uaccess"
+
+# PDP Wired Fight Pad Pro for Nintendo Switch
+KERNEL=="hidraw*", ATTRS{idVendor}=="0e6f",
ATTRS{idProduct}=="0185", MODE="0660", TAG+="uaccess"
+
+# PowerA Wired Controller for Nintendo Switch
+KERNEL=="hidraw*", ATTRS{idVendor}=="20d6",
ATTRS{idProduct}=="a711", MODE="0660", TAG+="uaccess"
+
+# PowerA Wireless Controller for Nintendo Switch we have to use
+# ATTRS{name} since VID/PID are reported as zeros. We use /bin/sh
+# instead of udevadm directly becuase we need to use '*' glob at the
+# end of "hidraw" name since we don't know the index it'd have.
+#
+KERNEL=="input*", ATTRS{name}=="Lic Pro Controller",
RUN{program}+="/bin/sh -c 'udevadm test-builtin uaccess
/sys/%p/../../hidraw/hidraw*'"
+
+# Afterglow Deluxe+ Wired Controller for Nintendo Switch
+KERNEL=="hidraw*", ATTRS{idVendor}=="0e6f",
ATTRS{idProduct}=="0188", MODE="0660", TAG+="uaccess"
+
+# Nacon PS4 Revolution Pro Controller
+KERNEL=="hidraw*", ATTRS{idVendor}=="146b",
ATTRS{idProduct}=="0d01", MODE="0660", TAG+="uaccess"
+
+# Razer Raiju PS4 Controller
+KERNEL=="hidraw*", ATTRS{idVendor}=="1532",
ATTRS{idProduct}=="1000", MODE="0660", TAG+="uaccess"
+
+# Razer Raiju 2 Tournament Edition
+KERNEL=="hidraw*", ATTRS{idVendor}=="1532",
ATTRS{idProduct}=="1007", MODE="0660", TAG+="uaccess"
+
+# Razer Panthera Arcade Stick
+KERNEL=="hidraw*", ATTRS{idVendor}=="1532",
ATTRS{idProduct}=="0401", MODE="0660", TAG+="uaccess"
+
+# Mad Catz - Street Fighter V Arcade FightPad PRO
+KERNEL=="hidraw*", ATTRS{idVendor}=="0738",
ATTRS{idProduct}=="8250", MODE="0660", TAG+="uaccess"
+
+# Mad Catz - Street Fighter V Arcade FightStick TE S+
+KERNEL=="hidraw*", ATTRS{idVendor}=="0738",
ATTRS{idProduct}=="8384", MODE="0660", TAG+="uaccess"
+
+# EMiO Elite Controller for PS4
+KERNEL=="hidraw*", ATTRS{idVendor}=="0c12",
ATTRS{idProduct}=="1cf6", MODE="0660", TAG+="uaccess"
+
+# ZeroPlus P4 (hitbox)
+KERNEL=="hidraw*", ATTRS{idVendor}=="0c12",
ATTRS{idProduct}=="0ef6", MODE="0660", TAG+="uaccess"
+
+# HORI RAP4
+KERNEL=="hidraw*", ATTRS{idVendor}=="0f0d",
ATTRS{idProduct}=="008a", MODE="0660", TAG+="uaccess"
+
+# HORIPAD 4 FPS
+KERNEL=="hidraw*", ATTRS{idVendor}=="0f0d",
ATTRS{idProduct}=="0055", MODE="0660", TAG+="uaccess"
+
+# HORIPAD 4 FPS Plus
+KERNEL=="hidraw*", ATTRS{idVendor}=="0f0d",
ATTRS{idProduct}=="0066", MODE="0660", TAG+="uaccess"
+
+# HORIPAD for Nintendo Switch
+KERNEL=="hidraw*", ATTRS{idVendor}=="0f0d",
ATTRS{idProduct}=="00c1", MODE="0660", TAG+="uaccess"
+
+# HORIPAD mini 4
+KERNEL=="hidraw*", ATTRS{idVendor}=="0f0d",
ATTRS{idProduct}=="00ee", MODE="0660", TAG+="uaccess"
+
+# Armor Armor 3 Pad PS4
+KERNEL=="hidraw*", ATTRS{idVendor}=="0c12",
ATTRS{idProduct}=="0e10", MODE="0660", TAG+="uaccess"
+
+# STRIKEPAD PS4 Grip Add-on
+KERNEL=="hidraw*", ATTRS{idVendor}=="054c",
ATTRS{idProduct}=="05c5", MODE="0660", TAG+="uaccess"
+
+# NVIDIA Shield Portable (2013 - NVIDIA_Controller_v01.01 - In-Home Streaming only)
+KERNEL=="hidraw*", ATTRS{idVendor}=="0955",
ATTRS{idProduct}=="7203", MODE="0660", TAG+="uaccess",
ENV{ID_INPUT_JOYSTICK}="1", ENV{ID_INPUT_MOUSE}=""
+
+# NVIDIA Shield Controller (2015 - NVIDIA_Controller_v01.03 over USB hidraw)
+KERNEL=="hidraw*", ATTRS{idVendor}=="0955",
ATTRS{idProduct}=="7210", MODE="0660", TAG+="uaccess",
ENV{ID_INPUT_JOYSTICK}="1", ENV{ID_INPUT_MOUSE}=""
+
+# NVIDIA Shield Controller (2017 - NVIDIA_Controller_v01.04 over bluetooth hidraw)
+KERNEL=="hidraw*", KERNELS=="*0955:7214*", MODE="0660",
TAG+="uaccess"
+
+# Astro C40
+KERNEL=="hidraw*", ATTRS{idVendor}=="9886",
ATTRS{idProduct}=="0025", MODE="0660", TAG+="uaccess"
diff --git a/60-steam-vr.rules b/60-steam-vr.rules
new file mode 100644
index 0000000..8bb6f02
--- /dev/null
+++ b/60-steam-vr.rules
@@ -0,0 +1,25 @@
+
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="114d", ATTRS{idProduct}=="8a12",
MODE="0660", TAG+="uaccess"
+
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="2c87",
MODE="0660", TAG+="uaccess"
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0306",
MODE="0660", TAG+="uaccess"
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0309",
MODE="0660", TAG+="uaccess"
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="030a",
MODE="0660", TAG+="uaccess"
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="030b",
MODE="0660", TAG+="uaccess"
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="030c",
MODE="0660", TAG+="uaccess"
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="030e",
MODE="0660", TAG+="uaccess"
+
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="28de", ATTRS{idProduct}=="1043",
MODE="0660", TAG+="uaccess"
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="28de", ATTRS{idProduct}=="1142",
MODE="0660", TAG+="uaccess"
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2000",
MODE="0660", TAG+="uaccess"
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2010",
MODE="0660", TAG+="uaccess"
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2011",
MODE="0660", TAG+="uaccess"
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2012",
MODE="0660", TAG+="uaccess"
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2021",
MODE="0660", TAG+="uaccess"
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2022",
MODE="0660", TAG+="uaccess"
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2050",
MODE="0660", TAG+="uaccess"
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2101",
MODE="0660", TAG+="uaccess"
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2102",
MODE="0660", TAG+="uaccess"
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2150",
MODE="0660", TAG+="uaccess"
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2300",
MODE="0660", TAG+="uaccess"
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw",
ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2301",
MODE="0660", TAG+="uaccess"
diff --git a/steam.spec b/steam.spec
index 80cb339..bddfc98 100644
--- a/steam.spec
+++ b/steam.spec
@@ -27,6 +27,10 @@ Source6:
https://raw.githubusercontent.com/denilsonsa/udev-joystick-black
# Configure limits in systemd
Source7: 01-steam.conf
+# Newer udev rules than what is bundled in the tarball
+Source8:
https://raw.githubusercontent.com/ValveSoftware/steam-devices/master/60-s...
+Source9:
https://raw.githubusercontent.com/ValveSoftware/steam-devices/master/60-s...
+
# Do not install desktop file in lib/steam, do not install apt sources
Patch0: %{name}-makefile.patch
# Do not try to copy steam.desktop to the user's desktop from lib/steam
@@ -165,7 +169,7 @@ rm -fr %{buildroot}%{_docdir}/%{name}/ \
%{buildroot}%{_bindir}/%{name}deps
mkdir -p %{buildroot}%{_udevrulesdir}/
-install -m 644 -p subprojects/steam-devices/*.rules %{SOURCE6} \
+install -m 644 -p %{SOURCE6} %{SOURCE8} %{SOURCE9} \
%{buildroot}%{_udevrulesdir}/
# Environment files
@@ -227,6 +231,8 @@ fi
* Wed Jun 30 2021 Simone Caronni <negativo17(a)gmail.com> - 1.0.0.70-4
- Separate udev rules in separate subpackage to be used also by Valve's Flatpak
Steam client.
+- Use upstream's udev rules as those are newer than what is bundled in the
+ installer tarball.
* Tue May 04 2021 Leigh Scott <leigh123linux(a)gmail.com> - 1.0.0.70-3
- Fix appdata screenshots (rfbz#5984)