← Back to team overview

mactel-support team mailing list archive

Re: LCD panel brightness control for MacBookPro6, 2

 

On 05/05/2010 09:55 PM, Henrik Rydberg wrote:
Your changes are taken from the pommed git head?

No, I used the sources from the ppa repository. I can test my patch with the git head as well, if you want.
What about LCD on lid close, does that work satisfactorily?
Yes, this works great. I also tested suspend/resume (mbp-nvidia-bl related): works also great - the last setting is restored even though you can see that brightness is briefly (less than a second) turned to maximum.

During my suspend/resume experiments, I noticed that pommed sometimes (but only after the resume) stops to control the keyboard backlight: using F5 and F6 doesn't work anymore until I restart pommed.. strange:

KEY: keyboard backlight up

KEY: keyboard backlight up

KEY: keyboard backlight up

KEY: keyboard backlight up

KEY: keyboard backlight up

KEY: keyboard backlight up

KEY: keyboard backlight up

KEY: keyboard backlight up

KEY: keyboard backlight up

KEY: keyboard backlight up
KBD: inhibit set 0x08 -> 0x08
Ambient light: right 0, left 1
DBus ambientLight: 1 1 0 0
DBus process watch

KEY: keyboard backlight up

KEY: keyboard backlight up

KEY: keyboard backlight up

KEY: keyboard backlight up

KEY: keyboard backlight up

KEY: keyboard backlight up

KEY: keyboard backlight up

KEY: keyboard backlight up
KBD: inhibit set 0x08 -> 0x08
Ambient light: right 0, left 1
DBus ambientLight: 1 1 0 0
DBus process watch
KBD: inhibit set 0x08 -> 0x08
Ambient light: right 0, left 1
DBus ambientLight: 1 1 0 0
DBus process watch
KBD: inhibit set 0x08 -> 0x08
Ambient light: right 0, left 1
DBus ambientLight: 1 1 0 0
DBus process watch
KBD: inhibit set 0x08 -> 0x08
Ambient light: right 0, left 1
DBus ambientLight: 1 1 0 0
DBus process watch
KBD: inhibit set 0x08 -> 0x08
Ambient light: right 0, left 1
DBus ambientLight: 1 1 0 0
DBus process watch
KBD: inhibit set 0x08 -> 0x08
Ambient light: right 0, left 1
DBus ambientLight: 1 1 0 0
DBus process watch
The keyevents arrive..

This is after a restart of pommed (and where it works again):
KEY: keyboard backlight up
Trying /sys/class/leds/smc::kbd_backlight/brightness
KBD backlight value is 0
KBD stepping +16 -> 16
Trying /sys/class/leds/smc::kbd_backlight/brightness
KBD backlight value is 0
Trying /sys/class/leds/smc::kbd_backlight/brightness
KBD backlight value set to 16
DBus kbdBacklight: 16 0
DBus process watch
Ambient light: right 0, left 1
DBus ambientLight: 1 1 0 0
Ambient light lower threshold reached
Trying /sys/class/leds/smc::kbd_backlight/brightness
KBD backlight value is 16
DBus process watch

KEY: keyboard backlight up
Trying /sys/class/leds/smc::kbd_backlight/brightness
KBD backlight value is 16
KBD stepping +16 -> 32
Trying /sys/class/leds/smc::kbd_backlight/brightness
KBD backlight value is 16
Trying /sys/class/leds/smc::kbd_backlight/brightness
KBD backlight value set to 32
DBus kbdBacklight: 32 16

KEY: keyboard backlight up
Trying /sys/class/leds/smc::kbd_backlight/brightness
KBD backlight value is 32
KBD stepping +16 -> 48
Trying /sys/class/leds/smc::kbd_backlight/brightness
KBD backlight value is 32
Trying /sys/class/leds/smc::kbd_backlight/brightness
KBD backlight value set to 48
DBus kbdBacklight: 48 32

and that's my config - in case I set something stupid:

kbd {
        # default value for automatic backlight (0 - 255)
        default = 0
        # step value (1 - 127)
        step = 16
        # ambient light thresholds for automatic backlight (0 - 255)
        on_threshold = 20
        off_threshold = 40
        # enable/disable automatic backlight
        auto = yes
# idle timer - switches off keyboard backlight automatically (timeout in seconds, -1 to disable)
        idle_timer = 60
}


 -bf



References