mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* 2.6.0 swsusp
@ 2003-12-28  2:33 Norman Diamond
  2003-12-28 14:47 ` Pavel Machek
  0 siblings, 1 reply; 4+ messages in thread
From: Norman Diamond @ 2003-12-28  2:33 UTC (permalink / raw)
  To: linux-kernel

On a machine with working ACPI, I compiled 2.6.0 with Software Suspend
(Experimental).

1.  Help information says that the next boot can be done with
"resume=/dev/swappartition" or with "noresume".  It does not say how the
swsusp command decides which swap partition to save to.  The man page (which
still isn't sure if the command is named swsusp or suspend) also doesn't
say.  How can I guess which swap partition to designate at resume time?  For
the moment this is a hypothetical question because I haven't needed to make
a second swap partition on this machine yet.

2.  When I forgot to say either "resume" or "noresume", the kernel detected
that it could not use the swap partition, but it did not offer the
possibility to resume.  Surely it could detect early enough that the swap
partition is not usable for swap but is usable for resume, and could ask the
user whether to do a "resume" or "noresume".

3.  When swsusp completed its writing, it decided that my ACPI BIOS could
not power off automatically.  I wonder why.  No other OS has trouble
powering off this machine.  Also on machines with older APM BIOSes, no OS
had trouble powering off the machines, not even Linux with APM drivers.  So
I could hold the power switch for 4 seconds and the BIOS beeped a warning
before powering off, but I wonder why it was necessary.

By the way on this machine, the keyboard's hotkey Fn+F7 correctly causes
hibernation performed by the BIOS, and Fn+F10 correctly causes suspend to
RAM.  In both cases the power key correctly causes a resume, with resume
from hibernation being done by the BIOS.  Even though this is an ACPI
machine, the BIOS still has hibernation (using a dedicated partition)
because it was originally sold with Windows 98.  On my previous crash box
with APM, hotkeys Fn+F7 and Fn+F10 (and others) got broken by 2.6.0-test
kernels and could only be fixed by booting 2.4.nn kernels.  Since I sold my
previous crash box, I can't check if 2.6.0 solved that breakage or if APM
still necessitates using 2.4.20.


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

* Re: 2.6.0 swsusp
  2003-12-28  2:33 2.6.0 swsusp Norman Diamond
@ 2003-12-28 14:47 ` Pavel Machek
  2003-12-29  2:04   ` Norman Diamond
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2003-12-28 14:47 UTC (permalink / raw)
  To: Norman Diamond; +Cc: linux-kernel

Hi!

> On a machine with working ACPI, I compiled 2.6.0 with Software Suspend
> (Experimental).
> 
> 1.  Help information says that the next boot can be done with
> "resume=/dev/swappartition" or with "noresume".  It does not say how the
> swsusp command decides which swap partition to save to.  The man page (which
> still isn't sure if the command is named swsusp or suspend) also doesn't
> say.  How can I guess which swap partition to designate at resume time?  For
> the moment this is a hypothetical question because I haven't needed to make
> a second swap partition on this machine yet.

You have to have just one swap partition for now.

> 2.  When I forgot to say either "resume" or "noresume", the kernel detected
> that it could not use the swap partition, but it did not offer the
> possibility to resume.  Surely it could detect early enough that the swap
> partition is not usable for swap but is usable for resume, and could ask the
> user whether to do a "resume" or "noresume".

At *that* point, it is no longer possible to resume safely.

> 3.  When swsusp completed its writing, it decided that my ACPI BIOS could
> not power off automatically.  I wonder why.  No other OS has trouble
> powering off this machine.  Also on machines with older APM BIOSes, no OS
> had trouble powering off the machines, not even Linux with APM drivers.  So
> I could hold the power switch for 4 seconds and the BIOS beeped a warning
> before powering off, but I wonder why it was necessary.

If regular halt is also unable to power off machine, fill the bug in
ACPI bugzilla.
								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

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

* Re: 2.6.0 swsusp
  2003-12-28 14:47 ` Pavel Machek
@ 2003-12-29  2:04   ` Norman Diamond
  2003-12-29  2:19     ` Pavel Machek
  0 siblings, 1 reply; 4+ messages in thread
From: Norman Diamond @ 2003-12-29  2:04 UTC (permalink / raw)
  To: Pavel Machek; +Cc: linux-kernel

Pavel Machek replied to me:

> > 2.  When I forgot to say either "resume" or "noresume", the kernel detected
> > that it could not use the swap partition, but it did not offer the
> > possibility to resume.  Surely it could detect early enough that the swap
> > partition is not usable for swap but is usable for resume, and could ask the
> > user whether to do a "resume" or "noresume".
>
> At *that* point, it is no longer possible to resume safely.

Yes and no.  Junio C. Hamano explained the same thing to me, but he ALSO
explained a trick that he uses.  He ALWAYS tells the kernel to do a resume.
Then the kernel detects sufficiently early if a resume is really possible or
not.

Hmm, I guess I still see that if we wait for the kernel to mount / and read
/etc/fstab to find where the swap partition is then it will already be too
late to try resuming from the image in the swap partition.  But
theoretically it must be possible, because a certain famous monopoly
software maker can resume from an image stored in a FILE after starting its
boot sequence.

> > 3.  When swsusp completed its writing, it decided that my ACPI BIOS could
> > not power off automatically.  I wonder why.  No other OS has trouble
> > powering off this machine.  Also on machines with older APM BIOSes, no OS
> > had trouble powering off the machines, not even Linux with APM drivers.  So
> > I could hold the power switch for 4 seconds and the BIOS beeped a warning
> > before powering off, but I wonder why it was necessary.
>
> If regular halt is also unable to power off machine, fill the bug in
> ACPI bugzilla.

Exactly the opposite.  Regular halt works.  For some reason I hadn't tested
regular halt under Linux on this particular machine before first writing the
above (many reboots and suspends but not plain shutdowns).  But I tested a
regular halt later and it powered down automatically.  Only swsusp refuses
to power it down.


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

* Re: 2.6.0 swsusp
  2003-12-29  2:04   ` Norman Diamond
@ 2003-12-29  2:19     ` Pavel Machek
  0 siblings, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2003-12-29  2:19 UTC (permalink / raw)
  To: Norman Diamond; +Cc: linux-kernel

Hi!

> > > 2.  When I forgot to say either "resume" or "noresume", the kernel detected
> > > that it could not use the swap partition, but it did not offer the
> > > possibility to resume.  Surely it could detect early enough that the swap
> > > partition is not usable for swap but is usable for resume, and could ask the
> > > user whether to do a "resume" or "noresume".
> >
> > At *that* point, it is no longer possible to resume safely.
> 
> Yes and no.  Junio C. Hamano explained the same thing to me, but he ALSO
> explained a trick that he uses.  He ALWAYS tells the kernel to do a resume.
> Then the kernel detects sufficiently early if a resume is really possible or
> not.

Yep, same trick I use... Hmm, perhaps it should be written
somewhere. But that's why "noresume" makes sense.

> Hmm, I guess I still see that if we wait for the kernel to mount / and read
> /etc/fstab to find where the swap partition is then it will already be too
> late to try resuming from the image in the swap partition.  But
> theoretically it must be possible, because a certain famous monopoly
> software maker can resume from an image stored in a FILE after starting its
> boot sequence.

With enough thrust, you can make pig fly...

[Not doable in 2.6, and I do not think it is good idea].

> > > 3.  When swsusp completed its writing, it decided that my ACPI BIOS could
> > > not power off automatically.  I wonder why.  No other OS has trouble
> > > powering off this machine.  Also on machines with older APM BIOSes, no OS
> > > had trouble powering off the machines, not even Linux with APM drivers.  So
> > > I could hold the power switch for 4 seconds and the BIOS beeped a warning
> > > before powering off, but I wonder why it was necessary.
> >
> > If regular halt is also unable to power off machine, fill the bug in
> > ACPI bugzilla.
> 
> Exactly the opposite.  Regular halt works.  For some reason I hadn't tested
> regular halt under Linux on this particular machine before first writing the
> above (many reboots and suspends but not plain shutdowns).  But I tested a
> regular halt later and it powered down automatically.  Only swsusp refuses
> to power it down.

Ahha, okay. On swsusp (swsusp.sf.net) list, there was some patch for
something pretty much unrelated; it put regular sys_reboot() into
swsusp. Any chance to try that?
								Pavel
-- 
When do you have heart between your knees?

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

end of thread, other threads:[~2003-12-29  2:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-28  2:33 2.6.0 swsusp Norman Diamond
2003-12-28 14:47 ` Pavel Machek
2003-12-29  2:04   ` Norman Diamond
2003-12-29  2:19     ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome