LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* swsusp + APM in 2.6.6
@ 2004-05-13  1:24 Plaz McMan
  2004-05-13 11:42 ` Aristeu Sergio Rozanski Filho
  2004-05-14  3:15 ` Pavel Machek
  0 siblings, 2 replies; 5+ messages in thread
From: Plaz McMan @ 2004-05-13  1:24 UTC (permalink / raw)
  To: linux-kernel

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: swsusp + APM in 2.6.6
  2004-05-13  1:24 swsusp + APM in 2.6.6 Plaz McMan
@ 2004-05-13 11:42 ` Aristeu Sergio Rozanski Filho
  2004-05-13 12:01   ` Ari Pollak
  2004-05-14  3:15 ` Pavel Machek
  1 sibling, 1 reply; 5+ messages in thread
From: Aristeu Sergio Rozanski Filho @ 2004-05-13 11:42 UTC (permalink / raw)
  To: Plaz McMan; +Cc: linux-kernel

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

> 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-----

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: swsusp + APM in 2.6.6
  2004-05-13 11:42 ` Aristeu Sergio Rozanski Filho
@ 2004-05-13 12:01   ` Ari Pollak
  2004-05-14  3:16     ` Pavel Machek
  0 siblings, 1 reply; 5+ messages in thread
From: Ari Pollak @ 2004-05-13 12:01 UTC (permalink / raw)
  To: linux-kernel

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

Aristeu Sergio Rozanski Filho wrote:
> 
>>>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
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: swsusp + APM in 2.6.6
  2004-05-13  1:24 swsusp + APM in 2.6.6 Plaz McMan
  2004-05-13 11:42 ` Aristeu Sergio Rozanski Filho
@ 2004-05-14  3:15 ` Pavel Machek
  1 sibling, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2004-05-14  3:15 UTC (permalink / raw)
  To: Plaz McMan; +Cc: linux-kernel

Hi!

> 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.

> 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;
}

-- 
When do you have heart between your knees?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: swsusp + APM in 2.6.6
  2004-05-13 12:01   ` Ari Pollak
@ 2004-05-14  3:16     ` Pavel Machek
  0 siblings, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2004-05-14  3:16 UTC (permalink / raw)
  To: Ari Pollak; +Cc: linux-kernel

Hi!

> 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.
-- 
When do you have heart between your knees?

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-05-15  0:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-13  1:24 swsusp + APM in 2.6.6 Plaz McMan
2004-05-13 11:42 ` Aristeu Sergio Rozanski Filho
2004-05-13 12:01   ` Ari Pollak
2004-05-14  3:16     ` Pavel Machek
2004-05-14  3:15 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).