Created attachment 120491 [details] [PATCH] touchpad: for apple unibody touchpad, disable keyboards that are not the same product id for dwt Hi, I have a 13 inch Macbook Pro 2015. DWT is completely broken on it. The version I'm using is compiled from Master branch. The problem is that there are two (or more?) keyboard devices: "Broadcom Corp. Bluetooth USB Host Controller" and "Apple Inc. Apple Internal Keyboard / Trackpad". libinput picked the wrong one for DWT detection. Here is the hardware information: [tiger@mbp ~]$ xinput ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Broadcom Corp. Bluetooth USB Host Controller id=11 [slave pointer (2)] ⎜ ↳ bcm5974 id=13 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Video Bus id=7 [slave keyboard (3)] ↳ Power Button id=8 [slave keyboard (3)] ↳ Sleep Button id=9 [slave keyboard (3)] ↳ Broadcom Corp. Bluetooth USB Host Controller id=10 [slave keyboard (3)] ↳ Apple Inc. Apple Internal Keyboard / Trackpad id=12 [slave keyboard (3)] [tiger@mbp ~]$ xinput list-props 10 Device 'Broadcom Corp. Bluetooth USB Host Controller': <......> Device Product ID (261): 1452, 33424 <......> [tiger@mbp ~]$ xinput list-props 12 Device 'Apple Inc. Apple Internal Keyboard / Trackpad': <......> Device Product ID (261): 1452, 627 <......> [tiger@mbp ~]$ xinput list-props 13 Device 'bcm5974': Device Enabled (139): 1 <......> libinput Disable While Typing Enabled (297): 1 libinput Disable While Typing Enabled Default (298): 1 <......> Device Product ID (261): 1452, 627 <......> I have a workaround by forcing the touchpad to use the keyboard with the same vendor and product ID as the dwt keyboard. See the attached patch. Although it works, I highly doubt it's the right solution. A better solution may be supporting multiple dwt keyboards, or checking some other properties that can filter out the fake keyboard device.
Looks good, thanks. Please use your real name as git author and sign-off your patch though, once you attach the updated version I'll merge it. Please also attach an evemu-record for both the touchpad and the keyboard so I can add those as test devices. In the touchpad case, please record a simple short touch sequence.
Created attachment 120661 [details] [review] Updated patch Updated the patch, PTAL
Thanks, merged locally with two minor coding style changes (moved && to the previous line) and a reworded commit message. Please attach an evemu-describe of your touchpad and the keyboard device, I want to write a test-case for this.
Created attachment 120793 [details] evemu-describe for touchpad
Created attachment 120794 [details] evemu-describe for the right keyboard
Created attachment 120795 [details] evemu-describe for the wrong keyboard
Please see the attached files. I have evemu-describe for the touchpad, right keyboard and wrong keyboard separately.
Created attachment 120802 [details] [review] 0001-touchpad-fix-DWT-pairing-for-Macbook-Pro-2015.patch Updated. When writing the test case I found the original patch to be too narrow, it would only apply to this specific macbook. The new approach uses the hwdb to label the keyboard as an apple-internal one, then we just pair up the tp and the kbd based on that tag. Let me know if that works for you (it passes the tests here)
The patch doesn't work. I can't apply the whole patch to master branch, so I removed the test diffs. Will try to print some logs.
90-libinput-model-quirks.hwdb doesn't seem to work, model_flags is still 0
did you install the file and run udevadm hwdb --update? please check that there isn't a typo or something in the match string.
oh, and you need to trigger the update, either by reboot or sudo udevadm test /sys/class/input/eventX. That'll show what and whether it's applied, after that udevadm info /sys/class/input/eventX shows it too. If the new property doesn't show up with info, libinput won't see it either.
I didn't run udevadm hwdb --update. It works now
pushed as b3f11180e337d6cd7fd997685b65e5ed48acc661, thanks
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.