Skip to contentSkip to conversation

ACPI issues - suspend-to-ram and processor speed

DISCUSSION Andre Eisenbach 7 participants 18 messages May 18, 2004 – Jun 1, 2004 14 messages not in the archive ACPI

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear ACPI devel team,

I have two issues which prevent me from fully enjoying my notbook running on Linux. Both are seemingly related to ACPI. Please help me understand the problems better and maybe fix them or help me attempting a fix.

The notebook in question is a Compaq Presario 2100Z with an AMD Athlon XP 2400+ processor. Current kernel version is 2.6.6-mm2. I am not applying any ACPI patches from sf.net, but rely on whats in the kernel (which may be my first mistake).

I am very willing to learn and may be able to fix it myself, if you guys can help me find out more about which components are involved.

Problem 1 - Cannot suspend (or resume better)

Right now I am unable to suspend my notebook in any for or fashion (ram, disk, etc.). Therefore I have to turn off the notebook and boot again, which honestly makes the notebook pretty useless.

When I try to suspend to RAM, the suspend part seems to run fine (I can see suspend-to-ram messages), the lcd shuts off and the power button starts pulsing slowly (indicating standby). So far so good. However, if I hit the power button then to resume, the device seems to want to wake up (hd spins up, fans start) but the LCD never turns on and the notebook quickly (1-2 seconds) later switched to off (all quiet/lights off). Hitting the power button again starts a normal startup.

I also tried to suspend to disk using swsusp. That corrupted my swap partition and didn't resume.

What does it take to suspend to RAM?
What could be broken, and where should I start looking if I want to fix it? What more debug information do you guys need?

Problem 2 - CPU slows down when on battery

When the power cord is unplugged, my CPU slows down quite a bit. This is not indicated in /proc/cpuinfo and NOT due to cpufreq / powernow adjustments.

The problem does not seem to occur with ACPI=OFF

More details here in a post to the linux-kernel mailing list:
http://lkml.org/lkml/2004/5/9/100

Also a relevant and informative entry here:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=467655

When on battery, KDE is barely usable. Once again it doesnt make much sense for a laptop not to be usable on battery ... :(

Thanks for your attention and hopefully for your answers/comments. I can provide as much debug/info/configs as you would like and as a programmer am willing to help out/read up, if you just help me identify where to start.

Thanks,
André Eisenbach
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAqdO45DBE808V5icRAnEcAJ49pvxNlggXYpLBARhqh/pNSmSKewCgr6Eg mW5uBTiyk0Ab2IdtDXV3038=
=lqX+
-----END PGP SIGNATURE-----

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id%62&alloc_ida84&op=click

A message that is not in the archive (sent off-list or not yet received): 200405180213.34603.andre-+hZUvIEKc2q1Z/[email protected]

#2 lore raw

Hello,

I confirm what Andre have said : I've got a Presario 2118EA (quite same model with AMD Athlon XP1800). Suspend to ram hav never worked for me. It suspends but cannot resume (2 seconds after the wake up, the laptop shuts down) I suspected acpid to catch the power button press and tell the laptop to shut down, but after disabling it, no more luck...

Regarding the CPU slowdown, I've seen similar behaviour under Windows. I think it's related to the laptop itself, maybe as Pavel Machek said on LKML, it's the lack of power that force the laptop to run in this mode.

Mathieu LESNIAK

Quoted 52 lines · Andre Eisenbach

Dear ACPI devel team,

I have two issues which prevent me from fully enjoying my notbook running on Linux. Both are seemingly related to ACPI. Please help me understand the problems better and maybe fix them or help me attempting a fix.

The notebook in question is a Compaq Presario 2100Z with an AMD Athlon XP 2400+ processor. Current kernel version is 2.6.6-mm2. I am not applying any ACPI patches from sf.net, but rely on whats in the kernel (which may be my first mistake).

I am very willing to learn and may be able to fix it myself, if you guys can help me find out more about which components are involved.

Problem 1 - Cannot suspend (or resume better)

Right now I am unable to suspend my notebook in any for or fashion (ram, disk, etc.). Therefore I have to turn off the notebook and boot again, which honestly makes the notebook pretty useless.

When I try to suspend to RAM, the suspend part seems to run fine (I can see suspend-to-ram messages), the lcd shuts off and the power button starts pulsing slowly (indicating standby). So far so good. However, if I hit the power button then to resume, the device seems to want to wake up (hd spins up, fans start) but the LCD never turns on and the notebook quickly (1-2 seconds) later switched to off (all quiet/lights off). Hitting the power button again starts a normal startup.

I also tried to suspend to disk using swsusp. That corrupted my swap partition and didn't resume.

What does it take to suspend to RAM?
What could be broken, and where should I start looking if I want to fix it? What more debug information do you guys need?

Problem 2 - CPU slows down when on battery

When the power cord is unplugged, my CPU slows down quite a bit. This is not indicated in /proc/cpuinfo and NOT due to cpufreq / powernow adjustments.

The problem does not seem to occur with ACPI=OFF

More details here in a post to the linux-kernel mailing list:
http://lkml.org/lkml/2004/5/9/100

Also a relevant and informative entry here:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=467655

When on battery, KDE is barely usable. Once again it doesnt make much sense for a laptop not to be usable on battery ... :(

Quoted 6 lines

Thanks for your attention and hopefully for your answers/comments. I can provide as much debug/info/configs as you would like and as a programmer am willing to help out/read up, if you just help me identify where to start.

Thanks,
André Eisenbach

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id%62&alloc_ida84&op=click
_______________________________________________
Acpi-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/acpi-devel

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id�66&op=click

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 1 line · Mathieu LESNIAK

Regarding the CPU slowdown, I've seen similar behaviour under Windows. I think it's related to the laptop itself, maybe as Pavel Machek said on LKML, it's the lack of power that force the laptop to run in this mode.

According to the post on the LKML, the slowdown dows not occur in Linux with ACPI=off.
I do think that it may be a BIOS problem, but I hope that the ACPI knowledgable may be able to provide a workaround.

Cheers,
André

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id�66&op=click

A message that is not in the archive (sent off-list or not yet received): 40ACF074.2090402-+hZUvIEKc2q1Z/[email protected]

#6 lore raw
Quoted 8 lines · Andre Eisenbach
Quoted 4 lines · Mathieu LESNIAK

Regarding the CPU slowdown, I've seen similar behaviour under Windows. I think it's related to the laptop itself, maybe as Pavel Machek said on LKML, it's the lack of power that force the laptop to run in this mode.

Quoted 4 lines

According to the post on the LKML, the slowdown dows not occur in Linux with ACPI=off.
I do think that it may be a BIOS problem, but I hope that the ACPI knowledgable may be able to provide a workaround.

could be a number of things. Disabling the processor module would be the workaround.

-Len

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

#7 lore raw
In reply to a message not in the archive

Hi!

Quoted 2 lines

I also tried to suspend to disk using swsusp. That corrupted my swap partition and didn't resume.

Read swsusp.txt, power/tricks.txt.

Signature · 9 lines
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms         



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

A message that is not in the archive (sent off-list or not yet received): 20040523122942.GH5215-u08AdweFZfgxtPtxi4kahqVXKuFTiq87@public.gmane.org

#9 lore raw

Am Sonntag Mai 23 2004 05:29 schrieb Pavel Machek:

Quoted 4 lines
Quoted 2 lines

I also tried to suspend to disk using swsusp. That corrupted my swap partition and didn't resume.

Read swsusp.txt, power/tricks.txt.

Thank you, thank you, thank you.
RTFM seems to have done the trick.

After reading the two files suggested, I recompiled my kernel (2.6.7-rc1-mm1) with CONFIG_PM_DISK and _without_ CONFIG_PREEMPT and for the first time ever got software suspend to work!

It takes about 50secs to resume, which is still a relatively long time, but its definitely less than the about 1:20min it takes for me to fully boot and log on AND my state is preserved.

My notebook just got a whole lot more usable!
Thanks ACPI devs!

Now, if only suspend-to-ram would work.

How could I debug this problem?

Thanks,
André

A message that is not in the archive (sent off-list or not yet received): 200405280117.51602.andre-+hZUvIEKc2q1Z/[email protected]

#11 lore raw

Hi!

Quoted 11 lines
Quoted 4 lines
Quoted 2 lines

I also tried to suspend to disk using swsusp. That corrupted my swap partition and didn't resume.

Read swsusp.txt, power/tricks.txt.

Thank you, thank you, thank you.
RTFM seems to have done the trick.

After reading the two files suggested, I recompiled my kernel (2.6.7-rc1-mm1) with CONFIG_PM_DISK and _without_ CONFIG_PREEMPT and for the first time ever got software suspend to work!

Actually, stay away from CONFIG_PM_DISK, CONFIG_SOFTWARE_SUSPEND should work better.

Quoted 6 lines

My notebook just got a whole lot more usable!
Thanks ACPI devs!

Now, if only suspend-to-ram would work.

How could I debug this problem?

Well, it involves assembly, black magic and soldering iron. Still interested?
Pavel

Signature · 8 lines
934a471f20d6580d5aad759bf0d97ddc


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

A message that is not in the archive (sent off-list or not yet received): 20040528082426.GD1808-I/[email protected]

#13 lore raw

Am Freitag Mai 28 2004 01:24 schrieb Pavel Machek:

Quoted 6 lines
Quoted 3 lines

After reading the two files suggested, I recompiled my kernel (2.6.7-rc1-mm1) with CONFIG_PM_DISK and _without_ CONFIG_PREEMPT and for the first time ever got software suspend to work!

Actually, stay away from CONFIG_PM_DISK, CONFIG_SOFTWARE_SUSPEND should work better.

Ok, recompiled with CONFIG_SOFTWARE_SUSPEND and it still works :)

Quoted 4 lines
Quoted 1 line

How could I debug this problem?

Well, it involves assembly, black magic and soldering iron. Still interested?

Well, I am a programmer - albeit with rusty assembly knowledge, I do own a soldering iron and I own a black cat. Does that count? ;)

Where can I start to learn more about ACPI and which pieces have to be in place for suspend-to-ram to work?

Thanks for all your help!!

Cheers,
André

A message that is not in the archive (sent off-list or not yet received): 200405280221.52819.andre-+hZUvIEKc2q1Z/[email protected]

#15 lore raw

Hi!

Quoted 10 lines
Quoted 4 lines
Quoted 1 line

How could I debug this problem?

Well, it involves assembly, black magic and soldering iron. Still interested?

Well, I am a programmer - albeit with rusty assembly knowledge, I do own a soldering iron and I own a black cat. Does that count? ;)

Where can I start to learn more about ACPI and which pieces have to be in place for suspend-to-ram to work?

Take a look at arch/i386/kernel/acpi/wakeup.S, there's where resume begins. Try to find out if wakeup_code: is executed or not. (That's where soldering iron comes to play). If wakeup_code is not executed, you'll need to fix sleep code. If it is, wakeup needs to be fixed...

Pavel

Signature · 8 lines
934a471f20d6580d5aad759bf0d97ddc


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

A message that is not in the archive (sent off-list or not yet received): 20040528093102.GG1808-I/[email protected]

#17 lore raw

Stupid question of the evening:

It's 5am here and I've just spent about the whole night playing witch ACPI, DSDTs etc...

The notebook I have can only resume from standby by pressing the power button. Could it be, that when the power button is pressed, the system starts to wake up, but the "power button event" is not intercepted by ACPI and passes through to "the hardware", causing the notebook to shut down for good?

I know thats in very rough laymans terms, but I hope it's enough for you guys to tell me just how wrong I am ;).

Here's a rought flowchart of what's happening on my notebook (afer 6. is the problem):

1. echo 3 > proc/acpi/sleep
2. PM: Preparing system for suspend
3. Stopping tasks: ==================|

4. --> Notebook enters standby. HD quiet, LCD off, fans off, On/Off LED pulses slowly

5. Press power button to wake notebok

6. --> Notebook tries to leave standby. HD spins up, LCD light on but no text, fans start...
7. --> Not even 1/2 second later, all off. Notebook is off. On/Off LED off

8. Press power button again.
9. --> Normal boot...

Could it be that there's some magic power-off event queued up when you press the button?

Thanks,
André

A message that is not in the archive (sent off-list or not yet received): 200405280536.50261.andre-+hZUvIEKc2q1Z/[email protected]

#19 lore raw

Hi!

Can you get any data out of notebook? Like 8 leds on paralel port, pci card decoding port 0x80 etc? [That's where soldering iron might be usefull].

Quoted 10 lines

Stupid question of the evening:

It's 5am here and I've just spent about the whole night playing witch ACPI, DSDTs etc...

The notebook I have can only resume from standby by pressing the power button. Could it be, that when the power button is pressed, the system starts to wake up, but the "power button event" is not intercepted by ACPI and passes through to "the hardware", causing the notebook to shut down for good?

Improbable.

Quoted 13 lines

I know thats in very rough laymans terms, but I hope it's enough for you guys to tell me just how wrong I am ;).

Here's a rought flowchart of what's happening on my notebook (afer 6. is the problem):

1. echo 3 > proc/acpi/sleep
2. PM: Preparing system for suspend
3. Stopping tasks: ==================|

4. --> Notebook enters standby. HD quiet, LCD off, fans off, On/Off LED pulses slowly

Quoted 6 lines

5. Press power button to wake notebok

6. --> Notebook tries to leave standby. HD spins up, LCD light on but no text, fans start...
7. --> Not even 1/2 second later, all off. Notebook is off. On/Off LED off

Easy. Insert infinite loop at begining of wakeup_start. If it hangs, you know it reached wakeup_start, and fix wakeup code. If it does not, we left hardware at "bad" (i.e. bios did not like it) state before suspend, fix suspend code. (Turn off APIC etc). [This is where your assembly skills come handy.]

Quoted 5 lines

8. Press power button again.
9. --> Normal boot...

Could it be that there's some magic power-off event queued up when you press the button?

If ACPI event was queued, it would do clean shutdown; you'd notice that.
Pavel
PS: When stuck, try asking your black cat :-).

Signature · 8 lines
934a471f20d6580d5aad759bf0d97ddc


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

A message that is not in the archive (sent off-list or not yet received): 20040529114512.GD25121-I/[email protected]

#21 lore raw

Am Samstag Mai 29 2004 04:45 schrieb Pavel Machek:

Quoted 3 lines

Can you get any data out of notebook? Like 8 leds on paralel port, pci card decoding port 0x80 etc? [That's where soldering iron might be usefull].

Yes, I can hook up the parallel port. Just let me know where we're gonna use it.

Quoted 8 lines
Quoted 2 lines

7. --> Not even 1/2 second later, all off. Notebook is off. On/Off LED off

Easy. Insert infinite loop at begining of wakeup_start. If it hangs, you know it reached wakeup_start, and fix wakeup code. If it does not, we left hardware at "bad" (i.e. bios did not like it) state before suspend, fix suspend code. (Turn off APIC etc). [This is where your assembly skills come handy.]

I put an endless loop into wakeup_start. Nothing changed. Same behaviour. I also recompiled the kernel without APIC, but I'm not sure thats what you meant.

Where do I find the suspend code?

Quoted 1 line

PS: When stuck, try asking your black cat :-).

She's sleeping. A lot.

;)

A message that is not in the archive (sent off-list or not yet received): 200405302100.36915.andre-+hZUvIEKc2q1Z/[email protected]

#23 lore raw

Hi!

Quoted 7 lines

Am Samstag Mai 29 2004 04:45 schrieb Pavel Machek:

Quoted 3 lines

Can you get any data out of notebook? Like 8 leds on paralel port, pci card decoding port 0x80 etc? [That's where soldering iron might be usefull].

Yes, I can hook up the parallel port. Just let me know where we're gonna use it.

Not yet, but something like that is neccessary for debugging wakeup phase.

Quoted 9 lines
Quoted 8 lines
Quoted 2 lines

7. --> Not even 1/2 second later, all off. Notebook is off. On/Off LED off

Easy. Insert infinite loop at begining of wakeup_start. If it hangs, you know it reached wakeup_start, and fix wakeup code. If it does not, we left hardware at "bad" (i.e. bios did not like it) state before suspend, fix suspend code. (Turn off APIC etc). [This is where your assembly skills come handy.]

Quoted 3 lines

I put an endless loop into wakeup_start. Nothing changed. Same behaviour. I also recompiled the kernel without APIC, but I'm not sure thats what you meant.

Okay, so problem is with suspend. Recompiling without APIC was good idea, see also tricks.txt what more you can do.

Quoted 1 line

Where do I find the suspend code?

Its all around acpi, last thing it does is in drivers/acpi/hardware/hwsleep.c.
Pavel

Signature · 8 lines
934a471f20d6580d5aad759bf0d97ddc


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
#24 lore raw
In reply to a message not in the archive

Where should one look if system doesn't do the slowly blinking power LED when echo 3 > /proc/acpi/sleep? It says entering state and then appears to just power off, nothing flashing.

-Vibol

Quoted 8 lines

Take a look at arch/i386/kernel/acpi/wakeup.S, there's where resume begins. Try to find out if wakeup_code: is executed or not. (That's where soldering iron comes to play). If wakeup_code is not executed, you'll need to fix sleep code. If it is, wakeup needs to be fixed...

Pavel

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

A message that is not in the archive (sent off-list or not yet received): 40B8815F.4000406-LA8/[email protected]

#26 lore raw

Hi!

Quoted 3 lines

Where should one look if system doesn't do the slowly blinking power LED when echo 3 > /proc/acpi/sleep? It says entering state and then appears to just power off, nothing flashing.

ACPI problem while entering suspend... Systems were where writing wrong number to 4-bit field somewhere in hwsleep.c actually made it to work...

Pavel

Quoted 11 lines

-Vibol

Quoted 8 lines

Take a look at arch/i386/kernel/acpi/wakeup.S, there's where resume begins. Try to find out if wakeup_code: is executed or not. (That's where soldering iron comes to play). If wakeup_code is not executed, you'll need to fix sleep code. If it is, wakeup needs to be fixed...

Pavel

Signature · 8 lines
934a471f20d6580d5aad759bf0d97ddc


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

A message that is not in the archive (sent off-list or not yet received): 20040529124934.GA15685-I/[email protected]

#28 lore raw

Pavel

Quoted 3 lines

ACPI problem while entering suspend... Systems were where writing wrong number to 4-bit field somewhere in hwsleep.c actually made it to work...

When my system suspends/resumes, which is a very risk process with recent kernels (for many builds it hangs on resume), there is a text console that appears.

Sometimes I get 4 characters corruption on that console in a strange colour... could that be related?

-Cam

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

A message that is not in the archive (sent off-list or not yet received): 40B8EF9F.6090405-Nk/[email protected]

#30 lore raw

Hi!

Quoted 7 lines
Quoted 3 lines

ACPI problem while entering suspend... Systems were where writing wrong number to 4-bit field somewhere in hwsleep.c actually made it to work...

When my system suspends/resumes, which is a very risk process with recent kernels (for many builds it hangs on resume), there is a text console that appears.

So new kernels have it broken but it worked in old ones?

Quoted 2 lines

Sometimes I get 4 characters corruption on that console in a strange colour... could that be related?

Is it trying to write "Linu" in yellow-on-black? That is my debugging hack, look i386/kernel/acpi/wakeup.S.
Pavel

Signature · 8 lines
934a471f20d6580d5aad759bf0d97ddc


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
#31 lore raw
In reply to a message not in the archive

Hi!

Quoted 3 lines

Where should one look if system doesn't do the slowly blinking power LED when echo 3 > /proc/acpi/sleep? It says entering state and then appears to just power off, nothing flashing.

hwsleep.c
Pavel

Signature · 8 lines
934a471f20d6580d5aad759bf0d97ddc


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click