From owner-freebsd-acpi@FreeBSD.ORG Mon Dec 13 09:11:58 2004 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D05616A4CE for ; Mon, 13 Dec 2004 09:11:58 +0000 (GMT) Received: from muse.clarku.edu (calliope.clarku.edu [140.232.1.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id D3A7843D5E for ; Mon, 13 Dec 2004 09:11:57 +0000 (GMT) (envelope-from ipartola@pisem.net) Received: from [140.232.148.83] (thalia.clarku.edu [140.232.1.65]) by muse.clarku.edu (Postfix) with ESMTP id 260C51D702D; Mon, 13 Dec 2004 04:02:24 -0500 (EST) Message-ID: <41BD5AA2.6010902@pisem.net> Date: Mon, 13 Dec 2004 04:02:26 -0500 From: Igor Partola User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Nate Lawson , freebsd-acpi@freebsd.org References: <41BA85A0.3050206@pisem.net> <41BB4DC4.6090901@root.org> <41BBB645.3010500@pisem.net> <41BBDE39.6020101@root.org> In-Reply-To: <41BBDE39.6020101@root.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Dell Inspiron 8600 X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Dec 2004 09:11:58 -0000 Nate Lawson wrote: > Igor Partola wrote: > >> Nate Lawson wrote: >> >>> >>> Yes, this is a deficiency in the current usermode interface. If you >>> look at my web page, I have a description of how to fix this if >>> someone wants to do it. It includes implementing the /dev/apm >>> suspend/standby compatibility ioctls including a timeout interface. >>> See the "Implement X suspend/resume notification" section below. >>> >>> http://www.root.org/~nate/freebsd/acpi-todo.html >>> >> That's a deficiency in the X server though isn't it? Without X >> running this fix would do no good. I thought the problem was in >> either the kernel ACPI implementation or in devd. >> >> I do not claim to be in any degree an expert in this though since I >> am not at all familiar with the inner workings of either. I'm just >> trying to set up this laptop to work nicely with FreeBSD. :). > > > If I hook up suspend/resume events to just go out devd, there's no > guarantee your usermode code would get run before the system suspends > since devd is not blocking. By implementing the ioctl, we could > depend on apmd running rc.suspend/resume before allowing the requested > action to continue. It has the side effect that another usermode > program (X), can also sit blocking the suspend path but multiple > control programs (apmd, X) would require device cloning or BPF-style > /dev/apm0, 1, 2, ... and the kernel would not be allowed to suspend > until everyone voted "yes". As you can see, this requires some > thinking and implementation work and I'd be happy if someone wanted to > do it. > I really wish I could help with this... but programming is more of a hobby for me and after I looked at the bsd_apm.c and other stuff I still have very little (more like theoretical) idea of how to implement this. Is there some kind of a manual on FreeBSD kernel/ACPI hacking that I should read to make things more clear? Aparently knowing some C just isn't enough to write my own code but if there is any material that would help, I'm ready to read it (a couple of times of course). Respect, Igor