comatose
comatose
comatose
comatose
hyenas
hyenas
hyenas
hyenas
Linux MintPPC Forums • View topic - Adjusting backlight on nvidia based machines

All times are UTC + 1 hour





Post new topic Reply to topic  [ 4 posts ] 
  Print view

Adjusting backlight on nvidia based machines
Author Message
PostPosted: Thu Jan 26, 2012 10:17 am 
Site Admin
Offline

Joined:Fri Oct 08, 2010 3:45 pm
Posts:2744
Edit: /sys/class/backlight/nvidiabl0/brightness


Top
 Profile  
 

Re: Adjusting backlight on nvidia based machines
PostPosted: Thu Feb 02, 2012 7:51 am 
Offline

Joined:Sat Dec 10, 2011 6:57 pm
Posts:22
I ran into this:
http://forum.lxde.org/viewtopic.php?f=5&t=1374
And adapted the script to work with the different location of the brightness settings:
Code:
# The first argument is whether to increase the brightness (+) or
# decrease the brightness (-).
# The second argument is optional and indicates the step size when
# increasing or decreasing the brightness. The default is 1.
if [ $# -eq 0 ]; then exit 1; fi
bright_file="/sys/class/backlight/nvidiabl0/brightness"
mbright_file="/sys/class/backlight/nvidiabl0/max_brightness"
while read line; do
brightness=$line
done < <(cat "$bright_file")
while read line; do
max_brightness=$line
done < <(cat "$mbright_file")
step=1
if [ $# -gt 1 ]; then
step=$2
fi
declare -i brightness
if [ $1 = "-" ]; then
if [ $brightness -ne 0 ]; then
brightness=$brightness-$step;
echo $brightness > /sys/class/backlight/nvidiabl0/brightness
fi
else
if [ $brightness -ne $max_brightness ]; then
brightness=$brightness+$step;
echo $brightness > $bright_file
fi
fi

Next step is to bind
Code:
/usr/bin/adjust_brightness.sh -
to key 192
and
Code:
/usr/bin/adjust_brightness.sh +
to key 193

Anybody knows where the key binding config files are? I have looked around a bit and it is suppose to be HOME/.config/openbox/rc.xml but I can't find it. I only found /usr/share/lxde/openbox/rc.xml


Top
 Profile  
 

Re: Adjusting backlight on nvidia based machines
PostPosted: Fri Feb 03, 2012 8:53 pm 
Offline

Joined:Sat Dec 10, 2011 6:57 pm
Posts:22
I am getting the following error when running the script from command line:
Syntax error: redirection unexpextected

I thought may be it was because the nvidiabl0 is a sim link but even with the real path I still get the same error.


Top
 Profile  
 

Re: Adjusting backlight on nvidia based machines
PostPosted: Fri Feb 03, 2012 9:46 pm 
Site Admin
Offline

Joined:Fri Oct 08, 2010 3:45 pm
Posts:2744
I would Google it.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


  Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Style by web designer custom , optymalizacja seo pozycjonowanie stron pozycjonowanie
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
comatose
comatose
comatose
comatose
hyenas
hyenas
hyenas
hyenas