Bug 2347 - S3 resume: reboot instead of resume
Summary: S3 resume: reboot instead of resume
Status: REJECTED DUPLICATE of bug 3691
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Sleep-Wake (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Shaohua
URL:
Keywords:
: 2319 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-03-21 17:30 UTC by Soos Gergely
Modified: 2005-12-22 20:54 UTC (History)
6 users (show)

See Also:
Kernel Version: 2.6.4
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

Description Soos Gergely 2004-03-21 17:30:52 UTC
Distribution: Slackware 9 with lots of replaced parts
Problem Description:
After I type echo 3 >/proc/acpi/sleep the kernel seems to go to S3 but when I
press the button to wake the whole system restarts like in case of a power on.
typing echo mem >/sys/power/state has no effect at all.

I had also tried S4.
echo disk >/sys/power/state has also no effect.
echo 4 >/proc/acpi/sleep works exept some errors in the mouse driver (actually
the mouse becomes unusable) and in the nvidia detonator

dmesg says my mouse driver is
mice: PS/2 mouse device common for all mice
input: ImExPS/2 Generic Explorer Mouse on isa0060/serio1

dmesg|grep ACPI looks like:
 BIOS-e820: 000000001fff0000 - 000000001fff8000 (ACPI data)
 BIOS-e820: 000000001fff8000 - 0000000020000000 (ACPI NVS)
ACPI: RSDP (v000 AMI                                       ) @ 0x000fa980
ACPI: RSDT (v001 AMIINT VIA_K7   0x00000010 MSFT 0x00000097) @ 0x1fff0000
ACPI: FADT (v001 AMIINT VIA_K7   0x00000011 MSFT 0x00000097) @ 0x1fff0030
ACPI: MADT (v001 AMIINT VIA_K7   0x00000009 MSFT 0x00000097) @ 0x1fff00c0
ACPI: DSDT (v001    VIA   VIA_K7 0x00001000 MSFT 0x0100000d) @ 0x00000000
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
ACPI: IOAPIC (id[0x02] address[0xfec00000] global_irq_base[0x0])
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level)
Using ACPI (MADT) for SMP configuration information
ACPI: Subsystem revision 20040220
ACPI: Interpreter enabled
ACPI: Using IOAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (00:00)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: Power Resource [URP1] (off)
ACPI: Power Resource [URP2] (off)
ACPI: Power Resource [FDDP] (off)
ACPI: Power Resource [LPTP] (off)
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKC] (IRQs *3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 *5 6 7 10 11 12 14 15)
ACPI: No IRQ known for interrupt pin A of device 0000:00:11.1 - using IRQ 255
PCI: Using ACPI for IRQ routing
ACPI: Power Button (FF) [PWRF]
ACPI: Sleep Button (CM) [SLPB]
ACPI: Processor [CPU1] (supports C1)
ACPI: No IRQ known for interrupt pin A of device 0000:00:11.1 - using IRQ 255
ACPI: (supports S0 S3 S4 S5)

The device 00:11.1 is IDE interface: VIA Technologies, Inc. VT82C586/B/686A/B
PIPC Bus Master IDE (rev 06)
If I can give more usefull information, please contact me.
I would really like to use the S3 state.
Comment 1 Soos Gergely 2004-03-24 08:59:34 UTC
Typing echo -n mem > /sys/power/state has the same effect as
echo 3 >/proc/acpi/sleep, the computer restarts, and does not enter the state
Comment 2 Len Brown 2004-03-24 18:27:22 UTC
any chance you can capture what the kernel printed when entering S3?
If you have a serial console, that would work, otherwise we'd
probably have to add an infinite loop down in the code to
prevent the system from actually removing power so you can
see the screen...
Comment 3 Soos Gergely 2004-03-26 07:33:40 UTC
Sorry, I don't have a serial console, but I will insert the infinite loop myself
into the kernel source. My guess is to insert into file acpi/hardware/hwsleep.c
into the function acpi_enter_sleep_state() but I can't be sure, so please help me.

I am running the official 2.6.4 kernel.
Comment 4 Soos Gergely 2004-03-26 12:09:45 UTC
At the end I tried my idea about inserting the loop into
linux-2.6.4/drivers/acpi/hardware/hwsleep.c
This is a part of the file (FUNCTION: acpi_enter_sleep_state) with two marks of
mine:
...
        /* Write #2: SLP_TYP + SLP_EN */

        ACPI_FLUSH_CPU_CACHE (); /* MARK 1*/

        status = acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM1A_CONTROL, PM1Acontrol);
        if (ACPI_FAILURE (status)) {
                return_ACPI_STATUS (status);
        }
        /* MARK 2 */
        status = acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM1B_CONTROL, PM1Bcontrol);
        if (ACPI_FAILURE (status)) {
                return_ACPI_STATUS (status);
        }
...

If I insert the loop after Mark 1, the screen will contains:

Stopping tasks: ===========|
hdd: start_power_step (step:0)
hdd: start_power_step (step:1)
hdd: complete_power_step(step:1, stat:50, err:0)
hdd: completing PM request, suspend
hdc: start_power_step (step:0)
hdc: completing PM request, suspend
hda: start_power_step (step:0)
hda: start_power_step (step:1)
hda: complete_power_step(step:1, stat:50, err:0)
hda: completing PM request, suspend
PM: Entering state.
 hwsleep-0300 [13] acpi_enter_sleep_state: Entering sleep state [S3]

This wasn't a cut and paste, I copied it by hand.
At this point the keyboard, mouse and even the power led is turned off, but the
fans are still working.
If I insert the while(1); after Mark 2 the system is already powered down, and
the loop is not executed.
Comment 5 Soos Gergely 2004-04-19 11:47:56 UTC
I tried

echo -n mem /sys/power/state

with kernel 2.6.5
but the result is the same (without the ide debug info of course).
Comment 6 David Leemans 2004-06-03 06:08:45 UTC
My computer too reboots when I try to resume from S3.
The system goes in standby, but when trying to resume (powerbutton), it reboots.
Log files don't show anything usefull.
  
System : Athlon XP1700 on Asrock K7SX8 mainboard (Sis746FX chipset)
OS : Slackware 9.1 + kernel 2.6.7-rc2
Comment 7 Len Brown 2004-11-17 00:20:15 UTC
still an issue after 2.6.10-rc2?
(it includes the patch in bug 3390)

if so, does this patch from Hiroshi Itoh help?:
http://marc.theaimsgroup.com/?l=linux-kernel&m=110062740314222&w=2
Comment 8 Nikolay Shtinkov 2004-11-25 13:10:56 UTC
Yes, still an issue on 2.6.10-rc2.
No, the patch does not help.

My machine: Averatec 3225H laptop, Mandrake 10.0.
Comment 9 Len Brown 2005-01-03 18:42:38 UTC
same with 2.6.10 final?
Comment 10 Nikolay Shtinkov 2005-01-24 12:48:51 UTC
Sorry for the delay.
The problem persists in 2.6.10 final, 2.6.11-rc1 and 2.6.11-rc2.
Comment 11 Shaohua 2005-01-25 17:26:10 UTC
Can you track down if your machine actually enters the resume code?
you coulde add 'jmp .' just under '.code16' of 
arch/i386/kernel/acpi/wakeup.S::wakeup_code, and see if your system is frozen. 
Thanks.
Comment 12 Nikolay Shtinkov 2005-01-26 08:30:17 UTC
The machine reboots as before - it doesn't reach the wakeup code at all.
Comment 13 Shaohua 2005-09-20 22:42:07 UTC
Could anybody try the debug patch at Bug 3691? Thanks!
Comment 14 Shaohua 2005-10-18 23:41:18 UTC
*** Bug 2319 has been marked as a duplicate of this bug. ***
Comment 15 Shaohua 2005-12-22 20:54:48 UTC
It appears many VIA motherboards have such issue. Bug 3691 has more info, mark 
this one as duplicate.

*** This bug has been marked as a duplicate of 3691 ***

Note You need to log in before you can comment on or make changes to this bug.