From Dennis Wassenberg....
I observed an issue in acpid-2.0.27 using a Lenovo Thinkpad X1 Tablet. Some short technical details: The ThinKeyboad of this tablet is connected via USB. There is one USB device with 3 interfaces. Interface 0 is the general keyboard. Over Interface 1 comes the function/special keys and Interface 2 is the Touchpad/Trackpoint. Regarding Interfaces 0 and 1 the kernel registered 2 input devices. In case of connecting the ThinKeyboard the process_inotify function got 2 inotify messages included in one buffer but it opens only the input file of the device which was located at the first message. That's why the input events of the special keys (like VOL_UP, VOL_DOWN, BRIGHTNESS_UP, BRIGHTNESS_DOWN, ...) which come from interface 1 are not observed by acpid because the input device was not opened.
That means:
bytes = 64;
eventbuf.event.len = 16
sizeof(struct inotify_event) = 16
sizeof(one_message) = 32
One inotify message is 32 Bytes and there are 2 included in the buffer.
I prepared a patch to fix this (patch attached). I introduced a loop which processes the inotify messages in a buffer one after the other.
Patch accepted. Committed as [2c1201].
Related
Commit: [2c1201]
Last edit: Ted Felix 2016-09-07