[prev in list] [next in list] [prev in thread] [next in thread] 

List:       acpi4linux
Subject:    Re: [ACPI] swsusp and S4
From:       Andy Dustman <andy () dustman ! net>
Date:       2002-05-29 18:32:07
[Download RAW message or body]

On Wed, 2002-05-29 at 12:47, Nathan Conrad wrote:

> Why does shutdown work, while writing to /proc/acpi/sleep does not?

There was a problem with the swsusp patch. I see that there is an
updated patch as of yesterday (same version number) which may fix it.
Otherwise, the attached patch should fix it (apply with -l option to
patch).

-- 
Andy Dustman         PGP: 0x930B8AB6
    @       .net     http://dustman.net/andy
"Cogito, ergo sum." -- Rene Descartes
"I yam what I yam and that's all that I yam." -- Popeye

["swsusp.fix" (swsusp.fix)]

From fchabaud@free.fr Tue May 28 20:45:20 2002
Return-Path: <fchabaud@free.fr>
Delivered-To: dustman-andy@dustman.net
Received: (qmail 935 invoked from network); 28 May 2002 20:45:20 -0000
Received: from postfix2-2.free.fr (213.228.0.140) by gomer.neosouth.net
	with SMTP; 28 May 2002 20:45:20 -0000
Received: from home.perso (nas-cbv-11-62-147-119-65.dial.proxad.net
	[62.147.119.65]) by postfix2-2.free.fr (Postfix) with ESMTP id 999315FE83;
	Tue, 28 May 2002 22:45:14 +0200 (CEST)
Received: from colombe.home.perso (colombe.home.perso [192.168.2.5]) by
	home.perso (8.11.3/8.9.3/SuSE Linux 8.9.3-0.1) with ESMTP id g4SKaMJ18014;
	Tue, 28 May 2002 22:36:22 +0200
Received: from colombe (localhost [127.0.0.1]) by colombe.home.perso
	(8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) with ESMTP id g4SKZjn09045; Tue, 28
	May 2002 22:35:46 +0200
Message-Id: <200205282035.g4SKZjn09045@colombe.home.perso>
Date: Tue, 28 May 2002 22:35:42 +0200 (CEST)
From: fchabaud@free.fr
Reply-To: fchabaud@free.fr
Subject: Re: [Swsusp] Re: linux-2.4.18 + acpi-20020517 +
	swsusp-v5beta-acpi20020503
To: andy@dustman.net
Cc: swsusp@lister.fornax.hu
In-Reply-To: <1022613768.1554.8.camel@4.0.0.10.in-addr.arpa>
MIME-Version: 1.0
Content-Type: TEXT/plain; charset=iso-8859-1
X-Evolution-Source: imap://andy@gomer.neosouth.net/
Content-Transfer-Encoding: 8bit

Le 28 Mai, Andy Dustman a écrit :
> On Tue, 2002-05-28 at 13:42, fchabaud@free.fr wrote:
>> Le 28 Mai, Ducrot Bruno a écrit :
>> linux-2.4.18 + acpi-20020517 + swsusp-v5beta-acpi20020503 ?
>> 
>> Try swsusp-v6beta-acpi20020517 + agpgart optional module. I have i815
>> chipset too (unless the version isn't the same, what is the output of
>> lspci -v ?) You'll find the optional module on my page.
> 
> linux-2.4.18 + acpi-20020517 + swsusp6 + patch-agp == !(good)
> 
> The main problem with this combination is that echo 4 >/proc/acpi/sleep
> no longer does a suspend to disk (it seems to do nothing; I believe the
> error is something like "write to unknown device", it doesn't appear in
> logs). Alt-SysRq-D does suspend, and I'm able to unsuspend, but X is
> still broken, and I have to power-off to reboot.
> 
> I don't know if your swsusp patch does anything with suspend to ram
> (might be ACPI-only in 2.4.x) but in case it does: That doesn't work on
> my system either. It seems to suspend, and when you try to wake it, it
> immediately sleeps again. When you try once again, it seems to wake and
> crash.
> 

For acpi20020517 users, the acpi20020503 file drivers/acpi/acpi_system.c
has been renamed to drivers/acpi/system.c. Try the following patch and
see if it suspends.

cvs diff: Diffing drivers/acpi
Index: drivers/acpi/system.c
===================================================================
RCS file: /usr/src/cvs/linux-src/drivers/acpi/Attic/system.c,v
retrieving revision 1.1.4.1
diff -u -r1.1.4.1 system.c
--- drivers/acpi/system.c       2002/05/25 16:35:08     1.1.4.1
+++ drivers/acpi/system.c       2002/05/28 20:32:49
@@ -44,6 +44,7 @@
 #include <linux/mc146818rtc.h>
 #endif
 #endif
+#include <linux/suspend.h>
 
 
 #define _COMPONENT             ACPI_SYSTEM_COMPONENT
@@ -706,10 +707,16 @@
        if (!system->states[state])
                return_VALUE(-ENODEV);
 
+#ifdef CONFIG_SOFTWARE_SUSPEND
+       if(state == ACPI_STATE_S4) {
+               software_suspend();
+       } else
+#endif
+       {
        status = acpi_suspend(state);
        if (ACPI_FAILURE(status))
                return_VALUE(-ENODEV);
-
+       }
        return_VALUE(count);
 }
 
@@ -1210,6 +1217,9 @@
        }
        printk(")\n");
 
+#ifdef CONFIG_SOFTWARE_SUSPEND
+       system->states[4] = 1;
+#endif
 #ifdef CONFIG_PM
        /* Install the soft-off (S5) handler. */
        if (system->states[ACPI_STATE_S5]) {


--
Florent Chabaud         ___________________________________
SGDN/DCSSI/SDS/LTI     | florent.chabaud@polytechnique.org
http://www.ssi.gouv.fr | http://fchabaud.free.fr


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Acpi-devel mailing list
Acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acpi-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic