Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Nov 2007 15:54:19 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-acpi@freebsd.org
Subject:   Re: acpi_thermal User Overriden Parameters Reset on Power	State	Change
Message-ID:  <200711211554.20024.jhb@freebsd.org>
In-Reply-To: <4744936A.6090002@root.org>
References:  <1195536301.1271.11.camel@localhost> <1195675813.56779.42.camel@RabbitsDen> <4744936A.6090002@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 21 November 2007 03:22:02 pm Nate Lawson wrote:
> Alexandre "Sunny" Kovalenko wrote:
> > On Tue, 2007-11-20 at 16:25 +1100, Nick Withers wrote:
> >> Hi y'all,
> >>
> >> Firstly, sorry if this isn't entirely the correct place to post this,
> > I think acpi@ would be the better place (forwarded).
> >  
> >> for starters I'm not sure whether this problem is limited to -CURRENT
> >> and / or 7.0 or not. Tried to have a look at fixing it myself, but I'm
> >> not l33t enough! :-)
> >>
> >> On my Compaq Presario B3820 (PV142PA#ABG) laptop, I override the
> >> hw.acpi.thermal.tz0._PSV value because the default is the temperature at
> >> which the CPU is halted by the hardware until the temperature settles
> >> down. Since this gets triggered fairly often and is pretty annoying, I
> >> lower the trigger temperature level and have powerd(8) work
> >> passive-cooling-shaped magic.
> >>
> >> However, disconnecting or reconnecting AC power resets the value to the
> >> BIOS provided level.
> >>
> >> Would anyone be able to offer assistance with this? It's not too big a
> >> deal, I just have to remember to set the appropriate value again if the
> >> power state changes.
> >>
> > At the very least, you do not have to remember to do this: at the bottom 
> > of /etc/devd.conf there is an example on how to associate your custom 
> > script with AC state changes. Look for something like:
> > 
> > # This example calls a script when the AC state changes, passing the
> > # notify value as the first argument.  If the state is 0x00, it might
> > # call some sysctls to implement economy mode.  If 0x01, it might set
> > # the mode to performance.
> > notify 10 {
> >         match "system"          "ACPI";
> >         match "subsystem"       "ACAD";
> >         action                  "/etc/acpi_ac $notify";
> > };
> > 
> > As to changing _PSV value for good: you can dump your ASL (look for 
> > instructions in the Handbook), then look for something like
> > 
> >                         Method (_PSV, 0, NotSerialized)
> >                         {
> >                             Return (0xE30)
> >                         }
> > 
> > modify value, remembering that <return value> = <degree C> * 10 + 2732, 
> > recompile your ASL and override it on boot (handbook comes handy there as 
well).
> 
> Alexandre, thank you for your detailed and accurate reply.  I really
> appreciate the work of users in helping share information about acpi.
> If you ever want to submit examples for the acpi section of the
> handbook, this kind of FAQ would be useful.

One issue, btw, with the "ACAD" example is that you can't easily hook multiple 
actions to a single event.  For example, it would be nice if I could have 
ataidle change the power settings for my hard drive when I was on battery, 
but I'd have to have my script call /etc/rc.d/power_profile to not lose the 
existing power profile stuff, and that doesn't allow for scaling in an 
automated way (i.e. having ports add a file under /usr/local/etc somewhere to 
hook into the power profile stuff).

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711211554.20024.jhb>