Created attachment 139996 [details] [review] 0001-udev-the-IBM-X41-Tablet-must-not-disable-the-keyboar.patch From Bug 103749, comment 36 there, moving it here to avoid the other bug getting noisy with an unrelated device. The X41 tablet must not disable the keyboard during tablet mode, otherwise the lid buttons are inaccessible. Patch attached, please give it a try. This is a hwdb entry only, please see this link for instructions: https://wayland.freedesktop.org/libinput/doc/latest/udev_config.html#hwdb
Hello! Thank you very much. I am not sure if I'm doing everything correctly, so here is what I am doing: 1. I have applied patch (with 'patch < patchname.patch`) to the source code (patch was in repository root, but said it can't find a file, so I provided it a path to the file) and built and installed libinput according to official build instructions. I realize now that it's silly, but at first I couldn't found libinput's hwdb file. 2. I updated hwdb file on-disk and ran 'udevadm trigger' for event devices 4 and 5 (keyboard and additional buttons which include tablet switch event). 3. I then ran 'udevadm test' for those devices. There are few lines that bothered me in the output, here are they: PROGRAM 'libinput-device-group /sys/devices/platform/i8042/serio0/input/input10/event4' /usr/lib/udev/rules.d/80-libinput-device-groups.rules:7 starting 'libinput-device-group /sys/devices/platform/i8042/serio0/input/input10/event4' 'libinput-device-group /sys/devices/platform/i8042/serio0/input/input10/event4'(out) '11/1/1:isa0060/serio0' Process 'libinput-device-group /sys/devices/platform/i8042/serio0/input/input10/event4' succeeded. IMPORT builtin 'hwdb' /usr/lib/udev/rules.d/90-libinput-model-quirks.rules:32 2 character(s) replaced IMPORT builtin 'hwdb' /usr/lib/udev/rules.d/90-libinput-model-quirks.rules:36 IMPORT builtin 'hwdb' /usr/lib/udev/rules.d/90-libinput-model-quirks.rules:40 IMPORT builtin 'hwdb' returned non-zero and PROGRAM 'libinput-device-group /sys/devices/platform/thinkpad_acpi/input/input6/event5' /usr/lib/udev/rules.d/80-libinput-device-groups.rules:7 starting 'libinput-device-group /sys/devices/platform/thinkpad_acpi/input/input6/event5' 'libinput-device-group /sys/devices/platform/thinkpad_acpi/input/input6/event5'(out) '19/1014/5054:thinkpad_acpi' Process 'libinput-device-group /sys/devices/platform/thinkpad_acpi/input/input6/event5' succeeded. 2 character(s) replaced IMPORT builtin 'hwdb' /usr/lib/udev/rules.d/90-libinput-model-quirks.rules:36 IMPORT builtin 'hwdb' returned non-zero IMPORT builtin 'hwdb' /usr/lib/udev/rules.d/90-libinput-model-quirks.rules:40 IMPORT builtin 'hwdb' returned non-zero I'm not sure if it is ok, so I decided I should attach this. 4. Those lid buttons don't have keycodes at first, so I used 'setkeycodes' to give them keycodes. I tried using udev/hwdb rule in past, but it didn't work at all. Am I doing something wrong? Did I forgot some step or something? Thanks again.
I forgot to add that after all that, lid keys still don't work when transformed.
It's a git patch, you're better off doing "git am < patchfile" and git will take care of it. Otherwise patch -p1 should work too but I'd rather you use git directly. Installing afterwards is correct but not necessary, you could just copy the hwdb file over the system one. Whether the lid keys are mapped to anything doesn't really matter to libinput at least, but depending what they're mapped to X may filter them. What does evemu-record say about the buttons on the lid? The udevadm test messages are fine. What was the bottom of the udevadm test output though? Did it list the LIBINPUT_MODEL_TABLET_MODE_NO_SUSPEND property for the keyboard device? What does libinput debug-events --verbose say when you run it now?
(In reply to Peter Hutterer from comment #3) > It's a git patch, you're better off doing "git am < patchfile" and git will > take care of it. Otherwise patch -p1 should work too but I'd rather you use > git directly. Installing afterwards is correct but not necessary, you could > just copy the hwdb file over the system one. Yep, I tried again using git patch, and it produced no errors. > The udevadm test messages are fine. What was the bottom of the udevadm test > output though? Did it list the LIBINPUT_MODEL_TABLET_MODE_NO_SUSPEND > property for the keyboard device? It does! For some reason, I tried again using git patch and it works perfectly. Regular keyboard also works (if I stick a finger between lid and case and press some keys when event has triggered they work), but it's not like lid is pressing any buttons or moving a trackpoint, so it's not a problem. I'm going to reboot and see if everything persists, and then close the bug. Thank you!
Oh, right, I wasn't the one who openned issue. Anyways, changes persist trough reboot and work perfectly. Thanks again!.
Either way, bugs shouldn't be closed until they're on git master anyway. Patch is pushed now, thanks for testing. commit 07eefba84b1fe46b3e8702ee0db806ddfb80df73 Author: Peter Hutterer <> Date: Mon Jun 4 08:16:48 2018 +1000 udev: the IBM X41 Tablet must not disable the keyboard in tablet mode https://wayland.freedesktop.org/libinput/doc/latest/reporting_bugs.html#fixed_bugs
Exact same situation on Lenovo ThinkPad S1 Yoga (svnLENOVO:*pvrThinkPadS1Yoga:*) Probably also on all ThinkPad Yoga models (:*pvrThinkPad*Yoga*:*) ; the keyboard gets locked mechanically. It's not the case on other consumer yoga models though.
sinan, please file a separate issue so we don't mix hardware-specific quirks for different devices in the same bug reports. libinput has switched to gitlab now, please file the issue here: https://gitlab.freedesktop.org/libinput/libinput/issues
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.