2.6.23-rc6: S4 and S5 no longer listed as supported on Toshiba Satellite A40

Previous thread: [Announce] Linux-tiny project revival by Tim Bird on Wednesday, September 19, 2007 - 2:03 pm. (61 messages)

Next thread: what is the difference between shutdown command and writing to /sys/power/state by Agarwal, Lomesh on Wednesday, September 19, 2007 - 2:50 pm. (7 messages)
To: <linux-acpi@...>
Cc: <linux-kernel@...>
Date: Wednesday, September 19, 2007 - 2:14 pm

Hi,

When compared with 2.6.22-4, dmesg no longer lists S4 and S5 as supported
for my Toshiba Satellite A40 laptop (Mobile Intel Pentium 4, 2.8GHz).

-Linux version 2.6.22-2-686 (Debian 2.6.22-4) (waldi@debian.org) ...
+Linux version 2.6.23-rc6 (root@faramir) ...
[...]
+ACPI: EC: Look up EC in DSDT
ACPI: Interpreter enabled
-ACPI: (supports S0 S3 S4 S5)
+ACPI: (supports S0 S3)
ACPI: Using IOAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (0000:00)

I see no other relevant changes in dmesg (full output below).

Is this a regression or expected?

Cheers,
Frans Pop

To: Frans Pop <elendil@...>
Cc: <linux-acpi@...>, <linux-kernel@...>
Date: Thursday, September 20, 2007 - 6:53 am

Unexpected, and potentially pretty serious. Something went wrong with
ACPI. Can you try to narrow down when it started happening?

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-

To: Pavel Machek <pavel@...>
Cc: <linux-acpi@...>, <linux-kernel@...>
Date: Thursday, September 20, 2007 - 8:37 am

rc1 still had all 4 levels. I'll run a bisect between rc1 and rc6.
-

To: Frans Pop <elendil@...>
Cc: Pavel Machek <pavel@...>, <linux-acpi@...>, <linux-kernel@...>
Date: Thursday, September 20, 2007 - 12:33 pm

2.6.23-rc1 OK (supports S0 S3 S4 S5)
2.6.23-rc2 wrong: (supports S0 S3)
-

To: Maciek Rutecki <maciej.rutecki@...>
Cc: Frans Pop <elendil@...>, Pavel Machek <pavel@...>, <linux-acpi@...>, <linux-kernel@...>
Date: Thursday, September 20, 2007 - 1:29 pm

Please try this patch.

Regards,
Alex.

To: Alexey Starikovskiy <aystarik@...>
Cc: Pavel Machek <pavel@...>, <linux-acpi@...>, <linux-kernel@...>, Maciek Rutecki <maciej.rutecki@...>
Date: Thursday, September 20, 2007 - 2:17 pm

Works. All states are now listed again.

Isn't there a risk now that we now end up printing
ACPI: (supports)
if CONFIG_SUSPEND is not enabled and >S4 is not supported?

Or, more probably, it would print
ACPI: (supports S5)
as it is unlikely that "off" is not supported :-)

Maybe S0 should be taken outside the #ifdef and the loop as that state is
also basically always there?

Thanks,
FJP
-

To: Frans Pop <elendil@...>
Cc: Pavel Machek <pavel@...>, <linux-acpi@...>, <linux-kernel@...>, Maciek Rutecki <maciej.rutecki@...>
Date: Thursday, September 20, 2007 - 2:33 pm

Don't think it is worth the trouble. We already have this loop almost completely unrolled,
let's not make it complete mess...

Regards,

-

To: Alexey Starikovskiy <aystarik@...>
Cc: Frans Pop <elendil@...>, Pavel Machek <pavel@...>, <linux-acpi@...>, <linux-kernel@...>, Maciek Rutecki <maciej.rutecki@...>
Date: Thursday, September 20, 2007 - 4:07 pm

Well, you could use "(supports S0" instead of just "(supports". ;-)

Greetings,
Rafael
-

To: Rafael J. Wysocki <rjw@...>
Cc: Alexey Starikovskiy <aystarik@...>, Pavel Machek <pavel@...>, <linux-acpi@...>, <linux-kernel@...>, Maciek Rutecki <maciej.rutecki@...>
Date: Thursday, September 20, 2007 - 4:32 pm

Agreed, though arguably the same goes for S5. I guess you could say they are

After thinking about this a bit more, I think this does make sense for three
(admittedly minor) reasons:
- consistency between messages with and without CONFIG_SUSPEND
- consistency with /proc/acpi/sleep
- avoiding unnecessary change from previous versions.

Please consider the attached patch which applies on top of Alexey's. Feel
free to integrate it in his patch.

Signed-off-by: Frans Pop <elendil@planet.nl>

To: Rafael J. Wysocki <rjw@...>
Cc: Alexey Starikovskiy <aystarik@...>, Pavel Machek <pavel@...>, <linux-acpi@...>, <linux-kernel@...>, Maciek Rutecki <maciej.rutecki@...>
Date: Thursday, September 20, 2007 - 5:18 pm

One additional reason...

With current code, sleep_states(0) will not be set if compiled without
CONFIG_SUSPEND, which means that S0 will also disappear from
/proc/acpi/sleep. With pre-2.6.23 code it would be listed there.

I think that is even a more relevant change than the display issue and could
possibly even be considered a user-space interface regression.
My proposed patch fixes that too.

Note that the patch currently does not call acpi_get_sleep_type_data for S0,
but (partially from Rafael's comment) I was assuming that for S0 that does
not really matter. If it does, then the patch could easily be adjusted to
include that.
-

To: Frans Pop <elendil@...>, Alexey Starikovskiy <aystarik@...>
Cc: Pavel Machek <pavel@...>, <linux-acpi@...>, <linux-kernel@...>, Maciek Rutecki <maciej.rutecki@...>
Date: Thursday, September 20, 2007 - 4:53 pm

Alexey, do you agree?

(patch reproduced below for convenience).

diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c
index 638172f..85633c5 100644
--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -401,9 +401,11 @@ int __init acpi_sleep_init(void)
if (acpi_disabled)
return 0;

-printk(KERN_INFO PREFIX "(supports");
+ sleep_states[ACPI_STATE_S0] = 1;
+ printk(KERN_INFO PREFIX "(supports S0");
+
#ifdef CONFIG_SUSPEND
- for (i = ACPI_STATE_S0; i < ACPI_STATE_S4; i++) {
+ for (i = ACPI_STATE_S1; i < ACPI_STATE_S4; i++) {
status = acpi_get_sleep_type_data(i, &type_a, &type_b);
if (ACPI_SUCCESS(status)) {
sleep_states[i] = 1;
-

To: Rafael J. Wysocki <rjw@...>
Cc: Frans Pop <elendil@...>, Pavel Machek <pavel@...>, <linux-acpi@...>, <linux-kernel@...>, Maciek Rutecki <maciej.rutecki@...>
Date: Friday, September 21, 2007 - 10:04 am

Yes, was thinking to do it myself, but my ISP died this morning....

Regards,

-

To: Alexey Starikovskiy <aystarik@...>
Cc: Frans Pop <elendil@...>, Pavel Machek <pavel@...>, <linux-acpi@...>, <linux-kernel@...>, Maciek Rutecki <maciej.rutecki@...>
Date: Friday, September 21, 2007 - 10:33 am

OK

I'll push the Frans' patch to Len if you don't mind.

Greetings,
Rafael
-

To: Pavel Machek <pavel@...>
Cc: <linux-acpi@...>, <linux-kernel@...>
Date: Thursday, September 20, 2007 - 12:33 pm

I've bisected it down to this trio of changes:
- b0cb1a19d05b8ea8 Replace CONFIG_SOFTWARE_SUSPEND with CONFIG_HIBERNATION
- 296699de6bdc7171 Introduce CONFIG_SUSPEND for suspend-to-Ram and standby
- 673d5b43daa00b42 ACPI: restore CONFIG_ACPI_SLEEP

The actual change is probably in the second of those.

I've seen the comment that the change may just be cosmetic, but I'll leave
it to others to confirm that (and if so, judge if it is desirable or not).

Cheers,
Frans Pop
-

To: Frans Pop <elendil@...>
Cc: Pavel Machek <pavel@...>, <linux-acpi@...>, <linux-kernel@...>
Date: Thursday, September 20, 2007 - 12:01 pm

I have the same on HP/Compaq nx6310:
ACPI: (supports S0 S3)

(kernel 2.6.23-rc6)

But suspend to ram/disk works.

-

To: Maciek Rutecki <maciej.rutecki@...>
Cc: Frans Pop <elendil@...>, Pavel Machek <pavel@...>, <linux-acpi@...>, <linux-kernel@...>
Date: Thursday, September 20, 2007 - 12:59 pm

Linux version 2.6.20-16-generic (ubuntu):
ACPI: (supports S0 S3 S4 S5)

Linux version 2.6.23-rc2-rg (with a little snd-hda-intel patch)
ACPI: (supports S0 S3)

For me too (with s2ram, not with vanilla echo ram > ...). And the system
is otherwise ok.

--
La presente comunicación tiene carácter confidencial y es para el exclusivo uso del destinatario indicado en la misma. Si Ud. no es el destinatario indicado, le informamos que cualquier forma de distribución, reproducción o uso de esta comunicación y/o de la información contenida en la misma están estrictamente prohibidos por la ley. Si Ud. ha recibido esta comunicación por error, por favor, notifíquelo inmediatamente al remitente contestando a este mensaje y proceda a continuación a destruirlo. Gracias por su colaboración.

This communication contains confidential information. It is for the exclusive use of the intended addressee. If you are not the intended addressee, please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited by law. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy this message. Thank you for your cooperation.

-

To: Maciek Rutecki <maciej.rutecki@...>, Rafael J. Wysocki <rjw@...>
Cc: Frans Pop <elendil@...>, Pavel Machek <pavel@...>, <linux-acpi@...>, <linux-kernel@...>
Date: Thursday, September 20, 2007 - 12:34 pm

This is due to Rafael' split of suspend from hibernation.
namely 296699de6bdc717189a331ab6bbe90e05c94db06.
Detection of S4 lacks printk(), so even if S4 is supported, it will not be reported.
Adding Rafael to the discussion :)

Regards,
Alex.

-

To: Alexey Starikovskiy <aystarik@...>
Cc: Maciek Rutecki <maciej.rutecki@...>, Frans Pop <elendil@...>, Pavel Machek <pavel@...>, <linux-acpi@...>, <linux-kernel@...>
Date: Thursday, September 20, 2007 - 4:01 pm

Thanks, I've already spotted the fix patch.

Greetings,
Rafael
-

Previous thread: [Announce] Linux-tiny project revival by Tim Bird on Wednesday, September 19, 2007 - 2:03 pm. (61 messages)

Next thread: what is the difference between shutdown command and writing to /sys/power/state by Agarwal, Lomesh on Wednesday, September 19, 2007 - 2:50 pm. (7 messages)