Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to be able to turn off my screen upon a keypress. I need vbetool to do that (xset dpms force off just blanks it, does not turn it off). However, vbetool needs root priviledges. So I put line my_user_name ALL=NOPASSWD:/usr/sbin/vbetool" into my sudoers file with visudo. However, when I run vbetool dpms off, it says

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

Any ideas how to solve this?

share|improve this question
up vote 0 down vote accepted

So it turns of the line to put to visudo needs to be as follows:

my_user_name ALL=(ALL) NOPASSWD: /usr/sbin/vbetool

Then sudo vbetool dpms off works.

However, it seems xset dpms force off does the same thing after all. I think it did not work that way a couple of releases back, but now it works.

share|improve this answer
BTW: when assigning a two key shortcut (for example ctrl + e)to xset dpms force off, one needs to add delay to is since releasing the second key will turn the screen back on. So create a script #!/bin/bash sleep 1 xset dpms force off and assign this script to a shortcut. – sup Mar 21 '12 at 12:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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