do not fail on the first inaccessible input device #431
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 inmkb.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 toopen()
, the function will return with error code -1, leading to the error message shown above.After checking the permissions (e.g.
gimx-launcher
is sgidinput
, so permissions are fine) and even running the program asroot
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 asroot
. 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! 馃憤