Whenever I wake up my laptop from sleep or start it up, brightness is set to max.
Is there any way I can set it lower by default?
Whenever I wake up my laptop from sleep or start it up, brightness is set to max.
Is there any way I can set it lower by default?
if we can find a command that will affect the backlight yes
does that work on your system?Code:xbacklight -set 50
Laptop: ASUS A54C-NB91 (Storage: WD3200BEKT + MKNSSDCR60GB-DX); Desktop: Custom Build - Images included; rPi Server
Putting your Networked Printer's scanner software to shame PHP Scanner Server
I frequently edit my post when I have the last post
It does not work...
Give the results of this command
ThanksCode:ls /sys/class/backlight/*/
Here you go:
Code:/sys/class/backlight/acpi_video0/: actual_brightness brightness max_brightness subsystem uevent bl_power device power type /sys/class/backlight/apple_backlight/: actual_brightness brightness power type bl_power max_brightness subsystem uevent /sys/class/backlight/intel_backlight/: actual_brightness brightness max_brightness subsystem uevent bl_power device power type
you may need to edit the BOLD parts of this post for this to work for you based on the output of ls /sys/class/backlight/
I just made a script
this is meant as a replacement for xbacklight
script:Code:sudo apt-get remove xbacklight gksu gedit /usr/local/bin/xbacklight sudo chmod +x /usr/local/bin/xbacklight sudo chmod 777 /sys/class/backlight/acpi_video0/brightness
This makes the script not need sudo every time you reboot:Code:#!/bin/bash where="/sys/class/backlight/acpi_video0" max=`cat $where/max_brightness` current=`cat $where/actual_brightness` if [ "$1" == "--set" ];then if [ ! "`echo $2 | sed 's/[a-Z]//g'`" == "$2" ];then `dirname $0`/`basename $0` exit elif [ 0`echo "$2" | sed 's/.//' | grep "^[0-9]*$"` -gt 0 ] && [ ! "`echo \"$2\" | grep \"^[0-9]*$\"`" == "$2" ];then if [ "`echo ${2:0:1}`" == "+" ];then X=$(($current+`echo ${2:1}`)) elif [ "`echo ${2:0:1}`" == "-" ];then X=$(($current-`echo ${2:1}`)) else echo "${2:0:1} is not a +/-" exit fi if [ $X -gt $max ];then echo $max > $where/brightness elif [ $X -lt 0 ];then echo 0 > $where/brightness else echo $X > $where/brightness fi exit fi if [ ! "`echo \"$2\" | grep \"^[0-9]*$\"`" == "$2" ];then echo "$2 is not a Intiger" elif [ "$2" -lt $(($max+1)) ] && [ "$2" -gt -1 ];then echo $2 > $where/brightness elif [ "$2" -lt 0 ];then echo 0 > $where/brightness else echo $max > $where/brightness fi elif [ "$1" == "--get" ];then if [ "$2" == "current" ];then echo $current elif [ "$2" == "max" ];then echo $max else echo -e "Current: $current\nMaximum: $max" fi else echo -e "Usage:\n\t`basename $0` --set Int | +Int | -Int" echo -e "\t`basename $0` --get current | max | NULL" fi exit
Code:sudo sed '/^[^#]*exit 0/i chmod 777 /sys/class/backlight/acpi_video0/brightness \&' -i /etc/rc.local
Last edited by pqwoerituytrueiwoq; October 9th, 2012 at 05:34 AM. Reason: Attached copy of script with installer
Laptop: ASUS A54C-NB91 (Storage: WD3200BEKT + MKNSSDCR60GB-DX); Desktop: Custom Build - Images included; rPi Server
Putting your Networked Printer's scanner software to shame PHP Scanner Server
I frequently edit my post when I have the last post
Hi ,
is this script really needed ?
I mean
I would ask for the results of
Then we can see what value affects the brightnessCode:sudo cat /sys/class/backlight/acpi_video0/brightness sudo cat /sys/class/backlight/apple_backlight/brightness sudo cat /sys/class/backlight/intel_backlight/brightness
withbolds may change..Code:echo "VALUE" | sudo tee /sys/class/backlight/acpi_video0/brightness
and after we found what is the correct command , we could just add the command to /etc/rc.local .
By the way , I don't know coding - scripting , I admire "scripters" and I wish will work.
Thanks
the script i made would pre-process the command you gave
as long as VALUE is a valid value your command is the same as my script (except mine cat tell you your brightness and max brightness)
with the script i made you could put xbacklight --set VALUE in the /etc/rc.local script
could also make custom keyboard shortcuts for it to increase/decrease brightness
there was one person who was not able to set the brightness in /etc/rc.local but it worked from a lightdm startupscript
but that was using xbacklight whch may act like numlockx and require lightdm to be running to work
Last edited by pqwoerituytrueiwoq; October 8th, 2012 at 10:31 PM.
Laptop: ASUS A54C-NB91 (Storage: WD3200BEKT + MKNSSDCR60GB-DX); Desktop: Custom Build - Images included; rPi Server
Putting your Networked Printer's scanner software to shame PHP Scanner Server
I frequently edit my post when I have the last post
These are good for calling it from a script (i assume the min is 0 for everyone)
xbacklight --get max
xbacklight --get current
This is good for humans
xbacklight --get
This is to increase the brightness
xbacklight --set +2
This is to decrease the brightness
xbacklight --set -2
This is to set the brightness
xbacklight --set 5
This is for the help output
xbacklight
xbacklight --help
xbacklight -h
xbacklight "I dont know what I am doing"
Laptop: ASUS A54C-NB91 (Storage: WD3200BEKT + MKNSSDCR60GB-DX); Desktop: Custom Build - Images included; rPi Server
Putting your Networked Printer's scanner software to shame PHP Scanner Server
I frequently edit my post when I have the last post
Bookmarks