Home > Important > Fix Brightness on Xubuntu

Fix Brightness on Xubuntu


To implement that script, follow these instructions:
1. In a terminal window, type in:
Code:
mousepad ./backlight_d.sh(the mousepad application will open)
2. Copy and paste the following into the mousepad application that just opened:
Quote:
#!/bin/bash
old_b=9;
declare -i curr_b=240;
declare -i target_b=240;
while : ; do
b=`cat /sys/class/backlight/acpi_video0/brightness`;
delay=”0.5″
if [ $old_b != $b ]; then
old_b=$b
let “target_b=$b * 20 + 12”
#printf “Target: %10d\n” $target_b
fi
hex_b=”.”;
if [ “$curr_b” -lt “$target_b” ] ; then
let “curr_b=$curr_b + 2”
if [ “$curr_b” -gt “$target_b” ] ; then
let “curr_b=$target_b”
fi
hex_b=”-“
elif [ “$curr_b” -gt “$target_b” ] ; then
let “curr_b=$curr_b – 2”
if [ “$curr_b” -lt “$target_b” ] ; then
let “curr_b=$target_b”
fi
hex_b=”-“
fi
if [ $hex_b != “.” ] ; then
hex_b=`printf “%02X” $curr_b`
delay=”0.005″
setpci -s 00:02.0 F4.B=$hex_b
fi
sleep $delay
done
3. Save the file:
Code:
File->Save4. Back in the terminal window, type in the following:
Code:
sudo cp ./backlight_d.sh /etc/ && sudo chmod +x /etc/backlight_d.sh(enter your password when prompted).
5. Enter the following into the terminal window:
Code:
sudo mousepad /etc/rc.local(mousepad will open again) and before the exit 0 line, type in the following:
Code:
nohup /etc/backlight_d.sh &
 so it looks like:
Quote:
nohup /etc/backlight_d.sh &
exit 0
Restart your computer. According to that article, you should be able to adjust your brightness. Post back and let us know if it works. If not, there are a few other things we can try.
This truly works, I’ve tried it many times. In the past, everytime I had an issue with Xubuntu I was reinstalling it, instead of fixing the problem. So now that I found the explanation feel free to use it for good purposes.
Advertisements
Categories: Important
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: