I am running Ubuntu 20.04 server on a raspberry pi 4. My issue is that the screen does not turn off, at all.

I do not have any xserver installed, so x related answers won't work. Using setterm, I can enable screen blanking, but powerdown does nothing, even though that's what should control this. I've also tried gettings set org.gnome.desktop.session idle-delay 10 to no avail. I tried setterm --blank 1 --powerdown 2

I did manage to turn off the power to the hdmi with a command, but that was another day so I cannot remember the command. I'm controlling the computer directly with a keyboard, not ssh


1 Answer 1


SOLUTION (verified with Ubuntu 20.04 server running on a laptop)

Create a file:

sudo nano /etc/systemd/system/enable-console-blanking.service

And put this into the file:

Description=Enable virtual console blanking

ExecStart=/usr/bin/setterm -blank 1


Then change the file rights and enable the service:

sudo chmod 664 /etc/systemd/system/enable-console-blanking.service
sudo systemctl enable enable-console-blanking.service

And reboot the server. Now the screens blanks after 1 minute without keypresses, even before the login.

  • I did not realized I had gotten a reply here. The issue is still at large, and your solution doesn't work. to be clear I can blank the screen, but that's not what I want to do, I want the display to after a set amount of no keystrokes being detected turn itself off. I've gathered that's what --powerdown does, but whenever I set that value nothing happens Jun 2, 2021 at 22:34
  • Have you tried adding the " -powersave powerdown " switch? Also check if some of the other switches of setterm can make it work for you: tutorialspoint.com/unix_commands/setterm.htm Jun 13, 2021 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.