Date: Fri, 4 Jun 2010 00:16:14 +1000 (EST) From: Ian Smith <smithi@nimnet.asn.au> To: David DEMELIER <demelier.david@gmail.com> Cc: freebsd-mobile@freebsd.org Subject: Re: Automatic shutdown with devd. Message-ID: <20100604000347.J27982@sola.nimnet.asn.au> In-Reply-To: <AANLkTik8c-9CYk0cjuBZA3ja2Q5b6P8jrXxExJxLBJ7X@mail.gmail.com> References: <20100601120131.A070C10657ED@hub.freebsd.org> <20100602001405.T27982@sola.nimnet.asn.au> <AANLkTilLGKhJ5MuzgDopTNYwh2FKo1Mbnrph_MXnVGpe@mail.gmail.com> <20100603141648.E27982@sola.nimnet.asn.au> <AANLkTik8c-9CYk0cjuBZA3ja2Q5b6P8jrXxExJxLBJ7X@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-144974044-1275574574=:27982 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT [ moved here from freebsd-questions ] On Thu, 3 Jun 2010, David DEMELIER wrote: > 2010/6/3 Ian Smith <smithi@nimnet.asn.au>: > > On Tue, 1 Jun 2010, David DEMELIER wrote: > > > 2010/6/1 Ian Smith <smithi@nimnet.asn.au>: > > > > In freebsd-questions Digest, Vol 313, Issue 4, Message: 26 > > > > On Tue, 1 Jun 2010 10:55:08 +0200 David DEMELIER <demelier.david@gmail.com> wrote: > > [..] > > > > > Is there a way to make this conditional to do only if the laptop is > > > > > not charging, AC plugged in ? > > > > > > > > Your script can check whether the AC power is on with: > > > > > > > > AC=`sysctl -n hw.acpi.acline` > > > > if [ $AC = 1 ]; then > > > > exit 0 # or whatever, when on AC power > > > > elif [ $AC = 0 ]; then > > > > : # do whatever when on battery > > > > else > > > > : # AC/Battery state unknown .. > > > > fi > > > > > > > > You could try just logging all state changes for a while; from critical > > > > charging to charging to high to discharging to critical discharging, I > > > > think that's the lot .. you can also check hw.acpi.battery.life etc. > > > > > > > > > > Okay I will try a script like this one. > > > > Let us know how it goes; it's clearer now from below why you need this. > > > > > > However, your system should do an 'emergency suspend' on critical low > > > > battery anyway .. usually set at 1% capacity but some BIOS will let you > > > > adjust that (see acpiconf -i0). Only if suspend/resume works of course. > > > > > > > > > > It would be great if suspend/resume would works yes ! For the moment > > > it's not the case : > > > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=i386/146715 > > > > Ah yes. I guess you might have to try the freebsd-acpi list about that, > > after reading the ACPI debugging section of the Handbook, providing your > > dmesg and probably an acpidump of your ASL as shown there. > > > > I don't know the current status of suspend/resume on amd64, nor anything > > about your HP Probook 4510s. The freebsd-mobile list might be a better > > place to start, at least to ask whether anyone else shares your problem? > > > > cheers, Ian > > Okay, the HP Probook has some problems with ACPI suspend/resume now. I > attached the acpidump -dt. > > As described in the PR, the resume works but seems to freeze (cannot > shutdown by pressing the power button) and the screen stays off. These lists don't accept non-text attachments, so I've put it up here: http://smithi.id.au/hp4510s/acpi.asl.gz plus your dmesg posted to -stable last week; post it again if changed: http://smithi.id.au/hp4510s/dmesg.txt As I said, I don't know anything about these, hopefully someone does .. cheers, Ian --0-144974044-1275574574=:27982--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100604000347.J27982>