Thanks for the feedback rydberg - after looking into it some more it
seems the new MBP / MBA's use the 10 byte light value from the left
sensor as follows:

first 2 bytes seem to always be 01
next 2 bytes are a big endian 16-bit value of the ambient light value with a 
maximum value of 65535
next 2 bytes are a big endian 16-bit value of the ambient light value but is 
somehow scaled down from the first one and perhaps has a different dynamic range
next 2 bytes are a big endian 16-bit value of the ambient light value with a 
maximum value of 1023
last 2 bytes I got no idea about

So I've cooked up a patch to use the value which reports 1023 as max
which just basically divides this by 4 to give us a value which we can
return with a maximum of 255 like the max value on the older machines.

It also seems the right sensor doesn't ever report anything so we just
return 0 for this.

Please test the attached patch and if possible can this be merged into
the  applesmc-dkms mactel package?

** Attachment added: "report light sensor value correctly on newer MacBooks"
   http://launchpadlibrarian.net/21099779/applesmc-dkms-light-sensor-fix.patch

-- 
Backlight keeps getting darker on MacBookPro
https://bugs.launchpad.net/bugs/285815
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to