Hi, On Mon, May 13, 2024 at 03:13:53PM -0700, Dmitry Torokhov wrote: > Hi Guido, > > On Thu, May 09, 2024 at 02:00:28PM +0200, Guido Günther wrote: > > This helps user space to figure out which keys should be used to unidle a > > device. E.g on phones the volume rocker should usually not unblank the > > screen. > > How exactly this is supposed to be used? We have "disabled" keys and > switches attribute because this function can be controlled at runtime > from userspace while wakeup control is a static device setting. Current Linux userspace usually unblanks/unidles a device on every keypress. That is usually not the expected result on phones where often only the power button and e.g. some home buttons should do this. These keys usually match the keys that are used as wakeup sources to bring a device out of suspend. So if we export the wakeup keys to userspace we can pick some sensible defaults (overridable via hwdb¹). > Kernel also does not really know if the screen should be unblanked or > not, if a button or switch is configured for wake up the kernel will go > through wakeup process all the same and then userspace can decide if it > should stay woken up or not. Yes, we merely want that as a hint to figure out sensible defaults in userspace (which might be a subset of the wakeup keys). Cherrs, -- Guido ¹) See https://gitlab.gnome.org/World/Phosh/gmobile/-/blob/main/data/61-gmobile-wakeup.hwdb?ref_type=heads#L57-L59 > > Thanks. > > -- > Dmitry >