2006-08-22 10:40:06

by Michael S. Tsirkin

[permalink] [raw]
Subject: T60 not coming out of suspend to RAM

Hi!
I'm running Linus' git tree on my thinkpad T60.
It generally seems to work fine after suspend to disk.
However, the system does not come out of suspend to ram,
with screen staying blank. I'm looking for hints for debugging this.

If I set suspend/resume event tracing, I see this in dmesg
after reboot:

dmesg -s 1000000 | grep 'hash matches'
hash matches drivers/base/power/resume.c:42
hash matches device serio2

serio2 seems to be the psmouse device:
ls /sys/bus/serio/drivers/psmouse/
bind bind_mode description serio0 serio2 unbind

Does this mean the mouse driver blocks the resume?

I've rebuilt psmouse as a module, unloaded it before suspend, and now
I see the same behaviour but after reboot:
dmesg -s 1000000 | grep 'hash matches'
hash matches drivers/base/power/resume.c:42
hash matches device i2c-9191

Which is somewhat weird because
ls /sys/bus/i2c/devices
does not list any i2c devices

I could continue disabling stuff - but I am looking in the
correct place even? How do you debug resume issues?

Thanks,

--
MST


2006-08-25 11:04:52

by Pavel Machek

[permalink] [raw]
Subject: Re: T60 not coming out of suspend to RAM

Hi!

> I'm running Linus' git tree on my thinkpad T60.
> It generally seems to work fine after suspend to disk.
> However, the system does not come out of suspend to ram,
> with screen staying blank. I'm looking for hints for debugging this.
>
> If I set suspend/resume event tracing, I see this in dmesg
> after reboot:
>
> dmesg -s 1000000 | grep 'hash matches'
> hash matches drivers/base/power/resume.c:42
> hash matches device serio2
>
> serio2 seems to be the psmouse device:
> ls /sys/bus/serio/drivers/psmouse/
> bind bind_mode description serio0 serio2 unbind
>
> Does this mean the mouse driver blocks the resume?
>
> I've rebuilt psmouse as a module, unloaded it before suspend, and now
> I see the same behaviour but after reboot:
> dmesg -s 1000000 | grep 'hash matches'
> hash matches drivers/base/power/resume.c:42
> hash matches device i2c-9191
>
> Which is somewhat weird because
> ls /sys/bus/i2c/devices
> does not list any i2c devices
>
> I could continue disabling stuff - but I am looking in the
> correct place even? How do you debug resume issues?

Yes, disabling stuff is way to go. Just disable everything, and binary
search from there :-).
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

2006-08-25 11:55:35

by Thomas Glanzmann

[permalink] [raw]
Subject: Re: T60 not coming out of suspend to RAM

Hello Michael,
I have also a T60 and for me it worked after 2 days of compiling kernels
and trying combinations. For me suspend to ram only works with the
following: Kernel 2.6.17.7 and ipw3945-1.0.5, ATI binary driver and
*loaded* ATI Kernel Module. With newer kernel versions or newer ipw3945
it did not work any longer (or it worked once and as soon as I tried
consecutive suspend to ram it stopped working). Oh and if you have high
latency with your e1000 network card (500ms - 1 second and laggy ssh to
a machine on the same lan segement) disable the parallel port in the
bios and irq load balancing in the kernel config. Oh and when I have
sshfs mounted it does not to suspend to ram so get sure that you umount
all sshfs mounted filesystems, if you use it at all.

With the above combination everything I need works:

* sound
* ati binary only driver
* suspend to ram
* e1000
* wifi

When I tried newer / older kernel versions at least one of the above broke. I
sometimes still have no sound or e1000, but a reboot fixes the problem for me.
For e1000 I also "#if 0"ed the bios checksum in the driver so that it loads
often when no ethernet cable is plugged in.

Also see the notes on: http://vizzzion.org/?id=t60

Let us know, if you proceed.

Thomas

2006-08-25 11:58:51

by Thomas Glanzmann

[permalink] [raw]
Subject: Re: T60 not coming out of suspend to RAM

Hello,
oh and before I forget about this:

Turn SATA in Bios to compatibility mode And don't forget about
the following kernel patch: Otherwise you don't have a disk
after the resume. But the buffer cache is still there. ;-)

http://vizzzion.org/stuff/thinkpad-t60/libata-acpi.diff

and yes, it is currently no fun to run a t60 under linux but it can only
get better.

Thomas

2006-08-26 20:33:30

by Michael S. Tsirkin

[permalink] [raw]
Subject: Re: T60 not coming out of suspend to RAM

Quoting r. Thomas Glanzmann <[email protected]>:
> Subject: Re: T60 not coming out of suspend to RAM
>
> Hello,
> oh and before I forget about this:
>
> Turn SATA in Bios to compatibility mode And don't forget about
> the following kernel patch: Otherwise you don't have a disk
> after the resume. But the buffer cache is still there. ;-)
>
> http://vizzzion.org/stuff/thinkpad-t60/libata-acpi.diff
>
> and yes, it is currently no fun to run a t60 under linux but it can only
> get better.
>
> Thomas
>

I do indeed not have a disk after resume - get a bunch of errors
out of libata.
Is this patch still needed under 2.6.18 git?
If yes, is there an updated version?

--
MST

2006-08-28 13:55:05

by Michael S. Tsirkin

[permalink] [raw]
Subject: Re: T60 not coming out of suspend to RAM

OK, it turns out the problem was with running SATA drive in AHCI mode.

After applying the following patch from Forrest Zhao
http://lkml.org/lkml/2006/7/20/56
both suspend to disk and suspend to ram work fine now.
This patch is going into 2.6.18, isn't it?

Huge thanks to Thomas Glanzman for help in tracking this down.
You rock.

--
MST

2006-08-28 15:42:59

by Pavel Machek

[permalink] [raw]
Subject: Re: T60 not coming out of suspend to RAM

On Mon 2006-08-28 16:53:58, Michael S. Tsirkin wrote:
> OK, it turns out the problem was with running SATA drive in AHCI mode.
>
> After applying the following patch from Forrest Zhao
> http://lkml.org/lkml/2006/7/20/56
> both suspend to disk and suspend to ram work fine now.
> This patch is going into 2.6.18, isn't it?

Not sure, check latest -rc5, and if it is not there, ask akpm...

Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

2006-08-28 17:19:44

by Michael S. Tsirkin

[permalink] [raw]
Subject: Re: T60 not coming out of suspend to RAM

Quoting r. Pavel Machek <[email protected]>:
> Subject: Re: T60 not coming out of suspend to RAM
>
> On Mon 2006-08-28 16:53:58, Michael S. Tsirkin wrote:
> > OK, it turns out the problem was with running SATA drive in AHCI mode.
> >
> > After applying the following patch from Forrest Zhao
> > http://lkml.org/lkml/2006/7/20/56
> > both suspend to disk and suspend to ram work fine now.
> > This patch is going into 2.6.18, isn't it?
>
> Not sure, check latest -rc5, and if it is not there, ask akpm...
>

Andrew, this is going into 2.6.18, isn't it? I don't see it in -rc5.

--
MST

2006-08-28 19:26:32

by Andrew Morton

[permalink] [raw]
Subject: Re: T60 not coming out of suspend to RAM

On Mon, 28 Aug 2006 20:19:26 +0300
"Michael S. Tsirkin" <[email protected]> wrote:

> Quoting r. Pavel Machek <[email protected]>:
> > Subject: Re: T60 not coming out of suspend to RAM
> >
> > On Mon 2006-08-28 16:53:58, Michael S. Tsirkin wrote:
> > > OK, it turns out the problem was with running SATA drive in AHCI mode.
> > >
> > > After applying the following patch from Forrest Zhao
> > > http://lkml.org/lkml/2006/7/20/56
> > > both suspend to disk and suspend to ram work fine now.
> > > This patch is going into 2.6.18, isn't it?
> >
> > Not sure, check latest -rc5, and if it is not there, ask akpm...
> >
>
> Andrew, this is going into 2.6.18, isn't it? I don't see it in -rc5.
>

It looks like Forrest's stuff is all queued up in the libata devel tree,
although in a significantly different-looking form.

So no, right now it doesn't look good for 2.6.18.

2006-08-28 20:19:58

by Michael S. Tsirkin

[permalink] [raw]
Subject: Re: T60 not coming out of suspend to RAM

Quoting r. Andrew Morton <[email protected]>:
> Subject: Re: T60 not coming out of suspend to RAM
>
> On Mon, 28 Aug 2006 20:19:26 +0300
> "Michael S. Tsirkin" <[email protected]> wrote:
>
> > Quoting r. Pavel Machek <[email protected]>:
> > > Subject: Re: T60 not coming out of suspend to RAM
> > >
> > > On Mon 2006-08-28 16:53:58, Michael S. Tsirkin wrote:
> > > > OK, it turns out the problem was with running SATA drive in AHCI mode.
> > > >
> > > > After applying the following patch from Forrest Zhao
> > > > http://lkml.org/lkml/2006/7/20/56
> > > > both suspend to disk and suspend to ram work fine now.
> > > > This patch is going into 2.6.18, isn't it?
> > >
> > > Not sure, check latest -rc5, and if it is not there, ask akpm...
> > >
> >
> > Andrew, this is going into 2.6.18, isn't it? I don't see it in -rc5.
> >
>
> It looks like Forrest's stuff is all queued up in the libata devel tree,
> although in a significantly different-looking form.
>
> So no, right now it doesn't look good for 2.6.18.
>

Ugh, more's the pity :(
How about merging this one patch? T60 is only half as useful without it (no disk
after resume), and the rate of changes in libata is high so just using a patch
is gonnu be painful in the long run.

--
MST

2006-08-30 14:46:59

by Pavel Machek

[permalink] [raw]
Subject: Re: T60 not coming out of suspend to RAM

Hi!

> > > > > OK, it turns out the problem was with running SATA drive in AHCI mode.
> > > > >
> > > > > After applying the following patch from Forrest Zhao
> > > > > http://lkml.org/lkml/2006/7/20/56
> > > > > both suspend to disk and suspend to ram work fine now.
> > > > > This patch is going into 2.6.18, isn't it?
> > > >
> > > > Not sure, check latest -rc5, and if it is not there, ask akpm...
> > > >
> > >
> > > Andrew, this is going into 2.6.18, isn't it? I don't see it in -rc5.
> > >
> >
> > It looks like Forrest's stuff is all queued up in the libata devel tree,
> > although in a significantly different-looking form.
> >
> > So no, right now it doesn't look good for 2.6.18.
> >
>
> Ugh, more's the pity :(
> How about merging this one patch? T60 is only half as useful without it (no disk
> after resume), and the rate of changes in libata is high so just using a patch
> is gonnu be painful in the long run.

I guess you need to convince SATA maintainer that patch is safe before
it can go in...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

2006-08-30 15:06:36

by Michael S. Tsirkin

[permalink] [raw]
Subject: Re: T60 not coming out of suspend to RAM

Quoting r. Pavel Machek <[email protected]>:
> Subject: Re: T60 not coming out of suspend to RAM
>
> Hi!
>
> > > > > > OK, it turns out the problem was with running SATA drive in AHCI mode.
> > > > > >
> > > > > > After applying the following patch from Forrest Zhao
> > > > > > http://lkml.org/lkml/2006/7/20/56
> > > > > > both suspend to disk and suspend to ram work fine now.
> > > > > > This patch is going into 2.6.18, isn't it?
> > > > >
> > > > > Not sure, check latest -rc5, and if it is not there, ask akpm...
> > > > >
> > > >
> > > > Andrew, this is going into 2.6.18, isn't it? I don't see it in -rc5.
> > > >
> > >
> > > It looks like Forrest's stuff is all queued up in the libata devel tree,
> > > although in a significantly different-looking form.
> > >
> > > So no, right now it doesn't look good for 2.6.18.
> > >
> >
> > Ugh, more's the pity :( How about merging this one patch? T60 is only half
> > as useful without it (no disk after resume), and the rate of changes in
> > libata is high so just using a patch is gonnu be painful in the long run.
>
> I guess you need to convince SATA maintainer that patch is safe before
> it can go in...

Right.

Jeff, could you please ack whether the following patch from Forrest Zhao
is safe for 2.6.18?
http://lkml.org/lkml/2006/7/20/56

Without it, no disk access is possible after resume from suspend-to-ram
on my T60.

--
MST

2006-10-04 21:52:35

by Michael S. Tsirkin

[permalink] [raw]
Subject: T60 ACPI events on 78b656b8

Just tested the latest Linux git, and I see a weird issue:
after some use, my T60 stops triggering any ACPI events:
tail -f /var/log/acpid
does not show anything, even on Fn/F4 which is supposed ot be always enabled.
Restarting the acpid doesn't do anything either - ACPI starts working
again, for a while, only after reboot.

This worked fine in 2.6.18 - any ideas? How to debug this?

--
MST