1

I installed Ubuntu server 20.04 on old, damaged laptop. The problem is, that I can not close the cover - this is the "damaged" part of the problem.

Is there any way to turn off the screen via command line?

I found such solution: sudo vbetool dpms off, but it does not work and returns error:

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

How can I turn off the screen? Is it even possible with command line only?

5
  • I believe there is now no s/w solution to this but on a laptop, isn't there a fn key which deselects the screen and ports to an external monitor? If none is attached, does that perform what you seek to achieve?
    – 24601
    Sep 24, 2020 at 16:58
  • There is an fn key that should turn off the screen, but it does not work with command line only. It did work with windows, and I belive that it probably would work with x-ubuntu, but I have command line only. I belive that it should be possible to somehow "install" and use this function, since it is there... byt how to reach it - I have no idea.
    – Zorann
    Sep 24, 2020 at 17:06
  • 1
    There's no accepted solution in this reference but it may help askubuntu.com/questions/62858/…
    – 24601
    Sep 24, 2020 at 17:45
  • @Zorann When you say you "have command line only", are you referring to the tty device terminals? (You're not using graphical terminal emulators in X11/Wayland? And you're not logging in remotely?)
    – xiota
    Sep 24, 2020 at 18:03
  • @xiota I'm new with linux so I'm not familiar with those terms, but Yes - I have no graphical interface, only command line. I'm logging in via putty from windows computer.
    – Zorann
    Sep 24, 2020 at 18:30

1 Answer 1

1

I had the same issue on Ubuntu 20.04 LTS server.

$ sudo vbetool dpms off

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

Finally I found the solution here.

You have to use 2 extra command.

In order:

sudo mount -o remount,exec /dev
sudo vbetool dpms off
sudo mount -o remount,noexec /dev

To turn on again the display:

sudo mount -o remount,exec /dev
sudo vbetool dpms on
sudo mount -o remount,noexec /dev
2
  • I actually can`t belive it! I was sure that it was a lost case. I know that I should add an comment about the topic rather than just thank You, but for me it is just amazing! You just make me happy today :)
    – Zorann
    Jul 12, 2021 at 19:01
  • That's the power of community. We help each other when we can :)
    – Belushi
    Jul 13, 2021 at 13:54

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.