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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not fail on the first inaccessible input device #431

Merged
merged 1 commit into from Feb 5, 2017

Conversation

tempura-san
Copy link
Contributor

I wanted to use GIMX on an Acer TravelMate running Ubuntu 16.04 LTS and got the message "can't read inputs!".

Digging in the source, and using the console output and strace the problem was found in mkb.c.

The function mkb_init() will iterate over all event devices found below /dev/input and will try to open each of them in turn. If any of the devices fails to open(), the function will return with error code -1, leading to the error message shown above.

After checking the permissions (e.g. gimx-launcher is sgid input, so permissions are fine) and even running the program as root the same error was popping up.

Some poking later the culprit was found. Acer laptops sport the ACER BMA150 accelerometer, which will be registered by the kernel as event and joystick device (check your /var/log/Xorg.0.log for BMA150, for me it was /dev/input/event9 and /dev/input/js0) but lacking the capabilities. They can even not be read as root. They could be removed, but not permanently, as they will be recreated next time the X server starts.

The change in this PR will try to open each event device in turn and only report an error is absolutely no accessible event device is found. It has been tested working on an Acer Travelmate 6593.

Cheers,
Tempura

PS: Thank you for GIMX! 馃憤

@matlo matlo merged commit 1568e70 into matlo:master Feb 5, 2017
@matlo
Copy link
Owner

matlo commented Feb 5, 2017

Thanks!

@tempura-san tempura-san deleted the infix branch February 5, 2017 11:38
@tempura-san
Copy link
Contributor Author

You're welcome! 馃槂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants