Hutterer: libinput - a common input stack for Wayland compositors and X.Org drivers
It looks like a big happy family at first, but then you see that synaptics won't talk to evdev because of the tapping incident a couple of years back, mouse and keyboard have no idea what forks and knives are for, wacom is the hippy GPL cousin that doesn't even live in the same state and no-one quite knows why elographics keeps getting invited. The X server tries to keep the peace by just generally getting in the way of everyone so no-one can argue for too long. You step back, shrug apologetically and say 'well, that's just how these things are, right?'"
Posted Sep 24, 2014 14:55 UTC (Wed)
by javispedro (guest, #83660)
[Link] (4 responses)
You can map this "single" device node to the evdev driver, but then you lose most of the Wacom functionality, since the evdev driver will not create the stylus+eraser devices X11 software such as Gimp expects.
Or you can map the device to the xorg Wacom driver, but then you lose the keyboard and buttons functionality, since the Wacom driver doesn't know what to do with them.
In addition, the touchpad hardware can work in either "touchscreen" mode or "mouse emulation" mode. The hardware's "touchscreen mode" is useless because to use right click emulation and other niceties you want to use the -synaptics driver, which will then ignore both Wacom and keyboard events.
On the other hand, I'm sure libinput will be only 1% as customizable as the older suite of Xorg drivers was...
Posted Sep 24, 2014 22:00 UTC (Wed)
by whot (subscriber, #50317)
[Link] (3 responses)
Wayland has a notion of "capabilities" rather than device types. libinput took that concept, so instead of a keyboard device libinput gives you a device that has the capability to send keys. And/or pointer events, touch events, etc. Which means that a lot of the problems from mixed devices don't even show up, and the others we can work around internally and present them in a well-defined manner to the caller.
Posted Sep 26, 2014 14:05 UTC (Fri)
by bentiss (guest, #89102)
[Link] (2 responses)
And actually, since the kernel v3.10, the pen and touchscreen are already split natively in hid-multitouch. Not to mention that the surface pros have separate HID devices for the touchpad and the buttons (volume/power) goes through a direct ACPI buttons interface which produces its own evdev device.
So libinput does only simple mapping and relies on the kernel to split input devices correctly.
Posted Sep 30, 2014 17:34 UTC (Tue)
by javispedro (guest, #83660)
[Link] (1 responses)
But you are completely wrong re the Surface Pro. The pen and touchscreen devices are already split in the hardware (the touchscreen is a separate device from the "conglomerate" USB device); the kernel's "split" feature is useless because of the above reasons. And the volume buttons do not come from ACPI, but via this "conglomerate" device (obviously the power button does come via ACPI too).
It seems from your comment that libinput is not going to improve the situation at all. :( Sounds weird, because I don't understand why devices need to be split at all.
Posted Sep 30, 2014 18:03 UTC (Tue)
by bentiss (guest, #89102)
[Link]
In the kernel, we have much more information than the userspace has. And yes, we can create one input device for each physical device (mouse, keyboard, touchpad, pen, touchscreen, etc...).
In the case of the Surface Pro 1 and 2, the panel has two chips connected through one hub, as you said, and yes, the plumbing of the kernel already creates one input device for the touch part, and one for the pen. There were never any intention to explode a device in meaningless events, like reporting the button of the pen through the keyboard or through its own input device. So in the Surface 1 and 2 cases, we do not touch anything in the kernel.
However, the Surface (Pro) 3 has a N-trig chip/sensor which does both touch and pen in one usb/hid device. Then, in this case, we split out the touch from the pen by creating two input devices so that the user space can treat the touch as a touch and the pen as a pen.
Believe it or not, the plan for libinput is to rely on what we learned from the past to provide a better input library that can be used by future compositors. And Peter saw a lot of crazyness to know how to avoid them.
BTW, by re-reading your first comment, I think your device simply lacks a good support in the kernel. If the OEM are crazy enough to send the keyboards and the pen events in the same HID device, this has to be split in the kernel so that the upper layers are not messed up with it.
Posted Sep 25, 2014 6:37 UTC (Thu)
by zdzichu (subscriber, #17118)
[Link] (7 responses)
Posted Sep 25, 2014 23:19 UTC (Thu)
by whot (subscriber, #50317)
[Link] (6 responses)
Posted Sep 26, 2014 1:30 UTC (Fri)
by Cyberax (✭ supporter ✭, #52523)
[Link] (1 responses)
So please, make the touchpad configuration available. It's not reasonable to hide it. Even such fascist OSes as Mac OS X allow to configure touchpad.
Posted Sep 27, 2014 5:07 UTC (Sat)
by flussence (guest, #85566)
[Link]
That, and I've been using it for the in-page scroll feature browsers have had for the past, oh, 15 years or so...
Posted Sep 26, 2014 2:58 UTC (Fri)
by zblaxell (subscriber, #26385)
[Link] (3 responses)
But that's nothing. I remap my Macbook's touchpad to behave like a standard PC laptop, using some of the useless bottom-row keyboard keys as buttons, disabling multi-finger gestures to prevent accidental scrolling when something brushes across the twelve-square-inch area, and using the bottom and right half inches of the device for scrolling on two axes. I remap my netbook's tiny touchpad area to behave like a Mac touchpad because multi-finger gestures for scrolling make sense on a device that is smaller than my thumb, while bottom- and side- scroll areas do not. Both of these can be expressed as Synaptics configurations on any suitably capable hardware (with a little bit of X keyboard to get the middle and right buttons on the Mac) and there have been several quite usable and effective configuration tools for these devices when FDO isn't intentionally breaking them.
Neither touchpad is usable in its default configuration. The Mac can't reliably position clicks with middle or right buttons using the touchpad, and dragging is impossible. Both devices send large scroll events at random when they detect a stray finger brushing against them in the wrong place or time. To understand what this is like, connect a second keyboard to your computer and have someone press PageUp and PageDown rapidly and randomly, but only at the most inconvenient times for you.
libinput is a non-starter until it can configure a Synaptics device. They are everywhere, and hardware vendors make terrible choices when they configure them. There's no excuse for not being able to configure such a common device properly.
Posted Sep 26, 2014 4:19 UTC (Fri)
by whot (subscriber, #50317)
[Link] (2 responses)
Posted Sep 26, 2014 4:47 UTC (Fri)
by Cyberax (✭ supporter ✭, #52523)
[Link]
Posted Sep 26, 2014 15:21 UTC (Fri)
by zblaxell (subscriber, #26385)
[Link]
Even left+right middle-click emulation isn't good enough for some work. I configured the non-Lenovos using their keyboards to emulate the missing button(s). I even bind a key to left-click with the keyboard on the Mac because clicking on the trackpad causes a small jog in the pointer position.
I also threw in a few other cases where inadequate configurability ruins the end-user hardware experience. Most of these are Synaptics devices, which seemed worth talking about because the OP really seems to have a hate on for those.
Posted Sep 28, 2014 8:13 UTC (Sun)
by tomgj (guest, #50537)
[Link]
I take it it still works for traditional X pasting?
Hutterer: libinput - a common input stack for Wayland compositors and X.Org drivers
Hutterer: libinput - a common input stack for Wayland compositors and X.Org drivers
Hutterer: libinput - a common input stack for Wayland compositors and X.Org drivers
Hutterer: libinput - a common input stack for Wayland compositors and X.Org drivers
Hutterer: libinput - a common input stack for Wayland compositors and X.Org drivers
Replacing middle button on Thinkpads with No configurability
wheel emulation for the trackstick
... breaks my workflow.
Such hardcoding is not reasonable - middle button is middle button.
No configurability
No configurability
I've been using it for window dragging.
No configurability
No configurability
No configurability
No configurability
No configurability
Hutterer: libinput - a common input stack for Wayland compositors and X.Org drivers