systemmd-boot screen off after one minute

discretecourage

New Member
Feb 22, 2023
6
1
3
I just installed proxmox on zfs raid1 configuration with 2 1tb ssd on a laptop.
How do i put the screen to off after one minute of booting automatically.

the grub method dont work as root zfs use systemmd-boot

i got this snippet of code from somewhere on internet that is turning off screen through command line
Code:
setterm -term linux -blank 1 -powersave powerdown -powerdown 1 </dev/tty1 >/dev/tty1

could anyone point a direction
 
I tested on a PVE test VM, below are the steps:
Create a systemd service with (ScreenOff) name using vi or nano:

Bash:
vi /etc/systemd/system/ScreenOff.service

add the below to the ScreenOff.service:

Code:
[Unit]
Description=Turn off screen after 1 minute
[Service]
Type=oneshot
ExecStart=/usr/bin/setterm -term linux -blank 1 -powersave powerdown -powerdown 1 </dev/tty1 >/dev/tty1
[Install]
WantedBy=multi-user.target

Finally, enable and start that service by issuing the bellow commands:

Bash:
systemctl enable ScreenOff.service
systemctl start ScreenOff.service

You can see the status of that service as well using systemctl status ScreenOff.service command in order to see if the service is running and active.
 
  • Like
Reactions: discretecourage
thank you for the reply.
you tested this on a test vm to help a forum member just amazed me .
you are increadible.


i have not tested this yet as i changed boot option in my bios to "legacy first" as an accident and by that the system some how booted the same installation with grub boot.
such that the grub method worked.

i believe the method posted works well and bookmarked the post for future reference


i do not know if there is any downside to booting with grub method over efi.
 
Last edited:
  • Like
Reactions: Moayad

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!