From owner-freebsd-acpi@FreeBSD.ORG Fri Sep 3 03:02:03 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 8BC411065897 for ; Fri, 3 Sep 2010 03:02:03 +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 DFF8B8FC0A for ; Fri, 3 Sep 2010 03:02:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id o8331xsI071651; Fri, 3 Sep 2010 13:02:00 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Fri, 3 Sep 2010 13:01:59 +1000 (EST) From: Ian Smith To: Jung-uk Kim In-Reply-To: <201009021926.53690.jkim@FreeBSD.org> Message-ID: <20100903114418.I32216@sola.nimnet.asn.au> References: <20100901042852.P29840@sola.nimnet.asn.au> <4C801EE0.50505@gmail.com> <201009021926.53690.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-acpi@FreeBSD.org, Andriy Gapon Subject: Re: acpi shows wrong battery state (fwd) 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: Fri, 03 Sep 2010 03:02:03 -0000 On Thu, 2 Sep 2010, Jung-uk Kim wrote: > On Thursday 02 September 2010 06:02 pm, kuba wrote: [Andriy wrote:] > > > Take a look at these tunables: > > > debug.acpi.ec.timeout: 750 > > > debug.acpi.ec.polled: 0 > > > debug.acpi.ec.burst: 0 > > > > > > Perhaps increasing timeout would help? > > > > Increasing timeout didn't help at all :( > > Is there a chance that in the future release 8.2 this problem will > > be fixed? I don't have any idea left how to force acpi to show > > proper battery state, and I need this information to work with my > > laptop, so I think that the best option is to remove or leave > > unused freebsd for some time :/ and use only linux. > > As few people already have said, your EC is not responding and that's > the root cause. However, 8.0 also didn't work according to your > dmesg output. You said "battery indicator" is not working from 8.1 > in another e-mail. If I understand it correctly, that's some sort of > LED on the laptop, right? Did "acpiconf -i batt" ever work with 8.0? > I doubt it, though. 8.0 eventually did 'work' despite the hatfull of dmesg error messages, and kuba reported that 8.1 has worked (re returning battery info) a couple of times which is why I suspected a 'sometimes' ec.timeout issue. And strange as it sounds, 'acpiconf -i batt' does return the same info as 'acpiconf -i0' on my Thinkpad at 8.0, as does 'acpiconf -i foo' :) I guess 'acpi_battinfo(atoi(optarg));' just returns 0 for 'foo'. That is what kuba meant by "battery indicator", also the hw.acpi.bat* values. acpiconf(8) should make clear that _batt_ refers to unit 0, 1 etc; it also still (at 8.1) shows -s5 (soft off) as a valid option, when it is not. I'll try a PR with patch once I'm finished upgrading to 8.1-S. But that's really an aside from the real issue you identify below, and perhaps also some TZ value/s being 'absurd' .. cheers, Ian > Another problem is acpi_wmi(4) is not attaching because it cannot > match the device, which is defined wrong in the AML: > > Name (_HID, "pnp0c14") > > It should never be lower cases although it seems we have a workaround > for *some* models in sys/dev/acpi_support/acpi_wmi.c: > > 201: static char *wmi_ids[] = {"PNP0C14", "PNP0c14", NULL}; > > Also, your acpidump output shows typical BIOS stupidity, i.e., it > tries to detect installed MS Windows version and responds > differently. We have updated ACPICA in 8.1 and it matches Vista's > OSI now. That's probably the reason why the battery indicator > stopped working. > > To recap: > > 1. Add "pnp0c14" in sys/dev/acpi_support/acpi_wmi.c like this: > > static char *wmi_ids[] = {"PNP0C14", "PNP0c14", "pnp0c14", NULL}; > > Recompile, install, and reboot. > > 2. If #1 does not help, remove the following three lines from > sys/contrib/dev/acpica/utilities/uteval.c, which were added in 8.1: > > 149: {"Windows 2006.1", ACPI_OSI_WINSRV_2008}, ... > 150: {"Windows 2006 SP1", ACPI_OSI_WIN_VISTA_SP1}, ... > 151: {"Windows 2009", ACPI_OSI_WIN_7}, ... > > Recompile, install, and reboot. > > 3. If #2 still does not help, you should complain to HP. > > Good luck. > > Jung-uk Kim