Date: Mon, 16 Jun 2014 16:36:42 +0200 From: CeDeROM <cederom@tlen.pl> To: freebsd-hackers@freebsd.org, freebsd-acpi@freebsd.org Subject: sysctl hw.acpi.acline Message-ID: <CAFYkXj=cN=A7ZRs-N5xoER51=daMaaS4uBCQLpfnOC0=Mg0WuA@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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@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 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 Any hints appreciated! :-) Tomek -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFYkXj=cN=A7ZRs-N5xoER51=daMaaS4uBCQLpfnOC0=Mg0WuA>