2005-01-11 21:23:41

by Rafael J. Wysocki

[permalink] [raw]
Subject: 2.6.10-mm2: swsusp problem with resuming on batteries (AMD64)

Hi,

On 2.6.10-mm2, if swsusp suspends my box on AC power and then it's resumed on
batteries, the box reboots after (or while) suspending devices (ie before
restoring the image). This is 100% reproducible, it appears.

The box is an Athlon 64 laptop on NForce 3.

Greets,
RJW

--
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
-- Lewis Carroll "Alice's Adventures in Wonderland"


2005-01-11 21:28:47

by Pavel Machek

[permalink] [raw]
Subject: Re: 2.6.10-mm2: swsusp problem with resuming on batteries (AMD64)

Hi!

> On 2.6.10-mm2, if swsusp suspends my box on AC power and then it's resumed on
> batteries, the box reboots after (or while) suspending devices (ie before
> restoring the image). This is 100% reproducible, it appears.
>
> The box is an Athlon 64 laptop on NForce 3.

Can you try without cpufreq support? If we attempt to do 2GHz on AC
power, machine may die ugly death.
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

2005-01-11 21:31:56

by Pavel Machek

[permalink] [raw]
Subject: Re: 2.6.10-mm2: swsusp problem with resuming on batteries (AMD64)

Hi!

> On 2.6.10-mm2, if swsusp suspends my box on AC power and then it's resumed on
> batteries, the box reboots after (or while) suspending devices (ie before
> restoring the image). This is 100% reproducible, it appears.
>
> The box is an Athlon 64 laptop on NForce 3.

Forcing machine to 800MHz before suspend may do the trick, too.

Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

2005-01-11 21:36:10

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: 2.6.10-mm2: swsusp problem with resuming on batteries (AMD64)

On Tuesday, 11 of January 2005 22:27, Pavel Machek wrote:
> Hi!
>
> > On 2.6.10-mm2, if swsusp suspends my box on AC power and then it's resumed
on
> > batteries, the box reboots after (or while) suspending devices (ie before
> > restoring the image). This is 100% reproducible, it appears.
> >
> > The box is an Athlon 64 laptop on NForce 3.
>
> Forcing machine to 800MHz before suspend may do the trick, too.

How can I do this?

RJW

--
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
-- Lewis Carroll "Alice's Adventures in Wonderland"

2005-01-11 21:58:10

by Pavel Machek

[permalink] [raw]
Subject: Re: 2.6.10-mm2: swsusp problem with resuming on batteries (AMD64)

Hi!

> > > On 2.6.10-mm2, if swsusp suspends my box on AC power and then it's resumed
> on
> > > batteries, the box reboots after (or while) suspending devices (ie before
> > > restoring the image). This is 100% reproducible, it appears.
> > >
> > > The box is an Athlon 64 laptop on NForce 3.
> >
> > Forcing machine to 800MHz before suspend may do the trick, too.
>
> How can I do this?

echo "0%44%44%powersave" > /proc/cpufreq if you have that interface
enabled. Or simply turn off CONFIG_CPUFREQ in config.

Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

2005-01-11 22:15:44

by Barry K. Nathan

[permalink] [raw]
Subject: Re: 2.6.10-mm2: swsusp problem with resuming on batteries (AMD64)

> > The box is an Athlon 64 laptop on NForce 3.
>
> Can you try without cpufreq support? If we attempt to do 2GHz on AC
> power, machine may die ugly death.

Athlon 64 probably means it's running an x86_64 kernel. Wasn't there
another thread on lkml about -mm2 swsusp and x86_64? I wonder if it's
the same problem (or a related one).

-Barry K. Nathan <[email protected]>

2005-01-11 23:38:14

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: 2.6.10-mm2: swsusp problem with resuming on batteries (AMD64)

On Tuesday, 11 of January 2005 23:14, Barry K. Nathan wrote:
> > > The box is an Athlon 64 laptop on NForce 3.
> >
> > Can you try without cpufreq support? If we attempt to do 2GHz on AC
> > power, machine may die ugly death.
>
> Athlon 64 probably means it's running an x86_64 kernel. Wasn't there
> another thread on lkml about -mm2 swsusp and x86_64?

Yes, there was.

> I wonder if it's the same problem (or a related one).

The other thread was about the hang caused by the timer driver on suspend
(which I'm still trying to understand, but it takes time ;-)).

That problem is rather not related to this one, because I'm currently using a
slightly modified kernel in which the function timer_resume() (that caused
the hang) is a noop.

Greets,
RJW

--
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
-- Lewis Carroll "Alice's Adventures in Wonderland"

2005-01-12 17:24:12

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: 2.6.10-mm2: swsusp problem with resuming on batteries (AMD64)

On Tuesday, 11 of January 2005 22:55, Pavel Machek wrote:
> Hi!
>
> > > > On 2.6.10-mm2, if swsusp suspends my box on AC power and then it's
resumed
> > on
> > > > batteries, the box reboots after (or while) suspending devices (ie
before
> > > > restoring the image). This is 100% reproducible, it appears.
> > > >
> > > > The box is an Athlon 64 laptop on NForce 3.
> > >
> > > Forcing machine to 800MHz before suspend may do the trick, too.
> >
> > How can I do this?
>
> echo "0%44%44%powersave" > /proc/cpufreq if you have that interface
> enabled. Or simply turn off CONFIG_CPUFREQ in config.

I turned off CONFIG_CPUFREQ and it helped. Still, cpufreq is a neat feature
and I'd like to keep it in the kernel. :-)

Greets,
RJW

--
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
-- Lewis Carroll "Alice's Adventures in Wonderland"

2005-01-12 20:54:18

by Pavel Machek

[permalink] [raw]
Subject: Re: 2.6.10-mm2: swsusp problem with resuming on batteries (AMD64)

Hi!

> > > > Forcing machine to 800MHz before suspend may do the trick, too.
> > >
> > > How can I do this?
> >
> > echo "0%44%44%powersave" > /proc/cpufreq if you have that interface
> > enabled. Or simply turn off CONFIG_CPUFREQ in config.
>
> I turned off CONFIG_CPUFREQ and it helped. Still, cpufreq is a neat feature
> and I'd like to keep it in the kernel. :-)

Yes, uh, what you have to do is add suspend/resume routines to
cpufreq. Always force it to lowest frequency in
device_suspend()... and force it to rescan AC/battery status before
going to higher frequency.
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!