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

xow crashing when started with systemctl #54

Closed
avdz opened this issue Apr 17, 2020 · 5 comments
Closed

xow crashing when started with systemctl #54

avdz opened this issue Apr 17, 2020 · 5 comments
Labels
compatibility Compatibility with a certain system/device

Comments

@avdz
Copy link

avdz commented Apr 17, 2020

Hi,

I've an issue with xow:
I can't seem to start xow with systemctl. It exits after receiving a permission denied error.
I can start it without issue manually.

pi@SteamLink:~ $ sudo journalctl -u xow -b -f
-- Logs begin at Fri 2020-04-17 18:42:59 CEST. --
Apr 17 18:56:21 SteamLink xow[1395]: 2020-04-17 18:56:21 DEBUG - Opening device...
Apr 17 18:56:21 SteamLink xow[1395]: 2020-04-17 18:56:21 INFO - Dongle plugged in
Apr 17 18:56:21 SteamLink xow[1395]: 2020-04-17 18:56:21 DEBUG - Firmware already loaded, resetting...
Apr 17 18:56:21 SteamLink xow[1395]: 2020-04-17 18:56:21 DEBUG - Firmware loaded
Apr 17 18:56:21 SteamLink xow[1395]: 2020-04-17 18:56:21 DEBUG - Invalid MAC address, correcting...
Apr 17 18:56:21 SteamLink xow[1395]: 2020-04-17 18:56:21 DEBUG - ASIC version: 7632
Apr 17 18:56:21 SteamLink xow[1395]: 2020-04-17 18:56:21 DEBUG - MAC version: 7662
Apr 17 18:56:21 SteamLink xow[1395]: 2020-04-17 18:56:21 DEBUG - Chip id: 7613
Apr 17 18:56:21 SteamLink xow[1395]: 2020-04-17 18:56:21 INFO - Wireless address: 62:45:bd:02:25:4e
Apr 17 18:56:21 SteamLink xow[1395]: 2020-04-17 18:56:21 INFO - Dongle initialized
Apr 17 18:56:34 SteamLink xow[1395]: 2020-04-17 18:56:34 DEBUG - Client associating: 7e:ed:82:4d:8e:67
Apr 17 18:56:34 SteamLink xow[1395]: terminate called after throwing an instance of 'InputException'
Apr 17 18:56:34 SteamLink xow[1395]: what(): Error opening device: Permission denied
Apr 17 18:56:34 SteamLink systemd[1]: xow.service: Main process exited, code=killed, status=6/ABRT
Apr 17 18:56:34 SteamLink systemd[1]: xow.service: Failed with result 'signal'.

It seems that it is similar to #23
I've tried following commands to trigger the udev rules again but it does not change the permission of the /dev/uinput file

sudo udevadm control --reload-rules
sudo udevadm trigger

Why could this be?

@medusalix
Copy link
Owner

medusalix commented Apr 17, 2020

Have you done a restart after installing xow? As far as I know the udev rules only trigger when /dev/uinput is created at boot time.

@avdz
Copy link
Author

avdz commented Apr 17, 2020

Yes I did.
Is it possible that this steamlink rule is alse changing the /dev/uinput permission?

sudo cat /lib/udev/rules.d/55-steamlink.rules
# USB devices
SUBSYSTEM=="usb", GROUP="plugdev"

# HID devices
KERNEL=="hidraw*", GROUP="input", MODE:="0660"

@medusalix
Copy link
Owner

Is it possible that this steamlink rule is alse changing the /dev/uinput permission?

Probably not, as these rules only affect USB and HID devices.
Please try replacing the last line in /lib/udev/rules.d/99-xow.rules with the following (and reboot):

KERNEL=="uinput", SUBSYSTEM=="misc", MODE="0666", OPTIONS+="static_node=uinput"

@avdz
Copy link
Author

avdz commented Apr 20, 2020

Nope still

pi@SteamLink:~ $ ls -la /dev/uinput
crw-rw----+ 1 root input 10, 223 Apr 20 17:16 /dev/uinput

Edit:
Found the culprit. I noticed the following rule:
pi@SteamLink:/lib/udev/rules.d $ sudo !!
sudo cat 56-steamlink.rules
# USB devices
SUBSYSTEM=="usb", GROUP="plugdev"

# HID devices
KERNEL=="hidraw*", GROUP="input", MODE:="0660"

# Creating virtual devices
KERNEL=="uinput", GROUP="input", MODE:="0660"

I changed the last MODE to 0666 and the uinput permissions are ok now.
Thanks for the support. I learned a bit about udev rules and uinput now :-)

@avdz avdz closed this as completed Apr 20, 2020
@medusalix medusalix added the compatibility Compatibility with a certain system/device label Apr 20, 2020
@musse
Copy link

musse commented Apr 25, 2020

I had the same issue and changing the MODE to 0666 on the lib/udev/rules.d/56-steamlink.rules also did the trick. I'm using xow and steamlink on a Raspberry Pi 4.

Relevant thread in the Steam Link RPi forums: https://steamcommunity.com/app/353380/discussions/6/2260187517782948889/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Compatibility with a certain system/device
Projects
None yet
Development

No branches or pull requests

3 participants