A few words on everything daemon – systemd and power management overridden problem

For few weeks I had a strange problem with power management on my laptop. It is quite old Asus, really nicely supported by Linux community, so it was almost impossible to be any low-level problem. The problem was that, when I had lid of the laptop closed, system was always suspending, ignoring Plasma power management settings. This was really annoying, especially when I was leaving some background task and of course closing the lid to save power on turned off screen and then few minutes later realizing that the computer slept just after leaving it. Unfortunately I had not much time to investigate what was the reason.

Until today. It seems that systemd just started managing another part of my computer – power management. And was kind enough to ignore the fact that desktop environment is already managing it and set up its own configuration files. The effect was that it was intercepting lid close event and suspend the computer anyway.

So, if you encountered similar problem, then below are the details of what should be changed to turn that feature off.

  1. Open /etc/systemd/logind.conf with your favorite editor as root.
  2. Add following lines to [Login] section:
HandlePowerKey=ignore
HandleSuspendKey=suspend
HandleHibernateKey=hibernate
HandleLidSwitch=ignore
  1. Save and restart logind with:
systemctl restart systemd-logind.service

Now you should have gotten rid of systemd’s attempt to be the everything you need on Linux box (at least this time).

This entry was posted in Tutorials and tagged , , . Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback.

Leave a Reply

Your email address will not be published. Required fields are marked *

Your email address will never be published.