From owner-freebsd-acpi@FreeBSD.ORG Mon Jun 16 14:36:43 2014 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73EB61D9; Mon, 16 Jun 2014 14:36:43 +0000 (UTC) Received: from mail-ob0-x22a.google.com (mail-ob0-x22a.google.com [IPv6:2607:f8b0:4003:c01::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 35F482793; Mon, 16 Jun 2014 14:36:43 +0000 (UTC) Received: by mail-ob0-f170.google.com with SMTP id uz6so5840564obc.29 for ; Mon, 16 Jun 2014 07:36:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=oWx26RFOrgpanoD1eGlBA5sIlLZqdex3yXQkS+eGATY=; b=fbAb/P983BySOTuKqWcsyl1quUWC7BZOBKybbcI2KPdTLOyEXr9qdWwUgjknfRTrKQ BXJh3SPYViCEXLkK+yLWI+9W+amY2NTRLxfcGAUoKK73500q5hDVls+ZODlteXcXLDQs WMi9iGUrwxPPEhhbhJWPqMfgGDfdDdto27ZahG0BA6RjZETjbZQBw4XGvJG4netOoY6u UUIHY9JHZ54g3Vc6aBwEyZLbMnmQMmL+jrKhtDZAHaVMmeW6Xyfo3xDhhA42d48EzDrC a7iPclNDAMJZsNPxARt+qWlR+kZksCLapwMVtmJxOFLKbxdKsGq977yFPya/p016aeuJ gTgg== MIME-Version: 1.0 X-Received: by 10.182.44.233 with SMTP id h9mr2829681obm.68.1402929402497; Mon, 16 Jun 2014 07:36:42 -0700 (PDT) Sender: tomek.cedro@gmail.com Received: by 10.202.75.207 with HTTP; Mon, 16 Jun 2014 07:36:42 -0700 (PDT) Date: Mon, 16 Jun 2014 16:36:42 +0200 X-Google-Sender-Auth: J2ao6J-YJnAqLBlLvQvrwYsR-AE Message-ID: Subject: sysctl hw.acpi.acline From: CeDeROM To: freebsd-hackers@freebsd.org, freebsd-acpi@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2014 14:36:43 -0000 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