acpi shows wrong battery state (fwd)
Ian Smith
smithi at nimnet.asn.au
Fri Sep 3 03:02:03 UTC 2010
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
More information about the freebsd-acpi
mailing list