sysctl hw.acpi.acline

CeDeROM cederom at tlen.pl
Mon Jun 16 14:36:43 UTC 2014


Hello world :-)

One application that I am porting needs to know the power supply
information from the system. I thought using SYSCTL + ACPI would be
the simplest and elegant way. But, I found out that information on the
power supply is only available on the laptop machines, while on the
desktop machines it does not apply. According to the "man acpi", the
"hw.acpi.acline" oid tells the AC line state, so I guess desktop
should always tell 1, but there is no such oid on my desktop..

Is this a bug or feature? :-)

How can I tell the power source on my FreeBSD (i.e. AC, Battery, UPS)?

man acpi:
...
     hw.acpi.acline
             AC line state (1 means online, 0 means on battery power).

root at hexagon:~ # sysctl hw.acpi.acline
sysctl: unknown oid 'hw.acpi.acline': No such file or directory
root at hexagon:~ # uname -a
FreeBSD hexagon 10.0-RELEASE-p3 FreeBSD 10.0-RELEASE-p3 #0: Tue May 13
18:31:10 UTC 2014
root at amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

Any hints appreciated! :-)
Tomek

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info


More information about the freebsd-acpi mailing list