How to disable screen dimming in 14.04?

18,065

Solution 1

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

Solution 2

  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:"

Solution 3

#!/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

Share:
18,065

Related videos on Youtube

opu 웃
Author by

opu 웃

Updated on September 18, 2022

Comments

  • opu 웃
    opu 웃 over 1 year

    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??

  • oz123
    oz123 over 9 years
    fails to work on my ideapad...
  • sawa
    sawa over 7 years
    I have done your second option using system settings, but it does not work for me.