Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Pbbuttonsd for the Macbook Pro
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
bruda
Guru
Guru


Joined: 06 May 2004
Posts: 376
Location: Sherbrooke, QC, Canada

PostPosted: Mon Dec 04, 2006 8:40 pm    Post subject: Pbbuttonsd for the Macbook Pro Reply with quote

Note. The most recent pbbuttonsd version as per this thread is now the official release 0.8.0 (the ebuild is mine though so not official I guess). I introduced in the ebuild the new use flag "macbook" which will configure the daemon for the Intel based Macs. The "doc" flag now causes the doxygen documentation to be built and put into /usr/share/doc as usual.

Hi all,

This is intended as a continuation of the discusion on the matter in the MacBook Pro Core 2 Duo thread. I have made some attempts at making pbbuttonsd work on the new Macbooks and Matthias Grimm (the maintainer of the daemon) was kind enough to include my hacks into a new, test version of the thing. Here is the result:

bruda wrote:
I have talked to Matthias and since he does not mind having more than one beta tester here is the teste version of pbbuttonsd: http://turing.ubishops.ca/misc/pbbuttonsd-0.7.9.8.ebuild. This works correctly only with gtkpbbuttons 0.6.9 (in the sense that the older gtkpbbuttons expect light to be measured on a 16-values scale but the newer versions of pbbuttonsd provide a 100-values scale) so you need to install that (I use for the purpose the following slightly modified ebuild: http://turing.ubishops.ca/misc/gtkpbbuttons-0.6.9.ebuild). Note that this test version has a different name for the config file. I quote Matthias:
Quote:
The attached version got a new configurations handling with is not fully compatible with the old one. The new configuration file is called pbbuttonsd.cnf so it won't conflict with the old one. Nevertheless you should have a look at the new configuration file because the old one is _not_ automatically converted.

As you suggested it should be made clear that it is only a test version and should not be used in any production environment. Nevertheless I'm interested in any feedback (positive or negative). Your code will be part of the upcoming release if no negative side effects will be reported. I will try to get basic ACPI battery functions working until release date.


So if anybody is using this and works (or does not) could you please post some feedback. As I said, the automatic adjustment of backlight does not work for me--actually it starts by working but dies a couple of minutes later; I am not sure why, since the keyboard light adjustment works just fine. I said that I will look into the matter but I did not find the time to date, so if anybody finds anything wrong I would be extatic to hear it.


For the record (and for self-containment purposes) here is some subsequent discusion:

Scott Price wrote:
The good news: All of the buttons work! :D

The bad news:

#1 The first thing it does is shut off my display and turn the keyboard light on full. I can easily use the keys to fix that, but it is kind of annoying. It almost seems as if the program is getting the two backlights confused. Like it should be doing the opposite.

#2 The auto stuff doesn't work (or does strange things, like turn off the display and keyboard lights when the room goes dark). The not working is more common.

#3 The program crashes hard if it can't find the mixer elements you specify (darned spelling errors...)

#4 The program doesn't seem to compile without IBaM support. It errors saying some ibam_ struct is missing.

All the buttons work!!! :D :D :D

Is there a bug tracking database that we can enter these bugs into?


bruda wrote:
Scott Price wrote:
The good news: All of the buttons work! :D

Cool :D
Quote:
#1 The first thing it does is shut off my display and turn the keyboard light on full. I can easily use the keys to fix that, but it is kind of annoying. It almost seems as if the program is getting the two backlights confused. Like it should be doing the opposite.

This is rather starnge, the program is supposed to turn off the backlight for an instant but then it powers it back on.
Quote:
#2 The auto stuff doesn't work (or does strange things, like turn off the display and keyboard lights when the room goes dark). The not working is more common.

What is the output of applesmc (from macbook-tools, that's where I got most of the sensor readout code from) wth various lighting conditions? For this purpose I am doing a loop like
Code:
while true; do applesmc | grep Light; sleep 1; done

and I keep covering the side grilles where the sensors are, can you try this and see what happens with the sensors? Then it would probably be nice to enable debugging in pbbuttonsd and see what are the actual readouts from there.
Quote:
#3 The program crashes hard if it can't find the mixer elements you specify (darned spelling errors...)

Unfortunately that's how pbbuttonsd behaved since I knew it.
Quote:
Is there a bug tracking database that we can enter these bugs into?

I am not aware of any. The pbbuttonsd page is http://pbbuttons.berlios.de/ and I am pretty sure Matthias welcomes bug reports and fixes (I know because I bugged him in the past). I will also point Matthias to this thread (or do you think it would be better to start a new one? let me know before I point anybody to it).


kaiRy wrote:
When I emerge pbbuttonsd with the ibam flag and when I start the service it tell me that "/var/lib/ibam doesn't exist" and when I emerge it withouth this flag the emerge fails.


bruda wrote:
kaiRy wrote:
When I emerge pbbuttonsd with the ibam flag and when I start the service it tell me that "/var/lib/ibam doesn't exist".

Have you tried creating the directory? As far as I remember the ebuild creates it, but still...

_________________
Quid latine dictum sit altum videtur


Last edited by bruda on Wed Feb 21, 2007 4:28 pm; edited 3 times in total
Back to top
View user's profile Send private message
kaiRy
n00b
n00b


Joined: 22 Jul 2006
Posts: 14

PostPosted: Tue Dec 05, 2006 12:22 pm    Post subject: Reply with quote

I create it and it works but I had the same problem Black Screen and full keyboard backlight.
All buttons work but I can't change the volume level.. it doesn't detect my alsa server
Back to top
View user's profile Send private message
Scott Price
n00b
n00b


Joined: 07 Feb 2003
Posts: 44
Location: Hopkins, MN

PostPosted: Tue Dec 05, 2006 3:18 pm    Post subject: Reply with quote

I had to change the mixer values for my computer.
Code:

[MODULE MIXER ALSA]
Card=default
Channels=PCM, Front, Headphone


And make sure not to use quotes. It takes them literally. ;)

Scott =)
Back to top
View user's profile Send private message
bruda
Guru
Guru


Joined: 06 May 2004
Posts: 376
Location: Sherbrooke, QC, Canada

PostPosted: Tue Dec 05, 2006 3:39 pm    Post subject: Reply with quote

Could it be that you are setting too low a minimal value for backlight? My display goes blank (or almost) with a backlight value under 30 (absolute value out of 255, ~12%), so it might be that your machine thinks that the room is really dark so it adjust the keyboard illumination to maximum and the display backlight to minimum (and if this minimum is too low it effectively blanks it). What is the output of your sensors? Are they stuck at 0 (or -1, which is an error condition)?

I am having no problems of this kind. Could be that I am running an x86_64 system (amd64 stable with a few exceptions) but I seriously doubt it. In any case, the first thing to check would be that the SMC interace (its ambient component to be precise) works as advertised.

If somebody wants to poke into the source code note that the SMC interface is all in src/module_imac.c.
_________________
Quid latine dictum sit altum videtur
Back to top
View user's profile Send private message
Scott Price
n00b
n00b


Joined: 07 Feb 2003
Posts: 44
Location: Hopkins, MN

PostPosted: Tue Dec 05, 2006 3:47 pm    Post subject: Reply with quote

Okay, I did the light sensor test. These are the results:

Code:

Light: Left: 21, Right: 26
Light: Left: 20, Right: 26
Light: Left: 27, Right: 1
Light: Left: 26, Right: 0
Light: Left: 30, Right: 0
Light: Left: 2, Right: 19
Light: Left: 0, Right: 26
Light: Left: 0, Right: 26
Light: Left: 26, Right: 27
Light: Left: 26, Right: 27
Light: Left: 27, Right: 30
Light: Left: 27, Right: 30
Light: Left: 27, Right: 29
Light: Left: 27, Right: 29
Light: Left: 23, Right: 28
Light: Left: 32, Right: 42
Light: Left: 59, Right: 65
Light: Left: 67, Right: 86
Light: Left: 70, Right: 90
Light: Left: 68, Right: 94
Light: Left: 68, Right: 82
Light: Left: 21, Right: 24
Light: Left: 31, Right: 31
Light: Left: 29, Right: 30
Light: Left: 29, Right: 30
Light: Left: 29, Right: 31


You can see when I put my hand over each side, then when I held it so that it saw more light. It seems to be working.

Scott =)
Back to top
View user's profile Send private message
bruda
Guru
Guru


Joined: 06 May 2004
Posts: 376
Location: Sherbrooke, QC, Canada

PostPosted: Tue Dec 05, 2006 4:07 pm    Post subject: Reply with quote

Seems to be working alright. I presume you adjusted the minimal backlight to something that makes sense too. Would it be too much to ask you whether the sensor readout is correct in the daemon? This would imply adding a debug statement in getRawAmbient() along the following lines:
Code:
printf("getRawAmbient: left %d, right %d", left, right);

right after the return. This gives you the sensor values as pbbuttonsd sees them every second or so.

If the values are correct and your bounds are sane then it might well be that we are seeing the same problem (the backlight control failing for yet unknown reasons) with two different manifestations. I really want to check it out, honestly, but please don't hold your breath.
_________________
Quid latine dictum sit altum videtur
Back to top
View user's profile Send private message
kaiRy
n00b
n00b


Joined: 22 Jul 2006
Posts: 14

PostPosted: Thu Dec 07, 2006 11:42 am    Post subject: Reply with quote

Scott Price wrote:
I had to change the mixer values for my computer.
Code:

[MODULE MIXER ALSA]
Card=default
Channels=PCM, Front, Headphone


And make sure not to use quotes. It takes them literally. ;)

Scott =)


:oops: Where should I set this ??? :oops:
Back to top
View user's profile Send private message
bruda
Guru
Guru


Joined: 06 May 2004
Posts: 376
Location: Sherbrooke, QC, Canada

PostPosted: Thu Dec 07, 2006 1:37 pm    Post subject: Reply with quote

kaiRy wrote:
Scott Price wrote:
I had to change the mixer values for my computer.
Code:

[MODULE MIXER ALSA]
Card=default
Channels=PCM, Front, Headphone


And make sure not to use quotes. It takes them literally. ;)

Scott =)


:oops: Where should I set this ??? :oops:

In /etc/pbbuttonsd.cnf ;-)
_________________
Quid latine dictum sit altum videtur
Back to top
View user's profile Send private message
kaiRy
n00b
n00b


Joined: 22 Jul 2006
Posts: 14

PostPosted: Fri Dec 08, 2006 9:04 am    Post subject: Reply with quote

I put it in /etc/pbbuttonsd.conf but no change :? it's weird.
Back to top
View user's profile Send private message
Scott Price
n00b
n00b


Joined: 07 Feb 2003
Posts: 44
Location: Hopkins, MN

PostPosted: Fri Dec 08, 2006 1:52 pm    Post subject: Reply with quote

kaiRy wrote:
I put it in /etc/pbbuttonsd.conf but no change :? it's weird.


Not /etc/pbbuttons.cOnf just /etc/pbbuttons.cnf The experimental version slightly changed the file name so it wouldn't overwrite the old conf file.

Scott =)
Back to top
View user's profile Send private message
bruda
Guru
Guru


Joined: 06 May 2004
Posts: 376
Location: Sherbrooke, QC, Canada

PostPosted: Thu Dec 14, 2006 1:12 am    Post subject: Reply with quote

Matthias Grimm wrote:
I made a little progress as well. I started a module_acpi.c and battery and power source information will already be read and transmitted to the pbbuttonsd high level modules. Furthermore I fixed the compiling problem with ibam that was reported in the forum.

Last but not least I found a bug in driver_mixer_alsa.c that might have caused the segfault. Nevertheless I would be thankful for any further information and a copy of the configfile that caused the crash.

To check my ACPI code I need some data. Could you please send me the contents of /proc/acpi from your machine? Maybe some of the other testers could do the same.

Next I will have a look in the autoadjustment code and add some simulation code to find out why it works only for a few minutes. Furthermore I just discovered another problem with 100% CPU load. After I fixed this problems you get another beta for testing.

_________________
Quid latine dictum sit altum videtur
Back to top
View user's profile Send private message
Scott Price
n00b
n00b


Joined: 07 Feb 2003
Posts: 44
Location: Hopkins, MN

PostPosted: Thu Dec 14, 2006 2:11 am    Post subject: Reply with quote

Code:

[prices@crazyharry ~]% ls -asl /proc/acpi/
total 0
0 dr-xr-xr-x 11 root root 0 Dec 13 20:02 .
0 dr-xr-xr-x 88 root root 0 Dec 13 20:01 ..
0 dr-xr-xr-x  3 root root 0 Dec 13 20:09 ac_adapter
0 -rw-r--r--  1 root root 0 Dec 13 20:09 alarm
0 dr-xr-xr-x  3 root root 0 Dec 13 20:09 battery
0 dr-xr-xr-x  5 root root 0 Dec 13 20:09 button
0 -r--------  1 root root 0 Dec 13 20:09 dsdt
0 dr-xr-xr-x  3 root root 0 Dec 13 20:09 embedded_controller
0 -r--------  1 root root 0 Dec 13 20:02 event
0 -r--------  1 root root 0 Dec 13 20:09 fadt
0 dr-xr-xr-x  2 root root 0 Dec 13 20:09 fan
0 -r--r--r--  1 root root 0 Dec 13 20:09 info
0 dr-xr-xr-x  2 root root 0 Dec 13 20:09 power_resource
0 dr-xr-xr-x  4 root root 0 Dec 13 20:09 processor
0 dr-xr-xr-x  2 root root 0 Dec 13 20:09 thermal_zone
0 dr-xr-xr-x  3 root root 0 Dec 13 20:09 video
0 -rw-r--r--  1 root root 0 Dec 13 20:09 wakeup


Just that, or does he want more?

I will have to try to make that config file again. I didn't save it.

Scott =)
Back to top
View user's profile Send private message
bruda
Guru
Guru


Joined: 06 May 2004
Posts: 376
Location: Sherbrooke, QC, Canada

PostPosted: Thu Dec 14, 2006 2:36 am    Post subject: Reply with quote

I personally did an ls -lRF /proc/acpi. I would presume that he wants to see the content of some subdirectories if not all.
_________________
Quid latine dictum sit altum videtur
Back to top
View user's profile Send private message
Scott Price
n00b
n00b


Joined: 07 Feb 2003
Posts: 44
Location: Hopkins, MN

PostPosted: Thu Dec 14, 2006 3:07 am    Post subject: Reply with quote

Code:

[prices@crazyharry ~]% ls -lRF /proc/acpi
/proc/acpi:
total 0
dr-xr-xr-x 3 root root 0 Dec 13 21:06 ac_adapter/
-rw-r--r-- 1 root root 0 Dec 13 21:06 alarm
dr-xr-xr-x 3 root root 0 Dec 13 21:06 battery/
dr-xr-xr-x 5 root root 0 Dec 13 21:06 button/
-r-------- 1 root root 0 Dec 13 21:06 dsdt
dr-xr-xr-x 3 root root 0 Dec 13 21:06 embedded_controller/
-r-------- 1 root root 0 Dec 13 20:02 event
-r-------- 1 root root 0 Dec 13 21:06 fadt
dr-xr-xr-x 2 root root 0 Dec 13 21:06 fan/
-r--r--r-- 1 root root 0 Dec 13 21:06 info
dr-xr-xr-x 2 root root 0 Dec 13 21:06 power_resource/
dr-xr-xr-x 4 root root 0 Dec 13 21:06 processor/
dr-xr-xr-x 2 root root 0 Dec 13 21:06 thermal_zone/
dr-xr-xr-x 3 root root 0 Dec 13 21:06 video/
-rw-r--r-- 1 root root 0 Dec 13 21:06 wakeup

/proc/acpi/ac_adapter:
total 0
dr-xr-xr-x 2 root root 0 Dec 13 21:06 ADP1/

/proc/acpi/ac_adapter/ADP1:
total 0
-r--r--r-- 1 root root 0 Dec 13 21:06 state

/proc/acpi/battery:
total 0
dr-xr-xr-x 2 root root 0 Dec 13 21:06 BAT0/

/proc/acpi/battery/BAT0:
total 0
-rw-r--r-- 1 root root 0 Dec 13 21:06 alarm
-r--r--r-- 1 root root 0 Dec 13 21:06 info
-r--r--r-- 1 root root 0 Dec 13 21:06 state

/proc/acpi/button:
total 0
dr-xr-xr-x 3 root root 0 Dec 13 21:06 lid/
dr-xr-xr-x 4 root root 0 Dec 13 21:06 power/
dr-xr-xr-x 3 root root 0 Dec 13 21:06 sleep/

/proc/acpi/button/lid:
total 0
dr-xr-xr-x 2 root root 0 Dec 13 21:06 LID0/

/proc/acpi/button/lid/LID0:
total 0
-r--r--r-- 1 root root 0 Dec 13 21:06 info
-r--r--r-- 1 root root 0 Dec 13 21:06 state

/proc/acpi/button/power:
total 0
dr-xr-xr-x 2 root root 0 Dec 13 21:06 PWRB/
dr-xr-xr-x 2 root root 0 Dec 13 21:06 PWRF/

/proc/acpi/button/power/PWRB:
total 0
-r--r--r-- 1 root root 0 Dec 13 21:06 info

/proc/acpi/button/power/PWRF:
total 0
-r--r--r-- 1 root root 0 Dec 13 21:06 info

/proc/acpi/button/sleep:
total 0
dr-xr-xr-x 2 root root 0 Dec 13 21:06 SLPB/

/proc/acpi/button/sleep/SLPB:
total 0
-r--r--r-- 1 root root 0 Dec 13 21:06 info

/proc/acpi/embedded_controller:
total 0
dr-xr-xr-x 2 root root 0 Dec 13 21:06 EC/

/proc/acpi/embedded_controller/EC:
total 0
-r--r--r-- 1 root root 0 Dec 13 21:06 info

/proc/acpi/fan:
total 0

/proc/acpi/power_resource:
total 0

/proc/acpi/processor:
total 0
dr-xr-xr-x 2 root root 0 Dec 13 21:06 CPU0/
dr-xr-xr-x 2 root root 0 Dec 13 21:06 CPU1/

/proc/acpi/processor/CPU0:
total 0
-r--r--r-- 1 root root 0 Dec 13 21:06 info
-rw-r--r-- 1 root root 0 Dec 13 21:06 limit
-r--r--r-- 1 root root 0 Dec 13 21:06 power
-rw-r--r-- 1 root root 0 Dec 13 21:06 throttling

/proc/acpi/processor/CPU1:
total 0
-r--r--r-- 1 root root 0 Dec 13 21:06 info
-rw-r--r-- 1 root root 0 Dec 13 21:06 limit
-r--r--r-- 1 root root 0 Dec 13 21:06 power
-rw-r--r-- 1 root root 0 Dec 13 21:06 throttling

/proc/acpi/thermal_zone:
total 0

/proc/acpi/video:
total 0
dr-xr-xr-x 7 root root 0 Dec 13 21:06 GFX0/

/proc/acpi/video/GFX0:
total 0
dr-xr-xr-x 2 root root 0 Dec 13 21:06 DD01/
dr-xr-xr-x 2 root root 0 Dec 13 21:06 DD02/
dr-xr-xr-x 2 root root 0 Dec 13 21:06 DD03/
dr-xr-xr-x 2 root root 0 Dec 13 21:06 DD04/
dr-xr-xr-x 2 root root 0 Dec 13 21:06 DD05/
-r--r--r-- 1 root root 0 Dec 13 21:06 DOS
-r--r--r-- 1 root root 0 Dec 13 21:06 POST
-r--r--r-- 1 root root 0 Dec 13 21:06 POST_info
-r--r--r-- 1 root root 0 Dec 13 21:06 ROM
-r--r--r-- 1 root root 0 Dec 13 21:06 info

/proc/acpi/video/GFX0/DD01:
total 0
-r--r--r-- 1 root root 0 Dec 13 21:06 EDID
-rw-r--r-- 1 root root 0 Dec 13 21:06 brightness
-r--r--r-- 1 root root 0 Dec 13 21:06 info
-rw-r--r-- 1 root root 0 Dec 13 21:06 state

/proc/acpi/video/GFX0/DD02:
total 0
-r--r--r-- 1 root root 0 Dec 13 21:06 EDID
-rw-r--r-- 1 root root 0 Dec 13 21:06 brightness
-r--r--r-- 1 root root 0 Dec 13 21:06 info
-rw-r--r-- 1 root root 0 Dec 13 21:06 state

/proc/acpi/video/GFX0/DD03:
total 0
-r--r--r-- 1 root root 0 Dec 13 21:06 EDID
-rw-r--r-- 1 root root 0 Dec 13 21:06 brightness
-r--r--r-- 1 root root 0 Dec 13 21:06 info
-rw-r--r-- 1 root root 0 Dec 13 21:06 state

/proc/acpi/video/GFX0/DD04:
total 0
-r--r--r-- 1 root root 0 Dec 13 21:06 EDID
-rw-r--r-- 1 root root 0 Dec 13 21:06 brightness
-r--r--r-- 1 root root 0 Dec 13 21:06 info
-rw-r--r-- 1 root root 0 Dec 13 21:06 state

/proc/acpi/video/GFX0/DD05:
total 0
-r--r--r-- 1 root root 0 Dec 13 21:06 EDID
-rw-r--r-- 1 root root 0 Dec 13 21:06 brightness
-r--r--r-- 1 root root 0 Dec 13 21:06 info
-rw-r--r-- 1 root root 0 Dec 13 21:06 state

Back to top
View user's profile Send private message
bruda
Guru
Guru


Joined: 06 May 2004
Posts: 376
Location: Sherbrooke, QC, Canada

PostPosted: Sun Jan 21, 2007 2:01 am    Post subject: Reply with quote

Hi,

Matthias has released a new version--this time a release candidate. It seems to work well for me (I have been trying it for the last hour or so), if anybody else is interested the ebuild is at http://turing.ubishops.ca/misc/pbbuttonsd-0.8.0_rc1.ebuild. This version needs libsmbios, ebuild for which is included in this overlay.
_________________
Quid latine dictum sit altum videtur
Back to top
View user's profile Send private message
Scott Price
n00b
n00b


Joined: 07 Feb 2003
Posts: 44
Location: Hopkins, MN

PostPosted: Sun Jan 21, 2007 3:28 pm    Post subject: Reply with quote

The keyboard backlight doesn't work for me on 0.8.0rc1.

Scott =)
Back to top
View user's profile Send private message
bruda
Guru
Guru


Joined: 06 May 2004
Posts: 376
Location: Sherbrooke, QC, Canada

PostPosted: Tue Jan 23, 2007 1:27 am    Post subject: Reply with quote

So noted. How does it all fare in 0.8.0_rc2?
_________________
Quid latine dictum sit altum videtur
Back to top
View user's profile Send private message
Scott Price
n00b
n00b


Joined: 07 Feb 2003
Posts: 44
Location: Hopkins, MN

PostPosted: Tue Jan 23, 2007 12:33 pm    Post subject: Reply with quote

Everything seems to work (including the keyboard backlight) in rc2.

Scott =)
Back to top
View user's profile Send private message
bruda
Guru
Guru


Joined: 06 May 2004
Posts: 376
Location: Sherbrooke, QC, Canada

PostPosted: Tue Jan 23, 2007 1:32 pm    Post subject: Reply with quote

Thank you. Now if you have the time could you please re-download the ebuild (otherwise the debug flag will not work), use the "debug" use flag to rebuild the daemon and launch it from the command line. It should print information on ambient light sensors and other things, but I am curious whether it understands the AC/battery switches correctly. Whenever the AC is pulled an event like
Code:
Config    : P TAG_POWERCHANGED         : 0

should appear. Conversely, when the AC is plugged in, the event should be
Code:
Config    : P TAG_POWERCHANGED         : 1

Repeat for a number of times and let me know whether this reporting is reliable (it does not appear to be on my machine and I am curious to see whether I am the only one). Many thanks in advance.
_________________
Quid latine dictum sit altum videtur
Back to top
View user's profile Send private message
bruda
Guru
Guru


Joined: 06 May 2004
Posts: 376
Location: Sherbrooke, QC, Canada

PostPosted: Wed Jan 24, 2007 8:43 pm    Post subject: Reply with quote

Nevermind, the RC3 version is out and fixes (for me) this problem. Now you can use different limits for backlight auto-adjustment when on battery and on AC and the limits you define are actually taken into consideration.

The keyboard illumination auto-adjustment seems to be the only one having notable problems, at least this is my experience. This is being worked on. But then if anybody spots any other problem please post them.
_________________
Quid latine dictum sit altum videtur
Back to top
View user's profile Send private message
bruda
Guru
Guru


Joined: 06 May 2004
Posts: 376
Location: Sherbrooke, QC, Canada

PostPosted: Wed Feb 07, 2007 12:16 am    Post subject: Reply with quote

One more version out: 0.8.0_rc4, which changes the auto-adjustment parameters in quite a nice manner. This is not yet documented in the manual page, so I am including here Matthias' explanation on the matter:
Code:

The main improvement here is the new model to control the LCD and
keyboard brightness to get rid of ambiguous config options :-). The man
page is not updated yet so I briefly describe the new model here.

There are six new config options: Three for LCD control and three for the
keyboard illumination. Both work exactly the same. All other autoadjustment
parameters and the threshold parameter become obsolete.

      LCD_AutoadjMode=linear
      LCD_AutoadjParm_onBattery=0,1,54,100
      LCD_AutoadjParm_onAC=0,1,94,100

The "AutoadjMode" sets the model to use. Possible values are:
  1. "off"        - no automatic, ambient light dependent brightness
                    adjustment
  2. "linear"     - use a linear transformation from ambient light to
                    brightness level
  3. "hysteresis" - switch brightness between certain levels dependent
                    of ambient light

The "AutoadjParm" defines two ambient level/brightness level pairs each
that defines two characteristic points of the ambient light/brightness
level transformation in percent. The following sketches will make it
more clear:

   level = f(ambient)
 
      lêvel     2                    lêvel          2
       |         o------              |      +--<--o-----
       |        /                     |      |     |
       |       /                      |      |     |
       |------o                       |------o-->--+
       |       1                      |     1
       +--------ambient-light->       +---------ambient-light->
             linear                      hysteresis

The above example uses the linear model with parameter 0,1,94,100.
This means that from an ambient light level from 0% to 94% the LCD
brightness level will be linearly adjusted from 1% to 100%.

If we use the parameters 20,10,40,90 the brightness level will be 10%
as long as the ambient light level is below or equal to 20%. If the
ambient light level increases the backlight level will linearly
increase too until it reaches its maximum of 90%. This will happen at
ambient level of 40%. Above 40% ambient light the backlight brightness
stick to 90%.

If you use the same parameter with the hysteresis model the backlight
level will jump to 90% after the ambient light level became more than
40% and switch back to 10% when the ambient light decreases below 20%.

_________________
Quid latine dictum sit altum videtur
Back to top
View user's profile Send private message
bruda
Guru
Guru


Joined: 06 May 2004
Posts: 376
Location: Sherbrooke, QC, Canada

PostPosted: Wed Feb 21, 2007 4:30 pm    Post subject: Reply with quote

An official release covering all that has been discussed here is now out, so I guess this is the last message of this thread.
_________________
Quid latine dictum sit altum videtur
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum