Systemd: add option to sleep when lid closed, only when on battery

Created on 30 Jan 2017  路  3Comments  路  Source: systemd/systemd

Submission type

  • [ ] Bug report
  • [x] Request for enhancement (RFE)

systemd version the issue has been seen with

231

Used distribution

Fedora 25

Some days I wander around my office building going from meeting to meeting with my laptop. When I leave a meeting I close the lid and put my laptop under my arm. When that happens I want to suspend to RAM to power down spinning disks (don't tell me to use an SSD -- it's not the point), and generally just save the battery as I am not using it until my next meeting where I open the lid again.

Other days where I don't have meetings, I want to have my laptop in my office plugged into the mains and want to be able to remotely log into it, using ssh, perhaps. Since I don't need to use the screen I want to close the lid, but of course not have it suspend to RAM so that I can still log into it.

Before systemd-logind was handling all of this, these options were both available. Now with systemd-logind, I have only a single option of what do when the lid is closed, regardless of whether it's plugged into mains or not.

RFE 馃巵 login

Most helpful comment

8016 has been merged now. Closing.

All 3 comments

Yes, it'd be nice to allow this. I think it's already possible to achieve this by running an inhibitor before closing the lid, but a configuration setting would be nice too.

8016 has been merged now. Closing.

Woot woot! Can't wait for it to land in Fedora!

Was this page helpful?
0 / 5 - 0 ratings