Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Brightness adjustment works until I close my laptop. After I close it once I cannot adjust the brightness.

I often restart the computer to be able to adjust again. The Fn Keys do not work. The Brightness and Lock settings don't respond.

There must be a better way.

  • Toshiba, Portege.

Here is the etc/acpi/lid.sh read out. Could I adjust it?

    #!/bin/bash
# TODO:  Change the above to /bin/sh

test -f /usr/share/acpi-support/state-funcs || exit 0

. /usr/share/acpi-support/power-funcs
. /usr/share/acpi-support/policy-funcs
. /etc/default/acpi-support

[ -x /etc/acpi/local/lid.sh.pre ] && /etc/acpi/local/lid.sh.pre

if [ `CheckPolicy` = 0 ]; then exit; fi

grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]
then
    for x in /tmp/.X11-unix/*; do
    displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
    getXuser;
    if [ x"$XAUTHORITY" != x"" ]; then
        export DISPLAY=":$displaynum"       
        . /usr/share/acpi-support/screenblank
    fi
    done
else
    for x in /tmp/.X11-unix/*; do
    displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
    getXuser;
    if [ x"$XAUTHORITY" != x"" ]; then
        export DISPLAY=":$displaynum"
        grep -q off-line /proc/acpi/ac_adapter/*/state
        if [ $? = 1 ]
        then
        if pidof xscreensaver > /dev/null; then 
            su $user -c "xscreensaver-command -unthrottle"
        fi
        fi
        if [ x$RADEON_LIGHT = xtrue ]; then
        [ -x /usr/sbin/radeontool ] && radeontool light on
        fi
        if [ `pidof xscreensaver` ]; then
        su $user -c "xscreensaver-command -deactivate"
        fi
        su $user -c "xset dpms force on"
    fi
    done
fi
[ -x /etc/acpi/local/lid.sh.post ] && /etc/acpi/local/lid.sh.post
share|improve this question
1  
When you open or close the lid, /etc/acpi/lid.sh gets run. It's probably to blame for the problem. –  waltinator May 8 '12 at 5:51
    
Are you saying I could adjust this text to re-obtain my brightness adjustment capability? –  John McKean Pruitt May 8 '12 at 21:58
1  
No, I'm saying you could read /etc/acpi/lid.sh, figure out what it does, and why that makes subsequent brightness adjustments "not work". –  waltinator May 17 '12 at 4:46
    
@waaltinator unfortunately I'm still learning how to code, would you know what might be giving me my problem –  John McKean Pruitt May 19 '12 at 19:15
    
Nope. I think you'll have to describe your hardware more exactly (see this askubuntu.com/questions/14008/…), and hope for help. If you're still learning to code, DO NOT change the file!! Please - you risk getting your system into "it's broken and I can't communicate!" mode, and being very unhappy. –  waltinator May 20 '12 at 1:55
show 2 more comments

1 Answer 1

I had the same problem with a Toshiba Portege R935, and I discovered this (not so elegant) workaround:

  • as root change the value in sys/class/backlight/intel_backlight/brightness

    for example:

    echo 3000 > /sys/class/backlight/intel_backlight/brightness
    

Warning: these values are not between 0 and 7 (as the ones in sys/class/backlight/toshiba/), but between284and4539`, or something like that.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.