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. – Sergey Chupov Jan 26 at 21:13
up vote 8 down vote accepted

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 Dec 27 '14 at 19:44
  • I have done your second option using system settings, but it does not work for me. – sawa Aug 10 '16 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:"
#!/bin/bash

# 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

we_turned_it_off=0

while true; do
    sleep 60
    flash_on=0

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

        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
            we_turned_it_off=1
        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
            we_turned_it_off=0
        fi

    done
done    

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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.