PDA

View Full Version : strengthen "echo > /sys/power/disk"



frogotronic
March 6th, 2007, 03:29 AM
Hello,

I wanted to add the -h, or the -P flag to shutdown that appears in the /sys/power/disk file, which is called by the ACPI hibernate.sh script. I tried using sudo pico to edit the file, but I got an "Error: Invalid Argument" error when I tried to write the modified file.

The file currently consists of one line:


shutdown

I'd like to try to change it to


shutdown -h

or


shutdown -P

What am I missing?

Thanks,
- CH

Mr. C.
March 6th, 2007, 03:46 AM
Show the command and output exactly as it is on the screen.

MrC

frogotronic
March 6th, 2007, 04:20 AM
hmmm

okay, I'm trying to fix hibernate function on my laptop.

During the hibernate process, ACPI executes the hibernate.sh script. The last four lines of the script are:


echo -n $HIBERNATE_MODE >/sys/power/disk
echo -n "disk" >/sys/power/state

$LAPTOP_MODE stop

. /etc/acpi/resume.sh

BUT the machine goes all the way down but doesn't poweroff. I'd like to try to tell the system to power off at shutdown (which is called by /sys/power/disk) by using a flag.

- CH

Mr. C.
March 6th, 2007, 05:08 AM
Change this line of the script:

echo -n $HIBERNATE_MODE >/sys/power/disk

to this:

echo -n "$HIBERNATE_MODE -h" >/sys/power/disk

or

echo -n "$HIBERNATE_MODE -p" >/sys/power/disk

as you desire.
MrC

frogotronic
March 6th, 2007, 12:28 PM
Thanks for the help

- CH :KS