Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jun 2014 15:28:26 +0900 (JST)
From:      Mitsuru IWASAKI <iwasaki@freebsd.org>
To:        cederom@tlen.pl
Cc:        Anthony.B.Jenkins@att.net, freebsd-hackers@freebsd.org, freebsd-acpi@freebsd.org, ag@muc.de
Subject:   Re: sysctl hw.acpi.acline
Message-ID:  <20140618.152826.81987615.iwasaki@freebsd.org>
In-Reply-To: <CAFYkXjm9giHjdVUDTEJ3zvN3XRmRDOBoww%2B5GiUERh_UFg4hcA@mail.gmail.com>
References:  <CAFYkXj=7pa6mECqjWnpAyE%2BB7MhDFb8KPYfbWa0-hGW67ki1bw@mail.gmail.com> <20140617002905.GW31367@funkthat.com> <CAFYkXjm9giHjdVUDTEJ3zvN3XRmRDOBoww%2B5GiUERh_UFg4hcA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

> > ACPI have tons of optional stuff that isn't required to be present,
> > and apparently acline is one of them.  Also, acline is only useful
> > if there are multiple power sources, what if you have a desktop
> > machine always running off a battery, if we defaulted acline=1, then
> > you'd complain that the status is wrong... :)
> 
> There is no information in the ACPI Manual that the OID's are optional
> and may not exist in some cases. This is exactly the problem, an
> undefined and undocumented situation. Maybe its just worth putting a
> note :-)
> 
> "
>      hw.acpi.acline
>              AC line state (1 means online, 0 means on battery power).
> "

OK, how about adding the following line?
----
Note that this OID exists only if there is a ACPI Device ID "ACPI0003" in ACPI Namespace of the system.
----

> I expect code based on this oid to work on both desktop and laptop
> with no additional guessing. For me this manual information means that
> acline oid is always available, and will show 1 in case of desktop
> where no battery (maybe no UPS as well) is available. There is no
> information that this oid is optional. For desktop/server a battery
> power would mean UPS, right, so then I would also expect to see the
> battery charge status information.. but I understand this would be
> more complicated than in a laptop thus may not be implemented. Still,
> I would always expect power source type OID to tell me what is the
> power source, even if there can be only one.

Unfortunately, UPS is not covered by ACPI specification.  I think that
new OID would be needed in generic place (not under hw.acpi) in order
to get the state of power sources.
In that case, hw.acpi.battery should be moved to new place too.

Thanks



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140618.152826.81987615.iwasaki>