Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Unable to change brightness in Lenovo B570 laptop

  1. #11
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Unable to change brightness in Lenovo B570 laptop

    Good news! Not a solution, but a potential workaround.

    I came across a report where someone with a lenovo system still needed to specify acpi_backlight=vendor. It might be worth a shot just to see.

    Otherwise, according to that website, KDE integration hasn't been developed yet, so you may have to write your own scripts for now. I would suggest adding to /etc/rc.local (before the last "exit 0" statement) the following:
    Code:
    chmod 777 /sys/class/backlight/intel_backlight/brightness
    echo some_value > /sys/class/backlight/intel_backlight/brightness
    exit 0
    This would set the rights to this file so that everyone can write to it (meaning no need for sudo) and the second command would set a default brightness value that you would be comfortable with.

    You can then use a script like this:
    Code:
    #!/bin/bash
    # /usr/local/bin/brightness
    # wrapper script to change brightness values
    # make script executable
    
    # constants - edit as required
    UPPER=100
    LOWER=0
    INCREMENT=10
    DECREMENT=10
    
    # current value
    CURRENT=`cat /sys/class/backlight/intel_backlight/brightness`
    NEW=$CURRENT
    
    case $1 in
    	up)
    		if [ $(($CURRENT+$INCREMENT)) -le $UPPER ]; then
    			NEW=$(($CURRENT+$INCREMENT))
    		fi
    	;;
    	down)
    		if [ $(($CURRENT-$DECREMENT)) -ge $LOWER ]; then
    			NEW=$(($CURRENT-$DECREMENT))
    		fi
    	;;
    	*)
    	;;
    esac
    
    # set the new brightness value 
    echo $NEW > /sys/class/backlight/intel_backlight/brightness
    
    exit 0
    ...to change the brightness (make sure you adjust the values of UPPER, LOWER, INCREMENT, DECREMENT so they work for you) and run brightness up or brightness down when you want to change the brightness. You can also try to map your current FN function keys to this script.

  2. #12
    Join Date
    Jan 2010
    Beans
    13
    Distro
    Kubuntu 13.10 Saucy Salamander

    Talking Re: Unable to change brightness in Lenovo B570 laptop

    Thank you very much! This chmod in /etc/rc.local is just what I need! (isn't chmod 666 better?)

    But I think I'll write a bit different script - to save the brightness value between sessions, not make a default one. Now that it's possible to write to the brightness file, I'm free to use Python for this.

    Thanks again!
    Last edited by BlaXpirit; August 20th, 2011 at 02:27 PM.

  3. #13
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Unable to change brightness in Lenovo B570 laptop

    Quote Originally Posted by BlaXpirit View Post
    Thank you very much! This chmod in /etc/rc.local is just what I need! (isn't chmod 666 better?)
    Ah yes, no need to make it executable.

    But I think I'll write a bit different script - to save the brightness value between sessions, not make a default one. Now that it's possible to write to the brightness file, I'm free to use Python for this.
    If you don't mind sharing, I'd like to have a look at your completed script. Maybe make use of it elsewhere.

    Thanks again!
    No worries.

  4. #14
    Join Date
    Jan 2010
    Beans
    13
    Distro
    Kubuntu 13.10 Saucy Salamander

    Re: Unable to change brightness in Lenovo B570 laptop

    So, here is the script.

    • Put `brightness restore` to /etc/rc.local
    • Map `brightness inc` and `brightness dec` to some hotkeys.

  5. #15
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Unable to change brightness in Lenovo B570 laptop

    Thats a nice bit of coding there.
    Thanks.

  6. #16
    Join Date
    Feb 2009
    Beans
    2

    Re: Unable to change brightness in Lenovo B570 laptop

    Quote Originally Posted by BlaXpirit View Post
    So, here is the script.

    • Put `brightness restore` to /etc/rc.local
    • Map `brightness inc` and `brightness dec` to some hotkeys.
    Awesome, thanks! This works a treat! I really enjoy the restore function, very thoughtful to put that in.

    Where do I vote???

    PS: For in case somebody else stumbles across this thread, I have noticed that the official bug in the KDE4 tracker has been updated with a preliminary patch on the 30th of September 2011, so now it's only a matter of time before KDE4 has full support for this new backlight device. If it interest you, the bug URL is here:

    http://bugs.kde.org/show_bug.cgi?id=271467


    Regards,
    jhenkins

  7. #17
    Join Date
    Jan 2010
    Beans
    13
    Distro
    Kubuntu 13.10 Saucy Salamander

    Smile Re: Unable to change brightness in Lenovo B570 laptop

    Quote Originally Posted by jhenkins View Post
    Where do I vote???
    Well, you could vote here.

    Quote Originally Posted by jhenkins View Post
    ...it's only a matter of time before KDE4 has full support for this new backlight device.
    Good to hear!

  8. #18
    Join Date
    Sep 2006
    Beans
    19
    Distro
    Kubuntu 7.10 Gutsy Gibbon

    Re: Unable to change brightness in Lenovo B570 laptop

    Hi,

    I have used a similar workaround, however in my case (Panasonic CF-T5) the hotkeys used to work out of the box in Kubuntu Lucid. Brightness keys stopped working in Kubuntu Natty, while other hotkeys (volume, sleep/hybernate,..) still work.
    I filed a bug report here:
    https://bugs.kde.org/show_bug.cgi?id=283471

  9. #19
    Join Date
    Jan 2010
    Beans
    13
    Distro
    Kubuntu 13.10 Saucy Salamander

    Re: Unable to change brightness in Lenovo B570 laptop

    This has been fixed in Ubuntu 11.10!

Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •