Skip to contentSkip to conversation

2.5.69 - S3

DISCUSSION Michael Frank 3 participants 10 messages May 13, 2003 – May 19, 2003 10 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Was playing a bit with S3 - Single user mode, console, ACPI core only, no modules.

Suspending always works.

Resuming performs somewhat randomly as follows:

1) Linux! - hang

2) Resume failed

3) Resumes with lots of shell prompts scrolling, and seems to be functional thereafter

What is the expected behaviour at this time?

Regards
Michael

-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara The only event dedicated to issues related to Linux enterprise solutions www.enterpriselinuxforum.com

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

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

#3 lore raw
Quoted 13 lines · Pavel Machek

Hi!

Quoted 11 lines

Was playing a bit with S3 - Single user mode, console, ACPI core only, no modules.

Suspending always works.

Resuming performs somewhat randomly as follows:

1) Linux! - hang

2) Resume failed

Quoted 8 lines
Quoted 4 lines

3) Resumes with lots of shell prompts scrolling, and seems to be functional thereafter

What is the expected behaviour at this time?

3) is expected. You held down enter
when you did echo, so it still sees
enter down after resume.

Thank you, a script which delays a few seconds before suspend should fix 3)

How to get rid of 1) and 2) ?

Regards
Michael

-------------------------------------------------------
This SF.net email is sponsored by: If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software.
http://www.objectstore.net/sourceforge

A message that is not in the archive (sent off-list or not yet received): 200305180523.25157.mflt1-DTdK3Ks6N5kHTnRCetW4+N0b+6lKrnBL@public.gmane.org

#5 lore raw

Hi!

Quoted 16 lines
Quoted 16 lines
Quoted 15 lines

Was playing a bit with S3 - Single user mode, console, ACPI core only, no modules.

Suspending always works.

Resuming performs somewhat randomly as follows:

1) Linux! - hang

2) Resume failed

3) Resumes with lots of shell prompts scrolling, and seems to be functional thereafter

What is the expected behaviour at this time?

Quoted 7 lines
Quoted 3 lines

3) is expected. You held down enter
when you did echo, so it still sees
enter down after resume.

Thank you, a script which delays a few seconds before suspend should fix 3)

How to get rid of 1) and 2) ?

For 4) (harddisk problems from other mail): does it work after IDE reset? If not, try disabling DMA with hdparm.

As for 1) and 2): Good luck debugging 1) [adding more letters to see where it hangs etc]; what exactly means 2)?
Pavel

Signature · 9 lines
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]


-------------------------------------------------------
This SF.net email is sponsored by: If flattening out C++ or Java
code to make your application fit in a relational database is painful, 
don't do it! Check out ObjectStore. Now part of Progress Software.
http://www.objectstore.net/sourceforge

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

#7 lore raw
Quoted 22 lines · Pavel Machek

Hi!

Quoted 20 lines
Quoted 19 lines
Quoted 7 lines

Was playing a bit with S3 - Single user mode, console, ACPI core only, no modules.

Suspending always works.

Resuming performs somewhat randomly as follows:

Quoted 8 lines

1) Linux! - hang

2) Resume failed

3) Resumes with lots of shell prompts scrolling, and seems to be functional thereafter

What is the expected behaviour at this time?

3) is expected. You held down enter
when you did echo, so it still sees
enter down after resume.

Quoted 7 lines
Quoted 4 lines

Thank you, a script which delays a few seconds before suspend should fix 3)

How to get rid of 1) and 2) ?

For 4) (harddisk problems from other mail): does it work after IDE reset? If not, try disabling DMA with hdparm.

Seems to work after hard disk reset. Problem seems to depend on disk activity.

Quoted 3 lines

As for 1) and 2): Good luck debugging 1) [adding more letters to see where it hangs etc];

The disk LED stays on, so perhaps it hangs in IDE.

Quoted 1 line

what exactly means 2)?

This is Toshiba BIOS message. System does cold reboot thereafter.

Q? How does BIOS know whether to do resume or reboot?

further, there is mode 5)

which is mode 4) _plus_ disk reset fails, and disk won't spin up again, and kjournald gets mad....

and mode 6)

System hangs after all tasks left fridge with disk led on.

-----

hdparm -d0 may reduce probability of 1) - not sure, but it failed with 4) and 5) with it.

I suppose IDE gets false interupt upon resume.

Regards
Michael

-------------------------------------------------------
This SF.net email is sponsored by: If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software.
http://www.objectstore.net/sourceforge

A message that is not in the archive (sent off-list or not yet received): 200305182005.30192.mflt1-DTdK3Ks6N5kHTnRCetW4+N0b+6lKrnBL@public.gmane.org

#9 lore raw

Hi!

Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
Quoted 11 lines
Quoted 11 lines

Was playing a bit with S3 - Single user mode, console, ACPI core only, no modules.

Suspending always works.

Resuming performs somewhat randomly as follows:

1) Linux! - hang

2) Resume failed

Quoted 8 lines
Quoted 4 lines

3) Resumes with lots of shell prompts scrolling, and seems to be functional thereafter

What is the expected behaviour at this time?

3) is expected. You held down enter
when you did echo, so it still sees
enter down after resume.

Thank you, a script which delays a few seconds before suspend should fix 3)

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

How to get rid of 1) and 2) ?

For 4) (harddisk problems from other mail): does it work after IDE reset? If not, try disabling DMA with hdparm.

Seems to work after hard disk reset. Problem seems to depend on disk activity.

Okay, so it works when you are lucky.

Quoted 8 lines
Quoted 2 lines

As for 1) and 2): Good luck debugging 1) [adding more letters to see where it hangs etc];

The disk LED stays on, so perhaps it hangs in IDE.

Quoted 1 line

what exactly means 2)?

This is Toshiba BIOS message. System does cold reboot thereafter.

There's not much I can do about this one. Perhaps toshiba bios does something stupid with disk during resume and needs to have it in some particular state? But then, after S3, disk should be powering up...

Quoted 1 line

Q? How does BIOS know whether to do resume or reboot?

Either bit in CMOS-RAM or some other magic.

Quoted 3 lines

further, there is mode 5)

which is mode 4) _plus_ disk reset fails, and disk won't spin up again, and kjournald gets mad....

Disk reset should never ever fail. Can you try to debug that?

Quoted 5 lines

and mode 6)

System hangs after all tasks left fridge with disk led on.

I suppose IDE gets false interupt upon resume.

Spurious interrupts should be handled gracefully by IDE. On velo I ran my machine with IDE interrupt connected to 1kHz timer, and it more or less worked ("IDE0: spurious interrupt", "Last message repeated 1539 times").

Pavel

Signature · 9 lines
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]


-------------------------------------------------------
This SF.net email is sponsored by: If flattening out C++ or Java
code to make your application fit in a relational database is painful, 
don't do it! Check out ObjectStore. Now part of Progress Software.
http://www.objectstore.net/sourceforge

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

#11 lore raw
Quoted 42 lines · Pavel Machek

Hi!

Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
Quoted 11 lines
Quoted 11 lines

Was playing a bit with S3 - Single user mode, console, ACPI core only, no modules.

Suspending always works.

Resuming performs somewhat randomly as follows:

1) Linux! - hang

2) Resume failed

Quoted 8 lines
Quoted 4 lines

3) Resumes with lots of shell prompts scrolling, and seems to be functional thereafter

What is the expected behaviour at this time?

3) is expected. You held down enter
when you did echo, so it still sees
enter down after resume.

Thank you, a script which delays a few seconds before suspend should fix 3)

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

How to get rid of 1) and 2) ?

For 4) (harddisk problems from other mail): does it work after IDE reset? If not, try disabling DMA with hdparm.

Seems to work after hard disk reset. Problem seems to depend on disk activity.

Okay, so it works when you are lucky.

Quoted 7 lines
Quoted 2 lines

As for 1) and 2): Good luck debugging 1) [adding more letters to see where it hangs etc];

The disk LED stays on, so perhaps it hangs in IDE.

Quoted 1 line

what exactly means 2)?

Quoted 7 lines
Quoted 2 lines

This is Toshiba BIOS message. System does cold reboot
thereafter.

There's not much I can do about this one. Perhaps toshiba bios does something stupid with disk during resume and needs to have it in some particular state? But then, after S3, disk should be powering up...

It aborts resume here, so something must make it believe that resume state is bad.

IMHO has nothing to do with disk as it is just after reset and display init.

Lets worry about IDE first. Pattern indicates that init of IDE upon resume is at fault.

Quoted 6 lines
Quoted 4 lines

further, there is mode 5)

which is mode 4) _plus_ disk reset fails, and disk won't spin
up again, and kjournald gets mad....

Disk reset should never ever fail. Can you try to debug that?\

It just acts like the drive got removed.

IDE bridge HW state must be messed up.

I'll look into init of IDE after resume and debug that. Any hints and pointers are welcome.

Quoted 11 lines
Quoted 6 lines

and mode 6)

System hangs after all tasks left fridge with disk led on.

I suppose IDE gets false interupt upon resume.

Spurious interrupts should be handled gracefully by IDE. On velo I ran my machine with IDE interrupt connected to 1kHz timer, and it more or less worked ("IDE0: spurious interrupt", "Last message repeated 1539 times").

Cute, Your velo S3 OK (before it died) ? - Do you know of any machines that really work with S3?

What do these msgs mean? - never seen anything like this before.

May 18 17:49:27 mhfl2 kernel:    evgpe-0396: *** Error: acpi_ev_gpe_dispatch: No handler or method for GPE[FE], disabling event
May 18 17:49:27 mhfl2 kernel:    evgpe-0396: *** Error: acpi_ev_gpe_dispatch: No handler or method for GPE[105], disabling event
May 18 17:49:27 mhfl2 kernel:    evgpe-0396: *** Error: acpi_ev_gpe_dispatch: No handler or method for GPE[D1], disabling event

Regards
Michael

-------------------------------------------------------
This SF.net email is sponsored by: If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software.
http://www.objectstore.net/sourceforge

A message that is not in the archive (sent off-list or not yet received): 200305191153.51196.mflt1-DTdK3Ks6N5kHTnRCetW4+N0b+6lKrnBL@public.gmane.org

#13 lore raw

Thus wrote Michael Frank:

Quoted 1 line

Cute, Your velo S3 OK (before it died) ? - Do you know of any machines that really work with S3?

I've actually succeeded in getting my Asus L3800C into and out of S3, though not without some hassle:
1) turning off DMA -- it seemed to work with DMA and a particular kernel version, but I may be wrong,
2) appending acpi_sleep=s3_mode to get my display reinitialized,
3) compiling keybdev and related as modules, logging on remotely after resume and reloading these turns the keyboard back on.

I didn't test much, as I was (and still am) plagued by a serious filesystem problem under 2.5.x, but AFAIK, though the S3 worked OK with the somehow older kernels (2.5.61, possibly up to 63 or 65), the disk would always hang with the newer ones (2.5.67, 69), regardless of the DMA setting.

Somehow, if I recall correctly, I was even able to do S3 with usb-uhci loaded, which is strange because its presence always hangs my machine when leaving S1.

If you need any more info, I can do some further testing.

Best regards,

Signature · 9 lines
Karol 'sziwan' Kozimor
sziwan-DETuoxkZsSqrDJvtcaxF/[email protected]


-------------------------------------------------------
This SF.net email is sponsored by: If flattening out C++ or Java
code to make your application fit in a relational database is painful, 
don't do it! Check out ObjectStore. Now part of Progress Software.
http://www.objectstore.net/sourceforge
#14 lore raw
In reply to a message not in the archive

Hi!

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

further, there is mode 5)

which is mode 4) _plus_ disk reset fails, and disk won't spin
up again, and kjournald gets mad....

Quoted 8 lines
Quoted 1 line

Disk reset should never ever fail. Can you try to debug that?\

It just acts like the drive got removed.

IDE bridge HW state must be messed up.

I'll look into init of IDE after resume and debug that. Any hints and pointers are welcome.

I'm not so sure that any IDE init is done upon resume -- which might be a problem of course.

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

and mode 6)

System hangs after all tasks left fridge with disk led on.

I suppose IDE gets false interupt upon resume.

Quoted 7 lines
Quoted 4 lines

Spurious interrupts should be handled gracefully by IDE. On velo I ran my machine with IDE interrupt connected to 1kHz timer, and it more or less worked ("IDE0: spurious interrupt", "Last message repeated 1539 times").

Cute, Your velo S3 OK (before it died) ? - Do you know of any machines that really work with S3?

Velo is mips handheld, there's no ACPI there.

But I have two notebooks and one desktop where S3 works. (More or less, now I found that there's mtrr problem on second resume on desktop).

Quoted 6 lines

What do these msgs mean? - never seen anything like this before.

May 18 17:49:27 mhfl2 kernel:    evgpe-0396: *** Error: acpi_ev_gpe_dispatch: No handler or method for GPE[FE], disabling event
May 18 17:49:27 mhfl2 kernel:    evgpe-0396: *** Error: acpi_ev_gpe_dispatch: No handler or method for GPE[105], disabling event
May 18 17:49:27 mhfl2 kernel:    evgpe-0396: *** Error: acpi_ev_gpe_dispatch: No handler or method for GPE[D1], disabling event

I do not know that part of ACPI.
Pavel

Signature · 9 lines
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]


-------------------------------------------------------
This SF.net email is sponsored by: If flattening out C++ or Java
code to make your application fit in a relational database is painful, 
don't do it! Check out ObjectStore. Now part of Progress Software.
http://www.objectstore.net/sourceforge
#15 lore raw
In reply to a message not in the archive

Hi!

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

and mode 6)

System hangs after all tasks left fridge with disk led on.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

I suppose IDE gets false interupt upon resume.

Spurious interrupts should be handled gracefully by IDE. On velo I ran my machine with IDE interrupt connected to 1kHz timer, and it more or less worked ("IDE0: spurious interrupt", "Last message repeated 1539 times").

Cute, Your velo S3 OK (before it died) ? - Do you know of any machines that really work with S3?

I just fixed mtrrs and suspended/resumed that desktop ~10 times... It seems okay. [Not yet applicable to mainline, I guess, as mtrr is not in].

Pavel

usr/src/linux/arch/i386/kernel/cpu/mtrr/main.c renamed from usr/src/tmp/linux/arch/i386/kernel/cpu/mtrr/main.c +20 -22
@@ -648,33 +648,33 @@
 };
  
 #ifdef CONFIG_PM
-struct mtrr_suspend_state
-{
+struct mtrr_suspend_one {
 	mtrr_type ltype;
 	unsigned long lbase;
 	unsigned int lsize;
 };
 
-/* We return a pointer ptr on an area of *ptr bytes
-   beginning at ptr+sizeof(int)
-   This buffer has to be saved in some way during suspension */
-static int *mtrr_save_state(void)
+struct mtrr_suspend_state {
+	int len;
+	struct mtrr_suspend_one mtrr[0];
+};
+
+/* This buffer has to be saved in some way during suspension */
+struct mtrr_suspend_state *mtrr_save_state(void)
 {
 	int i, len;
-	int *ptr = NULL;
-	static struct mtrr_suspend_state *mtrr_suspend_buffer=NULL;
+	static struct mtrr_suspend_state *ptr = NULL;
+	static struct mtrr_suspend_one *mtrr_suspend_buffer=NULL;
      
 	if(!mtrr_suspend_buffer)
 	{
-		len = num_var_ranges * sizeof (struct mtrr_suspend_state) + sizeof(int);
+		len = num_var_ranges * sizeof (struct mtrr_suspend_one) + sizeof(int);
 		ptr = kmalloc (len, GFP_KERNEL);
 		if (ptr == NULL)
 			return(NULL);
-		*ptr = len;
-		ptr++;
-		mtrr_suspend_buffer = (struct mtrr_suspend_state *)ptr;
-		ptr--;
+		ptr->len = len;
 	}
+	mtrr_suspend_buffer = &ptr->mtrr;
 	for (i = 0; i < num_var_ranges; ++i,mtrr_suspend_buffer++)
 		mtrr_if->get (i,
 			      &(mtrr_suspend_buffer->lbase),
@@ -684,19 +684,17 @@
 }
 
 /* We restore mtrrs from buffer ptr */
-static void mtrr_restore_state(int *ptr)
+static void mtrr_restore_state(struct mtrr_suspend_state *ptr)
 {
 	int i, len;
-	struct mtrr_suspend_state *mtrr_suspend_buffer;
+	struct mtrr_suspend_one *mtrr_suspend_buffer;
      
-	len = num_var_ranges * sizeof (struct mtrr_suspend_state) + sizeof(int);
-	if(*ptr != len)
-	{
-		printk ("mtrr: Resuming failed due to different number of MTRRs\n");
+	len = num_var_ranges * sizeof (struct mtrr_suspend_one) + sizeof(int);
+	if(ptr->len != len) {
+		printk (KERN_CRIT "mtrr: Resuming failed due to different number of MTRRs\n");
 		return;
 	}
-	ptr++;
-	mtrr_suspend_buffer=(struct mtrr_suspend_state *)ptr;
+	mtrr_suspend_buffer = &ptr->mtrr;
 	for (i = 0; i < num_var_ranges; ++i,mtrr_suspend_buffer++)     
 		if (mtrr_suspend_buffer->lsize)	  
 			set_mtrr(i,
@@ -705,7 +703,7 @@
 				 mtrr_suspend_buffer->ltype);
 }
 
-static void *mtrr_state;
+static struct mtrr_suspend_state *mtrr_state;
 
 static int mtrr_suspend(struct device *dev, u32 state, u32 level)
 {
Signature · 9 lines
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]


-------------------------------------------------------
This SF.net email is sponsored by: If flattening out C++ or Java
code to make your application fit in a relational database is painful, 
don't do it! Check out ObjectStore. Now part of Progress Software.
http://www.objectstore.net/sourceforge

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

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

A message that is not in the archive (sent off-list or not yet received): 20030519100135.GA18034-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org

#19 lore raw
Quoted 5 lines · Pavel Machek
Quoted 2 lines

Cant' apply the patch to either 2.5.69 vanilla and -bk as of yesterday (mtrr/main.c unchanged anyway).

I told you so ;-).

Sorry, I patch first and ask later !-(

When will this go into mainline?

Quoted 5 lines
Quoted 2 lines

Why does one have to enable CONFIG_SOFTWARE_SUSPEND to enable option for ACPI sleep states (CONFIG_ACPI_SLEEP)?

It shares refrigerator etc. If you want to separate them... I guess people would welcome that.

What about making refrigerator independent of both - somewhat as a kernel facility?

BTW, Karol mentioned that S3 seems to have broken recently. What kernel version were these big IDE changes?

Regards
Michael

-------------------------------------------------------
This SF.net email is sponsored by: If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software.
http://www.objectstore.net/sourceforge