f
t
G+

Saturday, July 18, 2015

How To Save Screen Brightness In Ubuntu 14.04

How To Save Screen Brightness
In Ubuntu 14.04 LTS
(Solution For Screen Brightness Problem On Ubuntu 14.04)

Laptop users still have the screen brightness problem with Ubuntu 14.04.Every time the screen brightness gets maximum value on Ubuntu startup.

we can solve this problem by adding a small startup script to adjust the screen brightness levels on ubuntu startup.The script will automatically set/overwrite the default brightness value with specified/desired brightness value when Ubuntu boots up.

Here the step by step guide to save the screen brightness on Ubuntu 14.04 :

step 1 :

open Terminal by Ctrl+Alt+T

step 2:

Navigate to backlight directory.

cd /sys/class/backlight

step 3 :

Now you can see two directories(acpi_video0 and radeon_bl0) inside the backlight directory.
To see them use ls command.

ls

step 4 :

The upcomig steps depends on your computer processor . So you need find whether your computer is powered by intel or AMD.
The following command will show your processor name....

lscpu |grep -i vendor

sample output for AMD :

shivaraj@shivaraj-A14RM0E:~$ lscpu |grep -i vendor Vendor ID: AuthenticAMD shivaraj@shivaraj-A14RM0E:~$

sample output for Intel :

shivaraj@shivaraj-Latitude-D630:~$ lscpu |grep -i vendor Vendor ID: GenuineIntel shivaraj@shivaraj-Latitude-D630:~$

step 5 :

  • Change your screen brightness level to which you want to set as default.
  • Now find the equivalent value for current brightness level by using this command

If your processor is AMD then follow this step....

cat /sys/class/backlight/acpi_video0/actual_brightness

The above command will give brightness value.

Sample output:

shivaraj@shivaraj-A14RM0E:~$ cat /sys/class/backlight/acpi_video0/actual_brightness 2 shivaraj@shivaraj-A14RM0E:~$

If your processor is Intel then follow this step....

cat /sys/class/backlight/intel_backlight/actual_brightness

if the above command didn't show any variations in brightness value for different brightness values..
then, in above command, replace intel_backlight with the name of another folder(see:the output of step 3) present inside the backlight folder. and try again..

Sample output:

shivaraj@shivaraj-Latitude-D630:~$ cat /sys/class/backlight/dell_backlight/actual_brightness 2 shivaraj@shivaraj-Latitude-D630:~$
[NOTE: Remember This Brightness Values For Future Usage]

step 6 :

Get root privileges by using this command:

sudo -i

step 7 :

Now we need to create a new configuration file called fixbrightness.conf

gedit /etc/init/fixbrightness.conf

step 8 :

Now Paste the following code into the above created (fixbrightness.conf) file.

description "Sets brightness after graphics device is loaded"
start on graphics-device-added
task
exec /bin/echo 2 > /sys/class/backlight/acpi_video0/brightness

In above code,Replace the value 2 > with the brightness value we found in step 5
Similarly, Replace the folder name acpi_video0 with the folder name you used in step 5(before the word actual_brightness in code)

step 9 :

Thats It... Now Reboot Your System

sudo reboot