Installed Ubuntu server on a tablet. But the screen always stays on.

Can do a command:

echo -ne "\033[9;5]" > /dev/tty1

It does turn it off or at least it then goes to black. If I press a key on the keyboard it comes back on - that's what I want.

But that command doesn't stay. Sometimes in a week or so it can turn back on and I did not touch the keyboard.

There are all sorts of things can find for the desktop but not the server to turn the screen off when not using the keyboard on it.

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.

  • This worked the first time, but then the screen turned white after each subsequent timeout. Apr 1 at 19:28
  • That's strange. For me it works after several reboots using Ubuntu 20.04 server. Try checking if the created files mentioned above are altered. Apr 3 at 8:16
  • Yes, it is strange. No change to the config file. I notice that when I disturb the blackened screen by hitting shift, the screen flashes white before the text console reappears. So I wonder if the screen is displaying white and the backlight turns off the first time, but the backlight fails to turn off subsequently. I am running 20.04.4 desktop, with startx disabled, on a Lenovo Thinkpad X131e. Apr 4 at 16:51
  • ok. Maybe there are something in the computer BIOS that causes the backlight to stay on, if possible you could try to reset the BIOS-settings to default. Is it a Chromebook? Maybe you can try moving the hard drive to another computer and see if it behaves the same, or if the problem is tied to the Thinkpad X131e machine. Apr 6 at 7:25
  • I was able to fix the problem by adding radeon.backlight=0 to the kernel parameters in the grub configuration. Apr 7 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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