Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1674946 > unrolled thread
| Started by | Pali Rohár <pali.rohar@gmail.com> |
|---|---|
| First post | 2017-06-26 19:00 +0200 |
| Last post | 2017-06-29 12:40 +0200 |
| Articles | 11 — 4 participants |
Back to article view | Back to linux.kernel
Spurious touchpad events with closed LID Pali Rohár <pali.rohar@gmail.com> - 2017-06-26 19:00 +0200
Re: Spurious touchpad events with closed LID Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-06-26 19:10 +0200
Re: Spurious touchpad events with closed LID Pali Rohár <pali.rohar@gmail.com> - 2017-06-26 21:20 +0200
Re: Spurious touchpad events with closed LID Pavel Machek <pavel@ucw.cz> - 2017-06-28 22:20 +0200
Re: Spurious touchpad events with closed LID Bastien Nocera <hadess@hadess.net> - 2017-06-29 00:50 +0200
Re: Spurious touchpad events with closed LID Pali Rohár <pali.rohar@gmail.com> - 2017-06-29 09:40 +0200
Re: Spurious touchpad events with closed LID Pavel Machek <pavel@ucw.cz> - 2017-06-29 12:10 +0200
Re: Spurious touchpad events with closed LID Pali Rohár <pali.rohar@gmail.com> - 2017-06-29 12:20 +0200
Re: Spurious touchpad events with closed LID Pavel Machek <pavel@ucw.cz> - 2017-06-29 12:20 +0200
Re: Spurious touchpad events with closed LID Pali Rohár <pali.rohar@gmail.com> - 2017-06-29 12:30 +0200
Re: Spurious touchpad events with closed LID Bastien Nocera <hadess@hadess.net> - 2017-06-29 12:40 +0200
| From | Pali Rohár <pali.rohar@gmail.com> |
|---|---|
| Date | 2017-06-26 19:00 +0200 |
| Subject | Spurious touchpad events with closed LID |
| Message-ID | <tWFwJ-4Os-11@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
Hi! When I'm using dock with external input devices (keyboard + mouse) and LID is closed, I'm getting spurious touchpad events and random mouse clicks and movements. It is because top part of LID is above touchpad and probably generates touch pushes. Year (or two?) when I had conversation with ALPS people I was told that Windows driver is automatically turning touchpad off when ACPI LID close event is received (and similarly turn touchpad on). Maybe Linux should do similar thing? Random movement or touchpad clicks is really annoying. But I'm not sure if kernel or userspace should do this job... What do you think? -- Pali Rohár pali.rohar@gmail.com
[toc] | [next] | [standalone]
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Date | 2017-06-26 19:10 +0200 |
| Message-ID | <tWFGq-56V-9@gated-at.bofh.it> |
| In reply to | #1674946 |
On Mon, Jun 26, 2017 at 06:54:53PM +0200, Pali Rohár wrote: > Hi! > > When I'm using dock with external input devices (keyboard + mouse) and > LID is closed, I'm getting spurious touchpad events and random mouse > clicks and movements. > > It is because top part of LID is above touchpad and probably generates > touch pushes. > > Year (or two?) when I had conversation with ALPS people I was told that > Windows driver is automatically turning touchpad off when ACPI LID close > event is received (and similarly turn touchpad on). > > Maybe Linux should do similar thing? Random movement or touchpad clicks > is really annoying. But I'm not sure if kernel or userspace should do > this job... What do you think? It is a matter of policy (deciding when device is "usable") and this should be controlled from userspace. Kernel should provide necessary knobs for it though. For a long time I was saying that it should be done at device core level, but I do not think we will ever get there. On ChromeOS input devices export "inhibit" attribute that basically overrides open/close count and prevents delivery of events to userspace, and power management driver controls this attribute together with wake up and others. This allows us to implement policies like "the touchpad should only be active and a wakeup source while the device is in laptop mode, but not in tablet or tent mode, or when lid is closed", "disable keyboard in tablet mode or when list is closed", etc. Drivers can also implement inhibit/uninhibit methods that can put inhibited devices into lower power mode. I am not too happy with the implementation (I'd like to see if we could merge inhibit/uninhibit and open/close), that is why I haven't pushed it upstream yet. Thanks. -- Dmitry
[toc] | [prev] | [next] | [standalone]
| From | Pali Rohár <pali.rohar@gmail.com> |
|---|---|
| Date | 2017-06-26 21:20 +0200 |
| Message-ID | <tWHIe-6lD-5@gated-at.bofh.it> |
| In reply to | #1674951 |
[Multipart message — attachments visible in raw view] — view raw
On Monday 26 June 2017 19:03:12 Dmitry Torokhov wrote: > On Mon, Jun 26, 2017 at 06:54:53PM +0200, Pali Rohár wrote: > > Hi! > > > > When I'm using dock with external input devices (keyboard + mouse) > > and LID is closed, I'm getting spurious touchpad events and random > > mouse clicks and movements. > > > > It is because top part of LID is above touchpad and probably > > generates touch pushes. > > > > Year (or two?) when I had conversation with ALPS people I was told > > that Windows driver is automatically turning touchpad off when > > ACPI LID close event is received (and similarly turn touchpad on). > > > > Maybe Linux should do similar thing? Random movement or touchpad > > clicks is really annoying. But I'm not sure if kernel or userspace > > should do this job... What do you think? > > It is a matter of policy (deciding when device is "usable") and this > should be controlled from userspace. Kernel should provide necessary > knobs for it though. For a long time I was saying that it should be > done at device core level, but I do not think we will ever get > there. > > On ChromeOS input devices export "inhibit" attribute that basically > overrides open/close count and prevents delivery of events to > userspace, and power management driver controls this attribute > together with wake up and others. Hm... this sounds like a "disable" property for each event device which I was talking about months ago (ccing Pavel). Very similar problem is on Nokia N900, where touchscreen needs to be turned off when screen is locked and phone in pocket. > This allows us to implement > policies like "the touchpad should only be active and a wakeup > source while the device is in laptop mode, but not in tablet or tent > mode, or when lid is closed", "disable keyboard in tablet mode or > when list is closed", etc. Exactly. Userspace receive all needed events and then tell kernel to "mute" input device based on own userspace policies. > Drivers can also implement inhibit/uninhibit methods that can put > inhibited devices into lower power mode. Sounds good. Once events are not delivered to userspace, kernel does not have to receive them too and can power off that input device (if hw support such thing). > I am not too happy with the > implementation (I'd like to see if we could merge inhibit/uninhibit > and open/close), that is why I haven't pushed it upstream yet. Can you send some links to that implementation/patch series? -- Pali Rohár pali.rohar@gmail.com
[toc] | [prev] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2017-06-28 22:20 +0200 |
| Message-ID | <tXrBn-237-7@gated-at.bofh.it> |
| In reply to | #1675038 |
[Multipart message — attachments visible in raw view] — view raw
Hi! > > > When I'm using dock with external input devices (keyboard + mouse) > > > and LID is closed, I'm getting spurious touchpad events and random > > > mouse clicks and movements. > > > > > > It is because top part of LID is above touchpad and probably > > > generates touch pushes. > > > > > > Year (or two?) when I had conversation with ALPS people I was told > > > that Windows driver is automatically turning touchpad off when > > > ACPI LID close event is received (and similarly turn touchpad on). > > > > > > Maybe Linux should do similar thing? Random movement or touchpad > > > clicks is really annoying. But I'm not sure if kernel or userspace > > > should do this job... What do you think? > > > > It is a matter of policy (deciding when device is "usable") and this > > should be controlled from userspace. Kernel should provide necessary > > knobs for it though. For a long time I was saying that it should be > > done at device core level, but I do not think we will ever get > > there. > > > > On ChromeOS input devices export "inhibit" attribute that basically > > overrides open/close count and prevents delivery of events to > > userspace, and power management driver controls this attribute > > together with wake up and others. > > Hm... this sounds like a "disable" property for each event device which > I was talking about months ago (ccing Pavel). Very similar problem is on > Nokia N900, where touchscreen needs to be turned off when screen is > locked and phone in pocket. Yes, disable property would be nice. > > This allows us to implement > > policies like "the touchpad should only be active and a wakeup > > source while the device is in laptop mode, but not in tablet or tent > > mode, or when lid is closed", "disable keyboard in tablet mode or > > when list is closed", etc. While policy normally belongs to userspace, I'd argue this is workaround for a hardware bug, and in-kernel solution would be acceptable. Anyway, disable attribute would be nice first step. Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [next] | [standalone]
| From | Bastien Nocera <hadess@hadess.net> |
|---|---|
| Date | 2017-06-29 00:50 +0200 |
| Message-ID | <tXtWy-1by-9@gated-at.bofh.it> |
| In reply to | #1677130 |
On Wed, 2017-06-28 at 22:15 +0200, Pavel Machek wrote: > <snip> > While policy normally belongs to userspace, I'd argue this is > workaround for a hardware bug, and in-kernel solution would be > acceptable. > > Anyway, disable attribute would be nice first step. It's already fixed for those of us on recent distributions. The "ID_INPUT_TOUCHPAD_INTEGRATION=internal" touchpads will be disabled when the lid is closed, when libinput is used to process the events. Usually, non-crappy hardware will do that in firmware, but software is easier to patch ;)
[toc] | [prev] | [next] | [standalone]
| From | Pali Rohár <pali.rohar@gmail.com> |
|---|---|
| Date | 2017-06-29 09:40 +0200 |
| Message-ID | <tXCdt-4I6-47@gated-at.bofh.it> |
| In reply to | #1677251 |
On Thursday 29 June 2017 00:44:27 Bastien Nocera wrote: > On Wed, 2017-06-28 at 22:15 +0200, Pavel Machek wrote: > > > <snip> > > While policy normally belongs to userspace, I'd argue this is > > workaround for a hardware bug, and in-kernel solution would be > > acceptable. > > > > Anyway, disable attribute would be nice first step. > > It's already fixed for those of us on recent distributions. The > "ID_INPUT_TOUCHPAD_INTEGRATION=internal" touchpads will be disabled > when the lid is closed, when libinput is used to process the events. But this does not fix other usage of /dev/input/* and also does not fix pressing spurious keys in linux virtual tty (ctrl+alt+f1). So it is not a fix. Also important question is: How you detect which input device is "internal", non-removable part of notebook and which one is external? You can have external USB touchpad, and also you can have external PS/2 keyboard connected to docking station (which was e.g. my situation). Also there are PS/2 to active USB converters, to make whole situation complicated. And moreover some internal notebook keyboards are connected via USB and some touchpads via i2c/smbus. I think this detection is not easy or at least I have no idea how to do properly. Existence of PS/2 keyboard does not mean it is internal and existence of USB keyboard does not mean it is external. Maybe ACPI/DSDT provides some information? (No idea, just asking) > Usually, non-crappy hardware will do that in firmware, but software is > easier to patch ;) -- Pali Rohár pali.rohar@gmail.com
[toc] | [prev] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2017-06-29 12:10 +0200 |
| Message-ID | <tXEyB-6he-7@gated-at.bofh.it> |
| In reply to | #1677493 |
[Multipart message — attachments visible in raw view] — view raw
Hi! On Thu 2017-06-29 09:31:02, Pali Rohár wrote: > On Thursday 29 June 2017 00:44:27 Bastien Nocera wrote: > > On Wed, 2017-06-28 at 22:15 +0200, Pavel Machek wrote: > > > > > <snip> > > > While policy normally belongs to userspace, I'd argue this is > > > workaround for a hardware bug, and in-kernel solution would be > > > acceptable. > > > > > > Anyway, disable attribute would be nice first step. > > > > It's already fixed for those of us on recent distributions. The > > "ID_INPUT_TOUCHPAD_INTEGRATION=internal" touchpads will be disabled > > when the lid is closed, when libinput is used to process the events. > > But this does not fix other usage of /dev/input/* and also does not fix > pressing spurious keys in linux virtual tty (ctrl+alt+f1). So it is not > a fix. > > Also important question is: How you detect which input device is > "internal", non-removable part of notebook and which one is external? > > You can have external USB touchpad, and also you can have external PS/2 > keyboard connected to docking station (which was e.g. my situation). > > Also there are PS/2 to active USB converters, to make whole situation > complicated. > > And moreover some internal notebook keyboards are connected via USB and > some touchpads via i2c/smbus. > > I think this detection is not easy or at least I have no idea how to do > properly. Existence of PS/2 keyboard does not mean it is internal and > existence of USB keyboard does not mean it is external. > > Maybe ACPI/DSDT provides some information? (No idea, just asking) I'm not sure it is complex. You simply add DMI blacklist of the bad systems, with IDs of bad devices. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [next] | [standalone]
| From | Pali Rohár <pali.rohar@gmail.com> |
|---|---|
| Date | 2017-06-29 12:20 +0200 |
| Message-ID | <tXEIh-6kk-3@gated-at.bofh.it> |
| In reply to | #1677581 |
On Thursday 29 June 2017 12:08:37 Pavel Machek wrote: > Hi! > > On Thu 2017-06-29 09:31:02, Pali Rohár wrote: > > On Thursday 29 June 2017 00:44:27 Bastien Nocera wrote: > > > On Wed, 2017-06-28 at 22:15 +0200, Pavel Machek wrote: > > > > > > > <snip> > > > > While policy normally belongs to userspace, I'd argue this is > > > > workaround for a hardware bug, and in-kernel solution would be > > > > acceptable. > > > > > > > > Anyway, disable attribute would be nice first step. > > > > > > It's already fixed for those of us on recent distributions. The > > > "ID_INPUT_TOUCHPAD_INTEGRATION=internal" touchpads will be disabled > > > when the lid is closed, when libinput is used to process the events. > > > > But this does not fix other usage of /dev/input/* and also does not fix > > pressing spurious keys in linux virtual tty (ctrl+alt+f1). So it is not > > a fix. > > > > Also important question is: How you detect which input device is > > "internal", non-removable part of notebook and which one is external? > > > > You can have external USB touchpad, and also you can have external PS/2 > > keyboard connected to docking station (which was e.g. my situation). > > > > Also there are PS/2 to active USB converters, to make whole situation > > complicated. > > > > And moreover some internal notebook keyboards are connected via USB and > > some touchpads via i2c/smbus. > > > > I think this detection is not easy or at least I have no idea how to do > > properly. Existence of PS/2 keyboard does not mean it is internal and > > existence of USB keyboard does not mean it is external. > > > > Maybe ACPI/DSDT provides some information? (No idea, just asking) > > I'm not sure it is complex. You simply add DMI blacklist of the bad > systems, with IDs of bad devices. My original request is to disable internal keyboard, touchpad and trackpoint on notebook when it is docked and LID is closed. It has nothing to do with DMI blacklist or so. -- Pali Rohár pali.rohar@gmail.com
[toc] | [prev] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2017-06-29 12:20 +0200 |
| Message-ID | <tXEIh-6kk-5@gated-at.bofh.it> |
| In reply to | #1677583 |
[Multipart message — attachments visible in raw view] — view raw
On Thu 2017-06-29 12:11:12, Pali Rohár wrote: > On Thursday 29 June 2017 12:08:37 Pavel Machek wrote: > > Hi! > > > > On Thu 2017-06-29 09:31:02, Pali Rohár wrote: > > > On Thursday 29 June 2017 00:44:27 Bastien Nocera wrote: > > > > On Wed, 2017-06-28 at 22:15 +0200, Pavel Machek wrote: > > > > > > > > > <snip> > > > > > While policy normally belongs to userspace, I'd argue this is > > > > > workaround for a hardware bug, and in-kernel solution would be > > > > > acceptable. > > > > > > > > > > Anyway, disable attribute would be nice first step. > > > > > > > > It's already fixed for those of us on recent distributions. The > > > > "ID_INPUT_TOUCHPAD_INTEGRATION=internal" touchpads will be disabled > > > > when the lid is closed, when libinput is used to process the events. > > > > > > But this does not fix other usage of /dev/input/* and also does not fix > > > pressing spurious keys in linux virtual tty (ctrl+alt+f1). So it is not > > > a fix. > > > > > > Also important question is: How you detect which input device is > > > "internal", non-removable part of notebook and which one is external? > > > > > > You can have external USB touchpad, and also you can have external PS/2 > > > keyboard connected to docking station (which was e.g. my situation). > > > > > > Also there are PS/2 to active USB converters, to make whole situation > > > complicated. > > > > > > And moreover some internal notebook keyboards are connected via USB and > > > some touchpads via i2c/smbus. > > > > > > I think this detection is not easy or at least I have no idea how to do > > > properly. Existence of PS/2 keyboard does not mean it is internal and > > > existence of USB keyboard does not mean it is external. > > > > > > Maybe ACPI/DSDT provides some information? (No idea, just asking) > > > > I'm not sure it is complex. You simply add DMI blacklist of the bad > > systems, with IDs of bad devices. > > My original request is to disable internal keyboard, touchpad and > trackpoint on notebook when it is docked and LID is closed. > > It has nothing to do with DMI blacklist or so. Well, you have a buggy notebook. On non-buggy ones, touchpad will not generate events when closed. That's where the DMI blacklist comes to mind. (Of course, disable attribute would still be nice for other cases.) Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [next] | [standalone]
| From | Pali Rohár <pali.rohar@gmail.com> |
|---|---|
| Date | 2017-06-29 12:30 +0200 |
| Message-ID | <tXERY-6nj-3@gated-at.bofh.it> |
| In reply to | #1677584 |
On Thursday 29 June 2017 12:15:00 Pavel Machek wrote: > On Thu 2017-06-29 12:11:12, Pali Rohár wrote: > > On Thursday 29 June 2017 12:08:37 Pavel Machek wrote: > > > Hi! > > > > > > On Thu 2017-06-29 09:31:02, Pali Rohár wrote: > > > > On Thursday 29 June 2017 00:44:27 Bastien Nocera wrote: > > > > > On Wed, 2017-06-28 at 22:15 +0200, Pavel Machek wrote: > > > > > > > > > > > <snip> > > > > > > While policy normally belongs to userspace, I'd argue this is > > > > > > workaround for a hardware bug, and in-kernel solution would be > > > > > > acceptable. > > > > > > > > > > > > Anyway, disable attribute would be nice first step. > > > > > > > > > > It's already fixed for those of us on recent distributions. The > > > > > "ID_INPUT_TOUCHPAD_INTEGRATION=internal" touchpads will be disabled > > > > > when the lid is closed, when libinput is used to process the events. > > > > > > > > But this does not fix other usage of /dev/input/* and also does not fix > > > > pressing spurious keys in linux virtual tty (ctrl+alt+f1). So it is not > > > > a fix. > > > > > > > > Also important question is: How you detect which input device is > > > > "internal", non-removable part of notebook and which one is external? > > > > > > > > You can have external USB touchpad, and also you can have external PS/2 > > > > keyboard connected to docking station (which was e.g. my situation). > > > > > > > > Also there are PS/2 to active USB converters, to make whole situation > > > > complicated. > > > > > > > > And moreover some internal notebook keyboards are connected via USB and > > > > some touchpads via i2c/smbus. > > > > > > > > I think this detection is not easy or at least I have no idea how to do > > > > properly. Existence of PS/2 keyboard does not mean it is internal and > > > > existence of USB keyboard does not mean it is external. > > > > > > > > Maybe ACPI/DSDT provides some information? (No idea, just asking) > > > > > > I'm not sure it is complex. You simply add DMI blacklist of the bad > > > systems, with IDs of bad devices. > > > > My original request is to disable internal keyboard, touchpad and > > trackpoint on notebook when it is docked and LID is closed. > > > > It has nothing to do with DMI blacklist or so. > > Well, you have a buggy notebook. On non-buggy ones, touchpad will not > generate events when closed. > > That's where the DMI blacklist comes to mind. Such blacklist would be huge. Lot of notebooks working in this way. > (Of course, disable attribute would still be nice for other cases.) Yes. -- Pali Rohár pali.rohar@gmail.com
[toc] | [prev] | [next] | [standalone]
| From | Bastien Nocera <hadess@hadess.net> |
|---|---|
| Date | 2017-06-29 12:40 +0200 |
| Message-ID | <tXF1D-6q9-23@gated-at.bofh.it> |
| In reply to | #1677493 |
On Thu, 2017-06-29 at 09:31 +0200, Pali Rohár wrote: > On Thursday 29 June 2017 00:44:27 Bastien Nocera wrote: > > On Wed, 2017-06-28 at 22:15 +0200, Pavel Machek wrote: > > > > > > > <snip> > > > While policy normally belongs to userspace, I'd argue this is > > > workaround for a hardware bug, and in-kernel solution would be > > > acceptable. > > > > > > Anyway, disable attribute would be nice first step. > > > > It's already fixed for those of us on recent distributions. The > > "ID_INPUT_TOUCHPAD_INTEGRATION=internal" touchpads will be disabled > > when the lid is closed, when libinput is used to process the > > events. > > But this does not fix other usage of /dev/input/* and also does not > fix > pressing spurious keys in linux virtual tty (ctrl+alt+f1). So it is > not > a fix. > > Also important question is: How you detect which input device is > "internal", non-removable part of notebook and which one is external? We have heuristics and a database. Look at the hwdb/ subdirectory in systemd. > Maybe ACPI/DSDT provides some information? (No idea, just asking) It could and should, but it's usually empty because when some hardware makers can't be bothered to change the device's name, they'll hardly spend that time adding location information, are they?
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web