DIY: (FIX) systemd-logind hogging CPU cycles (80%+) when laptop lid closed (Aspire 5742-7438 MFG Date: 2010/08)

I noticed very high CPU load when my old laptop’s lid was closed. That load went away when the lid was opened.

Here is how we fix this issue so we can use an old laptop for our StartOS and be able to close the lid and stick it in a corner somewhere.

Thanks to @StuPleb and @circle_a on Telegram DIY for helping sort this out.

SSH into your StartOS via terminal
sudo su -
vim /media/embassy/config/

Entered the following


# post boot script for automation
# ===============================

# Append LidSwitch config within /etc/systemd/logind.conf
echo -e "\nHandleLidSwitch=ignore\nHandleLidSwitchExternalPower=ignore\nHandleLidSwitchDocked=ignore\nLidSwitchIgnoreInhibited=off" >> /etc/systemd/logind.conf

# Restart systemd-logind.service
systemctl restart systemd-logind.service

# Check that systemd-logind process is not pulling ~80+% CPU time when laptop lid is closed

Also here: Hastebin