Bug 6798 - Writing /sys/power/state is denied; Panasonic CF-Y5, ICH7, kernel 2.6.17.2
Summary: Writing /sys/power/state is denied; Panasonic CF-Y5, ICH7, kernel 2.6.17.2
Status: REJECTED INVALID
Alias: None
Product: ACPI
Classification: Unclassified
Component: Other (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Shaohua
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-05 13:07 UTC by Bernard Moret
Modified: 2006-07-31 17:52 UTC (History)
2 users (show)

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


Attachments
The various outputs for ACPI: dmidecode, acpidump, and lspci -vv (10.62 KB, text/plain)
2006-07-05 13:13 UTC, Bernard Moret
Details
output from acpidump (103.25 KB, text/plain)
2006-07-05 13:14 UTC, Bernard Moret
Details
output from lspci -vv (14.13 KB, text/plain)
2006-07-05 13:14 UTC, Bernard Moret
Details

Description Bernard Moret 2006-07-05 13:07:18 UTC
Most recent kernel where this bug did not occur: none
Distribution: Debian unstable
Hardware Environment: Panasonic CF-Y5 (Intel Core Duo L2300, 82801G ICH7
chipset, Phoenix BIOS)
Software Environment: up-to-date Debian unstable, 2.6.17.2 kernel (vanilla),
includes modules for Intel HDA sound and 3945 wireless, but occurs without any
modules loaded
Problem Description:
Running
echo -n "mem" > /sys/power/state
returns the message
-su: echo: write error: Operation not permitted
(ditto for attempting to write "standby" instead of "mem")
Steps to reproduce:
Comment 1 Bernard Moret 2006-07-05 13:13:37 UTC
Created attachment 8490 [details]
The various outputs for ACPI: dmidecode, acpidump, and lspci -vv
Comment 2 Bernard Moret 2006-07-05 13:14:15 UTC
Created attachment 8491 [details]
output from acpidump
Comment 3 Bernard Moret 2006-07-05 13:14:47 UTC
Created attachment 8492 [details]
output from lspci -vv
Comment 4 Nishanth Aravamudan 2006-07-05 13:30:17 UTC
Alright, simple stuff first.

ls -ahl /sys/power/state?

Are you running as root?

cat /sys/power/state?
Comment 5 Bernard Moret 2006-07-05 14:45:22 UTC
ls -ahl /sys/power/state?
-rw-r--r-- 1 root root 4.0K Jul  5 23:10 /sys/power/state

Are you running as root?
yes (logged in as root, not sudo)

cat /sys/power/state?
standby mem

(note: no "disk" state)
Comment 6 Len Brown 2006-07-05 18:15:36 UTC
re: disk
CONFIG_SOFTWARE_SUSPEND=y?

re: permission
does
# echo 3 >  /proc/acpi/state
work any differently?
Comment 7 Bernard Moret 2006-07-06 01:10:47 UTC
re: disk
CONFIG_SOFTWARE_SUSPEND=y?

No -- should I set it up?  (I normally only use suspend to memory on laptops.)

re: permission
does
# echo 3 >  /proc/acpi/state
work any differently?

Well, there is no file /proc/acpi/state; but if I use the same idea for
the file /sys/power/state, I get the following:

/root# echo 3 > /sys/power/state
-su: echo: write error: Invalid argument

which is different from attempting to suspend:

/root# echo -n "mem" > /sys/power/state
-su: echo: write error: Operation not permitted

So, the system is checking for valid inputs, which are presumably limited to
"standby" and "mem".  (I tried writing "disk" to the file, with the same error
message as for trying to write "3".)
Comment 8 Bernard Moret 2006-07-06 01:19:14 UTC
re: disk
CONFIG_SOFTWARE_SUSPEND=y?

One more thing: this is no longer in 2.6.17(.2), is it?
Comment 9 Shaohua 2006-07-25 01:20:30 UTC
Do you have CPU hotplug enabled in the kernel? For MP, we need CPU hotplug to 
offline one CPU for suspend/resume.
Comment 10 Jiang, Brendan 2006-07-25 17:48:17 UTC
I've observed a similar error on a UP machine with 2.6.16.9 kernel when I 
echoed disk into /sys/power/state. The target machine used 256M memory. When i 
changed the memory to 512M, everything worked OK. 

I used to think this is because there's little free memory space left (less 
than half of total memory space) and thus the exact copy when creating image 
will fail. But now, it seems not exact since s3 has this issue, too.
Comment 11 Shaohua 2006-07-25 18:14:20 UTC
No, the 'echo disk' issue is a different one. It might be there isn't enough 
memory for snapshot. Bernard's issue isn't this bug.
Comment 12 Bernard Moret 2006-07-31 06:09:21 UTC
In response to comment #9:

David,

Sorry to be responding so late -- I've been on nearly constant travel.

I did *not* have hotplug CPU enabled.  I enabled it and recompiled
the kernel; with it enabled, the situation changes dramatically.

First,
   cat /sys/power/state
returns only
   mem
whereas before the change it returned
   standby mem
Trying to use "standby", I get this
   echo -n "standby" > /sys/power/state
   -su: echo: write error: No such device
which is quite different from
   echo -n "disk" > /sys/power/state
   -su: echo: write error: Invalid argument
which is also what I would get with, say
   echo 1 > /sys/power/state
indicating that the "standby" state is considered a valid argument, but
cannot be interpreted farther down the line.
More importantly, this also seems to imply that I can now attempt to write to
/sys/power/state

So now we get to the last one:
   echo -n "mem" > /sys/power/state
actually *works* and puts the machine in memory sleep!

(For now, I have not been able to get it to wake up in any usable state,
but that's probably just a question of hacking my scripts, figuring out
which daemons and devices I can leave to handle themselves and which I have
to handle myselves.)

Thanks for the hint!  I should now be able to get my machine to go to sleep
properly.

I remain puzzled about the change for "standby" and the continued absence of
a "disk" state, but neither one is of much use to me normally, so I am not
going to worry too much about it.

Bernard
Comment 13 Shaohua 2006-07-31 17:52:08 UTC
I'm closing this track. If you have other issues please open a new track.

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