From owner-freebsd-mobile@FreeBSD.ORG Thu Oct 23 10:59:33 2003 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D808F16A4B3 for ; Thu, 23 Oct 2003 10:59:32 -0700 (PDT) Received: from postal2.es.net (proxy.es.net [198.128.3.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE55243FE3 for ; Thu, 23 Oct 2003 10:59:31 -0700 (PDT) (envelope-from oberman@es.net) Received: from ptavv.es.net ([198.128.4.29]) by postal2.es.net (Postal Node 2) with ESMTP (SSL) id MUA74016; Thu, 23 Oct 2003 10:59:30 -0700 Received: from ptavv (localhost [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id D1A125D07; Thu, 23 Oct 2003 10:59:28 -0700 (PDT) To: Jamie Bowden In-Reply-To: Message from Jamie Bowden <20031023103304.H20891-100000@moo.sysabend.org> Date: Thu, 23 Oct 2003 10:59:28 -0700 From: "Kevin Oberman" Message-Id: <20031023175928.D1A125D07@ptavv.es.net> cc: Oliver Brandmueller cc: freebsd-mobile@freebsd.org Subject: Re: battery status with ACPI X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2003 17:59:33 -0000 > Date: Thu, 23 Oct 2003 10:50:43 -0700 (PDT) > From: Jamie Bowden > > On Thu, 23 Oct 2003, Kevin Oberman wrote: > > > > Date: Thu, 23 Oct 2003 05:57:03 -0700 (PDT) > > > From: Jamie Bowden > > > Sender: owner-freebsd-mobile@freebsd.org > > > > > > On Thu, 23 Oct 2003, Oliver Brandmueller wrote: > > > > > > > Hi. > > > > > > > > On Thu, Oct 23, 2003 at 11:15:58AM +0200, Daniel Lang wrote: > > > > > I'm looking for applications, that can display ACPI status > > > > > information. Most wanted is battery status, but everything > > > > > else would also be of interest (e.g. fan status, cpu speed, etc). > > > > > > > > > > In the ports I can only find applications, that require APM, > > > > > not ACPI. The base system does not seem to provide something > > > > > either? > > > > > > > > > > Did I miss something? > > > > > > > > At least for the battery status the APM applications work well for me > > > > through the emulated APM interface of the ACPI. For fanspeed, > > > > temperature and stuff like that this won't work. > > > > > > Xbattbar doesn't. It can grok whether the machine is on wall power or > > > not, but that's it. It cannot determine the battery level, and always > > > reports %100. This was built using the port under RELENG_5_1. > > > > Do you have 'apm_enable="YES"' in rc.conf? Even though you are running > > ACPI, the parameter is still required if you want to be able to use > > the APM emulation capability. With this present, both the Gnome > > Battery Charge Monitor and the gkrellm battery builtin work just fine. > > > > Have you confirmed that ACPI is properly returning the values? 'sysctl > > hw.acpi' will provide the information available from ACPI and might > > also be a clue on the problem. > > 1:33pm ghast /home/jamie %cat /etc/rc.conf | grep apm > apm_enable="YES" > > Yes, I do. this worked fine for me under 4-S, I was surprised when it > didn't under 5.1-R. > > 1:34pm ghast /home/jamie %sysctl hw.acpi > hw.acpi.supported_sleep_state: S1 S3 S4 S5 > hw.acpi.power_button_state: S5 > hw.acpi.sleep_button_state: S1 > hw.acpi.lid_switch_state: S1 > hw.acpi.standby_state: S1 > hw.acpi.suspend_state: S3 > hw.acpi.sleep_delay: 0 > hw.acpi.s4bios: 1 > hw.acpi.verbose: 0 > hw.acpi.disable_on_poweroff: 1 > hw.acpi.thermal.min_runtime: 0 > hw.acpi.thermal.polling_rate: 30 > hw.acpi.thermal.tz0.temperature: 2982 > hw.acpi.thermal.tz0.active: -1 > hw.acpi.thermal.tz0.thermal_flags: 0 > hw.acpi.thermal.tz0._PSV: -1 > hw.acpi.thermal.tz0._HOT: -1 > hw.acpi.thermal.tz0._CRT: 3742 > hw.acpi.thermal.tz0._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 > hw.acpi.acline: 1 > hw.acpi.battery.life: -1 > hw.acpi.battery.time: -1 > hw.acpi.battery.state: 7 > hw.acpi.battery.units: 2 > hw.acpi.battery.info_expire: 5 Unfortunately, you did this while on AC power, so there is no battery status information available. (It shows up as -1). Try again when on battery and see if you get "real" values. I know that Windows can report the battery charge state while charging, but I don't know quite where they get the information. It should report correctly when off of the AC (hw.acpi.acline: 0). If your hardware supports APM, you might want to just use that. See my mail to the list earlier this morning for how to do that. This is not ideal as ACPI provides far finer grained control, but I still run APM most of the time since ACPI suspend still does not work on many laptops. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634