On Tuesday, February 25, 2014 18:49:46 Achim Gratz wrote:
Raymond Wooninck writes:
Just a very early warning with regards to the latest released systemd version (version 210). In the release notes the following two items will have an effect on people that are utilizing laptops with a docking station and an external monitor.
[…]
Honestly, I don't think it is up to systemd or logind to decide what is supposed to happen in any of these cases. They ultimately need to handle whatever has been decided, but that decision needs to be taken outside these two processes. What you have described as current or suggested default policies doesn't strike me as particularly useful, measured by how I use my (usually docked in) laptop. Not only does one size fits _not_ all in this case, the desired policy is likely going to change even while the same user continues to be logged into the same session.
Regards, Achim.
Hi Achim,
This is the reply from Lennart on the point already raised:
logind is now a lot more aggressive when suspending the machine due to a closed laptop lid. Instead of acting only on the lid close action it will continuously watch the lid status and act on it. This is useful for laptops where the power button is on the outside of the chassis so that it can be reached without opening the lid (such as the Lenovo Yoga). On those machines logind will now immediately re-suspend the machine if the power button has been accidentally pressed while the laptop was suspended and in a backpack or similar.
What about being able to run laptops lid-closed as long as there's an external display and input device? I don't personally do this, but I'm curious how widely it might be needed.
What we'll probably do is two things:
1) Enumerate connected displays in logind from sysfs and inhibit lid close suspends if a number != 1 is found.
2) Avoid suspend due to lid close for 1min after the last suspend and 3min after boot or so.
Thing #1 has been traditionally done by GNOME which took an inhibitor lock when it detected multiple connected displays. We probably should move this one layer down into logind to open this up for other DEs and more importantly to close the race where GNOME would be started after logind which means the inhibitor lock GNOME could take would be too late to make sure logind doesn't already suspend due to the lid closed.
Thing #2 is then necessary to cover for USB docking stations for which we simply never know when they fully reappear after a supend or at boot, since that's unbounded on USB. Of course this rule #2 isn't that great on my own Yoga laptop, since it means if I by accident power on the laptop in my backpack it will only resuspend after 1min instead of instantly... But I figure that's the price to pay for being general purpose.
Those two items are now on the TODO list.
Lennart