From owner-freebsd-amd64@FreeBSD.ORG Tue Jan 10 10:19:46 2006 Return-Path: X-Original-To: freebsd-amd64@FreeBSD.org Delivered-To: freebsd-amd64@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8344D16A420; Tue, 10 Jan 2006 10:19:46 +0000 (GMT) (envelope-from ariff@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26FFE43D45; Tue, 10 Jan 2006 10:19:46 +0000 (GMT) (envelope-from ariff@FreeBSD.org) Received: from misaki (root@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with SMTP id k0AAJgt1088539; Tue, 10 Jan 2006 10:19:43 GMT (envelope-from ariff@FreeBSD.org) Date: Tue, 10 Jan 2006 18:19:31 +0800 From: Ariff Abdullah To: Bruno Ducrot Message-Id: <20060110181931.57fd0d39.ariff@FreeBSD.org> In-Reply-To: <20060110094712.GB32102@poupinou.org> References: <200512291412.19476.peter@wemm.org> <20060103155509.GE13887@poupinou.org> <20060103185047.GH13887@poupinou.org> <20060104161842.GK13887@poupinou.org> <20060105005441.029835c1.ariff@FreeBSD.org> <43C2C6AB.5060605@root.org> <20060110050828.100b026a.ariff@FreeBSD.org> <20060110094712.GB32102@poupinou.org> Organization: FreeBSD X-Mailer: /usr/local/lib/ruby/1.8/net/smtp.rb Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Tue__10_Jan_2006_18_19_31_+0800_bILg9kvFPlz8PIID" Cc: freebsd-acpi@FreeBSD.org, freebsd-amd64@FreeBSD.org Subject: Re: No APM yet for AMD? X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2006 10:19:46 -0000 --Signature=_Tue__10_Jan_2006_18_19_31_+0800_bILg9kvFPlz8PIID Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, 10 Jan 2006 10:47:12 +0100 Bruno Ducrot wrote: > > There are no functional changes at all. It simply trying to be > > more verbose (and forgiving), in case the ioctl did not return > > advance information (such as remaining time, so on) which I > > believe few ACPI bioses incapable of providing such info. In this > > case, it trying to calculate the percentage of remining battery > > capacity based on Last Full Capacity, which current acpiconf > > ignore. > >=20 > > # acpiconf -i 0 (without patch) > > Design capacity: 6000 mAh > > Last full capacity: 4000 mAh > > Technology: secondary (rechargeable) > > Design voltage: 14800 mV > > Capacity (warn): 207 mAh > > Capacity (low): 125 mAh > > Low/warn granularity: 10 mAh > > Warn/full granularity: 25 mAh > > Model number: JM-6 > > Serial number: 0046713127 > > Type: LION > > OEM info: Hewlett-Packard > > State: not present > > ^^^^^^^^^^^ > > Voltage: unknown > >=20 > > # acpiconf -i 0 (patched) > > Design capacity: 6000 mAh > > Last full capacity: 4000 mAh > > Technology: secondary (rechargeable) > > Design voltage: 14800 mV > > Capacity (warn): 207 mAh > > Capacity (low): 125 mAh > > Low/warn granularity: 10 mAh > > Warn/full granularity: 25 mAh > > Model number: JM-6 > > Serial number: 0046713127 > > Type: LION > > OEM info: Hewlett-Packard > > State: high=20 > > ^^^^ > > Present rate: unknown > > Remaining capacity: 100% > > ^^^^ >=20 > Well, I would much prefer the remaining capacity still being > unknown in that case then. >=20 Why? This is not because of buggy acpi/dst bios, this is the limitation of the bios itself by not having a feature to calculate remaining time, plus the inability of present acpiconf(8) that simply ignore the fact there is other possible way to calculate it although not as precise as "minutes left". On top of that, the output of sysctl hw.acpi.battery only applicable for bioses with "remaining time" feature. Note that this is nothing new, Windows and Linux does display remaining capacity in terms of percentage remaining if it cannot acquire the accurate remaining time. # acpiconf -i 0 Design capacity: 6000 mAh Last full capacity: 4000 mAh Technology: secondary (rechargeable) Design voltage: 14800 mV Capacity (warn): 207 mAh Capacity (low): 125 mAh Low/warn granularity: 10 mAh Warn/full granularity: 25 mAh Model number: JM-6 Serial number: 0046713127 Type: LION OEM info: Hewlett-Packard State: discharging=20 ^^^^^^^^^^^ Present rate: unknown Remaining capacity: 91% ^^^ Voltage: unknown AC line: off-line # sysctl hw.acpi.battery hw.acpi.battery.life: -1 hw.acpi.battery.time: -1 hw.acpi.battery.state: 7 hw.acpi.battery.units: 1 hw.acpi.battery.info_expire: 5 At least I know when to plug in back my ac connector :) Well, I don't know much about FreeBSD ACPI. But at least, this patch / fix / workaround does indeed help me and few others. Of course if the dsdt can be hacked to give accurate remaining battery time, that would be better :) -- Ariff Abdullah FreeBSD --Signature=_Tue__10_Jan_2006_18_19_31_+0800_bILg9kvFPlz8PIID Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDw4o3lr+deMUwTNoRAvu2AKCGaCBish++9o32b+qVRe3cVla++QCgiaF5 705niuiU5nhdWOI/HTxXcjI= =xIo9 -----END PGP SIGNATURE----- --Signature=_Tue__10_Jan_2006_18_19_31_+0800_bILg9kvFPlz8PIID--