From: Lorenzo Colitti <lorenzo-Z4WAQ3j+MphBDgjK7y7TUQ@public.gmane.org>
To: softwaresuspend-devel-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [patch] swsusp2 should execute _WAK on resume
Date: Mon, 07 Mar 2005 15:41:30 +0100 [thread overview]
Message-ID: <422C681A.5040208@colitti.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1139 bytes --]
Hi,
[CCing ACPI-devel in case someone wants to comment]
Using swsusp2 2.1.8 on a vanilla 2.6.11 kernel (but I have been seeing
this since v2.1 on 2.6.9), my laptop (HP nc6000) doesn't generate any
ACPI thermal events after resume. This means the fans only come on
(screaming) if the CPU reaches 85 °C or so, which is not very healthy.
This is due to the fact that unlike swsusp and S3, swsusp2 does not call
the ACPI _WAK method, which the ACPI spec says should be called when the
machine comes out of a sleep state. If I hack swsusp2 so that it calls
the _WAK method on resume, the fans work correctly after resume.
I do this via the attached hack, but I don't know much about the
workings of swsusp2, so I don't know if it's the right approach. It does
work for me though, and even if the details of the patch aren't right,
based on my reading of the ACPI spec I think this should be done.
Comments? Is it fit to apply to the swsusp2 tree?
Cheers,
Lorenzo
P.S. I have been using swsusp2 since v2.1 for 2.6.9, and it works like a
charm. A big thank you to the people that made it possible. :)
[-- Attachment #2: patch-swsusp2-acpiwakeonresume.diff --]
[-- Type: text/plain, Size: 773 bytes --]
diff -u linux-2.6.11/kernel/power/suspend2_core/suspend.c linux-2.6.11-patched/kernel/power/suspend2_core/suspend.c
--- linux-2.6.11/kernel/power/suspend2_core/suspend.c 2005-03-07 15:17:31.000000000 +0100
+++ linux-2.6.11-patched/kernel/power/suspend2_core/suspend.c 2005-03-07 15:18:47.000000000 +0100
@@ -404,6 +404,10 @@
* Called From : do_suspend2_lowlevel
*/
+#ifdef CONFIG_ACPI
+extern u32 acpi_leave_sleep_state (u8 sleep_state);
+#endif
+
static void do_suspend2_resume_2(void)
{
set_suspend_state(SUSPEND_NOW_RESUMING);
@@ -433,6 +437,11 @@
suspend_checksum_print_differences();
prepare_status(0, 0, "Cleaning up...");
+
+#ifdef CONFIG_ACPI
+ if (suspend_powerdown_method)
+ acpi_leave_sleep_state(suspend_powerdown_method);
+#endif
}
/*
next reply other threads:[~2005-03-07 14:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-07 14:41 Lorenzo Colitti [this message]
[not found] ` <422C681A.5040208-Z4WAQ3j+MphBDgjK7y7TUQ@public.gmane.org>
2005-03-08 16:34 ` [patch] swsusp2 should execute _WAK on resume Kristoffer Sjoberg
-- strict thread matches above, loose matches on Subject: below --
2005-03-08 17:52 Moore, Robert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=422C681A.5040208@colitti.com \
--to=lorenzo-z4waq3j+mphbdgjk7y7tuq@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=softwaresuspend-devel-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox