Re: status of ACPI suspend/resume on Thinkpad T60 w/ T7200 processor?

2011-08-28 Thread Jonathan Thornburg
In message 
I asked
> What's the status of suspend/resume on thinkpad T60 series models,
> particularly the T60 with T7200 cpu?
[[...]]
> Does suspend/resume work on T60 as of 4.9-{release,stable}?  -current?

I've just bought a used T60 with ATI video (dmesg below), and my
experience matches that of several other people in this thread:
suspend-to-RAM/resume does *not* work for any combination I've tried
of GENERIC or GENERIC.MP, 4.9-release or 4.9-stable, whether X is
running or not, and whether suspend-to-RAM is initiated via Fn-F4
or 'zzz'.

However, with the small kernel patch suggested earlier in this thread
(details below), suspend/resume now "95% work" for me.  This message
documents what doesn't work and what does (for the archives).


Running a GENERIC or GENERIC.MP kernel, I see slightly different
failure symptoms depending on whether or not X is running:
(a) If suspending immediately after a cold boot (after logging in as
root at the console, without X ever having been started):  After
initiating a suspend the disk light flickers, then the moon light
blinks, and stays blinking forever.
(b) If suspending from an xterm with X running:  After initiating a
suspend the disk light flickers, and the moon light blinks, then
the moon light stays on (not blinking).
An both cases the machine appears to be suspended at this point, e.g.,
the fan is off.  But if I then try to resume by either pressing the
Fn key or closing-and-reopening the lid, then
* For case (a) nothing happens.
* For case (b) the moon light blinks, the disk light flickers, then
  the moon light blinks, and stays blinking forever.
In either case the machine hangs at this point -- there's no response
to any keyboard input (including CTRL/Alt/Del or CTRL/Alt/Backspace).
(Interestingly, Fn-PgUp still turns the ThinkLight on/off, so I infer
the CPU & BIOS are still running.)  I have to power-cycle to regain
control.


As suggested by Pedro la Peu  in message
 I built
a modified kernel by commenting out the "repost all ATI video" table
entry in /usr/src/sys/dev/pci/vga_pci.c:

/*
 * disable ATI video repost (hopefully will fix ACPI suspend/resume)
 * as per suggestion by  Pedro la Peu 
 * in message  http://marc.info/?l=openbsd-misc&m=131255997922341&w=1
 */
#if 0
{   /* All ATI video until further notice */
{   PCI_VENDOR_ATI, 0x,
0x, 0x },
{   0x, 0x, 0x, 0x}, 1, 0
},
#endif

With this change (using a renamed copy of either the GENERIC or
GENERIC.MP kernel config file):
(a) If suspending immediately after a cold boot (after logging in as
root at the console, without X ever having been started), the
failure symptoms are unchanged.
(b) If suspending from an xterm with X running:  suspend/resume works
fine: after initiating a suspend the disk light flickers, then
the moon light blinks, then the moon light stays on (not blinking).
At the point the machine is suspended.  If I request a resume
(either with the Fn-key or by opening the lid) the disk light
and moon light flicker, then both go out and the machine resumes.
The ethernet (em0) works fine after the resume; I haven't tried
the wifi yet.  However, the console remains dead -- no screen
image, no response to any keyboard input *except* that
CTRL/Alt/Del does do a clean shutdown.

So, with the modified kernel, suspend/resume works fine so long as
I'm running X.  For a laptop, that qualifies as a "95% solution".

My thanks to all who replied in this thread, and particularly to
Pedro la Pau for suggesting the kernel patch which got suspend/resume
working for me.


OpenBSD 4.9 (GENERIC.MP) #819: Wed Mar  2 06:57:49 MST 2011
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3218931712 (3069MB)
avail mem = 3119222784 (2974MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (68 entries)
bios0: vendor LENOVO version "7IET23WW (1.04 )" date 12/27/2006
bios0: LENOVO 87424GU
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT TCPA APIC MCFG HPET SLIC BOOT SSDT SSDT SSDT 
SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) LURT(S3) DURT(S3) EXP0(S4) EXP1(S4) 
EXP2(S4) EXP3(S4) PCI1(S4) USB0(S3) USB1(S3) USB2(S3) USB7(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz, 1995.30 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG
cpu0: 4MB 64b/line 16-way L2 cache
cpu0: apic clock running at 166MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 CPU T7200 @ 2

Re: status of ACPI suspend/resume on Thinkpad T60 w/ T7200 processor?

2011-08-07 Thread Jona Joachim
On Sat, Aug 06, 2011 at 03:24:42AM +0200, Benny Lofgren wrote:
> On 2011-08-05 17.51, Pedro la Peu wrote:
> > On Friday 05 August 2011 13:35:16 Jona Joachim wrote:
> > There are other resume related problems on my Stinkpad Z61M (console is 
> > blank after resume and bge0 can no longer get a link) but at least the 
> > machine and X resume enough to be useful.
> 
> I've got a Z61p with what I assume is similar hardware (haven't got mine
> handy right now so can't get a dmesg) and exactly the same symptoms. The
> resume would indeed be useful even with the blank text console if only
> the network got back online, but alas no. If memory serves, not even the
> wpi wifi survives a suspend/resume cycle.

wpi(4) did come back nicely back when resume worked on my T60. However
the console never survived a resume, only X was usable.

Best regards,
Jona



Re: status of ACPI suspend/resume on Thinkpad T60 w/ T7200 processor?

2011-08-06 Thread Pedro la Peu
On Saturday 06 August 2011 02:24:42 Benny Lofgren wrote:

> I've got a Z61p with what I assume is similar hardware (haven't got
> mine handy right now so can't get a dmesg) and exactly the same
> symptoms. The resume would indeed be useful even with the blank text
> console if only the network got back online, but alas no. If memory
> serves, not even the wpi wifi survives a suspend/resume cycle.

To clarify, with vga repost disabled, everything else including wireless 
(wpi) resumes just fine. As I don't use text consoles or ethernet very 
often I suspend and resume a lot and have no issues.

I have a diff somewhere that adds a machdep.vgarepost sysctl, I should 
dig it out after tree unlock to see if it's of any interest.



OpenBSD 5.0 (GENERIC.MP) #37: Thu Aug  4 17:02:30 MDT 2011
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Genuine Intel(R) CPU T2500 @ 2.00GHz ("GenuineIntel" 686-class) 2 
GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,VMX,EST,TM2,xTPR,PDCM
real mem  = 2145775616 (2046MB)
avail mem = 2100596736 (2003MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 08/26/09, BIOS32 rev. 0 @ 0xfd6b0, 
SMBIOS rev. 2.4 @ 0xe0010 (68 entries)
bios0: vendor LENOVO version "7FETA9WW (2.27 )" date 08/26/2009
bios0: LENOVO 94503HG
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT TCPA APIC MCFG HPET BOOT SSDT SSDT 
SSDT SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) UART(S3) EXP0(S4) EXP1(S4) EXP2
(S4) EXP3(S4) PCI1(S4) USB0(S3) USB1(S3) USB3(S3) USB7(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 166MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Genuine Intel(R) CPU T2500 @ 2.00GHz ("GenuineIntel" 686-class) 2 
GHz
cpu1: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,VMX,EST,TM2,xTPR,PDCM
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 2, remapped to apid 1
acpimcfg0 at acpi0 addr 0xf000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (AGP_)
acpiprt2 at acpi0: bus 2 (EXP0)
acpiprt3 at acpi0: bus 3 (EXP1)
acpiprt4 at acpi0: bus 4 (EXP2)
acpiprt5 at acpi0: bus 12 (EXP3)
acpiprt6 at acpi0: bus 21 (PCI1)
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpipwrres0 at acpi0: PUBS
acpitz0 at acpi0: critical temperature is 127 degC
acpitz1 at acpi0: critical temperature is 99 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "92P1129" serial   177 type LION 
oem "Panasonic"
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
acpidock0 at acpi0: GDCK not docked (0)
bios0: ROM list: 0xc/0xfc00 0xd/0x1600 0xd1800/0x1000 
0xdc000/0x4000! 0xe/0x1!
cpu0: Enhanced SpeedStep 1996 MHz: speeds: 2000, 1667, 1333, 1000 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82945GM Host" rev 0x03
ppb0 at pci0 dev 1 function 0 "Intel 82945GM PCIE" rev 0x03: apic 1 int 
16
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "ATI Radeon Mobility X1400" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
radeondrm0 at vga1: apic 1 int 16
drm0 at radeondrm0
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: msi
azalia0: codecs: Analog Devices AD1981HD, Conexant/0x2bfa, using Analog 
Devices AD1981HD
audio0 at azalia0
ppb1 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: apic 1 int 
20
pci2 at ppb1 bus 2
bge0 at pci2 dev 0 function 0 "Broadcom BCM5752M" rev 0x02, BCM5752 A2 
(0x6002): apic 1 int 16, address 00:16:36:69:5f:6c
brgphy0 at bge0 phy 1: BCM5752 10/100/1000baseT PHY, rev. 0
ppb2 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: apic 1 int 
21
pci3 at ppb2 bus 3
wpi0 at pci3 dev 0 function 0 "Intel PRO/Wireless 3945ABG" rev 0x02: 
msi, MoW2, address 00:13:02:99:92:4c
ppb3 at pci0 dev 28 function 2 "Intel 82801GB PCIE" rev 0x02: apic 1 int 
22
pci4 at ppb3 bus 4
ppb4 at pci0 dev 28 function 3 "Intel 82801GB PCIE" rev 0x02: apic 1 int 
23
pci5 at ppb4 bus 12
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 1 int 
16
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: apic 1 int 
17
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x02: apic 1 int 
18
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x02: apic 1 int 
19
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x02: apic 1 int 
19
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb5 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe2
pci6 at ppb

Re: status of ACPI suspend/resume on Thinkpad T60 w/ T7200 processor?

2011-08-05 Thread Benny Lofgren
On 2011-08-05 17.51, Pedro la Peu wrote:
> On Friday 05 August 2011 13:35:16 Jona Joachim wrote:
> There are other resume related problems on my Stinkpad Z61M (console is 
> blank after resume and bge0 can no longer get a link) but at least the 
> machine and X resume enough to be useful.

I've got a Z61p with what I assume is similar hardware (haven't got mine
handy right now so can't get a dmesg) and exactly the same symptoms. The
resume would indeed be useful even with the blank text console if only
the network got back online, but alas no. If memory serves, not even the
wpi wifi survives a suspend/resume cycle.

When I have a spare moment (I'd more likely need a weekend or so) I'll
try to debug those problems, but I've never looked at power management
before so I really have no clue as to where to begin. Should be fun. :-)


Regards,
/Benny

-- 
internetlabbet.se / work:   +46 8 551 124 80  / "Words must
Benny Lofgren/  mobile: +46 70 718 11 90 /   be weighed,
/   fax:+46 8 551 124 89/not counted."
   /email:  benny -at- internetlabbet.se



Re: status of ACPI suspend/resume on Thinkpad T60 w/ T7200 processor?

2011-08-05 Thread Pedro la Peu
On Friday 05 August 2011 13:35:16 Jona Joachim wrote:

> When I try to resume it starts blinking. The screen backlight does not
> light up, the screen stays totally dark, same behaviour with or
> without X.

For me the "repost all ati video" change in vga_pci.c broke resume with 
similar symptoms. You could do a simple test to see if this affects you 
too. In sys/dev/pci/vga_pci.c comment out the relevant lines:

// {   /* All ATI video until further notice */
// {   PCI_VENDOR_ATI, 0x,
// 0x, 0x },
// {   0x, 0x, 0x, 0x}, 1, 0
// },

Build a kernel and see if resume gets any further.

There are other resume related problems on my Stinkpad Z61M (console is 
blank after resume and bge0 can no longer get a link) but at least the 
machine and X resume enough to be useful.



Re: status of ACPI suspend/resume on Thinkpad T60 w/ T7200 processor?

2011-08-05 Thread Jona Joachim
On 2011-08-04, Mike Larkin  wrote:
> On Thu, Aug 04, 2011 at 09:37:00PM +, Jona Joachim wrote:
>> On 2011-08-04, Jonathan Thornburg  wrote:
>> > What's the status of suspend/resume on thinkpad T60 series models,
>> > particularly the T60 with T7200 cpu?  So far as I know these are ACPI
>> > and I know there have been a lot of improvements lately... but on
>> > 2010-10-23 Luca Corti 
>> > (message )
>> > reported
>> >> Dmesg from my T60 (T7200) below.
>> >> 
>> >> No big issues, but the fan is in fact a bit loud on OpenBSD, even when
>> >> running apmd -C. It could even suspend and resume correctly recently,
>> >> then stopped working but I don't mind since I don't use s/r.
>> > [[...]]
>> >> OpenBSD 4.8-current (GENERIC.MP) #591: Tue Oct 19 11:45:02 MDT 2010
>> >> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>> >
>> > Does suspend/resume work on T60 as of 4.9-{release,stable}?  -current?
>> 
>> It does not work in 4.9. I haven't checked -CURRENT but I don't expect
>> it to work on -CURRENT either. It used to work at some point but I think
>> it was a change to the radeon driver that broke it (I assume you have a
>> radeon card). As of now it suspends but does not resume.
>
> Does the moon icon stay lit, start blinking, go off? Does the screen backlight
> light up (even if it's black). Did you try resuming from text mode (eg no X)?

When I try to resume it starts blinking. The screen backlight does not
light up, the screen stays totally dark, same behaviour with or without
X.

Best regards,
Jona



Re: status of ACPI suspend/resume on Thinkpad T60 w/ T7200 processor?

2011-08-04 Thread Mike Larkin
On Thu, Aug 04, 2011 at 09:37:00PM +, Jona Joachim wrote:
> On 2011-08-04, Jonathan Thornburg  wrote:
> > What's the status of suspend/resume on thinkpad T60 series models,
> > particularly the T60 with T7200 cpu?  So far as I know these are ACPI
> > and I know there have been a lot of improvements lately... but on
> > 2010-10-23 Luca Corti 
> > (message )
> > reported
> >> Dmesg from my T60 (T7200) below.
> >> 
> >> No big issues, but the fan is in fact a bit loud on OpenBSD, even when
> >> running apmd -C. It could even suspend and resume correctly recently,
> >> then stopped working but I don't mind since I don't use s/r.
> > [[...]]
> >> OpenBSD 4.8-current (GENERIC.MP) #591: Tue Oct 19 11:45:02 MDT 2010
> >> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> >
> > Does suspend/resume work on T60 as of 4.9-{release,stable}?  -current?
> 
> It does not work in 4.9. I haven't checked -CURRENT but I don't expect
> it to work on -CURRENT either. It used to work at some point but I think
> it was a change to the radeon driver that broke it (I assume you have a
> radeon card). As of now it suspends but does not resume.

Does the moon icon stay lit, start blinking, go off? Does the screen backlight
light up (even if it's black). Did you try resuming from text mode (eg no X)?

-ml

> 
> Best regards,
> Jona
> 
> -- 
> Pond-erosa Puff wouldn't take no guff
> Water oughta be clean and free
> So he fought the fight and he set things right
> With his OpenBSD



Re: status of ACPI suspend/resume on Thinkpad T60 w/ T7200 processor?

2011-08-04 Thread Jona Joachim
On 2011-08-04, Jonathan Thornburg  wrote:
> What's the status of suspend/resume on thinkpad T60 series models,
> particularly the T60 with T7200 cpu?  So far as I know these are ACPI
> and I know there have been a lot of improvements lately... but on
> 2010-10-23 Luca Corti 
> (message )
> reported
>> Dmesg from my T60 (T7200) below.
>> 
>> No big issues, but the fan is in fact a bit loud on OpenBSD, even when
>> running apmd -C. It could even suspend and resume correctly recently,
>> then stopped working but I don't mind since I don't use s/r.
> [[...]]
>> OpenBSD 4.8-current (GENERIC.MP) #591: Tue Oct 19 11:45:02 MDT 2010
>> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>
> Does suspend/resume work on T60 as of 4.9-{release,stable}?  -current?

It does not work in 4.9. I haven't checked -CURRENT but I don't expect
it to work on -CURRENT either. It used to work at some point but I think
it was a change to the radeon driver that broke it (I assume you have a
radeon card). As of now it suspends but does not resume.

Best regards,
Jona

-- 
Pond-erosa Puff wouldn't take no guff
Water oughta be clean and free
So he fought the fight and he set things right
With his OpenBSD



status of ACPI suspend/resume on Thinkpad T60 w/ T7200 processor?

2011-08-04 Thread Jonathan Thornburg
What's the status of suspend/resume on thinkpad T60 series models,
particularly the T60 with T7200 cpu?  So far as I know these are ACPI
and I know there have been a lot of improvements lately... but on
2010-10-23 Luca Corti 
(message )
reported
> Dmesg from my T60 (T7200) below.
> 
> No big issues, but the fan is in fact a bit loud on OpenBSD, even when
> running apmd -C. It could even suspend and resume correctly recently,
> then stopped working but I don't mind since I don't use s/r.
[[...]]
> OpenBSD 4.8-current (GENERIC.MP) #591: Tue Oct 19 11:45:02 MDT 2010
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

Does suspend/resume work on T60 as of 4.9-{release,stable}?  -current?

ciao,

-- 
-- Jonathan Thornburg 
   Dept of Astronomy & IUCSS, Indiana University, Bloomington, Indiana, USA
   "Washing one's hands of the conflict between the powerful and the
powerless means to side with the powerful, not to be neutral."
  -- quote by Freire / poster by Oxfam