Written 24 Aug 2026. This is a how-to, not a product card. Buy links are not tagged yet.
Don't let the leftover laptop sleep
Close the lid. The leftover laptop has to stay awake so SSH and Pi-hole keep working. A leftover desktop can skip this note.
The leftover laptop goes dark, and the house stops seeing it. You close the lid to tuck it away. A minute later you cannot type on it from the couch. Pi-hole stops answering names. The box is not off. It is asleep.
Why it sleeps
Sleep is a pause, not a shutdown. The machine is still on, but it has stopped doing work. The lid is the flap over the screen. Closing it is the usual signal to sleep. Sitting idle with no keyboard can do the same. SSH, a way to type commands on that box from your normal computer, over the house network, dies while it sleeps. Pi-hole dies too. The house looks for names, and nobody is home.
Skip this if the leftover is a desktop
A leftover OptiPlex, EliteDesk, or mini PC already stays on. There is no lid to close. Skip this note. Come back only if that box still sleeps on its own.
Keep the lid shut without sleeping
This is for Debian or Ubuntu, the OS from what OS to put on the leftover box, on a leftover laptop that is now the lab. A server install has no settings app. We tell Linux to ignore the lid with a few commands. Ignoring the lid means closing it does not sleep the machine.
Make a folder for a small extra config file:
sudo mkdir -p /etc/systemd/logind.conf.d
Then write a drop-in that ignores the lid, on power or docked:
sudo tee /etc/systemd/logind.conf.d/lid.conf <<'EOF'
[Login]
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore
EOF
Reload the service that watches the lid:
sudo systemctl restart systemd-logind
Stop idle sleep
A server install often has this off already. If you used a laptop image, idle sleep can still kick in after a stretch with no keyboard. Turn suspend off:
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
That is one command. It is enough.
Leave it plugged in
Leave the charger in the wall. Closing the lid is fine once sleep is ignored. Do not bury the laptop under a sweater. Heat needs somewhere to go. Under a desk, on a shelf, with a little air, is enough.
Check it worked
Close the lid. Wait a minute. SSH from the couch should still work, with the number from find the leftover box on the house network. If it times out, the box slept. Run the lid commands again, and confirm it is still plugged in.
What next
If this box does not have a useful job yet, put Pi-hole on it. That is the first useful thing on the leftover box. If ads already skip, a second copy of the house folder is a backup of the leftover-box folder. Do not buy a NAS for this.
Skip
Skip this note if the leftover is a desktop or a mini PC. Skip a dummy HDMI plug as the first fix. The lid is the problem, not a missing screen. Skip buying a new mini PC because the laptop slept. Skip a cooling pad.
Sources
Debian: logind.conf. Ubuntu: logind.conf. Official pages only. For the leftover box, see start with what you already have. For the OS, see what OS to put on the leftover box. For the install, see your first weekend.