0

My laptop screen stays on when the lid is closed. How do I enable blanking, and how do I enable display power off after x minutes in the console?

This is a server install on a laptop and I really don't want the screen to be on 24/7 when the lid is closed! Seems wasteful...

setterm --blank 1 --powerdown 2 works, but how do I add this so it survives a reboot?

I followed other questions and a user told me what I had previously done was irrecoverable. I'd prefer to avoid that again? (See: Boot splash persists at login, so powersaving and screen blanking don't come into affect?)

plr108
  • 121
  • 3

3 Answers3

1

The above is great info if you're logged in, but it doesn't resolve my question:

How do I set up the console of the laptop to auto-blank after X minutes. I want to set this natively to the console, not a logged in terminal, because I may not log into it very often, and it may be sitting at a login prompt most of the time.

I would like the console to wake up and display when a key is pressed, and go back to powersave/blank mode after X minutes.

I can't believe it's so hard to find this -- I've been looking for some time. This is something that I got used to on NetBSD and FreeBSD as just a normal configuration parameter for the console. Surely it has to be possible.

1

Since /etc/issue is written to every virtual console, try appending the output of your setterm command:

cp /etc/issue /etc/issue.original
setterm --blank 1 --powerdown 2 >>/etc/issue

I've been using this approach with Ubuntu for a couple months now.

jzzz
  • 26
0

consoleblank= in /etc/default/grub's GRUB_CMDLINE_LINUX_DEFAULT=. https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt