From owner-freebsd-acpi@FreeBSD.ORG Fri Dec 12 15:34:32 2014 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7001C375; Fri, 12 Dec 2014 15:34:32 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4AA55989; Fri, 12 Dec 2014 15:34:32 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id F1234B99A; Fri, 12 Dec 2014 10:34:30 -0500 (EST) From: John Baldwin To: Colin Percival Subject: Re: ENXIOing non-present battery Date: Fri, 12 Dec 2014 10:21:59 -0500 Message-ID: <6449474.BnGsyZAKhP@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <548A072D.7090304@freebsd.org> References: <54840781.70603@freebsd.org> <201412111408.50866.jhb@freebsd.org> <548A072D.7090304@freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 12 Dec 2014 10:34:31 -0500 (EST) Cc: freebsd-acpi@freebsd.org X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2014 15:34:32 -0000 On Thursday, December 11, 2014 01:05:49 PM Colin Percival wrote: > On 12/11/14 11:08, John Baldwin wrote: > > On Sunday, December 07, 2014 2:53:37 am Colin Percival wrote: > >> On my Dell Latitude E7440 laptop, the ACPI reports two batteries: First > >> the battery which exists; and second, a "Not Present" battery with zeroed > >> statistics. FreeBSD, not realizing that this second battery is a complete > >> myth -- the E7440 only has one battery, and there is nowhere to add another > >> -- faithfully reports the data from ACPI to userland. > > > > Does setting hint.battery.1.disabled=1 work for you? > > That fixes the dev.battery sysctls and KDE's battery monitor. The > hw.acpi.battery.units sysctl still reports "2", and `acpiconf -i 1` > still reports the phantom battery; but I suppose those don't matter > much... Ok. That is the "generic" thing we already have in place to disable devices, so I'd probably prefer to use that as the known workaround rather than adding another knob. That said, it looks like we report the userland state of "not present" correctly. I wonder if the bug is in KDE itself and its FreeBSD-specific power management bits (rather than hald)? -- John Baldwin