872
Peak homelabbing (lemmy.world)
you are viewing a single comment's thread
view the rest of the comments
[-] jcs@lemmy.world 10 points 6 days ago* (last edited 6 days ago)

Disable suspend when the laptop lid is closed:

sudo sed -i 's/#HandleLidSwitch=suspend/HandleLidSwitch=ignore/g' /etc/systemd/logind.conf
sudo sed -i 's/#HandleLidSwitchExternalPower=suspend/HandleLidSwitchExternalPower=ignore/g' /etc/systemd/logind.conf
sudo systemctl restart systemd-logind

If you are in a TTY, you can blank the screen before closing the lid to prevent burn-in. After running this, come back later and press a key to turn the screen on again.

alias blankscreen='setterm --blank=force; read ans; setterm --blank=poke'

[-] Grass@sh.itjust.works 5 points 6 days ago

but my keyboard is a heatsink...

[-] WhyJiffie@sh.itjust.works 2 points 6 days ago

put it in /etc/systemd/logind.conf.d/nosleep.conf so that updates can't ever undo this

[-] MonkderVierte@lemmy.zip 0 points 6 days ago* (last edited 6 days ago)

Thanks, but honestly, a simple cat would be more helpful than a sed line. I mean, who reads sed lines?

this post was submitted on 06 Aug 2025
872 points (99.4% liked)

Programmer Humor

25650 readers
2569 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS