joycond icon indicating copy to clipboard operation
joycond copied to clipboard

systemd service: paranoia mode

Open Tatsh opened this issue 2 years ago • 8 comments

Makes the service run with extreme restrictions.

Tatsh avatar Dec 13 '21 03:12 Tatsh

As I have pointed out in the Gentoo bug report below[1], access to /dev/uinput is also needed. Otherwise, pairing the Pro Controller as virtual device does not work.

[1] https://bugs.gentoo.org/867385

ShadowsFriend avatar Sep 22 '22 13:09 ShadowsFriend

Does that only affect Bluetooth?

Also do you have a udev rule for uinput for the Pro Controller?

Tatsh avatar Sep 22 '22 14:09 Tatsh

Does that only affect Bluetooth?

No, my controller is connected via cable.

Also do you have a udev rule for uinput for the Pro Controller?

Yes, I have the following rule for uinput: KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", OPTIONS+="static_node=uinput"

ShadowsFriend avatar Sep 22 '22 14:09 ShadowsFriend

Sounds like the udev rule should be submitted to upstream? That OPTIONS part is not in the files here.

Tatsh avatar Sep 23 '22 19:09 Tatsh

Maybe it should. The rule is part of the Steam Input rules[1] as Steam makes quite some use of uinput. Steam is also the primary reason why pairing the Pro Controller as a virtual controller is even a thing in joycond because Steam Input is fighting with the kernel driver until [2] is fixed.

[1] https://github.com/ValveSoftware/steam-for-linux/issues/4794 [2] https://github.com/ValveSoftware/steam-for-linux/issues/6651

ShadowsFriend avatar Sep 23 '22 19:09 ShadowsFriend

Pushed the fix.

After the uinput device exists, what is the output of cat /proc/devices? I am wondering if there is uinput under character devices. I would prefer to use the device group name if possible.

Tatsh avatar Oct 01 '22 00:10 Tatsh

When I first played around with the issue, I also tried finding the corresponding device group name. I was, however, not knowledgeable enough to figure it out. Here are the character devices shown by cat /proc/devices :

  1 mem
  4 /dev/vc/0
  4 tty
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
  7 vcs
 10 misc
 13 input
 14 sound
 21 sg
 29 fb
116 alsa
128 ptm
136 pts
180 usb
189 usb_device
202 cpu/msr
203 cpu/cpuid
226 drm
246 hidraw
247 usbmon
248 kfd
249 bsg
250 watchdog
251 ptp
252 pps
253 rtc
254 dax

ShadowsFriend avatar Oct 01 '22 12:10 ShadowsFriend

I"m going to leave it as is with the device path.

Tatsh avatar Oct 01 '22 17:10 Tatsh