PDA

View Full Version : [ubuntu] 12.04 screen darkens at 10 min of idle



mark bower
November 3rd, 2012, 01:27 AM
12.04LTS & Gnome Classic-no effects, PC (not laptop)
I have tried a number of things to permanently stop the screen from going dark after 10 min of idle time. The screen comes alive with key or mouse movement. For a session, if I execute "xset s off" in a terminal, no more blanking takes place; the problem is it is not a permanent fix for the next boot.

What I tried after removing: xscreensaver and gnome-screensaver:

1)Sys Settings>Brightness & Lock set to "Never" turn screen off, Lock set to "Off"
2)Sys Settings>Power set suspend to "Don't Suspend"
3a) Made on the desktop a script file "kill_blanking.sh" which has only two lines: "xset -dpms" & "xset s off".
3b) Apps>Sys Tls>Prefs>Startup Apps: added kill_blanking.sh. Went to its install location "~./.config/autostart" and made the file there executable. The file is renamed to "kill_blanking.sh.desktop" and following is its contents:

[Desktop Entry]
Type=Application
Exec=~/Desktop/kill_blanking.sh
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=kill_blanking
Name=kill_blanking
Comment[en_US]=
Comment=

4) Put "xset s off" in /etc/rc.local
5) Also played on the cmd line with "xset -dpms" and "xset s noblank" - interestingly the latter caused a gray screen vs going fully dark.
6a) Verified that "xdotool" was installed
6b) Similar to 3a) & 3b) above I made a script with the lines below and put them in the Startup Apps folder and made the resultant file executable:
while sleep 30 ; do xdotool keydown Shift_L keyup Shift_L ; done
7) It was mentioned that updates(Update Manager) may correct problem, I have declined to use updates. If there is a specific update that does the trick, then my all means please post.

I would prefer a method to just make a few manual entries to permanently stop the screen from going dark after 10 minutes of idle time.

mark bower

zombifier25
November 3rd, 2012, 08:05 AM
Try changing the settings for darkening the screen in System Settings > Lock and Brightness.

mark bower
November 3rd, 2012, 08:48 PM
Thanks. Yes I have set "Brightness & Lock" and Power(probably does not apply since using a PC) to presumably prevent darkening. I modified my original post to mention these settings.

mark bower
November 4th, 2012, 10:08 PM
I yielded and installed updates via Update Manager. I then reinstalled "xscreensaver" and it now works as expected. That is, the settings now control the screen display time periods. Whew.

Conclusion, since there was only one response to this post I am assuming that most 12.04 users install the updates from the get-go such that they would not experience the problem described here and elsewhere.

However, I am still not satisfied that I could not make a script file work(other than for the session from the cmd line) nor a community reponse as to what specific update has a bearing on the darkening problem(what file or files needed an update to correct the problem).

mike555
November 4th, 2012, 10:57 PM
You could have installed "caffeine " and set it to not blank when certain programs are running ( like Firefox or VLC player ).

critin
November 5th, 2012, 01:44 AM
I have declined to use updates.

Do you mind saying why?

mark bower
November 5th, 2012, 02:30 AM
@mike555 I am not familiar with what Caffine is about; I will read about it.

@ critin I have been reluctant to install updates since I see persons reporting from time to time that they have a perfectly working system, but then something gets broken when they make the updates. Possibly my memory is wrong on this. At any rate, something in the 12.04 updates changes the system so that xscreensaver works, and I suppose gnome-screensaver as well.

I will say that I stay frustrated with changes in Ubuntu. In 12.04 I changed back to gnome-classic, CUPS is broken with a work around, and of course the 10 min darkening thingy. I had none of these problems in Maverick. In fact, the only reason I upgraded was I was having problems where once in a while a video would not work, like the guy recently jumping from a balloon. I have literally spent about a week getting 12.04 back to what I liked with 10.10(Maverick)