From owner-freebsd-acpi@FreeBSD.ORG Wed Mar 17 14:05:51 2010 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E72EE1065670 for ; Wed, 17 Mar 2010 14:05:51 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) by mx1.freebsd.org (Postfix) with ESMTP id 3C90D8FC20 for ; Wed, 17 Mar 2010 14:05:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id o2HE5mDJ026488; Thu, 18 Mar 2010 01:05:48 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Thu, 18 Mar 2010 01:05:47 +1100 (EST) From: Ian Smith To: Joerg Wunsch In-Reply-To: <20100317074549.GC52442@uriah.heep.sax.de> Message-ID: <20100317224207.A85436@sola.nimnet.asn.au> References: <20100315062028.GC52442@uriah.heep.sax.de> <20100317070428.GA2924@server.vk2pj.dyndns.org> <20100317074549.GC52442@uriah.heep.sax.de> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-784614688-1268834747=:85436" Cc: freebsd-acpi@freebsd.org Subject: Re: Funny battery values (nx6325) X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2010 14:05:52 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-784614688-1268834747=:85436 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT On Wed, 17 Mar 2010, Joerg Wunsch wrote: > As Peter Jeremy wrote: > > > >Design capacity: 279 mAh > > >Last full capacity: 279 mAh > > > Is this consistent or does it vary from boot to boot or if you > > disconnect and reconnect the battery? Or try another battery? > Currently, my wife is on a business trip with that machine. > Hopefully, I'll also get a statement about how long it lasts on > battery once she is back ;-), and I'll re-check those values then. > > > >The battery is declared as 55 Wh, which would correspond to 5.1 Ah > > >(probably 3 x 2 x 18650 cells). > > > > But is also over 3 years old. Almost everything you do to LiION > > batteries makes their capacity drop. Except keeping spares in the fridge, but not the freezer. > That's right, but it wouldn't be supposed to affect the "Design > capacity", would it? ;) It wouldn't be supposed to :) caveat: I've only 5.5 sources to hand. acpiconf -i does no calculations, just prints what's given by if (ioctl(acpifd, ACPIIO_CMBAT_GET_BIF, &battio) == -1) err(EX_IOERR, "get battery info (%d) failed", num); printf("Battery %d information\n", num); if (battio.bif.units == 0) pwr_units = "mWh"; else pwr_units = "mAh"; etc, also answering mWh vs mAh display question. Tracing back through acpi_cmbat_get_total_battinfo in acpi_cmbat.c indicates that calculaing remaining time does uses last full capacity, but from there back through acpi_cmbat_get_bst and acpi_cmbat_get_bif it's all just retrieval, from acpi packages of _BST and _BIF .. presumably updated somehow via the EC, but I'm in way over my head already .. > Can anybody tell where these values actually come from? I could > perhaps even build a small microcontroller gadget, in order to query > the battery for its values offline (using I²C aka SMbus) in order to > see where the mistake might be. Most of it must be stored in the in-battery chip, but I don't know where specs may be, or even whether they all use same protocols. Sounds like some fun, snooping EC <-> battery chatter and reverse engineering that - assuming it occurs on an accessible smbus? - but maybe there's something in the ASL that might be bent? Peter's factor of 10 sounds plausible. I'm interested in this because my T23 battery is just about dead, only sometimes taking a charge now - that or the charging circuit is dodgy, which I'll find out when the new battery arrives. cheers, Ian --0-784614688-1268834747=:85436--