public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* S3 on Asus M6R
@ 2005-03-21 13:54 Jan Kasprzak
       [not found] ` <20050321135401.GC30293-0hYGf3jDe+XrBKCeMvbIDA@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kasprzak @ 2005-03-21 13:54 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

	Hi all,

	I have an Asus M6R laptop (http://www.fi.muni.cz/~kas/m6r/).
I have tried to use ACPI S3 suspend-to-ram, but it does not work for me:

- usually the system either immediately resumes and locks up
	after "echo 3 > /proc/acpi/sleep", or it or powers itself down
	and does a cold boot when I push the power button. I have found
	that the lm_sensors package is what causes the problem (altough	
	I have no idea why).

- without lm_sensors enabled (chkconfig lm_sensors off), I can suspend
	my system (the power LED starts blinking, which means the system
	is suspended to RAM). But I cannot resume it back - after hitting
	the power button the LEDs are on as when the laptop is normally
	running, but I get no output on the display, no response to ping, no
	response to CapsLock key, etc.

	I have read Documentation/power/video.txt, but neither using
vbetool or boot-radeon utility make any difference for me.

	I have tried to use bash -x s3.sh >s3.log 2>s3.err, where s3.sh
is as follows:

#!/bin/bash
chvt 1
rmmod ohci-hcd
rmmod ehci-hcd
sync
echo 3 > /proc/acpi/sleep
sync
/tmp/boot-radeon
chvt 7

but after the (unsuccessful) resume there was only the debugging output
up to the "rmmod ehci-hcd" command in the s3.err file.

I have tried acpi_sleep=s3_bios and s3_mode, but it does not help.

	I use generic 2.6.11.3 kernel, Fedora Core 3 system.
What else should I try to make S3 state working for me?

	Thanks,

-Y.

-- 
| Jan "Yenya" Kasprzak  <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839      Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/   Czech Linux Homepage: http://www.linux.cz/ |
> Whatever the Java applications and desktop dances may lead to, Unix will <
> still be pushing the packets around for a quite a while.      --Rob Pike <


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: S3 on Asus M6R
       [not found] ` <20050321135401.GC30293-0hYGf3jDe+XrBKCeMvbIDA@public.gmane.org>
@ 2005-03-21 16:29   ` Carl-Daniel Hailfinger
       [not found]     ` <423EF660.7010906-hi6Y0CQ0nG0@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Carl-Daniel Hailfinger @ 2005-03-21 16:29 UTC (permalink / raw)
  To: Jan Kasprzak; +Cc: acpi-devel

[forgot the CC:]
Jan Kasprzak schrieb:
> 	Hi all,
> 
> 	I have an Asus M6R laptop (http://www.fi.muni.cz/~kas/m6r/).
> I have tried to use ACPI S3 suspend-to-ram, but it does not work for me:
> 
> - usually the system either immediately resumes and locks up
> 	after "echo 3 > /proc/acpi/sleep", or it or powers itself down
> 	and does a cold boot when I push the power button. I have found
> 	that the lm_sensors package is what causes the problem (altough	
> 	I have no idea why).
> 
> - without lm_sensors enabled (chkconfig lm_sensors off), I can suspend
> 	my system (the power LED starts blinking, which means the system
> 	is suspended to RAM). But I cannot resume it back - after hitting
> 	the power button the LEDs are on as when the laptop is normally
> 	running, but I get no output on the display, no response to ping, no
> 	response to CapsLock key, etc.
> 
> 	I have read Documentation/power/video.txt, but neither using
> vbetool or boot-radeon utility make any difference for me.
> 
> 	I have tried to use bash -x s3.sh >s3.log 2>s3.err, where s3.sh
> is as follows:
> 
> #!/bin/bash
> chvt 1
> rmmod ohci-hcd
> rmmod ehci-hcd
> sync
> echo 3 > /proc/acpi/sleep
> sync
> /tmp/boot-radeon
> chvt 7

Can we see your kernel command line? Do you use any framebuffer? Does
it work if you boot with init=/bin/bash?


Regards,
Carl-Daniel
-- 
http://www.hailfinger.org/



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: S3 on Asus M6R
       [not found]     ` <423EF660.7010906-hi6Y0CQ0nG0@public.gmane.org>
@ 2005-03-21 17:03       ` Jan Kasprzak
       [not found]         ` <20050321170340.GK30293-0hYGf3jDe+XrBKCeMvbIDA@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kasprzak @ 2005-03-21 17:03 UTC (permalink / raw)
  To: Carl-Daniel Hailfinger; +Cc: acpi-devel

Carl-Daniel Hailfinger wrote:
: Can we see your kernel command line?

# cat /proc/cmdline
ro root=/dev/hda1 resume=/dev/hda2

: Do you use any framebuffer?

	No.

: Does it work if you boot with init=/bin/bash?
: 
	No. It suspends, but resume fails (LEDs are on, fan is on,
but no display output, no ping reply, ...).

-Yenya

-- 
| Jan "Yenya" Kasprzak  <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839      Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/   Czech Linux Homepage: http://www.linux.cz/ |
> Whatever the Java applications and desktop dances may lead to, Unix will <
> still be pushing the packets around for a quite a while.      --Rob Pike <


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: S3 on Asus M6R
       [not found]         ` <20050321170340.GK30293-0hYGf3jDe+XrBKCeMvbIDA@public.gmane.org>
@ 2005-03-21 17:34           ` Carl-Daniel Hailfinger
       [not found]             ` <423F05A9.6050309-hi6Y0CQ0nG0@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Carl-Daniel Hailfinger @ 2005-03-21 17:34 UTC (permalink / raw)
  To: Jan Kasprzak; +Cc: acpi-devel

Jan Kasprzak schrieb:
> Carl-Daniel Hailfinger wrote:
> : Can we see your kernel command line?
> 
> # cat /proc/cmdline
> ro root=/dev/hda1 resume=/dev/hda2
> 
> : Do you use any framebuffer?
> 
> 	No.
> 
> : Does it work if you boot with init=/bin/bash?
> : 
> 	No. It suspends, but resume fails (LEDs are on, fan is on,
> but no display output, no ping reply, ...).

Bah. Last try: Is a CD/DVD in the drive or are you plugged into a
docking station?

Another thing you could try is a serial console, but I doubt it
will work after resume.

Regards,
Carl-Daniel
-- 
http://www.hailfinger.org/


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: S3 on Asus M6R
       [not found]             ` <423F05A9.6050309-hi6Y0CQ0nG0@public.gmane.org>
@ 2005-03-21 17:39               ` Jan Kasprzak
       [not found]                 ` <20050321173912.GN30293-0hYGf3jDe+XrBKCeMvbIDA@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kasprzak @ 2005-03-21 17:39 UTC (permalink / raw)
  To: Carl-Daniel Hailfinger; +Cc: acpi-devel

Carl-Daniel Hailfinger wrote:
: Bah. Last try: Is a CD/DVD in the drive or are you plugged into a
: docking station?

	No and no.

: Another thing you could try is a serial console, but I doubt it
: will work after resume.

	No serial port on Asus M6R :-(.

-Yenya

-- 
| Jan "Yenya" Kasprzak  <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839      Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/   Czech Linux Homepage: http://www.linux.cz/ |
> Whatever the Java applications and desktop dances may lead to, Unix will <
> still be pushing the packets around for a quite a while.      --Rob Pike <


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: S3 on Asus M6R
       [not found]                 ` <20050321173912.GN30293-0hYGf3jDe+XrBKCeMvbIDA@public.gmane.org>
@ 2005-03-21 19:56                   ` Stefan Dösinger
       [not found]                     ` <200503212056.20589.stefandoesinger-RbZlAiThDcE@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Dösinger @ 2005-03-21 19:56 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: Jan Kasprzak, Carl-Daniel Hailfinger

Am Montag, 21. März 2005 18:39 schrieb Jan Kasprzak:
> Carl-Daniel Hailfinger wrote:
> : Bah. Last try: Is a CD/DVD in the drive or are you plugged into a
> : docking station?
>
> 	No and no.
>
> : Another thing you could try is a serial console, but I doubt it
> : will work after resume.
>
> 	No serial port on Asus M6R :-(.

You can try to place a few markers in the wakeup code. The first one would be 
to insert "lcall $0xffff, $0" (without the quote, hope the code is correct) 
in arch/i386/kernel/wakeup.S right at the beginning after ".code16" (Line 
number 22 in 2.6.11.3. If your kernel gets the control on resume this should 
cause a reboot right after wakeup. If it does, the problem is in the wakeup 
code, if it does not it's in the suspend code

Stefan


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: S3 on Asus M6R
       [not found]                     ` <200503212056.20589.stefandoesinger-RbZlAiThDcE@public.gmane.org>
@ 2005-03-21 21:02                       ` Jan Kasprzak
       [not found]                         ` <20050321210217.GF14356-0hYGf3jDe+XrBKCeMvbIDA@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kasprzak @ 2005-03-21 21:02 UTC (permalink / raw)
  To: Stefan Dösinger
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	Carl-Daniel Hailfinger

Stefan Dösinger wrote:
: You can try to place a few markers in the wakeup code. The first one would be 
: to insert "lcall $0xffff, $0" (without the quote, hope the code is correct) 
: in arch/i386/kernel/wakeup.S right at the beginning after ".code16" (Line 
: number 22 in 2.6.11.3.

	It is arch/i386/kernel/acpi/wakeup.S. Yes, adding "lcall $0xffff, $0"
to the line #22 causes the machine reboot when I hit the power button after
the suspend.

	OK, I will try to move this instruction down in wakeup.S now.
Any other hints? Thanks!

-Yenya

-- 
| Jan "Yenya" Kasprzak  <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839      Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/   Czech Linux Homepage: http://www.linux.cz/ |
> Whatever the Java applications and desktop dances may lead to, Unix will <
> still be pushing the packets around for a quite a while.      --Rob Pike <


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: S3 on Asus M6R
       [not found]                         ` <20050321210217.GF14356-0hYGf3jDe+XrBKCeMvbIDA@public.gmane.org>
@ 2005-03-21 21:56                           ` Stefan Dösinger
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Dösinger @ 2005-03-21 21:56 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: Jan Kasprzak, Carl-Daniel Hailfinger

[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]

Am Montag, 21. März 2005 22:02 schrieb Jan Kasprzak:
> Stefan Dösinger wrote:
> : You can try to place a few markers in the wakeup code. The first one
> : would be to insert "lcall $0xffff, $0" (without the quote, hope the code
> : is correct) in arch/i386/kernel/wakeup.S right at the beginning after
> : ".code16" (Line number 22 in 2.6.11.3.
>
> 	It is arch/i386/kernel/acpi/wakeup.S. Yes, adding "lcall $0xffff, $0"
> to the line #22 causes the machine reboot when I hit the power button after
> the suspend.
>
> 	OK, I will try to move this instruction down in wakeup.S now.
> Any other hints? Thanks!
1)Try  the attached patch

2)Yes, try to take down the line. The next function is, I think, in 
drivers/acpi/sleep/main.c. Search for the "Back to C" string to find it.

Watch out: that call is an old real mode BIOS call which simply causes a sysem 
reset. It won't work as soon as the system is in protected mode again(the 
switch is somewhere in wakeup.S I think.

3)As soon as the machine reaches the protected mode, you can try to make beeps 
from the system speaker, if you have one. I don't know how to do this anyway.

4)Did you build a minimal kernel with as few drivers as possible?

Stefan

[-- Attachment #2: suspend.diff --]
[-- Type: text/plain, Size: 2994 bytes --]

--- linux-2.6.9/include/linux/pm.h	2005-01-20 14:04:54.248337144 +0100
+++ include/linux/pm.h	2005-01-20 14:03:12.000000000 +0100
@@ -206,9 +206,11 @@
 
 struct pm_ops {
 	suspend_disk_method_t pm_disk_mode;
-	int (*prepare)(suspend_state_t state);
-	int (*enter)(suspend_state_t state);
-	int (*finish)(suspend_state_t state);
+	int (*prepare)(suspend_state_t state);		/*Called before suspending devices*/
+	int (*setup)(suspend_state_t state);		/*Called after device suspend*/
+	int (*enter)(suspend_state_t state);		/*To Finally enter the sleep state*/
+	int (*leave)(suspend_state_t state);		/*Before device wakeup*/
+	int (*finish)(suspend_state_t state);		/*After device wakeup*/
 };
 
 extern void pm_set_ops(struct pm_ops *);
--- linux-2.6.9/kernel/power/main.c	2005-01-20 14:04:54.463304464 +0100
+++ kernel/power/main.c	2005-01-20 14:10:36.499307088 +0100
@@ -67,6 +67,12 @@
 
 	if ((error = device_suspend(state)))
 		goto Finish;
+
+	if (pm_ops->setup) {
+		if ((error = pm_ops->setup(state)))
+			goto Finish;
+	}
+
 	return 0;
  Finish:
 	if (pm_ops->finish)
@@ -104,6 +110,8 @@
 
 static void suspend_finish(suspend_state_t state)
 {
+	if (pm_ops && pm_ops->leave)
+		pm_ops->leave(state);
 	device_resume();
 	if (pm_ops && pm_ops->finish)
 		pm_ops->finish(state);
--- linux-2.6.9/drivers/acpi/sleep/main.c	2005-01-20 14:04:47.382380928 +0100
+++ drivers/acpi/sleep/main.c	2005-01-20 14:12:29.234168784 +0100
@@ -36,7 +36,7 @@
 static int init_8259A_after_S1;
 
 /**
- *	acpi_pm_prepare - Do preliminary suspend work.
+ *	acpi_pm_setup - Do preliminary suspend work.
  *	@pm_state:		suspend state we're entering.
  *
  *	Make sure we support the state. If we do, and we need it, set the
@@ -44,7 +44,7 @@
  *	wakeup code to the waking vector. 
  */
 
-static int acpi_pm_prepare(suspend_state_t pm_state)
+static int acpi_pm_setup(suspend_state_t pm_state)
 {
 	u32 acpi_state = acpi_suspend_states[pm_state];
 
@@ -130,7 +130,23 @@
 	return ACPI_SUCCESS(status) ? 0 : -EFAULT;
 }
 
+/**
+ *	acpi_pm_leave - Make system ready to resume devices.
+ *	@pm_state:		State we're coming out of.
+ *
+ *	This is called after we wake back up and before device
+ *	resume methods are called.
+ */
 
+static int acpi_pm_leave(suspend_state_t pm_state)
+{
+	u32 acpi_state = acpi_suspend_states[pm_state];
+
+	acpi_leave_sleep_state(acpi_state);
+	acpi_disable_wakeup_device(acpi_state);
+
+	return 0;
+}
 /**
  *	acpi_pm_finish - Finish up suspend sequence.
  *	@pm_state:		State we're coming out of.
@@ -143,9 +159,6 @@
 {
 	u32 acpi_state = acpi_suspend_states[pm_state];
 
-	acpi_leave_sleep_state(acpi_state);
-	acpi_disable_wakeup_device(acpi_state);
-
 	/* reset firmware waking vector */
 	acpi_set_firmware_waking_vector((acpi_physical_address) 0);
 
@@ -171,8 +184,10 @@
 }
 
 static struct pm_ops acpi_pm_ops = {
-	.prepare	= acpi_pm_prepare,
+	.prepare	= NULL,
+	.setup		= acpi_pm_setup,
 	.enter		= acpi_pm_enter,
+	.leave		= acpi_pm_leave,
 	.finish		= acpi_pm_finish,
 };
 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-03-21 21:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-21 13:54 S3 on Asus M6R Jan Kasprzak
     [not found] ` <20050321135401.GC30293-0hYGf3jDe+XrBKCeMvbIDA@public.gmane.org>
2005-03-21 16:29   ` Carl-Daniel Hailfinger
     [not found]     ` <423EF660.7010906-hi6Y0CQ0nG0@public.gmane.org>
2005-03-21 17:03       ` Jan Kasprzak
     [not found]         ` <20050321170340.GK30293-0hYGf3jDe+XrBKCeMvbIDA@public.gmane.org>
2005-03-21 17:34           ` Carl-Daniel Hailfinger
     [not found]             ` <423F05A9.6050309-hi6Y0CQ0nG0@public.gmane.org>
2005-03-21 17:39               ` Jan Kasprzak
     [not found]                 ` <20050321173912.GN30293-0hYGf3jDe+XrBKCeMvbIDA@public.gmane.org>
2005-03-21 19:56                   ` Stefan Dösinger
     [not found]                     ` <200503212056.20589.stefandoesinger-RbZlAiThDcE@public.gmane.org>
2005-03-21 21:02                       ` Jan Kasprzak
     [not found]                         ` <20050321210217.GF14356-0hYGf3jDe+XrBKCeMvbIDA@public.gmane.org>
2005-03-21 21:56                           ` Stefan Dösinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox