Laptop into sleep mode
-
- Posts: 26
- Joined: Thu 15 Oct 2009, 13:29
Laptop into sleep mode
I just installed Puppy 5.2.8-005 on my wife's laptop and I really like it. Nice and stable. Even got Citrix to work just fine.
How do I configure it so that it goes into a sleep mode when the laptop lid is shut ?
Laptop Details: IBM-T43p, P4 2.2Ghz, 2GB ram.
Thanks and regards.
How do I configure it so that it goes into a sleep mode when the laptop lid is shut ?
Laptop Details: IBM-T43p, P4 2.2Ghz, 2GB ram.
Thanks and regards.
partial answer:
1. go to package manager and install acpitool
2. if you want options type in console
3. for handy sleep mode. Console
4. But typing that for sleep is a pain so do the following:
create a new text file. Name it something like sleep. insert this text in the file
save.
right click on the file you made. set permissions to executable.
Now if you click on it, the computer should sleep.
to make things even easier. Drag the file to your desktop. Go to the web and find a pretty icon (or use the one attached below). right click the file on the desktop ---> file--> set icon. Drag your icon.
Now if you have a desktop icon that will put your computer to sleep.
Sorry but I don't know how to make it sleep by shutting the lid
1. go to package manager and install acpitool
2. if you want options type in console
Code: Select all
acpitool -h
Code: Select all
acpitool -s
create a new text file. Name it something like sleep. insert this text in the file
Code: Select all
acpitool -s
right click on the file you made. set permissions to executable.
Now if you click on it, the computer should sleep.
to make things even easier. Drag the file to your desktop. Go to the web and find a pretty icon (or use the one attached below). right click the file on the desktop ---> file--> set icon. Drag your icon.
Now if you have a desktop icon that will put your computer to sleep.
Sorry but I don't know how to make it sleep by shutting the lid
- Attachments
-
- iWannaSleep webIcon_1.png
- (5.05 KiB) Downloaded 4731 times
For automatically put laptop to ram-sleep acpid might be of interest .
I think Puppy busybox comes with acpid enabled, but have not gotten it to work with configuration files (/etc/acpid.conf,acpi.map).
The code for busybox acpid had changed completely from 1.17 to 1.18 and was first introduced in 1.14 with minor changes to 1.16 and a bigger change from 1.16 to 1.17 .
Until now i got it to work with version <=1.18
for the power button .
To describe :
when acpid runs it polls /proc/acpi/events file .
when it detects an event, it should run a file called :
/etc/acpi/PWRF/00000080
The busybox code >=1.18(not working) looks like this :
Since LID0 is mentioned it might work with a script in /etc/acpi/LID/ directory (called 00000080) .
Note:My Lap had a LID/ dir entry in /proc/acpi not a LID0/ .
*
The regular acpid comes with much more script (examples) and works ,too .
I would use the regular acpid .
Jemimah has got regular acpid included in Saluki with very good scripts (at least in version 19 which i had tested)
(Jemimah/pemasu's kernels have additionally hibernation enabled .)
I think Puppy busybox comes with acpid enabled, but have not gotten it to work with configuration files (/etc/acpid.conf,acpi.map).
The code for busybox acpid had changed completely from 1.17 to 1.18 and was first introduced in 1.14 with minor changes to 1.16 and a bigger change from 1.16 to 1.17 .
Until now i got it to work with version <=1.18
for the power button .
To describe :
when acpid runs it polls /proc/acpi/events file .
when it detects an event, it should run a file called :
/etc/acpi/PWRF/00000080
The busybox code >=1.18(not working) looks like this :
Code: Select all
#struct acpi_event {
# const char *s_type;
# uint16_t n_type;
# const char *s_code;
# uint16_t n_code;
# uint32_t value;
# const char *desc;
#};
#static const struct acpi_event f_evt_tab[] = {
# { "EV_KEY", 0x01, "KEY_POWER", 116, 1, "button/power PWRF 00000080" },
# { "EV_KEY", 0x01, "KEY_POWER", 116, 1, "button/power PWRB 00000080" },
#};
#struct acpi_action {
# const char *key;
# const char *action;
#};
#static const struct acpi_action f_act_tab[] = {
# { "PWRF", "PWRF/00000080" },
# { "LID0", "LID/00000080" },
Note:My Lap had a LID/ dir entry in /proc/acpi not a LID0/ .
*
The regular acpid comes with much more script (examples) and works ,too .
I would use the regular acpid .
Jemimah has got regular acpid included in Saluki with very good scripts (at least in version 19 which i had tested)
(Jemimah/pemasu's kernels have additionally hibernation enabled .)
must have write access to proc/acpi/sleep no sleep file
Hi trying to get my Toshiba equium a60 to hibernate.
After installing acpitool and typing in console# acpitool -s
I get
Function Do_Suspend : could not open file : /proc/acpi/sleep.
You must have write access to /proc/acpi/sleep to suspend your computer.
Checked proc/acpi there is no sleep file in the folder. Is there a solution to this?
Also if I shut the lid then reopen it the laptop shuts down. Any idea as to why? thanks Rob
After installing acpitool and typing in console# acpitool -s
I get
Function Do_Suspend : could not open file : /proc/acpi/sleep.
You must have write access to /proc/acpi/sleep to suspend your computer.
Checked proc/acpi there is no sleep file in the folder. Is there a solution to this?
Also if I shut the lid then reopen it the laptop shuts down. Any idea as to why? thanks Rob
Rob- for starters mention you're running Slacko 5.3.3. If you grabbed it from PPM- run acpitool in a console..
These are the contents of mine.. Without another system or two to reference- the values may be different..
==
*Question: Does PPM return the deps installation window after hitting "examine dependencies?"
Aboard 5.3.3-4 I find PPM to be broken for acpitool and unable to install it's required deps..
Additionally- refrain from any follow-ups here and open a new, "Slacko specific" thread..
These are the contents of mine.. Without another system or two to reference- the values may be different..
==
*Question: Does PPM return the deps installation window after hitting "examine dependencies?"
Aboard 5.3.3-4 I find PPM to be broken for acpitool and unable to install it's required deps..
Additionally- refrain from any follow-ups here and open a new, "Slacko specific" thread..
- Attachments
-
- sleep_contents.png
- (2.96 KiB) Downloaded 4644 times
Last edited by Semme on Mon 21 May 2012, 18:15, edited 3 times in total.
-
- Posts: 26
- Joined: Thu 15 Oct 2009, 13:29
Slacko should have regular acpid installed , don"t know about current lucid .
Lucid busybox should have been 1.16.2 with acpid enabled .
busybox acpid --help
should show some info .. if help enabled ..
Acpid gets lauched by a script in /etc/init.d/ .
My investigations seem to be that busybox >= 1.18 acpid needs the button.ko module loaded, while busybox < 1.18 seems to get the input by the keyboard input driver .
sh-3.2# busybox
BusyBox v1.18.3 (2011-05-01 19:45:13 CEST) multi-call binary.
sh-3.2# lsmod | grep button
sh-3.2# ps | grep acpid
sh-3.2# modprobe -v button
insmod /lib/modules/2.6.37.4-KRG-iatom-1/kernel/drivers/acpi/button.ko
sh-3.2# busybox acpid -f
Will hit the power button now .. Good night !
Lucid busybox should have been 1.16.2 with acpid enabled .
busybox acpid --help
should show some info .. if help enabled ..
Acpid gets lauched by a script in /etc/init.d/ .
My investigations seem to be that busybox >= 1.18 acpid needs the button.ko module loaded, while busybox < 1.18 seems to get the input by the keyboard input driver .
sh-3.2# busybox
BusyBox v1.18.3 (2011-05-01 19:45:13 CEST) multi-call binary.
sh-3.2# lsmod | grep button
sh-3.2# ps | grep acpid
sh-3.2# modprobe -v button
insmod /lib/modules/2.6.37.4-KRG-iatom-1/kernel/drivers/acpi/button.ko
sh-3.2# busybox acpid -f
Will hit the power button now .. Good night !
I also am having the exact same problem as robpeteuk, but I can't create the sleep file in /proc/acpi/.
I would try "root" but I thought I already was root.
Any help would be greatly appreciated.
Also, if "acpitool -e" says that fan is not available, does that mean it's not running, or it can't grab the info?
I would try "root" but I thought I already was root.
Any help would be greatly appreciated.
Also, if "acpitool -e" says that fan is not available, does that mean it's not running, or it can't grab the info?