You are not logged in.

#1 2010-04-20 19:18:34

tomislavski
Member
Registered: 2010-02-09
Posts: 87

[SOLVED]suspend laptop: brightness always goes to 0

Hi everyone,

I'm using laptop-mode to control the brightness of my LCD. Here is the snipped of the "/etc/laptop-mode/conf.d/lcd-brightness.conf":

#
# Should laptop mode tools control LCD brightness?
#
CONTROL_BRIGHTNESS=1


#
# Commands to execute to set the brightness on your LCD
#
BATT_BRIGHTNESS_COMMAND="echo 22"
LM_AC_BRIGHTNESS_COMMAND="echo 23"
NOLM_AC_BRIGHTNESS_COMMAND="echo 24"
BRIGHTNESS_OUTPUT="/proc/acpi/video/IGFX/LCD/brightness"

I work with a lot of vim sessions and multiple xterms and when I set my laptop to hibernate (suspend2disk) with pm-utils, everything works lightning fast and without a problem (Arch is a revelation for me, it's magnificent). The only problem is that the brightness variable in the /proc/acpi/video/IGFX/LCD/brightness, the current one is set to 0 after I wake up from suspend to disk. If I unplug the cable, nothing happens (switch to battery), if I plug it back in, a small increase (not like the huge ones I have defined in the code block above) happens.

What could be the reason? Could acpi control this even if I have set the laptop-mode obviously to control the LCD?

Has anyone had these issues? This is the only thing that is keeping me shuting down the machine.... and to resume my work after takes about 4.67 annoying minutes with the use of vim sessions....

Help?

Last edited by tomislavski (2010-04-21 11:59:09)

Offline

#2 2010-04-21 11:58:36

tomislavski
Member
Registered: 2010-02-09
Posts: 87

Re: [SOLVED]suspend laptop: brightness always goes to 0

I found the solution.

The note in the /etc/laptop-mode/conf.d/lcd-brightness.conf that states that these values for the echo commands at the bottom of this file can be read from /sys/class/backlight/../max_brightness are wrong at least for my Laptop. This info is for HP Compaq 615:

if you want to have your brightness set properly, check out the values that are already in the /proc/acpi/video/IGFX/LCD/brightness file (with maybe IGFX changed to VID on some machines). In this file the values are defined from 0 to 100, so the value of 24 from the max_brightness file is actually a very low brightness value, not even near to 100% brightness. The proper way to define the echo commands in lcd-brightness.conf file is to set them accordingly to the ones defined in the brightness file, not max_brightness file.

big_smile cool. I love Arch linux. It makes me learn. big_smile

Offline

Board footer

Powered by FluxBB