From owner-freebsd-mobile@FreeBSD.ORG Thu Jul 13 09:48:32 2006 Return-Path: X-Original-To: freebsd-mobile@freebsd.org Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 315E516A4DA; Thu, 13 Jul 2006 09:48:32 +0000 (UTC) (envelope-from ducrot@poupinou.org) Received: from poup.poupinou.org (poup.poupinou.org [195.101.94.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id 96FD643D49; Thu, 13 Jul 2006 09:48:31 +0000 (GMT) (envelope-from ducrot@poupinou.org) Received: from ducrot by poup.poupinou.org with local (Exim) id 1G0xns-0000CW-00; Thu, 13 Jul 2006 11:48:16 +0200 Date: Thu, 13 Jul 2006 11:48:16 +0200 To: Eric Anderson Message-ID: <20060713094816.GI17014@poupinou.org> References: <20060711.104708.1159134898.imp@bsdimp.com> <200607111338.01412.mistry.7@osu.edu> <44B3EDA6.8050608@centtech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44B3EDA6.8050608@centtech.com> User-Agent: Mutt/1.5.9i From: Bruno Ducrot Cc: Daniel Eischen , freebsd-mobile@freebsd.org Subject: Re: Dell laptops X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jul 2006 09:48:32 -0000 Hi Eric, On Tue, Jul 11, 2006 at 01:27:50PM -0500, Eric Anderson wrote: > On 07/11/06 12:37, Anish Mistry wrote: > >On Tuesday 11 July 2006 13:10, Daniel Eischen wrote: > >>On Tue, 11 Jul 2006, M. Warner Losh wrote: > >>>Greetings, > >>> > >>>What are the current problems, if any, on current Dell laptops > >>>have with FreeBSD? > >>Yeah, thanks for asking! My Inspiron E1405 came with an Intel > >>3945 A/B/G mini-PCI wireless that isn't supported (OpenBSD has > >>a seemingly actively maintained wpi driver for this card, and > >>I have an experimental FreeBSD driver from damien that I haven't > >>yet been able to get to work). I've ordered an Atheros-based > >>mini-PCI in the meantime, and can lend out the 3945 to anyone > >>willing to work on it. > >> > >>Also, the Fn (the blue key) can't be used to suspend, control > >>volume, switch CRT/LCD, etc, and most importantly enable the > >>radio on the wireless card (Fn + F2). Even if the wpi driver > >>works, it's worthless if I can't enable the radio. > >It might simply need an acpi function keys driver for your system. > >Would you post an "acpidump -dt" from your system? > > > > > I have a bunch of info on the D820 posted here: > > http://www.googlebit.com/freebsd/200607110621/ It has been useful for me. Thanks. First, this information confirm one bug present in all Dell laptops I'm aware of (including but not limited to D600, D610, inspiron 6000) The bug is ACPI related, and concern how a particular event is handled. To be short, the ASL contain this method (example for the D820): Method (SMIE, 0, NotSerialized) { Store (SMI (0x96, 0x00), Local0) If (And (Local0, 0x01)) { Notify (\_TZ.THM, 0x80) } Notify (\_SB.PCI0.VID, 0x81) Notify (\_SB.PCI0.AGP.VID, 0x81) } If (And (Local0, 0x02)) { Store (SMI (0x6D, 0x00), Local0) <--- BUG. Local0 will change in that case!!! ... ... } If (And (Local0, 0x04)) <--- We may not have the correct value for Local0 in that case... { Notify (\_SB.BAT0, 0x81) Notify (\_SB.BAT1, 0x81) } If (And (Local0, 0x08)) { Notify (\_PR.CPU0, 0x80) Notify (\_PR.CPU1, 0x80) } If (And (Local0, 0x10)) { ... ... } ... This method possibly can change in the middle the value of Local0 and in that case the other If() statements are broken. This method is called in order to handle an SCI interrupt, specifically by \GPE._L19() (it will call in fact NEVT() which may call NEVT()). I don't know how to contact Dell in order to get that fixed. Second, there is a method called \SMI(), taking 2 arguments and returning a value. This method will actually trigger a SMI handler in order to perform almost all power management stuff, as for example getting fan status, controlling fan speed, controlling docking and so on. There is a specific kernel module under linux called i8k, that can be found here : http://people.debian.org/~dz/i8k/ Even though I think this driver could have possibly "funny" effect if ACPI is enabled under Linux (it will actually share the same IO with the SMI() method, and that must be serialized for obvious reason), looking onto that driver we learn for example that SMI(0x25, 0) will likely return the FN key status for almost all Dell Laptop. Therefore it should be somewhat easy to write a simple ACPI driver for Dell laptops, at least for FN key (if those still don't work). ATM I don't have time for writing such support. Cheers, -- Bruno Ducrot -- Which is worse: ignorance or apathy? -- Don't know. Don't care.