summarylogtreecommitdiffstats
path: root/console-blanking.service
blob: c4fbe76862c0b0940abfa39805593e914e75e931 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
## systemd service file to restore default blanking and powerdown fo
#  virtual consoles after a given timeout period (5-min blank, 6-min powerdown)
#  this functionality was originally provided by the kernel defaults setting
#  /sys/module/kernel/parameters/consoleblank 600 (now 0-disabled). the
#  blanking and powerdown were delegated to systemd to implement, but no
## service was ever provided by systemd to accomplish this fundamental task.

[Unit]
Description=Enable virtual console blanking and poweroff

[Service]
Type=oneshot
Environment=TERM=linux
StandardOutput=tty
TTYPath=/dev/console
ExecStart=/usr/bin/setterm -blank 5 -powerdown 6

[Install]
WantedBy=multi-user.target