Date: Fri, 05 Mar 2004 11:35:44 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: nate@root.org Cc: cvs-src@freebsd.org Subject: Re: cvs commit: src/usr.sbin/acpi/acpiconf acpiconf.c Message-ID: <20040305.113544.68047468.imp@bsdimp.com> In-Reply-To: <20040305101907.P30482@root.org> References: <200403051335.55836.doconnor@gsoft.com.au> <20040304.201932.78712700.imp@bsdimp.com> <20040305101907.P30482@root.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20040305101907.P30482@root.org> Nate Lawson <nate@root.org> writes: : On Thu, 4 Mar 2004, M. Warner Losh wrote: : > In message: <200403051335.55836.doconnor@gsoft.com.au> : > "Daniel O'Connor" <doconnor@gsoft.com.au> writes: : > : On Fri, 5 Mar 2004 13:09, Takanori Watanabe wrote: : > : : > : > apm(8) information is only emulated apm status. : > : > The acpiconf -i informations are not available from apm(8) interface. : > : : > : acpiconf -i doesn't show stuff like battery percentage and estimated run time : > : though.. : > : : > : I have a program which does and I'm going to shoe horn it into acpiconf and : > : send diffs if I get some spare time :) : > : : > : It's seriously neat to see how many Watt's your laptop is using when you : > : fiddle with stuff :) : > : > I have hacked my acpiconf to print more battery information too. : : I think this is the wrong way to go. Instead of having N separate : utilities with their different syntax for N power management systems, we : should have one user interface for battery and thermal and the PM system : exports data in that defined format. My proposed plan is: : : * Unified sysctls for battery and thermal (hw.power.XXX) : * Make sure both acpi(4) and apm(4) export information through that : interface. : * Move apm(8) to use those sysctls. : * Remove any non-acpi-specific code from acpiconf(8) Right now you can do acpiconf -i and get: Battery 0 information Design capacity: 45000 mWh Last full capacity: 45000 mWh Technology: secondary (rechargeable) Design voltage: 14800 mV Capacity (warn): 4500 mWh Capacity (low): 2250 mWh Low/warn granularity: 2250 mWh Warn/full granularity: 40500 mWh Model number: DR35 Serial number: 110 Type: NiMH OEM info: I've just added the following, based on the other ioctl that you can get battery info from: State: Present Rate: 50000 mWh Cap: 50000 mWh Volt: 10.0 V Note: My battery/ACPI has a bug where 'RATE' and 'CAP' are always the same number. I have a second bug where the CAP is listed as being more than the last full capacity of the battery. This makes it very hard to do estimates for remaining battery life, but I'm not sure what can be done about it. I see value in being able to get to the raw battery information from whatever system is present. Now, having said that, I have no problems with there being a unified interface also. I don't think that we can shoe-horn all systems into providing all this information. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040305.113544.68047468.imp>