Skip to contentSkip to conversation

swsusp + APM in 2.6.6

DISCUSSION Plaz McMan 4 participants 5 messages May 13, 2004 – May 15, 2004

lore
Share & tools
lore

Plaz McMan

author
#0 lore raw

Upgrading older IBM ThinkPad from 2.6.1 to 2.6.6.

In 2.6.1, I had ACPI + APM support compiled in, and I disabled ACPI at boot (acpi=off). With this setup, I could sleep, shutdown, and use swap suspend with "echo 4 > /proc/sleep" (_not_ /proc/acpi/sleep, as there was no /proc/acpi). I slept the computer with "apm -[s,S]". I had ACPI support because for some reason the computer wouldn't shutdown without it, even though I have it disabled at boot. Note that ACPI wouldn't properly sleep my computer (display stayed on, even with lid closed), which is why I used APM. In any event, 2.6.1 worked _great_ as far as PM stuff was concerned.

In 2.6.6, however, using the same kernel configuration, neither /proc/sleep or /proc/acpi/sleep exist! I _do_ have swsusp enabled in the kernel, as well as ACPI sleep states (do they do anything if you disable ACPI at boot?). ACPI sleep doesn't turn off the screen, so I want to use APM. However, I also want swsusp to work. So, I will continue to use 2.6.1 until everything pans out.

Other kernels (maybe only 2.6.5) wouldn't support my mobo's DMA, so I haven't tested this out on them. I will, however, at request.

Thanks,
-Brannon Klopfer

#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 3 lines

In 2.6.6, however, using the same kernel configuration, neither /proc/sleep or /proc/acpi/sleep exist! I _do_ have swsusp enabled in the kernel, as well as ACPI sleep states (do they do anything if you disable

please check
http://marc.theaimsgroup.com/?l=bk-commits-head&m=108423574229098&w=2

- --
Aristeu

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAo186RRJOudsVYbMRApr6AKCDzkzlgxslytXKJvdh2ckJ/Z+DLACeLgpf lPExuMmU42REcBA27D2p0ok=
=AkG5
-----END PGP SIGNATURE-----

#2 lore raw

You should be able to accomplish the same thing with "echo disk > /sys/power/state", as it says in the same file.

Quoted 8 lines · Aristeu Sergio Rozanski Filho
Quoted 4 lines
Quoted 4 lines

In 2.6.6, however, using the same kernel configuration, neither /proc/sleep or /proc/acpi/sleep exist! I _do_ have swsusp enabled in the kernel, as well as ACPI sleep states (do they do anything if you disable

please check
http://marc.theaimsgroup.com/?l=bk-commits-head&m=108423574229098&w=2

#3 lore raw

Hi!

Quoted 2 lines

You should be able to accomplish the same thing with "echo disk > /sys/power/state", as it says in the same file.

Thats *not* the same thing. That involves pmdisk. Different beast. Different beast you do not want to touch (*).
Pavel

(*) if you have intel-agp or similar, or highmem.

Signature · 1 line
When do you have heart between your knees?
#4 lore raw
In reply to Plaz McMan

Hi!

Quoted 11 lines

Upgrading older IBM ThinkPad from 2.6.1 to 2.6.6.

In 2.6.1, I had ACPI + APM support compiled in, and I disabled ACPI at boot (acpi=off). With this setup, I could sleep, shutdown, and use swap suspend with "echo 4 > /proc/sleep" (_not_ /proc/acpi/sleep, as there was no /proc/acpi). I slept the computer with "apm -[s,S]". I had ACPI support because for some reason the computer wouldn't shutdown without it, even though I have it disabled at boot. Note that ACPI wouldn't properly sleep my computer (display stayed on, even with lid closed), which is why I used APM. In any event, 2.6.1 worked _great_ as far as PM stuff was concerned.

Well, you actually exploited bug in ACPI /proc handling. Cute.

Quoted 6 lines

In 2.6.6, however, using the same kernel configuration, neither /proc/sleep or /proc/acpi/sleep exist! I _do_ have swsusp enabled in the kernel, as well as ACPI sleep states (do they do anything if you disable ACPI at boot?). ACPI sleep doesn't turn off the screen, so I want to use APM. However, I also want swsusp to work. So, I will continue to use 2.6.1 until everything pans out.

It works as designed. Perhaps on one sunny day shutdown will support -z option meaning "do swsusp".
Pavel

Q: My machine doesn't work with ACPI. How can I use swsusp than ?

A: Do reboot() syscall with right parameters. Warning: glibc gets in its way, so check with strace:

reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, 0xd000fce2)

(Thanks to Peter Osterlund:)

#include <unistd.h>
#include <syscall.h>

#define LINUX_REBOOT_MAGIC1 0xfee1dead
#define LINUX_REBOOT_MAGIC2 672274793
#define LINUX_REBOOT_CMD_SW_SUSPEND 0xD000FCE2

int main()

{
    syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
            LINUX_REBOOT_CMD_SW_SUSPEND, 0);
    return 0;
}
Signature · 1 line
When do you have heart between your knees?