EB's picture

Greetings,

Surprisingly I haven't found how to enable screen blanking after a period of inactivity. Curious that I've not seen any such question.

 

Using Turnkey Linux Wordpress, current version.

 

Thanks.

Forum: 
Jeremy Davis's picture

By default, TurnKey has 'consoleblank=0' (i.e. screen blanking disabled). You can change the zero to the number of seconds that you wish for it to wait before it blanks the console.

As it's a kernel parameter (which are set at boot time), you need to adjust the grub config and reboot to apply the change. OOTMH, it will go something like this:

E.g. to set a 2 minute (i.e. 120 seconds) timeout before blanking, edit /etc/default/grub and find the line"

GRUB_CMDLINE_LINUX_DEFAULT="consoleblank=0"

And change it to:

GRUB_CMDLINE_LINUX_DEFAULT="consoleblank=120"

FWIW the default setting is 10 minutes, so if that suits you, you could instead just remove the consoleblank parameter altogether; i.e.:

GRUB_CMDLINE_LINUX_DEFAULT=""

Then update grub:

update-grub

And to double check that the setting has been applied:

grep consoleblank /boot/grub/grub.cfg

Should return something like this (you may have more lines and some parameters of your system may be different, so we're just checking that 'consoleblank=120' is in there):

linux	/boot/vmlinuz-4.9.0-8-amd64 root=/dev/mapper/turnkey-root ro net.ifnames=0 consoleblank=120
    linux	/boot/vmlinuz-4.9.0-8-amd64 root=/dev/mapper/turnkey-root ro net.ifnames=0 consoleblank=120

Then reboot! :)

Once you've rebooted, you can double check what 'consoleblank' is set to in your running system, like this:

cat /sys/module/kernel/parameters/consoleblank
EB's picture

Add new comment