[PATCH] Close non-keyboard devices on DPMS off

Michal Suchanek hramrach at gmail.com
Sun Oct 6 12:11:20 PDT 2013


On 6 October 2013 20:17, Keith Packard <keithp at keithp.com> wrote:
> Mark Kettenis <mark.kettenis at xs4all.nl> writes:
>
>> Is that really desirable?
>
> It has a couple of benefits -- the first is that touch screens and touch
> pads often get input while your laptop screen is closed; this prevents
> that from waking up the X server.
>
> The second is that turning off input devices can allow the system to
> shut down USB resources and save a bunch of power. I posted the patch so
> that we could get measurements of the power savings.
>
>> For me, moving the mouse has always been the most natural way to wake
>> up the screen.
>
> Yeah, that's the usual way I wake my machine up as well. However, if you
> try this on an OS X machine, you'll find that only the keyboard will
> wake the machine up. So, it's not a universal policy at least.
>
>> And I can imagine that touching the screen is the most
>> natural way to do it on a device with a touchscreen.  Such devices
>> might not even have keyboard.
>
> It's hard to imagine a device without *any* keys, but it's certainly
> possible. The trick would be to figure out how to detect this
> automatically; my machine lists six "keyboard" devices:
>
>     ↳ Power Button                              id=6    [slave  keyboard (3)]
>     ↳ Power Button                              id=8    [slave  keyboard (3)]
>     ↳ Sleep Button                              id=9    [slave  keyboard (3)]
>     ↳ FaceTime HD Camera (Built-in)             id=11   [slave  keyboard (3)]
>     ↳ Apple Inc. Apple Internal Keyboard / Trackpad     id=12   [slave  keyboard (3)]
>     ↳ Video Bus                                 id=7    [slave  keyboard (3)]
>
> I think the interesting part here is the potential for power savings
> while the screen is blanked; getting some idea of how much closing the
> other devices is worth would be really helpful in figuring out when to
> make this choice.

It is common for tablets to have only power key, recovery key, volume
keys and a few softkeys which are areas on the touch surface outside
of the screen area. While it is feasible to wake the tablet by volume
keys it is not obvious that X11 has access to those (they are used by
the system so might be routed around X11) and they are often not very
practical to press. Tegra tablets should be able to run fbdev or
modesetting driver, theoretically. Allwinner, Rockchip and Exynos
based tablets should be able to run fbdev or similar driver. Some of
them probably do have touch surface that is supported by Linux.

While the powersavings achieved by turning off the touch surface might
or might not be interesting (the surface typically has dedicated
interface on the CPU) it will certainly make some tablets much harder
to use so this feature should be optional at the very least.

Thanks

Michal


More information about the xorg-devel mailing list