this post was submitted on 06 Aug 2025
843 points (99.5% liked)

Programmer Humor

25671 readers
1956 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
 
you are viewing a single comment's thread
view the rest of the comments
[–] jcs@lemmy.world 9 points 1 week ago* (last edited 1 week ago) (3 children)

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 1 week 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 1 week ago* (last edited 1 week ago)

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