2002-09-25 10:52:48

by Karel Gardas

[permalink] [raw]
Subject: [BUG] apm resume hangs on IBM T22 with 2.4.19 (harddrive sleeps forever)


Hello,

I have problem with resume from suspend on IBM T22 with kernel 2.4.19
patched with rmap-14a and usagi-20020916. Actually the problem is that OS
resume well from suspend (it prints some messages to console for example
from FW droping some packets), but harddisc is still sleeping and never
wake up...

Kernel is compiled with frame-buffer support and I always run XFree now at
version 4.1.0. I've tested suspend/resume cycle with X and without them
but the behavior is still the same - harddisc sleeps forever (or to reset)
- as I said kernel seems to run, there is 50-70% chance that console
(graphics) resume well and so I'm even able to type some command into
xterm (like cd /usr; find), but then it hangs on sleeping harddisc. Magic
system request keys are working too.

Kernel is compiled with Debian's gcc 2.95.4/binutils 2.12.90.0.1. Full
config is attached to this email. I have to add that I've not experienced
such problems with 2.4.18 - patched with older version of usagi and
rmap-12<something> yet. It always waits a bit after resume, but harddrive
is always finally woken up.

Any other information which I have to provide you for better debugging
this problem?

Thanks a lot for your help,

Karel
--
Karel Gardas [email protected]
ObjectSecurity Ltd. http://www.objectsecurity.com


Attachments:
config-2.4.19-rmap14a (24.44 kB)

2002-09-25 12:47:34

by Stephen Rothwell

[permalink] [raw]
Subject: Re: [BUG] apm resume hangs on IBM T22 with 2.4.19 (harddrive sleeps forever)

On Wed, 25 Sep 2002 12:58:11 +0200 (CEST) Karel Gardas <[email protected]> wrote:
>
> I have problem with resume from suspend on IBM T22 with kernel 2.4.19
> patched with rmap-14a and usagi-20020916. Actually the problem is that OS
> resume well from suspend (it prints some messages to console for example
> from FW droping some packets), but harddisc is still sleeping and never
> wake up...

I have a T22 and run 2.4.20-pre5 and 2.4.19-pre8 with no patches and
have no problems resuming from suspend.

> Kernel is compiled with frame-buffer support and I always run XFree now at
> version 4.1.0. I've tested suspend/resume cycle with X and without them
> but the behavior is still the same - harddisc sleeps forever (or to reset)
> - as I said kernel seems to run, there is 50-70% chance that console
> (graphics) resume well and so I'm even able to type some command into
> xterm (like cd /usr; find), but then it hangs on sleeping harddisc. Magic
> system request keys are working too.

My system is set up to always switch VTs (away from X) when it suspends
and back when it resumes.

> Kernel is compiled with Debian's gcc 2.95.4/binutils 2.12.90.0.1. Full
> config is attached to this email. I have to add that I've not experienced
> such problems with 2.4.18 - patched with older version of usagi and
> rmap-12<something> yet. It always waits a bit after resume, but harddrive
> is always finally woken up.
>
> Any other information which I have to provide you for better debugging
> this problem?

All I can suggest is that you try 2.4.19 without any patches, then with
the rmap patch and then with only the USAGI patch and see if that makes
any difference.

--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/

2002-09-26 15:02:27

by Alan

[permalink] [raw]
Subject: Re: [BUG] apm resume hangs on IBM T22 with 2.4.19 (harddrive sleeps forever)

> I have problem with resume from suspend on IBM T22 with kernel 2.4.19
> patched with rmap-14a and usagi-20020916. Actually the problem is that OS
> resume well from suspend (it prints some messages to console for example

Make sure your bios and other firmware are reasonably modern

2002-09-26 15:22:36

by Karel Gardas

[permalink] [raw]
Subject: Re: [BUG] apm resume hangs on IBM T22 with 2.4.19 (harddrive sleeps forever)

On Thu, 26 Sep 2002, Alan Cox wrote:

> > I have problem with resume from suspend on IBM T22 with kernel 2.4.19
> > patched with rmap-14a and usagi-20020916. Actually the problem is that OS
> > resume well from suspend (it prints some messages to console for example
>
> Make sure your bios and other firmware are reasonably modern

I've checked right now and I have latest bios for T22 installed.

Thanks,

Karel
--
Karel Gardas [email protected]
ObjectSecurity Ltd. http://www.objectsecurity.com

2002-09-30 10:58:17

by Karel Gardas

[permalink] [raw]
Subject: Re: [BUG] apm resume hangs on IBM T22 with 2.4.19 (harddrive sleeps forever)

On Wed, 25 Sep 2002, Stephen Rothwell wrote:

> On Wed, 25 Sep 2002 12:58:11 +0200 (CEST) Karel Gardas <[email protected]> wrote:
> >
> > I have problem with resume from suspend on IBM T22 with kernel 2.4.19
> > patched with rmap-14a and usagi-20020916. Actually the problem is that OS
> > resume well from suspend (it prints some messages to console for example
> > from FW droping some packets), but harddisc is still sleeping and never
> > wake up...
>
> I have a T22 and run 2.4.20-pre5 and 2.4.19-pre8 with no patches and
> have no problems resuming from suspend.

But you don't have clean 2.4.19.

[...]

> All I can suggest is that you try 2.4.19 without any patches, then with
> the rmap patch and then with only the USAGI patch and see if that makes
> any difference.

I've done it right now and it seems 2.4.19 w/o any patch is broken for me.
i.e. it behaves the same wrong way and hd is sleeping forevere after apm
resume...

Anything what should I test now?

Thanks a lot,

Karel
--
Karel Gardas [email protected]
ObjectSecurity Ltd. http://www.objectsecurity.com

2002-09-30 11:56:22

by Stephen Rothwell

[permalink] [raw]
Subject: Re: [BUG] apm resume hangs on IBM T22 with 2.4.19 (harddrive sleeps forever)

Hi Karel,

On Mon, 30 Sep 2002 13:03:19 +0200 (CEST) Karel Gardas <[email protected]> wrote:
>
> But you don't have clean 2.4.19.

True, I should try that.

> I've done it right now and it seems 2.4.19 w/o any patch is broken for me.
> i.e. it behaves the same wrong way and hd is sleeping forevere after apm
> resume...
>
> Anything what should I test now?

Can you try 2.4.19 with the arch/i386/kernel/apm.c from 2.4.18?

--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/

2002-09-30 13:41:59

by Karel Gardas

[permalink] [raw]
Subject: Re: [BUG] apm resume hangs on IBM T22 with 2.4.19 (harddrive sleeps forever)

On Mon, 30 Sep 2002, Stephen Rothwell wrote:

> > But you don't have clean 2.4.19.
>
> True, I should try that.

Did you try it?

> > I've done it right now and it seems 2.4.19 w/o any patch is broken for me.
> > i.e. it behaves the same wrong way and hd is sleeping forevere after apm
> > resume...
> >
> > Anything what should I test now?
>
> Can you try 2.4.19 with the arch/i386/kernel/apm.c from 2.4.18?

I've tried it and w/o success so hd is still sleeping after resume. So
maybe the problem is somewhere else. Do you have any advice what should I
try now? 2.4.20-pre<latest>? Or some other files from 2.4.18?

BTW: I'm always waiting at most 5 minutes for hd wakeup, is that enough? I
hope so, since it's enough on 2.4.18...

<after some time looking into syslog>

Maybe you'll find usefull that I have these messages after resume in
syslog:

Sep 28 22:07:39 thinkpad apmd[211]: System Suspend
Sep 29 19:31:28 thinkpad apmd[211]: apmd_call_proxy: Executing proxy: '/etc/apm/apmd_proxy' 'resume' 'suspend'
Sep 29 19:31:45 thinkpad kernel: ide_dmaproc: chipset supported ide_dma_lostirq func only: 13
Sep 29 19:31:45 thinkpad kernel: hda: lost interrupt
Sep 29 19:31:48 thinkpad apmd[211]: apmd_call_proxy: + Setting the System Clock using the Hardware Clock as reference... System Clock set. Local time: Sun Sep 29 19:31:48 CEST 2002
Sep 29 19:31:48 thinkpad apmd[211]: Normal Resume

But I don't know if they appear after every resume on working 2.4.18. I'd
have to check it.

Thanks a lot,

Karel
--
Karel Gardas [email protected]
ObjectSecurity Ltd. http://www.objectsecurity.com

2002-10-09 18:37:56

by Karel Gardas

[permalink] [raw]
Subject: Re: [BUG] apm resume hangs on IBM T22 with 2.4.19 (harddrive sleeps forever)


I have more information for bugreport below.

I've tested some kernel versions today and results are (BUG means hd
sleeps forever on this kernel, OK means hd finally wake up)

2.4.18 - OK (I'm using this now)
2.4.19pre1 - OK
2.4.19pre2 - OK
2.4.19pre3 - doesn't boot for me.^
2.4.19pre4 - BUG
2.4.19pre5 - BUG
2.4.19 - BUG
2.4.20pre10 - BUG


^ 2.4.19pre3 doesn't boot for me. The last messages from kernel during
boor are:

CPU: L1 I cache: 16k, L1 D cache: 16k
CPU: L2 cache: 256k
Intel machine check architecture supported.
^ here kernel hangs forever

With this boot problem, I'm not able to exactly detect which pre is broken
and brings the BUG first.

Is there anything which I should try to better debug this problem?

Note that copying arch/i386/kernel/apm.c file from 2.4.18 into 2.4.19pre4
and 2.4.19 doesn't help too, so maybe problem is somewhere else...

Note2: nearly after each (as I think) resume there is following text in
syslog:

Oct 9 10:20:24 thinkpad apmd[205]: User Suspend
Oct 9 10:20:47 thinkpad apmd[205]: apmd_call_proxy: Executing proxy: '/etc/apm/apmd_proxy' 'resume' 'suspend'
Oct 9 10:21:04 thinkpad kernel: ide_dmaproc: chipset supported ide_dma_lostirq func only: 13
Oct 9 10:21:04 thinkpad kernel: hda: lost interrupt
Oct 9 10:21:07 thinkpad apmd[205]: apmd_call_proxy: + Setting the System Clock using the Hardware Clock as reference... System Clock set. Local time: Wed Oct 9 10:21:07 CEST 2002
Oct 9 10:21:07 thinkpad apmd[205]: Normal Resume


Thanks,

Karel

On Wed, 25 Sep 2002, Karel Gardas wrote:

>
> Hello,
>
> I have problem with resume from suspend on IBM T22 with kernel 2.4.19
> patched with rmap-14a and usagi-20020916. Actually the problem is that OS
> resume well from suspend (it prints some messages to console for example
> from FW droping some packets), but harddisc is still sleeping and never
> wake up...
>
> Kernel is compiled with frame-buffer support and I always run XFree now at
> version 4.1.0. I've tested suspend/resume cycle with X and without them
> but the behavior is still the same - harddisc sleeps forever (or to reset)
> - as I said kernel seems to run, there is 50-70% chance that console
> (graphics) resume well and so I'm even able to type some command into
> xterm (like cd /usr; find), but then it hangs on sleeping harddisc. Magic
> system request keys are working too.
>
> Kernel is compiled with Debian's gcc 2.95.4/binutils 2.12.90.0.1. Full
> config is attached to this email. I have to add that I've not experienced
> such problems with 2.4.18 - patched with older version of usagi and
> rmap-12<something> yet. It always waits a bit after resume, but harddrive
> is always finally woken up.
>
> Any other information which I have to provide you for better debugging
> this problem?
>
> Thanks a lot for your help,
>
> Karel
> --
> Karel Gardas [email protected]
> ObjectSecurity Ltd. http://www.objectsecurity.com
>

--
Karel Gardas [email protected]
ObjectSecurity Ltd. http://www.objectsecurity.com


Subject: Re: [BUG] apm resume hangs on IBM T22 with 2.4.19 (harddrive sleeps forever)

I have a similar problem with a ALi M5229 but only with dma enabled. if it
suspends with dma enabled, when it resumes I got dma timeouts until it give
up and disable dma. after this I can't enable dma anymore. I guess
implementing resume() of alim15x3 to reconfigure chipset will solve this.
any sugestions/comments?

> I have problem with resume from suspend on IBM T22 with kernel 2.4.19
> patched with rmap-14a and usagi-20020916. Actually the problem is that OS
> resume well from suspend (it prints some messages to console for example
> from FW droping some packets), but harddisc is still sleeping and never
> wake up...

--
aris

2002-10-10 14:25:41

by Karel Gardas

[permalink] [raw]
Subject: Re: [BUG] apm resume hangs on IBM T22 with 2.4.19 (harddrive sleeps forever)


I've applied patch sent by Marcelo (below) (by hand since it fails with
patch -p0) and now I'm able to boot 2.4.19pre3. The result of this
testing is that this kernel has the bug too, so IMHO this bug/feature was
introduced between 2.4.19pre2 and 2.4.19pre3.

Any other patch/idea which should I try?

Thanks a lot,

Karel

> > 2.4.18 - OK (I'm using this now)
> > 2.4.19pre1 - OK
> > 2.4.19pre2 - OK
> > 2.4.19pre3 - doesn't boot for me.^
> > 2.4.19pre4 - BUG
> > 2.4.19pre5 - BUG
> > 2.4.19 - BUG
> > 2.4.20pre10 - BUG
> >

[sniped]

> # This is a BitKeeper generated patch for the following project:
> # Project Name: Linux kernel tree
> # This patch format is intended for GNU patch command version 2.5 or higher.
> # This patch includes the following deltas:
> # ChangeSet 1.181 -> 1.181.1.1
> # arch/i386/kernel/bluesmoke.c 1.13 -> 1.14
> #
> # --------------------------------------------
> # 02/03/14 [email protected] 1.181.1.1
> # Remove off-by-one Davej's fix in bluesmoke.c: it causes some
> # machines to crash at boot.
> #
> # --------------------------------------------
> #
> diff -Nru a/arch/i386/kernel/bluesmoke.c b/arch/i386/kernel/bluesmoke.c
> --- a/arch/i386/kernel/bluesmoke.c Thu Oct 10 02:40:07 2002
> +++ b/arch/i386/kernel/bluesmoke.c Thu Oct 10 02:40:07 2002
> @@ -169,7 +169,7 @@
> if(l&(1<<8))
> wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff);
> banks = l&0xff;
> - for(i=0;i<banks;i++)
> + for(i=1;i<banks;i++)
> {
> wrmsr(MSR_IA32_MC0_CTL+4*i, 0xffffffff, 0xffffffff);
> }
>
>

--
Karel Gardas [email protected]
ObjectSecurity Ltd. http://www.objectsecurity.com

2002-10-16 17:25:19

by Karel Gardas

[permalink] [raw]
Subject: Re: [BUG] apm resume hangs on IBM T22 with 2.4.19 (harddrive sleeps forever)


> I have a similar problem with a ALi M5229 but only with dma enabled. if
> it suspends with dma enabled, when it resumes I got dma timeouts until
> it give up and disable dma. after this I can't enable dma anymore. I
> guess implementing resume() of alim15x3 to reconfigure chipset will
> solve this. any sugestions/comments?

Yep! That's right! When I disabled DMA on hd, two 'broken' kernels were
able to wake up it - 2.4.19pre4 and 2.4.20pre10. So IMHO problem is
solved. I'm just curious what changed in 2.4.19pre3-4 that it caused this
problem and at the second I have classical i440BX + PIIX4 ide.

Anyway, thanks a lot,

Cheers,

Karel
--
Karel Gardas [email protected]
ObjectSecurity Ltd. http://www.objectsecurity.com