Skip to contentSkip to conversation

2.6.25-mm1: suspend-to-disk warning, resume failure

DISCUSSION Pavel Machek 5 participants 17 messages Apr 18, 2008 – Apr 29, 2008 3 messages not in the archive

Subsystems (4)
lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 24 lines · Andrew Morton

This is the Vaio.

This:

<cold boot>
<suspend-to-ram>
<resume-from-ram>
<suspend-to-ram>
<resume-from-ram>

works OK.

This:

<cold boot>
<suspend-to-disk>
<resume-from-disk>

works OK.

But this:

Quoted 7 lines

<cold boot>
<suspend-to-ram>
<resume-from-ram>
<suspend-to-disk>
<resume-from-disk>

hangs at the end of resume-from-disk.

You could try echo disk > /sys/power/state to see if it is ACPI acting funny or some driver

Quoted 34 lines

During the suspend-to-disk I saw:

ipw2200: Radio Frequency Kill Switch is On:
Kill switch must be turned off for wireless networking to work.
PM: Device usb1 failed to (unknown PM event): error -113
PM: Device usb2 failed to (unknown PM event): error -113
PM: Device usb3 failed to (unknown PM event): error -113
PM: Device usb4 failed to (unknown PM event): error -113 Suspending console(s)

But it suspends OK.

Resume _almost_ works. It gets to:

calling hpet_insert_resource+0x0/0x1e()
initcall hpet_insert_resource+0x0/0x1e() returned 1 after 0 msecs initcall hpet_insert_resource+0x0/0x1e() returned with error code 1 calling init_lapic_nmi_sysfs+0x0/0x33()
initcall init_lapic_nmi_sysfs+0x0/0x33() returned 0 after 0 msecs calling io_apic_bug_finalize+0x0/0x1c()
initcall io_apic_bug_finalize+0x0/0x1c() returned 0 after 0 msecs calling check_early_ioremap_leak+0x0/0x3d()
initcall check_early_ioremap_leak+0x0/0x3d() returned 0 after 0 msecs calling print_ipi_mode+0x0/0x26()
Using IPI Shortcut mode
initcall print_ipi_mode+0x0/0x26() returned 0 after 2 msecs calling init_oops_id+0x0/0x23()
initcall init_oops_id+0x0/0x23() returned 0 after 0 msecs calling disable_boot_consoles+0x0/0x36()
initcall disable_boot_consoles+0x0/0x36() returned 0 after 0 msecs calling pm_qos_power_init+0x0/0x54()
initcall pm_qos_power_init+0x0/0x54() returned 0 after 0 msecs

Quoted 8 lines

calling software_resume+0x0/0x179()
Freezing user space processes ... (elapsed 0.00 seconds) done. Freezing remaining freezable tasks ... <6>input: PS/2 Mouse as /class/input/input3
input: AlpsPS/2 ALPS GlidePoint as /class/input/input4
(elapsed 0.14 seconds) done.
PM: Loading image data pages (88965 pages) ... done
PM: Read 355860 kbytes in 16.36 seconds (21.75 MB/s)
Suspending console(s)

no_console_suspend should get you a bit more output...

Quoted 1 line

I guess I get to bisect this.

Either that, or you can try if it works with minimum config (no wireless, no usb, no fancy drivers).
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#2 lore raw
In reply to a message not in the archive

Hi!

Quoted 22 lines

This is the Vaio.

This:

<cold boot>
<suspend-to-ram>
<resume-from-ram>
<suspend-to-ram>
<resume-from-ram>

works OK.

This:

<cold boot>
<suspend-to-disk>
<resume-from-disk>

works OK.

Quoted 7 lines

But this:

<cold boot>
<suspend-to-ram>
<resume-from-ram>
<suspend-to-disk>
<resume-from-disk>

Works for me on thinkpad x60.

Problems I'm aware in this area: MCE driver does not like suspend (compile it out), and iommu has problems (iommu=soft solves it).
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#4 lore raw
In reply to a message not in the archive
Quoted 32 lines · On Fri, 18 Apr 2008 13:08:13 +0200 Pavel Machek <[email protected]> wrote:

Hi!

Quoted 22 lines

This is the Vaio.

This:

<cold boot>
<suspend-to-ram>
<resume-from-ram>
<suspend-to-ram>
<resume-from-ram>

works OK.

This:

<cold boot>
<suspend-to-disk>
<resume-from-disk>

works OK.

Quoted 7 lines

But this:

<cold boot>
<suspend-to-ram>
<resume-from-ram>
<suspend-to-disk>
<resume-from-disk>

Quoted 4 lines

Works for me on thinkpad x60.

Problems I'm aware in this area: MCE driver does not like suspend (compile it out), and iommu has problems (iommu=soft solves it).

Yeah. I got down to bisect the Vaio failure and it went away. But it was there.

#5 lore raw
In reply to a message not in the archive
Quoted 11 lines · Andrew Morton

But this:

<cold boot>
<suspend-to-ram>
<resume-from-ram>
<suspend-to-disk>
<resume-from-disk>

hangs at the end of resume-from-disk.

Quoted 8 lines

During the suspend-to-disk I saw:

ipw2200: Radio Frequency Kill Switch is On:
Kill switch must be turned off for wireless networking to work.
PM: Device usb1 failed to (unknown PM event): error -113
PM: Device usb2 failed to (unknown PM event): error -113
PM: Device usb3 failed to (unknown PM event): error -113
PM: Device usb4 failed to (unknown PM event): error -113

These -113 errors can be ignored. They are fallout from the recent conversion of the driver core's suspend/resume API. Matching changes have not yet been added to the USB core.

The "(unknown PM event)" strings look like a bug, though.

Alan Stern

#6 lore raw
Quoted 22 lines · Alan Stern
Quoted 11 lines · Andrew Morton

But this:

<cold boot>
<suspend-to-ram>
<resume-from-ram>
<suspend-to-disk>
<resume-from-disk>

hangs at the end of resume-from-disk.

Quoted 8 lines

During the suspend-to-disk I saw:

ipw2200: Radio Frequency Kill Switch is On:
Kill switch must be turned off for wireless networking to work.
PM: Device usb1 failed to (unknown PM event): error -113
PM: Device usb2 failed to (unknown PM event): error -113
PM: Device usb3 failed to (unknown PM event): error -113
PM: Device usb4 failed to (unknown PM event): error -113

Quoted 3 lines

These -113 errors can be ignored. They are fallout from the recent conversion of the driver core's suspend/resume API. Matching changes have not yet been added to the USB core.

Ick, that's not good, is anyone going to at least send me a patch to make them go away? :)

thanks,

greg k-h

#7 lore raw
Quoted 6 lines · Greg KH
Quoted 3 lines

These -113 errors can be ignored. They are fallout from the recent conversion of the driver core's suspend/resume API. Matching changes have not yet been added to the USB core.

Ick, that's not good, is anyone going to at least send me a patch to make them go away? :)

It's included in a 9-part series I'm debugging right now. If you want, I can send just that portion separately this afternoon.

Alan Stern

#8 lore raw
Quoted 11 lines · Alan Stern
Quoted 6 lines · Greg KH
Quoted 3 lines

These -113 errors can be ignored. They are fallout from the recent conversion of the driver core's suspend/resume API. Matching changes have not yet been added to the USB core.

Ick, that's not good, is anyone going to at least send me a patch to make them go away? :)

It's included in a 9-part series I'm debugging right now. If you want, I can send just that portion separately this afternoon.

No, that's fine, I can wait, just want to make sure that it is taken care of.

thanks,

greg k-h

#9 lore raw
In reply to Alan Stern
Quoted 22 lines · Alan Stern
Quoted 11 lines · Andrew Morton

But this:

<cold boot>
<suspend-to-ram>
<resume-from-ram>
<suspend-to-disk>
<resume-from-disk>

hangs at the end of resume-from-disk.

Quoted 8 lines

During the suspend-to-disk I saw:

ipw2200: Radio Frequency Kill Switch is On:
Kill switch must be turned off for wireless networking to work.
PM: Device usb1 failed to (unknown PM event): error -113
PM: Device usb2 failed to (unknown PM event): error -113
PM: Device usb3 failed to (unknown PM event): error -113
PM: Device usb4 failed to (unknown PM event): error -113

Quoted 5 lines

These -113 errors can be ignored. They are fallout from the recent conversion of the driver core's suspend/resume API. Matching changes have not yet been added to the USB core.

The "(unknown PM event)" strings look like a bug, though.

Yes, it does.

I'm trying to figure this out.

Thanks,
Rafael

#10 lore raw
Quoted 27 lines · Rafael J. Wysocki
Quoted 26 lines · Alan Stern
Quoted 11 lines · Andrew Morton

But this:

<cold boot>
<suspend-to-ram>
<resume-from-ram>
<suspend-to-disk>
<resume-from-disk>

hangs at the end of resume-from-disk.

Quoted 8 lines

During the suspend-to-disk I saw:

ipw2200: Radio Frequency Kill Switch is On:
Kill switch must be turned off for wireless networking to work.
PM: Device usb1 failed to (unknown PM event): error -113
PM: Device usb2 failed to (unknown PM event): error -113
PM: Device usb3 failed to (unknown PM event): error -113
PM: Device usb4 failed to (unknown PM event): error -113

These -113 errors can be ignored. They are fallout from the recent conversion of the driver core's suspend/resume API. Matching changes have not yet been added to the USB core.

Quoted 5 lines
Quoted 1 line

The "(unknown PM event)" strings look like a bug, though.

Yes, it does.

I'm trying to figure this out.

This particular problem should be fixed by the appended patch.

Andrew, can you please check if you see "recover" instead of "(unknown PM event)" in those messages with the patch applied?

Thanks,
Rafael

---
From: Rafael J. Wysocki <[email protected]>

If PMSG_RECOVER is passed to it, the pm_verb() function will return a pointer to "(unknown PM event)", which is wrong. Fix that.

---
 drivers/base/power/main.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/base/power/main.c +2 -0
Index: linux-2.6/drivers/base/power/main.c
===================================================================
@@ -259,6 +259,8 @@ static char *pm_verb(int event)
 		return "thaw";
 	case PM_EVENT_RESTORE:
 		return "restore";
+	case PM_EVENT_RECOVER:
+		return "recover";
 	default:
 		return "(unknown PM event)";
 	}
#11 lore raw
Quoted 28 lines · Rafael J. Wysocki
Quoted 27 lines · Rafael J. Wysocki
Quoted 26 lines · Alan Stern
Quoted 11 lines · Andrew Morton

But this:

<cold boot>
<suspend-to-ram>
<resume-from-ram>
<suspend-to-disk>
<resume-from-disk>

hangs at the end of resume-from-disk.

Quoted 8 lines

During the suspend-to-disk I saw:

ipw2200: Radio Frequency Kill Switch is On:
Kill switch must be turned off for wireless networking to work.
PM: Device usb1 failed to (unknown PM event): error -113
PM: Device usb2 failed to (unknown PM event): error -113
PM: Device usb3 failed to (unknown PM event): error -113
PM: Device usb4 failed to (unknown PM event): error -113

These -113 errors can be ignored. They are fallout from the recent conversion of the driver core's suspend/resume API. Matching changes have not yet been added to the USB core.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

The "(unknown PM event)" strings look like a bug, though.

Yes, it does.

I'm trying to figure this out.

This particular problem should be fixed by the appended patch.

The following patch is also necessary to make hibernation work as documented in pm.h.

Thanks,
Rafael

---
From: Rafael J. Wysocki <[email protected]>

Make hibernation work as documented in include/linux/pm.h .

In pm.h it is documented that device_power_up() and device_resume() will be called with PMSG_RECOVER if the creation of a hibernation image fails or the restoration of memory contents from a hibernation image fails. Otherwise, it should be called either with PMSG_THAW or with PMSG_RESTORE, depending on the context. Make that happen.

---
 kernel/power/disk.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
kernel/power/disk.c +5 -3
Index: linux-2.6/kernel/power/disk.c
===================================================================
@@ -225,7 +225,8 @@ static int create_image(int platform_mod
 	/* NOTE:  device_power_up() is just a resume() for devices
 	 * that suspended with irqs off ... no overall powerup.
 	 */
-	device_power_up(in_suspend ? PMSG_RECOVER : PMSG_RESTORE);
+	device_power_up(in_suspend ?
+		(error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE);
  Enable_irqs:
 	local_irq_enable();
 	device_pm_unlock();
@@ -282,7 +283,8 @@ int hibernation_snapshot(int platform_mo
  Finish:
 	platform_finish(platform_mode);
  Resume_devices:
-	device_resume(in_suspend ? PMSG_RECOVER : PMSG_RESTORE);
+	device_resume(in_suspend ?
+		(error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE);
  Resume_console:
 	resume_console();
  Close:
@@ -332,7 +334,7 @@ static int resume_target_kernel(void)
 	swsusp_free();
 	restore_processor_state();
 	touch_softlockup_watchdog();
-	device_power_up(PMSG_THAW);
+	device_power_up(PMSG_RECOVER);
  Enable_irqs:
 	local_irq_enable();
 	device_pm_unlock();
#12 lore raw
Quoted 46 lines · Rafael J. Wysocki
Quoted 28 lines · Rafael J. Wysocki
Quoted 27 lines · Rafael J. Wysocki
Quoted 26 lines · Alan Stern
Quoted 11 lines · Andrew Morton

But this:

<cold boot>
<suspend-to-ram>
<resume-from-ram>
<suspend-to-disk>
<resume-from-disk>

hangs at the end of resume-from-disk.

Quoted 8 lines

During the suspend-to-disk I saw:

ipw2200: Radio Frequency Kill Switch is On:
Kill switch must be turned off for wireless networking to work.
PM: Device usb1 failed to (unknown PM event): error -113
PM: Device usb2 failed to (unknown PM event): error -113
PM: Device usb3 failed to (unknown PM event): error -113
PM: Device usb4 failed to (unknown PM event): error -113

These -113 errors can be ignored. They are fallout from the recent conversion of the driver core's suspend/resume API. Matching changes have not yet been added to the USB core.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

The "(unknown PM event)" strings look like a bug, though.

Yes, it does.

I'm trying to figure this out.

This particular problem should be fixed by the appended patch.

The following patch is also necessary to make hibernation work as documented in pm.h.

Thanks,
Rafael

---
From: Rafael J. Wysocki <[email protected]>

Quoted 8 lines

Make hibernation work as documented in include/linux/pm.h .

In pm.h it is documented that device_power_up() and device_resume() will be called with PMSG_RECOVER if the creation of a hibernation image fails or the restoration of memory contents from a hibernation image fails. Otherwise, it should be called either with PMSG_THAW or with PMSG_RESTORE, depending on the context. Make that happen.

Should either of these patches be merged / added to the ones you sent me before?

thanks,

greg k-h

#13 lore raw
Quoted 56 lines · Greg KH
Quoted 46 lines · Rafael J. Wysocki
Quoted 28 lines · Rafael J. Wysocki
Quoted 27 lines · Rafael J. Wysocki
Quoted 26 lines · Alan Stern
Quoted 11 lines · Andrew Morton

But this:

<cold boot>
<suspend-to-ram>
<resume-from-ram>
<suspend-to-disk>
<resume-from-disk>

hangs at the end of resume-from-disk.

Quoted 8 lines

During the suspend-to-disk I saw:

ipw2200: Radio Frequency Kill Switch is On:
Kill switch must be turned off for wireless networking to work.
PM: Device usb1 failed to (unknown PM event): error -113
PM: Device usb2 failed to (unknown PM event): error -113
PM: Device usb3 failed to (unknown PM event): error -113
PM: Device usb4 failed to (unknown PM event): error -113

These -113 errors can be ignored. They are fallout from the recent conversion of the driver core's suspend/resume API. Matching changes have not yet been added to the USB core.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

The "(unknown PM event)" strings look like a bug, though.

Yes, it does.

I'm trying to figure this out.

This particular problem should be fixed by the appended patch.

The following patch is also necessary to make hibernation work as documented in pm.h.

Thanks,
Rafael

---
From: Rafael J. Wysocki <[email protected]>

Quoted 8 lines

Make hibernation work as documented in include/linux/pm.h .

In pm.h it is documented that device_power_up() and device_resume() will be called with PMSG_RECOVER if the creation of a hibernation image fails or the restoration of memory contents from a hibernation image fails. Otherwise, it should be called either with PMSG_THAW or with PMSG_RESTORE, depending on the context. Make that happen.

Quoted 2 lines

Should either of these patches be merged / added to the ones you sent me before?

Yes, both of them, please.

Thanks,
Rafael

#14 lore raw
Quoted 13 lines · Rafael J. Wysocki
Quoted 12 lines · Greg KH
Quoted 11 lines

---
From: Rafael J. Wysocki <[email protected]>

Make hibernation work as documented in include/linux/pm.h .

In pm.h it is documented that device_power_up() and device_resume() will be called with PMSG_RECOVER if the creation of a hibernation image fails or the restoration of memory contents from a hibernation image fails. Otherwise, it should be called either with PMSG_THAW or with PMSG_RESTORE, depending on the context. Make that happen.

Quoted 4 lines
Quoted 2 lines

Should either of these patches be merged / added to the ones you sent me before?

Yes, both of them, please.

Ok, which is it? Added at the end of the series, or merged in to prevent git bisection problems? If merged, which patch should I merge it to?

thanks,

greg k-h

#15 lore raw
Quoted 14 lines · Greg KH
Quoted 13 lines · Rafael J. Wysocki
Quoted 12 lines · Greg KH
Quoted 11 lines

---
From: Rafael J. Wysocki <[email protected]>

Make hibernation work as documented in include/linux/pm.h .

In pm.h it is documented that device_power_up() and device_resume() will be called with PMSG_RECOVER if the creation of a hibernation image fails or the restoration of memory contents from a hibernation image fails. Otherwise, it should be called either with PMSG_THAW or with PMSG_RESTORE, depending on the context. Make that happen.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Should either of these patches be merged / added to the ones you sent me before?

Yes, both of them, please.

Ok, which is it? Added at the end of the series, or merged in to prevent git bisection problems? If merged, which patch should I merge it to?

Please merge both into pm-introduce-new-top-level-suspend-and-hibernation-callbacks.patch , if possible, the changes belong in there.

Thanks,
Rafael

#19 lore raw
In reply to Rafael J. Wysocki
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
Quoted 6 lines

ipw2200: Radio Frequency Kill Switch is On:
Kill switch must be turned off for wireless networking to work.
PM: Device usb1 failed to (unknown PM event): error -113
PM: Device usb2 failed to (unknown PM event): error -113
PM: Device usb3 failed to (unknown PM event): error -113
PM: Device usb4 failed to (unknown PM event): error -113

These -113 errors can be ignored. They are fallout from the recent conversion of the driver core's suspend/resume API. Matching changes have not yet been added to the USB core.

The "(unknown PM event)" strings look like a bug, though.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Yes, it does.

I'm trying to figure this out.

This particular problem should be fixed by the appended patch.

The following patch is also necessary to make hibernation work as documented in pm.h.

ACK.

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#16 lore raw
In reply to Rafael J. Wysocki
Quoted 20 lines · Rafael J. Wysocki
Quoted 19 lines · Greg KH
Quoted 17 lines · Rafael J. Wysocki
Quoted 12 lines · Greg KH
Quoted 11 lines

---
From: Rafael J. Wysocki <[email protected]>

Make hibernation work as documented in include/linux/pm.h .

In pm.h it is documented that device_power_up() and device_resume() will be called with PMSG_RECOVER if the creation of a hibernation image fails or the restoration of memory contents from a hibernation image fails. Otherwise, it should be called either with PMSG_THAW or with PMSG_RESTORE, depending on the context. Make that happen.

Quoted 2 lines

Should either of these patches be merged / added to the ones you sent me before?

Yes, both of them, please.

Quoted 7 lines
Quoted 3 lines

Ok, which is it? Added at the end of the series, or merged in to prevent git bisection problems? If merged, which patch should I merge it to?

Please merge both into pm-introduce-new-top-level-suspend-and-hibernation-callbacks.patch , if possible, the changes belong in there.

Hm, I just tried this (sorry for the delay) and I think it's no longer needed with your latest version of the patches, right?

thanks,

greg k-h

#18 lore raw
In reply to a message not in the archive
Quoted 25 lines · Greg KH
Quoted 24 lines · Rafael J. Wysocki
Quoted 22 lines · Greg KH
Quoted 13 lines · Rafael J. Wysocki
Quoted 12 lines · Greg KH
Quoted 11 lines

---
From: Rafael J. Wysocki <[email protected]>

Make hibernation work as documented in include/linux/pm.h .

In pm.h it is documented that device_power_up() and device_resume() will be called with PMSG_RECOVER if the creation of a hibernation image fails or the restoration of memory contents from a hibernation image fails. Otherwise, it should be called either with PMSG_THAW or with PMSG_RESTORE, depending on the context. Make that happen.

Quoted 4 lines
Quoted 2 lines

Should either of these patches be merged / added to the ones you sent me before?

Yes, both of them, please.

Ok, which is it? Added at the end of the series, or merged in to prevent git bisection problems? If merged, which patch should I merge it to?

Quoted 6 lines
Quoted 3 lines

Please merge both into pm-introduce-new-top-level-suspend-and-hibernation-callbacks.patch , if possible, the changes belong in there.

Hm, I just tried this (sorry for the delay) and I think it's no longer needed with your latest version of the patches, right?

Right. The last version already contains it.

Thanks,
Rafael