0

I just upgraded to 20.04 from 18 for my Ubuntu server which runs on a laptop. I have an alias that runs at startup that uses vbetool to turn off the screen

sudo sh -c 'vbetool dpms off; read ans; vbetool dpms on'

but it doesn't work now on 20. When I try to run the alias manually, I get:

mmap /dev/zero: Operation not permitted
Failed to initialise LRMI (Linux Real-Mode Interface).

I just want the laptop screen to power off after booting. Any help would be appreciated.

1 Answers1

0

I've got a similar script that will work with an installed XServer:

xset -display :0 dpms force off;
#do sth
xset dpms force on

that works on different distros. Using -display is just a precaution, it might run without it, depending on how you start it.

kanehekili
  • 6,402
  • I don't have xset installed as I don't use the GUIs at all. Do you know if installing this would muddy any thing up to try out your script? – silicongreensix Mar 02 '21 at 22:15
  • Not this answer referring to hardware brightness: https://askubuntu.com/questions/729977/turning-the-brightness-completely-down – WinEunuuchs2Unix Mar 02 '21 at 23:25
  • I concur with WinEunuuchs2Unix. It wasn't clear from your question that you didn't have a Xserver, so xset is the wrong way - I will update my answer accordingly in case someone else could use the it.. – kanehekili Mar 03 '21 at 19:57