From owner-freebsd-current@FreeBSD.ORG Fri May 11 16:10:50 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DB59E16A400 for ; Fri, 11 May 2007 16:10:50 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by mx1.freebsd.org (Postfix) with ESMTP id 565DC13C447 for ; Fri, 11 May 2007 16:10:50 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by core.fnop.net (Postfix) with ESMTP id 2A6FA6909AF for ; Fri, 11 May 2007 16:39:08 +0100 (WEST) Received: by core.fnop.net (Postfix, from userid 1015) id 9BFA66909B4; Fri, 11 May 2007 16:39:07 +0100 (WEST) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on core.fnop.net X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.7 Received: from epsilon.local.fnop.net (unknown [193.136.24.206]) by core.fnop.net (Postfix) with ESMTP id B07BF6909AF for ; Fri, 11 May 2007 16:39:06 +0100 (WEST) Date: Fri, 11 May 2007 16:39:07 +0100 Message-ID: <86k5vffjz8.wl%rpaulo@fnop.net> From: Rui Paulo To: current@freebsd.org User-Agent: Wanderlust/2.15.5 (Almost Unreal) Emacs/21.3 Mule/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: ClamAV using ClamSMTP Cc: Subject: MacBook patches X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2007 16:10:50 -0000 Hi, 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 know: 1) Grab the patch a http://fnop.net/~rpaulo/freebsd/macbook.diff 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. 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 purpose. Have fun! -- Rui Paulo