S3 on Asus M6R
Subsystems (4)
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.
Signature · 3 lines
| 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/ |Quoted 2 lines
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
A message that is not in the archive (sent off-list or not yet received): [email protected]
[forgot the CC:]
Quoted 24 lines · Jan Kasprzak
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 thelm_sensorspackage is what causes the problem (altough I have no idea why).- without
lm_sensorsenabled (chkconfiglm_sensorsoff), 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, wheres3.sh
is as follows:
Quoted 9 lines
#!/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
Signature · 9 lines
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
A message that is not in the archive (sent off-list or not yet received): [email protected]
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
Signature · 3 lines
| 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/ |Quoted 2 lines
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
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · Jan Kasprzak
Carl-Daniel Hailfinger wrote:
: Can we see your kernel command line?# cat /proc/cmdline ro root=/dev/hda1 resume=/dev/hda2
Quoted 8 lines
: 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
Signature · 8 lines
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
A message that is not in the archive (sent off-list or not yet received): [email protected]
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
Signature · 3 lines
| 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/ |Quoted 2 lines
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
A message that is not in the archive (sent off-list or not yet received): [email protected]
Am Montag, 21. März 2005 18:39 schrieb Jan Kasprzak:
Quoted 10 lines
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_id396&op=click
A message that is not in the archive (sent off-list or not yet received): [email protected]
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
Signature · 3 lines
| 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/ |Quoted 2 lines
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_id396&op=click
A message that is not in the archive (sent off-list or not yet received): [email protected]
Am Montag, 21. März 2005 22:02 schrieb Jan Kasprzak:
Quoted 6 lines
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) inarch/i386/kernel/wakeup.Sright at the beginning after : ".code16" (Line number 22 in 2.6.11.3.
Quoted 6 lines
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.Snow.
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
linux/pm.h renamed from include/linux/pm.h +5 -3
@@ -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 *);
power/main.c renamed from kernel/power/main.c +8 -0
@@ -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);
acpi/sleep/main.c renamed from drivers/acpi/sleep/main.c +21 -6
@@ -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, };