On Tue, 22.07.14 12:35, Thomas Blume ([email protected]) wrote: > If so, we could record a previous lid open event e.g. in a status file. > We could then inhibit the suspend if there was no previous lid open event or > allow it without timeout, if there was one.
Not following here... Note that the lid switch is actually an input "switch" exposed by the kernel, not a "key". This means that it is a binary thing anyway, and lid switch close events are never generated when the device is already closed... I am also pretty sure we should always react to lid switch state. Many laptops have a power button accessible even if the device is closed (in particular all "convertible" devices, such as the Lenovo Yoga I have). Devices like that are prone to "accidental" resumes in backpacks and such (because something presses on the power button), and we want them to go back to suspend again, so that they don't stay on forever in the backpack. It's really annoying that we have to employ a timeout though before going back to suspend. This is required because there's no point in time when USB devices have to have shown up, and we want to allow USB docking stations with VGA to block the suspend... Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
