David Brownlee | 3 Feb 00:34 2006
Picon

Re: Thinkpad T42 Power Management

On Sat, 19 Nov 2005, Jared D. McNeill wrote:

> On 17-Nov-05, at 6:32 AM, Steven M. Bellovin wrote:
>
>> In message <Pine.NEB.4.63.0511171439340.8510 <at> angelic.cynic.net>, Curt 
>> Sampson w
>> rites:
>>> So, I finally made my choice and went out and got a Thinkpad T42.
>>> It seems to be working fine so far, though I've not tried X11 yet.
>>> 
>>> However, I'm not at all familiar with any kind of power management, and
>>> I'm wondering what I should be using on this machine. Do I just start
>>> apmd and powerd in rc.conf, and go with the manual pages from there?
>>> Does anybody have any handy scripts or anything like that?
>>> 
>> 
>> Use apm only.  Powerd requires ACPI, which (as far as I know) isn't
>> really useful yet on laptops, since you can't do suspend/resume.
>
> For what it's worth, I had suspend/resume (ACPI S1 and S3) working on my Dell 
> Latitude D600. -current doesn't provide a way to trigger a suspend, so here's 
> the (old) patch I used:
>
> 	http://www.invisible.ca/~jmcneill/netbsd/d600/acpi-sleep-sysctl.patch
>
> You can trigger a sleep with 'sysctl -w hw.acpi.sleepstate=<n>' where 'n' is 
> the ACPI sleepstate (1, 3, 4, etc).
>
> There was a bug in the D600 firmware where resume would fail to re-initialize 
> the display adapter if it entered S3 while undocked, but apart from that our 
(Continue reading)

Rui Paulo | 3 Feb 00:41 2006
Picon

Re: Thinkpad T42 Power Management

David Brownlee <abs <at> NetBSD.org> writes:

> On Sat, 19 Nov 2005, Jared D. McNeill wrote:
>
>> On 17-Nov-05, at 6:32 AM, Steven M. Bellovin wrote:
>>
>>> In message <Pine.NEB.4.63.0511171439340.8510 <at> angelic.cynic.net>,
>>> Curt Sampson w
>>> rites:
>>>> So, I finally made my choice and went out and got a Thinkpad T42.
>>>> It seems to be working fine so far, though I've not tried X11 yet.
>>>> However, I'm not at all familiar with any kind of power
>>>> management, and
>>>> I'm wondering what I should be using on this machine. Do I just start
>>>> apmd and powerd in rc.conf, and go with the manual pages from there?
>>>> Does anybody have any handy scripts or anything like that?
>>>>
>>> Use apm only.  Powerd requires ACPI, which (as far as I know) isn't
>>> really useful yet on laptops, since you can't do suspend/resume.
>>
>> For what it's worth, I had suspend/resume (ACPI S1 and S3) working
>> on my Dell Latitude D600. -current doesn't provide a way to trigger
>> a suspend, so here's the (old) patch I used:
>>
>> 	http://www.invisible.ca/~jmcneill/netbsd/d600/acpi-sleep-sysctl.patch
>>
>> You can trigger a sleep with 'sysctl -w hw.acpi.sleepstate=<n>'
>> where 'n' is the ACPI sleepstate (1, 3, 4, etc).
>>
>> There was a bug in the D600 firmware where resume would fail to
(Continue reading)

George Michaelson | 3 Feb 01:03 2006
Picon

Re: Thinkpad T42 Power Management


while we're on power mgt and ACPI, is there a loose roadmap for ACPI to
have the userspace hooks to support powerd and the like, so we get
speedstep and other goodness which right now is only in APM?

I know there are bound to be some MI issues here, but 99.99998% of the
laptop world is Intel/AMD+ACPI now, and it would be neat (tm) to be
able to use it. 

-G

Rui Paulo | 3 Feb 01:29 2006
Picon

Re: Thinkpad T42 Power Management

George Michaelson <ggm <at> apnic.net> writes:

> while we're on power mgt and ACPI, is there a loose roadmap for ACPI to
> have the userspace hooks to support powerd and the like, so we get
> speedstep and other goodness which right now is only in APM?
>
> I know there are bound to be some MI issues here, but 99.99998% of the
> laptop world is Intel/AMD+ACPI now, and it would be neat (tm) to be
> able to use it. 

I know our ACPI support isn't great but you can already do intresting
things with it:
% envstat -r                                                                [~]
    acpiacad0 connected
       acpibat0 present
    acpibat0 design cap:      4.400 Ah
 acpibat0 last full cap:      4.048 Ah
    acpibat0 technology:          1
acpibat0 design voltage:     14.400 V
      acpibat0 warn cap:      0.300 Ah ( 7.41%)
       acpibat0 low cap:      0.132 Ah ( 3.26%)
       acpibat0 voltage:     16.763 V
        acpibat0 charge:      4.048 Ah (100.00%)
    acpitz0 temperature:     63.000 degC
% ls /etc/powerd/scripts/                                                   [~]
acadapter*      lid_switch*     power_button*   reset_button*   sleep_button*

--

-- 
Rui Paulo - rpaulo <at> fnop.net

(Continue reading)

Jared D. McNeill | 3 Feb 01:32 2006
Picon

Re: Thinkpad T42 Power Management

On 2-Feb-06, at 7:41 PM, Rui Paulo wrote:
> This causes a panic on my laptop, but since crashing a machine with
> securelevel == 0 is easy with root access I see no problem committing
> this.

Got a backtrace?

Cheers,
Jared

George Michaelson | 3 Feb 01:38 2006
Picon

Re: Thinkpad T42 Power Management

On Fri, 03 Feb 2006 00:29:21 +0000
Rui Paulo <rpaulo <at> fnop.net> wrote:

  
> 
> I know our ACPI support isn't great but you can already do intresting
> things with it:
> % envstat
> -r                                                                [~]
> 
> ls /etc/powerd/scripts/
> [~] acadapter*      lid_switch*     power_button*   reset_button*
> sleep_button*
> 

Hey Rui, I don't mean to say you can't do nothing: but do any of those
provide the speed-step behaviour which gets me 600Mhz on my IBM X31
when on battery, and 1600Mhz when I go on AC? 

Because I've been led to believe that one doesn't work under ACPI.

-George

Rui Paulo | 3 Feb 01:43 2006
Picon

Re: Thinkpad T42 Power Management

"Jared D. McNeill" <jmcneill <at> invisible.ca> writes:

> On 2-Feb-06, at 7:41 PM, Rui Paulo wrote:
>> This causes a panic on my laptop, but since crashing a machine with
>> securelevel == 0 is easy with root access I see no problem committing
>> this.
>
> Got a backtrace?

Not yet. I triggers a MD i386 assertion related to PSL flags.
I was trying to work around the interrupt problems I have first before
even trying to dig into this.
Although, I have successfuly suspended this laptop two or three times,
but I can't recall the configuration I was using nor the hacks I did.
But anyway, it never came from suspend (the machine just reset).
Using FreeBSD 6.0 the problem is different: we comming from S3, the
display doesn't seem to come back. But that's another story..

--

-- 
Rui Paulo - rpaulo <at> fnop.net

Rui Paulo | 3 Feb 01:45 2006
Picon

Re: Thinkpad T42 Power Management

George Michaelson <ggm <at> apnic.net> writes:

> Hey Rui, I don't mean to say you can't do nothing: but do any of those
> provide the speed-step behaviour which gets me 600Mhz on my IBM X31
> when on battery, and 1600Mhz when I go on AC? 
>
> Because I've been led to believe that one doesn't work under ACPI.

No, speedstep via ACPI doesn't work. We don't have any committed code
about that.

--

-- 
Rui Paulo - rpaulo <at> fnop.net

Jared D. McNeill | 3 Feb 02:17 2006
Picon

Re: Thinkpad T42 Power Management

On 2-Feb-06, at 8:43 PM, Rui Paulo wrote:
> Using FreeBSD 6.0 the problem is different: we comming from S3, the
> display doesn't seem to come back. But that's another story..

I have this problem on my Latitide D600. It's apparantly a bug in the  
Dell firmware; video comes back if I suspend while docked..  
otherwise, I'm toast.

I tried to work around this on NetBSD, and my app causes (IIRC) a  
memory fault. The same app works fine before a suspend/resume cycle.  
Need to investigate to see if our vm86 code survives an ACPI suspend/ 
resume, and if not, why.

Cheers,
Jared

Steven M. Bellovin | 3 Feb 03:01 2006

Re: Thinkpad T42 Power Management

In message <Pine.NEB.4.64.0602022333330.538 <at> localhost.>, David Brownlee writes:
>On Sat, 19 Nov 2005, Jared D. McNeill wrote:
>
>> On 17-Nov-05, at 6:32 AM, Steven M. Bellovin wrote:
>>
>>> In message <Pine.NEB.4.63.0511171439340.8510 <at> angelic.cynic.net>, Curt 
>>> Sampson w
>>> rites:
>>>> So, I finally made my choice and went out and got a Thinkpad T42.
>>>> It seems to be working fine so far, though I've not tried X11 yet.
>>>> 
>>>> However, I'm not at all familiar with any kind of power management, and
>>>> I'm wondering what I should be using on this machine. Do I just start
>>>> apmd and powerd in rc.conf, and go with the manual pages from there?
>>>> Does anybody have any handy scripts or anything like that?
>>>> 
>>> 
>>> Use apm only.  Powerd requires ACPI, which (as far as I know) isn't
>>> really useful yet on laptops, since you can't do suspend/resume.
>>
>> For what it's worth, I had suspend/resume (ACPI S1 and S3) working on my Del
>l 
>> Latitude D600. -current doesn't provide a way to trigger a suspend, so here'
>s 
>> the (old) patch I used:
>>
>> 	http://www.invisible.ca/~jmcneill/netbsd/d600/acpi-sleep-sysctl.patch
>>
>> You can trigger a sleep with 'sysctl -w hw.acpi.sleepstate=<n>' where 'n' is
> 
(Continue reading)


Gmane