I am running Ubuntu Server 22.04 on a Surface Pro 4 and I would like to turn off the screen after the server boots (or reboots). Currently, the only way I can do this is by running the command setterm --blank 1 --powerdown 2 while I'm physically at the Surface, however I would like to be able to run this command remotely after logging in to the server via PuTTY. When run remotely, I get the message setterm: terminal xterm does not support --blank. I'm a beginner to Ubuntu and any help would be appreciated. Thank you in advance.
Asked
Active
Viewed 5,370 times
1
KJG
- 13
- 1
- 4
-
1Does this answer your question? Screen timeout for Ubuntu Server login screen – Doug Smythies May 02 '22 at 14:55
1 Answers
4
For Ubuntu server (no GUI), add consoleblank=300 to your GRUB_CMDLINE_LINUX_DEFAULT= line in your /etc/default/grub file, for a 5 minute no activity, then go blank setting. Keep a copy of your original /etc/default/grub file first, and remember to run sudo update-grub afterwards, then re-boot.
Example from my grub file and in context of other stuff on that line:
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 consoleblank=314 intel_pstate=active intel_pstate=no_hwp msr.allow_writes=on cpuidle.governor=teo"
Doug Smythies
- 15,448
- 5
- 44
- 61