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

I am using Kubuntu 12.10 and have 10 min. screen timeout for reducing the brightness. I just migrated from Windows and now I have a problem with "idle mode". I've also read this and this.

But for example, when I am also talking via skype or any video conference software, I have the same problem. I do not want to move my mouse every time since this is annoying.

How can I write a script to prevent screen sleeping or dimming if there is a sound, for example?

share|improve this question
See if the answers here help:… – user25656 Feb 24 '13 at 15:30
But in this case when Skype is running without conversation it still remains on and moves the mouse while I am working on something. – wakeup Feb 24 '13 at 15:54
@user1754665: In the answer linked by vasa1, modify the sleep_period variable to 599 instead of 60. That should reduce the frustration to a great extent. Also let me check if we have other options :) – Aditya Feb 24 '13 at 16:33
what are thee settings in 14.04? settings you mention do not exist in 14.04. thanks – user271060 Apr 19 '14 at 17:09
up vote 2 down vote accepted

I found a solution for my problem: caffeine...

Add repository:

sudo add-apt-repository ppa:caffeine-developers/ppa

Update package list:

sudo apt-get update

Install caffeine:

sudo apt-get install caffeine python-glade2
share|improve this answer

I'm quite sure that the exact thing you want to do would not worth the hassle. However, as sounds are usually related to a single app why would not you write a script for just that application to turn off power savings while you keep it running?

(example is for VLC)


#Disable modes
/usr/bin/xset -dpms &
/usr/bin/xset s off &

#Open VLC
/usr/bin/vlc "$@"

#Re-enable modes
/usr/bin/xset dpms
/usr/bin/xset s on

Or you could just turn the 3 settings off that affect the display: "Dim Display" and "Screen Energy Saving" (in system settings->power management) and "Screen Saver" (in system settings->display and monitor).

But to run a background process to address the incompleteness of the power management daemon? Come on...

By the way this "feature" is present at least since Lucid (10.04, 29/04/2010). It is still present in Trusty (14.04) as of 25/01/2014, I tested it. How embarrassing would that be for me if I was an Ubuntu developer?

share|improve this answer
Exactly, I am still wondering why this cannot be implemented by default and we need to use those kind of things. I think this script should be duplicated for all other applications also. Can we modity this to check more then one app (vlc, dragon, spotify, clementine) and execute the same things? – wakeup Jan 25 '14 at 19:10

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.