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:
             AC line state (1 means online, 0 means on battery power).

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

Any hints appreciated! :-)

CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
freebsd-acpi@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-acpi-unsubscr...@freebsd.org"

Reply via email to