MacBook patches

Rui Paulo rpaulo at
Fri May 11 16:10:50 UTC 2007

Attached are the work I've done so far for my Summer of Code
project. If you have a MacBook and are willing to spend some time
build -current with these patches and testing, here's what you should

1) Grab the patch a
2) Apply it to today's -current
3) Build a kernel.

Load three modules: backlight, msrtemp, cpufreq (est).
The only one that shouldn't work out of the box on MacBook Pro's

backlight controls the LCD backlight. You should have
hw.backlight.{enable,value} after loading the module.
Play with it to see if it works. I didn't test MacBook Core 2 Duo, but
it should work.
I have a feeling that it should be very easy to make it work for the
MacBook Pro, but contact me if you need help.

msrtemp displays the Cores temperature.
There should be N new sysctls, one for each CPU. For example:

$ sysctl dev.cpu.{0,1}.temperature
dev.cpu.0.temperature: 53
dev.cpu.1.temperature: 53

est should detect, at least, the following values:
dev.cpu.0.freq_levels: 2000/31000 1833/28016 1667/25033 1500/22050
1333/19066 1000/13100

Don't panic if you have more :) I disabled p4tcc and acpi_throttle on

Have fun!
Rui Paulo

More information about the freebsd-current mailing list