Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

On an almost fresh install of Ubuntu 12.04, after disabling screen turning off, screen lock, and suspension on inactivity from all the (two) places one can find under Ubuntu's System Settings, the screen still turns black after some minutes of inactivity. I can't tell for sure whether it only becomes blank/black or turns off.

I've uninstalled gnome-screensaver, which didn't change anything.

Of the several answers I found out there (most of which I didn't try because they were either unclear or reported to not work for everybody), I tried one that DID work:

sudo xset s off

After which I left the computer unattended for hours and the screen never turned black, so it definitely worked.

However, it does not survive a reboot. After reboot, screen starts turning black again after N minutes of inactivity.

Given that xset s off does work until reboot, how do I make that setting permanent?

I guess I could create a script that runs at startup issuing that command, but I think that would be a horrible hack and there should be a cleaner way to accomplish this.

share|improve this question
up vote 4 down vote accepted

Just add it to your .xsessionrc or .xinitrc file.

share|improve this answer

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.