tolga9009 / sidewinderd

Linux support for Microsoft SideWinder X4 / X6 and Logitech G103 / G105 / G710+.
http://cevel.net
Other
152 stars 26 forks source link

Wont play macro #21

Closed WantedFreak closed 7 years ago

WantedFreak commented 7 years ago
Found device: 045e:0768
Can't open uinput
Keyboard Constructor
getFeatureReport(7) returned: 7 4
getFeatureReport(7) returned: 7 0
getFeatureReport(7) returned: 7 0
getFeatureReport(7) returned: 7 0
getFeatureReport(7) returned: 7 0
getFeatureReport(7) returned: 7 0
getFeatureReport(7) returned: 7 4
getFeatureReport(7) returned: 7 64
Start Macro Recording on /dev/input/event3
getFeatureReport(7) returned: 7 44
Exit Macro Recording

Recorded "sudo !!" on S1 and got this output but it wont type that in the console or in any text field.

Im using M$ X4, kernel is x86_64 Linux 4.8.11-1-ARCH and desktop env is XFCE4

tolga9009 commented 7 years ago

Hi @WantedFreak,

thanks for the bug report. uinput is needed to inject key events, which couldn't be opened on your system, according to your log: Can't open uinput.

First of all, I'd make sure, that either /dev/uinput or /dev/input/uinput is existing on your system. If it's not, it might be possible, that it's in another location and we need to make adjustments to search in those locations aswell.

Next, check its permissions and make sure sidewinderd has write-access to them. Our current design needs you to run sidewinderd daemon process as root, with your desktop user configured in /etc/sidewinderd.conf. However, if you're running sidewinderd process as non-root user, it's very possible, you don't have enough permissions to open and write to uinput.

I assume you're running Arch Linux? In that case, uinput kernel support is enabled by default and usually you should be good to go out-of-the-box. I will personally test this on latest kernel aswell and report back.

Cheers, Tolga

//Edit: runs fine with 4.8.8 and 4.8.12 on my Arch Linux install. Are you running sudo sidewinderd or sudo systemctl start sidewinderd? Did you use an older version of sidewinderd and upgraded or is this your first install? Are you using the AUR package or did you built it from GitHub source?

For testing purposes, you can use chmod 666 /dev/uinput, just to make sure it's not a permissions issue. I'm waiting for your feedback.

WantedFreak commented 7 years ago

Hi. Yes I installed via AUR, first time using this package. I've tried using systemd and sudo sidewinderd . I've set my username in the config and uinput is at /dev/uinput. Setting 666 on uinput did not change anything.

tolga9009 commented 7 years ago

I need to check specific error code on the failed command. I could imagine, that maybe another application is blocking sidewinderd from opening uinput.

Or, something is wrong with the privilege elevation in sidewinderd. So far, we're not checking, whether seteuid(0) succeeds or not.

Both things need to be patched in code, then we can revisit this issue and see, where the issue is precisely.

WantedFreak commented 7 years ago

This is working now. I just tried and it works perfectly.