When I am inactive for 4-5 minutes, the screen is automatically dimmed. This is too much boring when I am watching movie. How to disable this thing??

  • I just want to add that in Google Chrome there's no such problem, so apparently it's not obligatory to install some software to prevent this.
    – scadge
    Commented Jan 26, 2018 at 21:13

3 Answers 3


You can install Caffeine to do this:

sudo add-apt-repository ppa:caffeine-developers/ppa
sudo apt-get update
sudo apt-get install caffeine

Then search for Caffeine in your Dash to start it. It should start automatically after a reboot.

Now Caffeine will show an indicator in the top right of your screen. Click on it to enable Caffeine (your PC won't go to sleep now). Click again to disable it and Ubuntu will follow its usual sleep schema.

You can also disable the sleep permanently if you prefer.

  1. Open System Settings
  2. Click on Brightness & Lock
  3. At Turn screen off when inactive for select Never
  • fails to work on my ideapad...
    – oz123
    Commented Dec 27, 2014 at 19:44
  • I have done your second option using system settings, but it does not work for me.
    – sawa
    Commented Aug 10, 2016 at 8:01
  1. System Tools -> Preferences -> Power
  2. Click on "screen brightness" in the Tip message:

Tip: screen brightness affects how much power is used

  1. Select "Never" for "Turn screen off when inactive for:"

# Cleanup any bad state we left behind if the user exited while flash was
# running
gconftool-2 -s /apps/gnome-screensaver/idle_activation_enabled --type bool true


while true; do
    sleep 60

    for pid in `pgrep firefox` ; do
        if grep libflashplayer /proc/$pid/maps > /dev/null ; then

        ss_on=`gconftool-2 -g /apps/gnome-screensaver/idle_activation_enabled`

        if [ "$flash_on" = "1" ] && [ "$ss_on" = "true" ]; then
            gconftool-2 -s /apps/gnome-screensaver/idle_activation_enabled \
                --type bool false
        elif [ "$flash_on" = "0" ] && [ "$ss_on" = "false" ] \
                && [ "$we_turned_it_off" = "1" ]; then
            gconftool-2 -s /apps/gnome-screensaver/idle_activation_enabled \
                --type bool true


save it as .sh file and add this file to session and startup

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .