Stop screen from going blank in Ubuntu

I will start with my question then add some explanation for those who care.  I'm about to loose my mind!

I need XUbuntu 8.10 (intrepid) to NEVER blank the screen, even when no one is logged in.  Seems simple, right.  Well It's not so simple as I have found, or maybe I'm stupid, or both...who knows!

A quick summary of what I am doing (will post my code below):
I'm trying to use an ooooooold (I mean this thing has Jesus' beeper number old) laptop as a picture frame.  It runs XUbuntu well enough, has WiFi, and a decent screen.

I'm using an init script to call some other scripts to start up images using feh without actually starting full X.  The F1 terminal stays at a login prompt all the time while it switches to the F7 terminal and shows its images (right now a webcam in germany).  When you start it up everything works fine until 20 minutes passes then the screen goes blank unless you touch the keyboard or mouse.  You can see my problem here; a digital picture frame isn't worth much if it goes blank after 20 min.

You will see in my scripts I'm trying to do some setterm stuff, but it doesn't work.

Can anyone help me?
brad@frame1:~$ cat /etc/init.d/picframe
#Start/Stop the pitctureframe
#Licensed under the GNU GPL v1.2+ (
# Provides:             defaultdaemon
# Required-Start:       $all
# Required-Stop:
# Default-Start:        2 3 4 5
# Default-Stop:         0 1 6
# Short-Description:    Start picframe at boot time
# Description:          Enable service provided by feh and picframe
test -f /home/brad/ || exit 0
test -f /home/brad/ || exit 0
test -f /home/brad/ || exit 0
test -f /home/brad/ || exit 0
case "$1" in
start) echo -n "Starting pictureframe"
echo "Are you asleep?"> /dev/mouse
echo "WAKE UP!!!"> /dev/mouse
sleep 5
echo "you getting up or what? You are going to miss the buss" > /dev/mouse
setterm -term linux -blank 0
echo -n "Stopping pictureframe"
setterm -term linux -blank 1
echo -n "Restarting pictureframe"
setterm -term linux -blank 0
echo "Usage: /etc/init.d/picframe
start | stop | restart"
exit 1
exit 0
brad@frame1:~$ cat
#This file is located at /home/brad/
#Licensed under the GNU GPL v1.2+ (
sleep 5
sleep 1
/usr/bin/X11/xinit /home/brad/ &
brad@frame1:~$ cat
#This file is located at /home/brad/
#Licensed under the GNU GPL v1.2+ (
killall feh unclutter
killall -g
umount -f /mnt/server
brad@frame1:~$ cat
#This file is located at /home/brad/
#Licensed under the GNU GPL v1.2+ (
mount.cifs //$/Photos /mnt/server -o username=someuser%somepass
brad@frame1:~$ cat
#This file is located at /home/brad/
#Licensed under the GNU GPL v1.2+ (
unclutter & feh -FZ -R30

Open in new window

LVL 22
mcsweenSr. Network AdministratorAsked:
Who is Participating?
Are you sure is not the power saving?

If you add:
Option "DPMS" "False"  

to your xorg.conf file, will not help?
If you're running gnome, start gconf-editor and go to apps - gnome-screensaver and uncheck the idle enable setting.

You may also be able to use gconftool-2 to do this manually.

gconftool-2 --set /apps/gnome-screensaver/idle_activation_enabled --type=bool false
mcsweenSr. Network AdministratorAuthor Commented:
will I have to do this every time or just once?

Also the F1 terminal does not go blank at all so I guess setterm is doing something
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Or check if you have that option with True value. If so, make it false or commented out.
mcsweenSr. Network AdministratorAuthor Commented:
tried this:

gconftool-2 --set /apps/gnome-screensaver/idle_activation_enabled --type=bool false

restarted, 20 minutes...blank screen.

Let me look into xorg.conf

I should have added the disclaimer that most of my linux experience is limited to ESX, FTP, and Apache servers.  Not real good with all the GUI stuff
mscween, you'll only have to do that once.
Well, it seems that  was right (and I hope is your case also!) Read more info here:

and also here (if you don't want to disable DPMS for personally reasons):
mcsweenSr. Network AdministratorAuthor Commented:
I have no xorg.conf file anywhere.  Even ran an updatedb and searched for one.

It could very well be the power saving, no idea how to shut it off still.

mcsweenSr. Network AdministratorAuthor Commented:
remember I am running XUbuntu if that makes any difference.  Supposed to be a super low overhead X interface
System -> Preferences -> Power Management
mcsweenSr. Network AdministratorAuthor Commented:
I have no xorg.conf on my system.

Should I go ahead and create /etc/X11/xorg.conf and add the stuff to it?  Being that this file is non-existant I don't understand how X can startup (which it will just fine if I issue startx as root).  Could this file have a different name?

I am at work now and will not be able to try until tonight.
mcsweenSr. Network AdministratorAuthor Commented:

I have already tried turning off all power saving stuff in System --> Prefrences --> Power Management to no avail.

I did notice last night when feh starts up it cries about needing to bypass my window manager to display a borderless window.  Does that mean it's not using any Xorg stuff?  Would feh start on it's own without X?  It seems unlikely but I'm not going to assume anything right now.
Did you tried or can you please search for all .conf files in the whole system?  there should be something I think...

find / -type f -name "*.conf"

Put the output into a file.txt and attach here. We will see...
mcsweenSr. Network AdministratorAuthor Commented:
I will post tonight when I get home
If you disabled the screen saver and the power management, then the screen should not be blanking. I'm concerned that under System -> Preferences -> Screensaver you did not uncheck the idle activation. Also, under System -> Preferences -> Power Management you didn't change all settings to Never.
mcsweenSr. Network AdministratorAuthor Commented:


/usr/share/acpi-support/NEC Computers International.config
/usr/share/acpi-support/ASUSTeK Computer Inc..config
/usr/share/acpi-support/SHARP Corporation.config
/usr/share/acpi-support/Dell Computer Corporation.config
/usr/share/acpi-support/FUJITSU SIEMENS.config
/usr/share/acpi-support/Dell Inc..config
/usr/share/acpi-support/Acer, inc..config
/usr/share/acpi-support/Samsung Electronics.config
/usr/share/acpi-support/Sony Corporation.config
mcsweenSr. Network AdministratorAuthor Commented:

Attached are my power saving and screensaver settings from within xfce.

I have the screensaver set to an actual one instead of blank screen so I was sure it wasn't the screensaver.

The selected screensaver does not come on, the screen goes blank but the backlight for the LCD is still on (you can see some bleeding on the edges)
mcsweenSr. Network AdministratorAuthor Commented:
OK, I think I found the reason I don't have an xorg.conf file...

I get this message when my init script fires.  It has been crying about no config file all along, i just didn't read the message properly.

Any wizard I can use to create this file, or a sample one I can use?  

I don't quite understand why Xfce fires up with the right resolution and it looks very nice without this conf file.

Linux frame1 2.6.27-7-generic #1 SMP Fri Oct 24 06:42:44 UTC 2008 i686
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
root@frame1:~# /etc/init.d/picframe start
X.Org X Server 1.5.2
Release Date: 10 October 2008
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.24-19-server i686 Ubuntu
Current Operating System: Linux frame1 2.6.27-7-generic #1 SMP Fri Oct 24 06:42:44 UTC 2008 i686
Build Date: 24 October 2008  08:00:16AM
xorg-server 2:1.5.2-2ubuntu3 (buildd@rothera.buildd)
        Before reporting problems, check
        to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Feb 10 18:37:46 2009
(EE) Unable to locate/open config file
(==) Using default built-in configuration (39 lines)
(EE) open /dev/fb0: No such file or directory
feh WARNING: Window Manager does not support MWM hints. To get a borderless window I have to bypass your wm.

Open in new window

My guess is that you have an xorg.conf file, otherwise, you wouldn't be able to save the above changes that you've shown in the screen caps. You would just be using the built-in defaults every time.

I think you found the problem, though. By default, I don't think that the xorg.conf is readable by any user other than root. This script is doing an xinit, to start xwindows. If it's already running, try removing that or try adding sudo to the beginning. Optionally, give read permissions to your user.

However, if you actually need to create an xorg.conf file:
Well.. that's strange :)

(EE) Unable to locate/open config file

Anyway, can you please check also: /var/log/Xorg.0.log  .. for more information?

Actually you can follow the link provided by AdamsConsulting. From that error it's obvious you don't have a config file, so I assume this should solve the problem..

And be sure you will add also this:

Option "DPMS" "False"
mcsweenSr. Network AdministratorAuthor Commented:
Thanks guys!  I will try and update the thread tonight.
I don't think it's obvious that you're missing a configuration file, otherwise you wouldn't have been able to save any changes (as shown in your screen caps). I think it's more obvious that your user doesn't have access to read the xorg.conf file.
mcsweenSr. Network AdministratorAuthor Commented:
All commands are run as root.  First thing I do on this machine when I login is type "sudo -s"

The error is:

(EE) Unable to locate/open config file

Not: permission denied/insufficient permissions/unable to write/etc..

Maybe I'm wrong, but for me it's obvious...
mcsweenSr. Network AdministratorAuthor Commented:
I tried to enter Option "DPMS" "False" in my xorg.conf after re-creating it and got a parse error.

Where should I put it in the xorg.conf

Says Options isn't a valid command
brad@frame1:~$ cat /etc/X11/xorg.conf
# xorg.conf (X.Org X Window System server configuration file)
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
# Note that some configuration settings that could be done previously
# in this file, now are automatically configured by the server and settings
# here are ignored.
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg
Section "Device"
        Identifier      "Configured Video Device"
        Option          "UseFBDev"              "true"
Section "Monitor"
        Identifier      "Configured Monitor"
Section "Screen"
        Identifier      "Default Screen"
        Monitor         "Configured Monitor"
        Device          "Configured Video Device"
Option "DPMS" "False"

Open in new window

Should be part of : Section "Monitor", after Identifier line. And try : false (lower f)
dzamfir, I haven't tried changing permissions on xorg.conf in Ubuntu to see if it generates a more specific error on why it can't open or acces the configuraton file. It's obvious to me that he has a configuration file, as he can save changes to it. Maybe I'm wrong, but it seems obvious to me. Good luck!
mcsweenSr. Network AdministratorAuthor Commented:
OK, I moved it to the monitor section and X loads again, but still blanking after 20 minutes :(
mcsweenSr. Network AdministratorAuthor Commented:
OK, needed a capitol F in false!!  It looks like it's FINALLY working!!!  Thanks guys for all the hard work, I wish I could assign more points
mcsweenSr. Network AdministratorAuthor Commented:

It was not a permissions issue, I know the difference between a permission issue an non-existent file.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.