Comment 26 for bug 451282

pauls (paulatgm) wrote :

I wonder if there was a change in how acpi records / sets brightness and gnome-power-manager was not updated to realize it.

I notice 2 different kernel locations on my system for brightness.

One is /sys/devices/virtual/backlight/acpi_video0/brightness and has the value of 0 on boot up. This seems strange because the lcd is at maximum brightness.

The other is /sys/devices/virtual/backlight/acpi_video0/actual_brightness and has the value of 7 on boot up. On my system, 7 is the maximum.

I suspect on suspend | hibernate that gnome-power-manager is saving "brightness" rather than "actual_brightness" and restoring that upon resume.

So, I added this little script to /etc/rc.local to set them the same.

brt=`cat /sys/devices/virtual/backlight/acpi_video0/brightness`
abrt=`cat /sys/devices/virtual/backlight/acpi_video0/actual_brightness`
if (( $brt != $abrt )) ; then
echo $abrt > /sys/devices/virtual/backlight/acpi_video0/brightness

Now, on my first suspend the bug does not occur.

I'm not sure if this will be the same for everyone. To find out your own brightness, just search /sys/ with this command:

paul :~$ find /sys/ -iname '*bright*'

If your locations are different, then change /etc/rc.local to the different values for yours.