linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Thoughts wanted on merging Software Suspend enhancements
@ 2003-07-11 22:45 Nigel Cunningham
  2003-07-12 14:00 ` Pavel Machek
  0 siblings, 1 reply; 53+ messages in thread
From: Nigel Cunningham @ 2003-07-11 22:45 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Pavel Machek, swsusp-devel, Linux Kernel Mailing List

Hi Linus.

As you may know, there has been a lot of work done on the 2.4 version of
software suspend. This includes:

- async i/o
- back out on errors rather than panicing (where possible)
- enhancements to refrigerator so it successfully freezes processes even
under high load
- save a full image rather than freeing just about all the memory first
- highmem support
- image compression support
- swapfile support in progress
- nice display
- user can abort at any time during suspend (oh, I forgot, I wanted
to...) by just pressing Escape
- extensive debugging info that doesn't need to be compiled in and can
be adjusted during the suspend cycle (very handy for diagnosing issues)

I'm wanting to get your thoughts on how we should go about merging it. I
don't think these qualify as bug fixes, but current users (and I'm not
excluding myself!) would certainly like to see the patch merged sooner
rather than later. Would it be a good idea to seek to get Marcello and
Andrew to take it into 2.4 and 2.6, and then aim for 2.[7|9]?

Regards,

Nigel
-- 
Nigel Cunningham
495 St Georges Road South, Hastings 4201, New Zealand

You see, at just the right time, when we were still powerless,
Christ died for the ungodly.
	-- Romans 5:6, NIV.


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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-11 22:45 Thoughts wanted on merging Software Suspend enhancements Nigel Cunningham
@ 2003-07-12 14:00 ` Pavel Machek
  2003-07-12 14:55   ` Nigel Cunningham
  2003-07-12 22:34   ` Dmitry Torokhov
  0 siblings, 2 replies; 53+ messages in thread
From: Pavel Machek @ 2003-07-12 14:00 UTC (permalink / raw)
  To: Nigel Cunningham; +Cc: Linus Torvalds, swsusp-devel, Linux Kernel Mailing List

Hi!

> Hi Linus.
>

Well, you probably did want Linus to answer, but I see some new stuff
here.

> As you may know, there has been a lot of work done on the 2.4 version of
> software suspend. This includes:
> 
> - async i/o
> - back out on errors rather than panicing (where possible)

If those panic()s happen for the users, then this is bugfix.

> - enhancements to refrigerator so it successfully freezes processes even
> under high load

This is bugfix.

> - save a full image rather than freeing just about all the memory first
> - highmem support
> - image compression support
> - swapfile support in progress

This seems extremely hard to do right. If you can do it right and not
rewrite half of kernel, that's okay, but I don't think you can do that.

> - nice display
> - user can abort at any time during suspend (oh, I forgot, I wanted
> to...) by just pressing Escape

That seems like missfeature. We don't want joe random user that is at
the console to prevent suspend by just pressing Escape. Maybe magic
key to do that would be acceptable...
								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-12 14:00 ` Pavel Machek
@ 2003-07-12 14:55   ` Nigel Cunningham
  2003-07-12 15:37     ` Pavel Machek
  2003-07-12 22:34   ` Dmitry Torokhov
  1 sibling, 1 reply; 53+ messages in thread
From: Nigel Cunningham @ 2003-07-12 14:55 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Linus Torvalds, swsusp-devel, Linux Kernel Mailing List

Don't ask me why I'm awake at 3am. I don't know.

On Sun, 2003-07-13 at 02:00, Pavel Machek wrote:
> Hi!
> 
> > Hi Linus.
> >
> 
> Well, you probably did want Linus to answer, but I see some new stuff
> here.

Yeah, I did. But it wasn't going to happen :>

> > - save a full image rather than freeing just about all the memory first
> > - highmem support
> > - image compression support
> > - swapfile support in progress
> 
> This seems extremely hard to do right. If you can do it right and not
> rewrite half of kernel, that's okay, but I don't think you can do that.

I assume you mean swapfile only. The first two have been working for a
while now. For swapfile support, my approach is simple. I'll store the
info rw_swap_page_base calculates and save it in the pagedir, using it
to read back the data at resume without requiring any knowledge of the
filesystem. (Of course I'm assuming the data isn't compressed etc but
since swapfiles work, this seems to be a reasonable assumption; I can
always mirror changes in the swapfile code). I'll also take advantage of
the fact that much of the pagedir data we're storing is very easily
compressable itself to ensure that this doesn't result in severe bloat
of the pagedirs. I've already got a little patch to test it the theory,
and results look very encouraging but I won't try to explain it here.
I'll just confuse the issue.

> > - nice display
> > - user can abort at any time during suspend (oh, I forgot, I wanted
> > to...) by just pressing Escape
> 
> That seems like missfeature. We don't want joe random user that is at
> the console to prevent suspend by just pressing Escape. Maybe magic
> key to do that would be acceptable...

Magic key? Do you mean a password? I suppose that could be a
configuration option. I for one love being able to just press escape
when I realise there was something I wanted to do before I shut the
computer down, and I'll bet there'll be tons of people who think the
same way. I could certainly go for a password option. The only question
would be, how to configure the password. Perhaps a root-only proc entry?

Regards,

Nigel

-- 
Nigel Cunningham
495 St Georges Road South, Hastings 4201, New Zealand

You see, at just the right time, when we were still powerless,
Christ died for the ungodly.
	-- Romans 5:6, NIV.


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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-12 14:55   ` Nigel Cunningham
@ 2003-07-12 15:37     ` Pavel Machek
  2003-07-12 19:38       ` Nigel Cunningham
                         ` (2 more replies)
  0 siblings, 3 replies; 53+ messages in thread
From: Pavel Machek @ 2003-07-12 15:37 UTC (permalink / raw)
  To: Nigel Cunningham; +Cc: swsusp-devel, Linux Kernel Mailing List

Hi!

> Don't ask me why I'm awake at 3am. I don't know.

;-). Its 5pm here...

> > Well, you probably did want Linus to answer, but I see some new stuff
> > here.
> 
> Yeah, I did. But it wasn't going to happen :>

Well, Linus just tends to drop the mail. [Killed him from Cc].

> > > - save a full image rather than freeing just about all the memory first
> > > - highmem support
> > > - image compression support
> > > - swapfile support in progress
> > 
> > This seems extremely hard to do right. If you can do it right and not
> > rewrite half of kernel, that's okay, but I don't think you can do that.
> 
> I assume you mean swapfile only. The first two have been working for a
> while now. For swapfile support, my approach is simple. I'll store the
> info rw_swap_page_base calculates and save it in the pagedir, using it
> to read back the data at resume without requiring any knowledge of the
> filesystem. (Of course I'm assuming the data isn't compressed etc but
> since swapfiles work, this seems to be a reasonable assumption; I can
> always mirror changes in the swapfile code). I'll also take advantage of
> the fact that much of the pagedir data we're storing is very easily
> compressable itself to ensure that this doesn't result in severe bloat
> of the pagedirs. I've already got a little patch to test it the theory,
> and results look very encouraging but I won't try to explain it here.
> I'll just confuse the issue.

Okay, that's sane approach to do it... But where do you store pointer
to pagedir?

> > > - nice display
> > > - user can abort at any time during suspend (oh, I forgot, I wanted
> > > to...) by just pressing Escape
> > 
> > That seems like missfeature. We don't want joe random user that is at
> > the console to prevent suspend by just pressing Escape. Maybe magic
> > key to do that would be acceptable...
> 
> Magic key? Do you mean a password? I suppose that could be a

Documentation/sysrq.txt. Magic sysrq driver will answer some
interesting questions like "how to press esc on the serial line", etc,
and it is also /proc configurable.

								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-12 15:37     ` Pavel Machek
@ 2003-07-12 19:38       ` Nigel Cunningham
  2003-07-12 20:15         ` Pavel Machek
  2003-07-12 20:20       ` Nigel Cunningham
  2003-07-13 18:17       ` [Swsusp-devel] " Michael Frank
  2 siblings, 1 reply; 53+ messages in thread
From: Nigel Cunningham @ 2003-07-12 19:38 UTC (permalink / raw)
  To: Pavel Machek; +Cc: swsusp-devel, Linux Kernel Mailing List

Hi.

On Sun, 2003-07-13 at 03:37, Pavel Machek wrote:
> > > > - nice display
> > > > - user can abort at any time during suspend (oh, I forgot, I wanted
> > > > to...) by just pressing Escape
> > > 
> > > That seems like missfeature. We don't want joe random user that is at
> > > the console to prevent suspend by just pressing Escape. Maybe magic
> > > key to do that would be acceptable...
> > 
> > Magic key? Do you mean a password? I suppose that could be a
> 
> Documentation/sysrq.txt. Magic sysrq driver will answer some
> interesting questions like "how to press esc on the serial line", etc,
> and it is also /proc configurable.

Oh so you just be having (eg) to press SysRq-Escape? Isn't that just
security by obscurity? I'd rather go for the password idea. Sounds like
there should be a few options for what is required to abort with one
chosen at make config time.

1.0 tomorrow unless there's anything big in the meantime.

Nigel

-- 
Nigel Cunningham
495 St Georges Road South, Hastings 4201, New Zealand

You see, at just the right time, when we were still powerless,
Christ died for the ungodly.
	-- Romans 5:6, NIV.


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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-12 19:38       ` Nigel Cunningham
@ 2003-07-12 20:15         ` Pavel Machek
  2003-07-12 20:22           ` [Swsusp-devel] " Nigel Cunningham
  0 siblings, 1 reply; 53+ messages in thread
From: Pavel Machek @ 2003-07-12 20:15 UTC (permalink / raw)
  To: Nigel Cunningham; +Cc: swsusp-devel, Linux Kernel Mailing List

Hi!

> > > > That seems like missfeature. We don't want joe random user that is at
> > > > the console to prevent suspend by just pressing Escape. Maybe magic
> > > > key to do that would be acceptable...
> > > 
> > > Magic key? Do you mean a password? I suppose that could be a
> > 
> > Documentation/sysrq.txt. Magic sysrq driver will answer some
> > interesting questions like "how to press esc on the serial line", etc,
> > and it is also /proc configurable.
> 
> Oh so you just be having (eg) to press SysRq-Escape? Isn't that just
> security by obscurity? I'd rather go for the password idea. Sounds like

No, you don't understand.

Magic SysRq is well known mechanism for torturing running
kernel. Kernel hackers have it enabled, security-consious people have
it disabled, and it is /proc-tweakable. It also works in cases like
"the only keyboard on serial terminal", etc. 

> 1.0 tomorrow unless there's anything big in the meantime.

Don't let Esc issue block 1.0, but I do not want to see Esc in 2.5.X.

								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-12 15:37     ` Pavel Machek
  2003-07-12 19:38       ` Nigel Cunningham
@ 2003-07-12 20:20       ` Nigel Cunningham
  2003-07-12 22:56         ` Pavel Machek
  2003-07-13 13:27         ` Jamie Lokier
  2003-07-13 18:17       ` [Swsusp-devel] " Michael Frank
  2 siblings, 2 replies; 53+ messages in thread
From: Nigel Cunningham @ 2003-07-12 20:20 UTC (permalink / raw)
  To: Pavel Machek; +Cc: swsusp-devel, Linux Kernel Mailing List

Hi.

On Sun, 2003-07-13 at 03:37, Pavel Machek wrote:
> Okay, that's sane approach to do it... But where do you store pointer
> to pagedir?

I didn't answer this before. Sorry. Initially, you would still be
expected to have a suspend partition, and hence it would still go in the
header. Longer term, I'll have to learn more and see if there's a place
we can use in the partition table or such like.

Regards,

Nigel
-- 
Nigel Cunningham
495 St Georges Road South, Hastings 4201, New Zealand

You see, at just the right time, when we were still powerless,
Christ died for the ungodly.
	-- Romans 5:6, NIV.


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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-12 20:15         ` Pavel Machek
@ 2003-07-12 20:22           ` Nigel Cunningham
  2003-07-12 22:52             ` Pavel Machek
  0 siblings, 1 reply; 53+ messages in thread
From: Nigel Cunningham @ 2003-07-12 20:22 UTC (permalink / raw)
  To: Pavel Machek; +Cc: swsusp-devel, Linux Kernel Mailing List

Hi again.

On Sun, 2003-07-13 at 08:15, Pavel Machek wrote:
> No, you don't understand.
> 
> Magic SysRq is well known mechanism for torturing running
> kernel. Kernel hackers have it enabled, security-consious people have
> it disabled, and it is /proc-tweakable. It also works in cases like
> "the only keyboard on serial terminal", etc. 

Ah okay. So the security by obscurity bit was wrong, but the general
idea of SysRq-Esc was right?

Regards,

Nigel

-- 
Nigel Cunningham
495 St Georges Road South, Hastings 4201, New Zealand

You see, at just the right time, when we were still powerless,
Christ died for the ungodly.
	-- Romans 5:6, NIV.


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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-12 14:00 ` Pavel Machek
  2003-07-12 14:55   ` Nigel Cunningham
@ 2003-07-12 22:34   ` Dmitry Torokhov
  2003-07-12 22:51     ` Pavel Machek
  1 sibling, 1 reply; 53+ messages in thread
From: Dmitry Torokhov @ 2003-07-12 22:34 UTC (permalink / raw)
  To: Pavel Machek, Nigel Cunningham
  Cc: Linus Torvalds, swsusp-devel, Linux Kernel Mailing List

On Saturday 12 July 2003 09:00 am, Pavel Machek wrote:
> > - user can abort at any time during suspend (oh, I forgot, I wanted
> > to...) by just pressing Escape
>
> That seems like missfeature. We don't want joe random user that is at
> the console to prevent suspend by just pressing Escape. Maybe magic
> key to do that would be acceptable...

In case when suspending (and interrupting suspend) matters most - 
laptops - Joe random user is the only user present. I myself would
rather have an option to press ESC than remember what SysRq really 
maps to as by the time I would figure that out the laptop would already
be suspended.

IMHO, an option to use ESC, probably compile time option, is a good 
thing.

Dmitry


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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-12 22:34   ` Dmitry Torokhov
@ 2003-07-12 22:51     ` Pavel Machek
  2003-07-13 13:35       ` Jamie Lokier
  0 siblings, 1 reply; 53+ messages in thread
From: Pavel Machek @ 2003-07-12 22:51 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Nigel Cunningham, Linus Torvalds, swsusp-devel,
	Linux Kernel Mailing List

Hi!

> > > - user can abort at any time during suspend (oh, I forgot, I wanted
> > > to...) by just pressing Escape
> >
> > That seems like missfeature. We don't want joe random user that is at
> > the console to prevent suspend by just pressing Escape. Maybe magic
> > key to do that would be acceptable...
> 
> In case when suspending (and interrupting suspend) matters most - 
> laptops - Joe random user is the only user present. I myself would
> rather have an option to press ESC than remember what SysRq really 
> maps to as by the time I would figure that out the laptop would already
> be suspended.
> 
> IMHO, an option to use ESC, probably compile time option, is a good 
> thing.

No more compile time options, thanks.

And no escape. Doing something from keyboard is *ugly*. Magic sysrq is
ugly, too, but its usefull enough to outweight that.

Hmm, I noticed that I'm making same mistake with shift during
powerdown. I guess I should kill that hack.
								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-12 20:22           ` [Swsusp-devel] " Nigel Cunningham
@ 2003-07-12 22:52             ` Pavel Machek
  2003-07-13  2:17               ` Jan Rychter
  0 siblings, 1 reply; 53+ messages in thread
From: Pavel Machek @ 2003-07-12 22:52 UTC (permalink / raw)
  To: Nigel Cunningham; +Cc: swsusp-devel, Linux Kernel Mailing List

Hi!

> > No, you don't understand.
> > 
> > Magic SysRq is well known mechanism for torturing running
> > kernel. Kernel hackers have it enabled, security-consious people have
> > it disabled, and it is /proc-tweakable. It also works in cases like
> > "the only keyboard on serial terminal", etc. 
> 
> Ah okay. So the security by obscurity bit was wrong, but the general
> idea of SysRq-Esc was right?

I guess so. Advantage is that people already know about Magic Sysrq
and know how to disable it. (It would be something like Sysrq-E, you
can't really use esc).
								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-12 20:20       ` Nigel Cunningham
@ 2003-07-12 22:56         ` Pavel Machek
  2003-07-13 13:27         ` Jamie Lokier
  1 sibling, 0 replies; 53+ messages in thread
From: Pavel Machek @ 2003-07-12 22:56 UTC (permalink / raw)
  To: Nigel Cunningham; +Cc: swsusp-devel, Linux Kernel Mailing List

Hi!

> > Okay, that's sane approach to do it... But where do you store pointer
> > to pagedir?
> 
> I didn't answer this before. Sorry. Initially, you would still be
> expected to have a suspend partition, and hence it would still go in the
> header. Longer term, I'll have to learn more and see if there's a place
> we can use in the partition table or such like.

This needs to be thought out. Partition table is out of question
because you kill the whole system if you get interrupted during
partition table write.

First few KB of each ext2 filesystem are available, but I do not think
we want to introduce such hacks.

								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-12 22:52             ` Pavel Machek
@ 2003-07-13  2:17               ` Jan Rychter
  0 siblings, 0 replies; 53+ messages in thread
From: Jan Rychter @ 2003-07-13  2:17 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 992 bytes --]

>>>>> "Pavel" == Pavel Machek <pavel@suse.cz> writes:
 Pavel> Hi!
 > No, you don't understand.
 >
 > Magic SysRq is well known mechanism for torturing running
 > kernel. Kernel hackers have it enabled, security-consious people have
 > it disabled, and it is /proc-tweakable. It also works in cases like
 > "the only keyboard on serial terminal", etc.
 >>
 >> Ah okay. So the security by obscurity bit was wrong, but the general
 >> idea of SysRq-Esc was right?

 Pavel> I guess so. Advantage is that people already know about Magic
 Pavel> Sysrq and know how to disable it. (It would be something like
 Pavel> Sysrq-E, you can't really use esc).  Pavel

This discussion is strange. Nigel is right, if one starts suspending by
mistake, one wants to be able to abort it easily. 'Esc' is just the
perfect key for that. What's the point of hiding or obscuring it? I
mean, why would you want to do that? You don't routinely 'hide' Ctrl-C
for security reasons, do you?

--J.

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-12 20:20       ` Nigel Cunningham
  2003-07-12 22:56         ` Pavel Machek
@ 2003-07-13 13:27         ` Jamie Lokier
  2003-07-13 19:23           ` Pavel Machek
  1 sibling, 1 reply; 53+ messages in thread
From: Jamie Lokier @ 2003-07-13 13:27 UTC (permalink / raw)
  To: Nigel Cunningham; +Cc: Pavel Machek, swsusp-devel, Linux Kernel Mailing List

Nigel Cunningham wrote:
> On Sun, 2003-07-13 at 03:37, Pavel Machek wrote:
> > Okay, that's sane approach to do it... But where do you store pointer
> > to pagedir?
> 
> I didn't answer this before. Sorry. Initially, you would still be
> expected to have a suspend partition, and hence it would still go in the
> header. Longer term, I'll have to learn more and see if there's a place
> we can use in the partition table or such like.

You could also just make it a kernel command line option, for the
bootloader to store.  It's not like it needs to move each time you
suspend - if you store the first block in a file in /boot.

-- Jamie

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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-12 22:51     ` Pavel Machek
@ 2003-07-13 13:35       ` Jamie Lokier
  2003-07-13 19:31         ` Pavel Machek
  2003-07-15 16:23         ` Kent Borg
  0 siblings, 2 replies; 53+ messages in thread
From: Jamie Lokier @ 2003-07-13 13:35 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Dmitry Torokhov, Nigel Cunningham, Linus Torvalds, swsusp-devel,
	Linux Kernel Mailing List

Pavel Machek wrote:
> And no escape. Doing something from keyboard is *ugly*. Magic sysrq is
> ugly, too, but its usefull enough to outweight that.

Can't you just use the Suspend button? :)

I'd be inclined to initiate suspend-to-disk when the laptop's lid is
closed, or when I press the suspend button if ACPI would be so
accomodating.  After closing the lid, if I change my mind there's only
two inputs I can do quickly: press the Suspend button, or open the
lid.  SysRq-Escape would take a couple of seconds longer due to
needing to open the lid.

Of those, I'd be worried about the fragile lid switch occasionally
bouncing as I moved the laptop, causing it to fail to suspend in my
bag.  The button is well protected.

-- Jamie

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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-12 15:37     ` Pavel Machek
  2003-07-12 19:38       ` Nigel Cunningham
  2003-07-12 20:20       ` Nigel Cunningham
@ 2003-07-13 18:17       ` Michael Frank
  2003-07-13 19:29         ` Pavel Machek
  2 siblings, 1 reply; 53+ messages in thread
From: Michael Frank @ 2003-07-13 18:17 UTC (permalink / raw)
  To: Pavel Machek, Nigel Cunningham; +Cc: swsusp-devel, Linux Kernel Mailing List

On Saturday 12 July 2003 23:37, Pavel Machek wrote:
> > > > - user can abort at any time during suspend (oh, I forgot, I wanted
> > > > to...) by just pressing Escape
> > >
> > > That seems like missfeature. We don't want joe random user that is at
> > > the console to prevent suspend by just pressing Escape. Maybe magic
> > > key to do that would be acceptable...

Dumb question applicable to 9x% of computers: how do you secure the suspend 
switch and OFF switch, not to mention the power plug or the battery?

As to security many portables have a bios password and no other passwords 
thereafter for the user account. The abort feature events could be enabled 
via swsusp proc entry mainly for (desktop) security. Also, then you ought 
to think about securing suspend events (don't swsusp the webserver please)!

In practice, when suspending, in many cases one would like to abort. Suspend 
should be abortable by ESC and post 1.0: the lid switch and/or suspend switch. 
If you think about it it makes sense to abort suspend instead of having 
to wait 15-40 seconds and reenter the bios password and wait another 10-30 
seconds. (assuming 2.4 speeds)

The way I would use S3/S4 is reboot only for a new kernel, and really use the 
machine portably much more. S3 would be used for short suspends and S4 for 
longer suspends.

In short, this is an _important_ feature _as_ much as S3 and S4.

Regards
Michael

-- 
Powered by linux-2.5.75-mm1. Compiled with gcc-2.95-3 - mature and rock solid

My current linux related activities:
- 2.5 yenta_socket testing
- Test development and testing of swsusp for 2.4/2.5 and ACPI S3 of 2.5 kernel 
- Everyday usage of 2.5 kernel

More info on 2.5 kernel: http://www.codemonkey.org.uk/post-halloween-2.5.txt
More info on swsusp: http://sourceforge.net/projects/swsusp/


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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-13 13:27         ` Jamie Lokier
@ 2003-07-13 19:23           ` Pavel Machek
  2003-07-13 19:29             ` Jamie Lokier
  0 siblings, 1 reply; 53+ messages in thread
From: Pavel Machek @ 2003-07-13 19:23 UTC (permalink / raw)
  To: Jamie Lokier; +Cc: Nigel Cunningham, swsusp-devel, Linux Kernel Mailing List

Hi!

> > > Okay, that's sane approach to do it... But where do you store pointer
> > > to pagedir?
> > 
> > I didn't answer this before. Sorry. Initially, you would still be
> > expected to have a suspend partition, and hence it would still go in the
> > header. Longer term, I'll have to learn more and see if there's a place
> > we can use in the partition table or such like.
> 
> You could also just make it a kernel command line option, for the
> bootloader to store.  It's not like it needs to move each time you
> suspend - if you store the first block in a file in /boot.

Okay, so we would simply require bootloader to tell us
"resume=/dev/hda@LBA=1234"? I guess that's quite clean, altrough it
needs bootloader change. Queue that for 2.7.0 ;-).

								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-13 18:17       ` [Swsusp-devel] " Michael Frank
@ 2003-07-13 19:29         ` Pavel Machek
  0 siblings, 0 replies; 53+ messages in thread
From: Pavel Machek @ 2003-07-13 19:29 UTC (permalink / raw)
  To: Michael Frank; +Cc: Nigel Cunningham, swsusp-devel, Linux Kernel Mailing List

Hi!

> > > > > - user can abort at any time during suspend (oh, I forgot, I wanted
> > > > > to...) by just pressing Escape
> > > >
> > > > That seems like missfeature. We don't want joe random user that is at
> > > > the console to prevent suspend by just pressing Escape. Maybe magic
> > > > key to do that would be acceptable...
> 
> Dumb question applicable to 9x% of computers: how do you secure the suspend 
> switch and OFF switch, not to mention the power plug or the battery?
> 
> As to security many portables have a bios password and no other passwords 
> thereafter for the user account. The abort feature events could be enabled 
> via swsusp proc entry mainly for (desktop) security. Also, then you ought 
> to think about securing suspend events (don't swsusp the webserver
> please)!

Only root can write to /proc/acpi/sleep, so there's no problem.

And having config variable just for escape during suspend is ugly.

> In practice, when suspending, in many cases one would like to abort. Suspend 
> should be abortable by ESC and post 1.0: the lid switch and/or suspend switch. 
> If you think about it it makes sense to abort suspend instead of having 
> to wait 15-40 seconds and reenter the bios password and wait another 10-30 
> seconds. (assuming 2.4 speeds)
> 
> The way I would use S3/S4 is reboot only for a new kernel, and really use the 
> machine portably much more. S3 would be used for short suspends and S4 for 
> longer suspends.
> 
> In short, this is an _important_ feature _as_ much as S3 and S4.

If you say that aborting with Esc is as important as having swsusp in
the first place... that's not true.
								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-13 19:23           ` Pavel Machek
@ 2003-07-13 19:29             ` Jamie Lokier
  0 siblings, 0 replies; 53+ messages in thread
From: Jamie Lokier @ 2003-07-13 19:29 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Nigel Cunningham, swsusp-devel, Linux Kernel Mailing List

Pavel Machek wrote:
> > You could also just make it a kernel command line option, for the
> > bootloader to store.  It's not like it needs to move each time you
> > suspend - if you store the first block in a file in /boot.
> 
> Okay, so we would simply require bootloader to tell us
> "resume=/dev/hda@LBA=1234"? I guess that's quite clean, altrough it
> needs bootloader change. Queue that for 2.7.0 ;-).

Actually it doesn't require a bootloader change, though that would be
easiest for users :)

-- Jamie

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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-13 13:35       ` Jamie Lokier
@ 2003-07-13 19:31         ` Pavel Machek
  2003-07-13 21:01           ` [Swsusp-devel] " Nigel Cunningham
  2003-07-14 20:10           ` Vojtech Pavlik
  2003-07-15 16:23         ` Kent Borg
  1 sibling, 2 replies; 53+ messages in thread
From: Pavel Machek @ 2003-07-13 19:31 UTC (permalink / raw)
  To: Jamie Lokier
  Cc: Dmitry Torokhov, Nigel Cunningham, Linus Torvalds, swsusp-devel,
	Linux Kernel Mailing List

Hi!

> > And no escape. Doing something from keyboard is *ugly*. Magic sysrq is
> > ugly, too, but its usefull enough to outweight that.
> 
> Can't you just use the Suspend button? :)

At least that's less ugly than Escape. If it is the same button that
would wake machine up when it finished suspend... I guess that makes
sense.
								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-13 19:31         ` Pavel Machek
@ 2003-07-13 21:01           ` Nigel Cunningham
  2003-07-13 21:09             ` Pavel Machek
       [not found]             ` <Pine.LNX.4.53.0307132305500.1090@phoenix.kerstin.at>
  2003-07-14 20:10           ` Vojtech Pavlik
  1 sibling, 2 replies; 53+ messages in thread
From: Nigel Cunningham @ 2003-07-13 21:01 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Jamie Lokier, Dmitry Torokhov, Linus Torvalds, swsusp-devel,
	Linux Kernel Mailing List

Escape is more intuitively obvious though - I would expect the suspend
button to only start a suspend. And the idea of escape cancelling
anything is well in-grained in peoples' minds.

Of course the other advantage is that reading lid & button switches adds
more code (To implement and to configure - the functions of those keys
ought to be optional?)

Regards,

Nigel

On Mon, 2003-07-14 at 07:31, Pavel Machek wrote:
> Hi!
> 
> > > And no escape. Doing something from keyboard is *ugly*. Magic sysrq is
> > > ugly, too, but its usefull enough to outweight that.
> > 
> > Can't you just use the Suspend button? :)
> 
> At least that's less ugly than Escape. If it is the same button that
> would wake machine up when it finished suspend... I guess that makes
> sense.
> 								Pavel
-- 
Nigel Cunningham
495 St Georges Road South, Hastings 4201, New Zealand

You see, at just the right time, when we were still powerless,
Christ died for the ungodly.
	-- Romans 5:6, NIV.


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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-13 21:01           ` [Swsusp-devel] " Nigel Cunningham
@ 2003-07-13 21:09             ` Pavel Machek
  2003-07-13 21:21               ` Jan Rychter
  2003-07-14  1:54               ` Nigel Cunningham
       [not found]             ` <Pine.LNX.4.53.0307132305500.1090@phoenix.kerstin.at>
  1 sibling, 2 replies; 53+ messages in thread
From: Pavel Machek @ 2003-07-13 21:09 UTC (permalink / raw)
  To: Nigel Cunningham
  Cc: Jamie Lokier, Dmitry Torokhov, swsusp-devel, Linux Kernel Mailing List

Hi!

> Escape is more intuitively obvious though - I would expect the suspend
> button to only start a suspend. And the idea of escape cancelling
> anything is well in-grained in peoples' minds.

You did not initiate suspend from keyboard => you should not
terminate it from keyboard.

								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-13 21:09             ` Pavel Machek
@ 2003-07-13 21:21               ` Jan Rychter
  2003-07-14  1:54               ` Nigel Cunningham
  1 sibling, 0 replies; 53+ messages in thread
From: Jan Rychter @ 2003-07-13 21:21 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Nigel Cunningham, Jamie Lokier, Dmitry Torokhov, swsusp-devel,
	Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 666 bytes --]

>>>>> "Pavel" == Pavel Machek <pavel@suse.cz> writes:
 Pavel> Hi!
 >> Escape is more intuitively obvious though - I would expect the
 >> suspend button to only start a suspend. And the idea of escape
 >> cancelling anything is well in-grained in peoples' minds.

 Pavel> You did not initiate suspend from keyboard => you should not
 Pavel> terminate it from keyboard.

Oh, come on. I usually initiate suspend by doing 'sh suspend' as root.

Besides, implementing swsusp support for ACPI events is IMHO right next
to impossible (not to mention unbelievably messy), and that's what you'd
need to have your power button abort the suspend process.

--J.

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
       [not found]             ` <Pine.LNX.4.53.0307132305500.1090@phoenix.kerstin.at>
@ 2003-07-14  1:15               ` Jamie Lokier
  2003-07-14  1:26                 ` Lyle Seaman
  0 siblings, 1 reply; 53+ messages in thread
From: Jamie Lokier @ 2003-07-14  1:15 UTC (permalink / raw)
  To: Markus Gaugusch; +Cc: Dmitry Torokhov, swsusp-devel, Linux Kernel Mailing List

Markus Gaugusch wrote:
> Also, if we are talking security, someone with console access already has
> the machine in his hands - no need to be too paranoid I think.

Think of pressing the suspend button or closing the lid, and walking
off while it is suspending.

-- Jamie

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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend  enhancements
  2003-07-14  1:15               ` Jamie Lokier
@ 2003-07-14  1:26                 ` Lyle Seaman
  2003-07-14  1:43                   ` Jamie Lokier
  0 siblings, 1 reply; 53+ messages in thread
From: Lyle Seaman @ 2003-07-14  1:26 UTC (permalink / raw)
  To: swsusp-devel, Linux Kernel Mailing List


Jamie Lokier wrote:

> Think of pressing the suspend button or closing the lid, and walking
> off while it is suspending.

please, continue...



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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-14  1:26                 ` Lyle Seaman
@ 2003-07-14  1:43                   ` Jamie Lokier
  2003-07-14  1:55                     ` Lyle Seaman
  0 siblings, 1 reply; 53+ messages in thread
From: Jamie Lokier @ 2003-07-14  1:43 UTC (permalink / raw)
  To: Lyle Seaman; +Cc: swsusp-devel, Linux Kernel Mailing List

Lyle Seaman wrote:
> > Think of pressing the suspend button or closing the lid, and walking
> > off while it is suspending.
> 
> please, continue...

Haven't you ever pressed the "off" or "lock" button on a computer in a
lab and walked away?

-- Jamie

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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-13 21:09             ` Pavel Machek
  2003-07-13 21:21               ` Jan Rychter
@ 2003-07-14  1:54               ` Nigel Cunningham
  2003-07-14  3:41                 ` Michael Frank
                                   ` (2 more replies)
  1 sibling, 3 replies; 53+ messages in thread
From: Nigel Cunningham @ 2003-07-14  1:54 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Jamie Lokier, Dmitry Torokhov, swsusp-devel, Linux Kernel Mailing List

Okay. 

Having listened to the arguments, I'll make pressing Escape to cancel
the suspend a feature which defaults to being disabled and can be
enabled via a proc entry in 2.4. I won't add code to poll for ACPI (or
APM) events :>

Regards,

Nigel

On Mon, 2003-07-14 at 09:09, Pavel Machek wrote:
> Hi!
> 
> > Escape is more intuitively obvious though - I would expect the suspend
> > button to only start a suspend. And the idea of escape cancelling
> > anything is well in-grained in peoples' minds.
> 
> You did not initiate suspend from keyboard => you should not
> terminate it from keyboard.
> 
> 								Pavel
-- 
Nigel Cunningham
495 St Georges Road South, Hastings 4201, New Zealand

You see, at just the right time, when we were still powerless,
Christ died for the ungodly.
	-- Romans 5:6, NIV.


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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend  enhancements
  2003-07-14  1:43                   ` Jamie Lokier
@ 2003-07-14  1:55                     ` Lyle Seaman
  2003-07-14  1:57                       ` Nigel Cunningham
  2003-07-14  2:17                       ` Lyle Seaman
  0 siblings, 2 replies; 53+ messages in thread
From: Lyle Seaman @ 2003-07-14  1:55 UTC (permalink / raw)
  To: swsusp-devel, Linux Kernel Mailing List


> Haven't you ever pressed the "off" or "lock" button on a computer in a
> lab and walked away?

Yes, I have, but that's not what I was driving at.  The question is, what do 
you think is the difference between :

(a) pressing "suspend" and walking away, while being assured that suspend will 
complete and leave the system ... suspended, until someone triggers a "resume"

and

(b) pressing "suspend" and walking away, while allowing the possibility that 
someone might interrupt the suspend operation.

??

Personally, I don't see any difference.




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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-14  1:55                     ` Lyle Seaman
@ 2003-07-14  1:57                       ` Nigel Cunningham
  2003-07-14  2:17                       ` Lyle Seaman
  1 sibling, 0 replies; 53+ messages in thread
From: Nigel Cunningham @ 2003-07-14  1:57 UTC (permalink / raw)
  To: Lyle Seaman; +Cc: swsusp-devel, Linux Kernel Mailing List

Of course there's also the possibility that suspending might abort due
to, say, being unable to freeze all the processes or having no swap
available.

In a situation like that, I wouldn't walk away until I saw it power
down. Besides, we're only talking about waiting 10 or 20 seconds in most
cases (depending on the system's configuration). If you care that much
about the security of your system, you'll be willing to wait.

Regards,

Nigel

On Mon, 2003-07-14 at 13:55, Lyle Seaman wrote:
> > Haven't you ever pressed the "off" or "lock" button on a computer in a
> > lab and walked away?
> 
> Yes, I have, but that's not what I was driving at.  The question is, what do 
> you think is the difference between :
> 
> (a) pressing "suspend" and walking away, while being assured that suspend will 
> complete and leave the system ... suspended, until someone triggers a "resume"
> 
> and
> 
> (b) pressing "suspend" and walking away, while allowing the possibility that 
> someone might interrupt the suspend operation.
> 
> ??
> 
> Personally, I don't see any difference.
> 
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
-- 
Nigel Cunningham
495 St Georges Road South, Hastings 4201, New Zealand

You see, at just the right time, when we were still powerless,
Christ died for the ungodly.
	-- Romans 5:6, NIV.


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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend  enhancements
  2003-07-14  1:55                     ` Lyle Seaman
  2003-07-14  1:57                       ` Nigel Cunningham
@ 2003-07-14  2:17                       ` Lyle Seaman
  1 sibling, 0 replies; 53+ messages in thread
From: Lyle Seaman @ 2003-07-14  2:17 UTC (permalink / raw)
  To: swsusp-devel, Linux Kernel Mailing List


I wrote:
> The question is, what do 
> you think is the difference between :
> 
> (a) pressing "suspend" and walking away...

> Personally, I don't see any difference.

I suppose you might have a BIOS password...  okay.



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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-14  1:54               ` Nigel Cunningham
@ 2003-07-14  3:41                 ` Michael Frank
  2003-07-14 13:11                 ` Pavel Machek
  2003-07-14 20:12                 ` Vojtech Pavlik
  2 siblings, 0 replies; 53+ messages in thread
From: Michael Frank @ 2003-07-14  3:41 UTC (permalink / raw)
  To: Nigel Cunningham, Pavel Machek
  Cc: Jamie Lokier, Dmitry Torokhov, swsusp-devel, Linux Kernel Mailing List

On Monday 14 July 2003 09:54, Nigel Cunningham wrote:
> Okay.
>
> Having listened to the arguments, I'll make pressing Escape to cancel
> the suspend a feature which defaults to being disabled and can be
> enabled via a proc entry in 2.4. 

OK!

I won't add code to poll for ACPI (or
> APM) events :>

Sounds like a reasonable tradeoff

>
> Regards,
>
> Nigel
>
> On Mon, 2003-07-14 at 09:09, Pavel Machek wrote:
> > Hi!
> >
> > > Escape is more intuitively obvious though - I would expect the suspend
> > > button to only start a suspend. And the idea of escape cancelling
> > > anything is well in-grained in peoples' minds.
> >
> > You did not initiate suspend from keyboard => you should not
> > terminate it from keyboard.
> >


Overruled ;)
-- 
Powered by linux-2.5.75-mm1. Compiled with gcc-2.95-3 - mature and rock solid

My current linux related activities:
- 2.5 yenta_socket testing
- Test development and testing of swsusp for 2.4/2.5 and ACPI S3 of 2.5 kernel 
- Everyday usage of 2.5 kernel

More info on 2.5 kernel: http://www.codemonkey.org.uk/post-halloween-2.5.txt
More info on swsusp: http://sourceforge.net/projects/swsusp/


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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-14  1:54               ` Nigel Cunningham
  2003-07-14  3:41                 ` Michael Frank
@ 2003-07-14 13:11                 ` Pavel Machek
  2003-07-14 17:30                   ` Jan Rychter
  2003-07-14 20:12                 ` Vojtech Pavlik
  2 siblings, 1 reply; 53+ messages in thread
From: Pavel Machek @ 2003-07-14 13:11 UTC (permalink / raw)
  To: Nigel Cunningham
  Cc: Jamie Lokier, Dmitry Torokhov, swsusp-devel, Linux Kernel Mailing List

Hi!

> Having listened to the arguments, I'll make pressing Escape to cancel
> the suspend a feature which defaults to being disabled and can be
> enabled via a proc entry in 2.4. I won't add code to poll for ACPI (or
> APM) events :>

At least no new proc entry, please. Make it depend on sysrq_enabled
and disable it completely if sysrq support is not compiled in.

								Pavel

-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-14 13:11                 ` Pavel Machek
@ 2003-07-14 17:30                   ` Jan Rychter
  2003-07-14 18:44                     ` Nigel Cunningham
  0 siblings, 1 reply; 53+ messages in thread
From: Jan Rychter @ 2003-07-14 17:30 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Jamie Lokier, Dmitry Torokhov, swsusp-devel, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 895 bytes --]

>>>>> "Pavel" == Pavel Machek <pavel@suse.cz> writes:
 Pavel> Hi!
 >> Having listened to the arguments, I'll make pressing Escape to
 >> cancel the suspend a feature which defaults to being disabled and
 >> can be enabled via a proc entry in 2.4. I won't add code to poll for
 >> ACPI (or APM) events :>

 Pavel> At least no new proc entry, please. Make it depend on
 Pavel> sysrq_enabled and disable it completely if sysrq support is not
 Pavel> compiled in.

Pavel, I disagree. This is important functionality. I *do* want to abort
suspends by pressing 'Esc'.

I do not believe that hiding this gives you any extra security, and I do
not believe that having it in is any kind of a problem. None of your
arguments against it convinced me.

Please do not try to hide it and obscure it any more than it already is
(Nigel has made this default to off for some reason).

--J.

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-14 17:30                   ` Jan Rychter
@ 2003-07-14 18:44                     ` Nigel Cunningham
  0 siblings, 0 replies; 53+ messages in thread
From: Nigel Cunningham @ 2003-07-14 18:44 UTC (permalink / raw)
  To: Jan Rychter
  Cc: Pavel Machek, Jamie Lokier, Dmitry Torokhov, swsusp-devel,
	Linux Kernel Mailing List

Hi.

It defaults to disabled precisely because of Pavel's concerns.

Regards,

Nigel

On Tue, 2003-07-15 at 05:30, Jan Rychter wrote:
> >>>>> "Pavel" == Pavel Machek <pavel@suse.cz> writes:
>  Pavel> Hi!
>  >> Having listened to the arguments, I'll make pressing Escape to
>  >> cancel the suspend a feature which defaults to being disabled and
>  >> can be enabled via a proc entry in 2.4. I won't add code to poll for
>  >> ACPI (or APM) events :>
> 
>  Pavel> At least no new proc entry, please. Make it depend on
>  Pavel> sysrq_enabled and disable it completely if sysrq support is not
>  Pavel> compiled in.
> 
> Pavel, I disagree. This is important functionality. I *do* want to abort
> suspends by pressing 'Esc'.
> 
> I do not believe that hiding this gives you any extra security, and I do
> not believe that having it in is any kind of a problem. None of your
> arguments against it convinced me.
> 
> Please do not try to hide it and obscure it any more than it already is
> (Nigel has made this default to off for some reason).
> 
> --J.
-- 
Nigel Cunningham
495 St Georges Road South, Hastings 4201, New Zealand

You see, at just the right time, when we were still powerless,
Christ died for the ungodly.
	-- Romans 5:6, NIV.


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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-13 19:31         ` Pavel Machek
  2003-07-13 21:01           ` [Swsusp-devel] " Nigel Cunningham
@ 2003-07-14 20:10           ` Vojtech Pavlik
  2003-07-14 20:21             ` Nigel Cunningham
  1 sibling, 1 reply; 53+ messages in thread
From: Vojtech Pavlik @ 2003-07-14 20:10 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Jamie Lokier, Dmitry Torokhov, Nigel Cunningham, Linus Torvalds,
	swsusp-devel, Linux Kernel Mailing List

On Sun, Jul 13, 2003 at 09:31:14PM +0200, Pavel Machek wrote:

> Hi!
> 
> > > And no escape. Doing something from keyboard is *ugly*. Magic sysrq is
> > > ugly, too, but its usefull enough to outweight that.
> > 
> > Can't you just use the Suspend button? :)
> 
> At least that's less ugly than Escape. If it is the same button that
> would wake machine up when it finished suspend... I guess that makes
> sense.

How about making it to be any key?

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-14  1:54               ` Nigel Cunningham
  2003-07-14  3:41                 ` Michael Frank
  2003-07-14 13:11                 ` Pavel Machek
@ 2003-07-14 20:12                 ` Vojtech Pavlik
  2003-07-14 20:18                   ` Pavel Machek
  2 siblings, 1 reply; 53+ messages in thread
From: Vojtech Pavlik @ 2003-07-14 20:12 UTC (permalink / raw)
  To: Nigel Cunningham
  Cc: Pavel Machek, Jamie Lokier, Dmitry Torokhov, swsusp-devel,
	Linux Kernel Mailing List

On Mon, Jul 14, 2003 at 01:54:44PM +1200, Nigel Cunningham wrote:

> Having listened to the arguments, I'll make pressing Escape to cancel
> the suspend a feature which defaults to being disabled and can be
> enabled via a proc entry in 2.4. I won't add code to poll for ACPI (or
> APM) events :>

I'd suggest making it a mappable function in the keymap, like reboot is
for example. Both for initiating and stopping the suspend. How about
that?

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-14 20:12                 ` Vojtech Pavlik
@ 2003-07-14 20:18                   ` Pavel Machek
  2003-07-14 20:30                     ` Nigel Cunningham
  2003-07-14 20:41                     ` Vojtech Pavlik
  0 siblings, 2 replies; 53+ messages in thread
From: Pavel Machek @ 2003-07-14 20:18 UTC (permalink / raw)
  To: Vojtech Pavlik
  Cc: Nigel Cunningham, Jamie Lokier, Dmitry Torokhov, swsusp-devel,
	Linux Kernel Mailing List

Hi!

> > Having listened to the arguments, I'll make pressing Escape to cancel
> > the suspend a feature which defaults to being disabled and can be
> > enabled via a proc entry in 2.4. I won't add code to poll for ACPI (or
> > APM) events :>
> 
> I'd suggest making it a mappable function in the keymap, like reboot is
> for example. Both for initiating and stopping the suspend. How about
> that?

Any user can load his own keymap, I believe... And I do not like
having special /proc options for esc key...
								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-14 20:10           ` Vojtech Pavlik
@ 2003-07-14 20:21             ` Nigel Cunningham
  2003-07-14 20:29               ` Pavel Machek
  0 siblings, 1 reply; 53+ messages in thread
From: Nigel Cunningham @ 2003-07-14 20:21 UTC (permalink / raw)
  To: Vojtech Pavlik
  Cc: Pavel Machek, Jamie Lokier, Dmitry Torokhov, Linus Torvalds,
	swsusp-devel, Linux Kernel Mailing List

It's too easy to accidentally cancel a suspend then. There's also the
fact that when debugging is compiled in, other keys are used to control
the debug output: digits set the loglevel, R toggles rebooting and pause
or break toggles pausing between steps (two keys because kdb might be
using pause). I bet Pavel won't like them either, but I've found them
invaluable for debugging and using SysRq combinations resulted in
post-resume problems with the keyboard driver sometimes thinking SysRq
was still being pressed.

Regards,

Nigel

On Tue, 2003-07-15 at 08:10, Vojtech Pavlik wrote:
> How about making it to be any key?
-- 
Nigel Cunningham
495 St Georges Road South, Hastings 4201, New Zealand

You see, at just the right time, when we were still powerless,
Christ died for the ungodly.
	-- Romans 5:6, NIV.


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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-14 20:21             ` Nigel Cunningham
@ 2003-07-14 20:29               ` Pavel Machek
  2003-07-14 20:32                 ` Nigel Cunningham
  0 siblings, 1 reply; 53+ messages in thread
From: Pavel Machek @ 2003-07-14 20:29 UTC (permalink / raw)
  To: Nigel Cunningham
  Cc: Vojtech Pavlik, Jamie Lokier, Dmitry Torokhov, swsusp-devel,
	Linux Kernel Mailing List

Hi!

> It's too easy to accidentally cancel a suspend then. There's also the
> fact that when debugging is compiled in, other keys are used to control
> the debug output: digits set the loglevel, R toggles rebooting and pause
> or break toggles pausing between steps (two keys because kdb might be
> using pause). I bet Pavel won't like them either, but I've found
> them

You won that bet. This kind of debugging stuff needs to be killed
before merging with Linus.
								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-14 20:18                   ` Pavel Machek
@ 2003-07-14 20:30                     ` Nigel Cunningham
  2003-07-14 20:43                       ` Pavel Machek
  2003-07-14 20:41                     ` Vojtech Pavlik
  1 sibling, 1 reply; 53+ messages in thread
From: Nigel Cunningham @ 2003-07-14 20:30 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Vojtech Pavlik, Jamie Lokier, Dmitry Torokhov, swsusp-devel,
	Linux Kernel Mailing List

Hi.

I'm going to stand firm on this one, Pavel.

I think being able to cancel a suspend is a really useful feature, and
I'll be surprised if we don't see Microsoft including it in their next
version of Windows (perhaps I should take a patent out! :>)

That's not to say that I haven't listened to you, however. That's why I
tightened up the requirements for using it yesterday. As to the extra
proc entry, it's not a biggie: 2.4 swsusp now has it's own proc handling
code which is easily extensible. I did this to make it easier to
understand.

This...

[nigel@laptop-linux nigel]$ ls -l /proc/swsusp/
total 0
--w-------    1 root     root            0 Jul 15 08:28 activate
-rw-------    1 root     root            0 Jul 15 08:28 async_io_limit
-rw-------    1 root     root            0 Jul 15 08:28 beeping
-rw-------    1 root     root            0 Jul 15 08:28 checkpage
-rw-------    1 root     root            0 Jul 15 08:28 debug_sections
-rw-------    1 root     root            0 Jul 15 08:28 default_console_level
-rw-------    1 root     root            0 Jul 15 08:28 enable_escape
-rw-------    1 root     root            0 Jul 15 08:28 image_size_limit
-r--------    1 root     root            0 Jul 15 08:28 interface_version
-r--------    1 root     root            0 Jul 15 08:28 last_result
-rw-------    1 root     root            0 Jul 15 08:28 log_everything
-rw-------    1 root     root            0 Jul 15 08:28 no_async_reads
-rw-------    1 root     root            0 Jul 15 08:28 no_async_writes
-rw-------    1 root     root            0 Jul 15 08:28 no_output
-rw-------    1 root     root            0 Jul 15 08:28 nopageset2
-rw-------    1 root     root            0 Jul 15 08:28 pause_between_steps
-rw-------    1 root     root            0 Jul 15 08:28 progressbar_granularity_limit
-rw-------    1 root     root            0 Jul 15 08:28 reboot
-rw-------    1 root     root            0 Jul 15 08:28 slow
-r--------    1 root     root            0 Jul 15 08:28 version
[nigel@laptop-linux nigel]$ 

is easier to understand and configure. The /proc/sys/kernel/swsusp
interface is still there to make it easy to save & restore them all at
once.

Regards,

Nigel

On Tue, 2003-07-15 at 08:18, Pavel Machek wrote:
> Hi!
> 
> > > Having listened to the arguments, I'll make pressing Escape to cancel
> > > the suspend a feature which defaults to being disabled and can be
> > > enabled via a proc entry in 2.4. I won't add code to poll for ACPI (or
> > > APM) events :>
> > 
> > I'd suggest making it a mappable function in the keymap, like reboot is
> > for example. Both for initiating and stopping the suspend. How about
> > that?
> 
> Any user can load his own keymap, I believe... And I do not like
> having special /proc options for esc key...
> 								Pavel
-- 
Nigel Cunningham
495 St Georges Road South, Hastings 4201, New Zealand

You see, at just the right time, when we were still powerless,
Christ died for the ungodly.
	-- Romans 5:6, NIV.


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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-14 20:29               ` Pavel Machek
@ 2003-07-14 20:32                 ` Nigel Cunningham
  2003-07-14 20:38                   ` Pavel Machek
  0 siblings, 1 reply; 53+ messages in thread
From: Nigel Cunningham @ 2003-07-14 20:32 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Vojtech Pavlik, Jamie Lokier, Dmitry Torokhov, swsusp-devel,
	Linux Kernel Mailing List

Fine by me. The whole point is to make debugging easier, not to bloat
the kernel. It would probably make sense to keep a debugging patch that
could be used to reinsert the code if a tricky problem arose, but that's
a long way off now, so not worth stressing about yet.

Regards,

Nigel

On Tue, 2003-07-15 at 08:29, Pavel Machek wrote:
> You won that bet. This kind of debugging stuff needs to be killed
> before merging with Linus.
> 								Pavel
-- 
Nigel Cunningham
495 St Georges Road South, Hastings 4201, New Zealand

You see, at just the right time, when we were still powerless,
Christ died for the ungodly.
	-- Romans 5:6, NIV.


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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-14 20:32                 ` Nigel Cunningham
@ 2003-07-14 20:38                   ` Pavel Machek
  0 siblings, 0 replies; 53+ messages in thread
From: Pavel Machek @ 2003-07-14 20:38 UTC (permalink / raw)
  To: Nigel Cunningham
  Cc: Vojtech Pavlik, Jamie Lokier, Dmitry Torokhov, swsusp-devel,
	Linux Kernel Mailing List

Hi!

> Fine by me. The whole point is to make debugging easier, not to bloat
> the kernel. It would probably make sense to keep a debugging patch that
> could be used to reinsert the code if a tricky problem arose, but that's
> a long way off now, so not worth stressing about yet.

Agreed, patch that adds debugging is definitely going to be usefull.

								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-14 20:18                   ` Pavel Machek
  2003-07-14 20:30                     ` Nigel Cunningham
@ 2003-07-14 20:41                     ` Vojtech Pavlik
       [not found]                       ` <20030714230219.GB11283@elf.ucw.cz>
  1 sibling, 1 reply; 53+ messages in thread
From: Vojtech Pavlik @ 2003-07-14 20:41 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Vojtech Pavlik, Nigel Cunningham, Jamie Lokier, Dmitry Torokhov,
	swsusp-devel, Linux Kernel Mailing List

On Mon, Jul 14, 2003 at 10:18:04PM +0200, Pavel Machek wrote:
> Hi!
> 
> > > Having listened to the arguments, I'll make pressing Escape to cancel
> > > the suspend a feature which defaults to being disabled and can be
> > > enabled via a proc entry in 2.4. I won't add code to poll for ACPI (or
> > > APM) events :>
> > 
> > I'd suggest making it a mappable function in the keymap, like reboot is
> > for example. Both for initiating and stopping the suspend. How about
> > that?
> 
> Any user can load his own keymap, I believe... And I do not like
> having special /proc options for esc key...

So what? He can press ctrl-alt-del or whatever if he has access to the
keyboard anyway. Nevertheless I don't see any way to cause harm by
cancelling a sw-suspend other than if a server was shutting down due to
the UPS batteries being empty. And in that case the machine will be in a
locked room anyway.

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-14 20:30                     ` Nigel Cunningham
@ 2003-07-14 20:43                       ` Pavel Machek
  2003-07-14 21:20                         ` Nigel Cunningham
  0 siblings, 1 reply; 53+ messages in thread
From: Pavel Machek @ 2003-07-14 20:43 UTC (permalink / raw)
  To: Nigel Cunningham
  Cc: Vojtech Pavlik, Jamie Lokier, Dmitry Torokhov, swsusp-devel,
	Linux Kernel Mailing List

Hi!

> I'm going to stand firm on this one, Pavel.
> 
> I think being able to cancel a suspend is a really useful feature, and
> I'll be surprised if we don't see Microsoft including it in their next
> version of Windows (perhaps I should take a patent out! :>)

:-).

> That's not to say that I haven't listened to you, however. That's why I
> tightened up the requirements for using it yesterday. As to the extra
> proc entry, it's not a biggie: 2.4 swsusp now has it's own proc handling
> code which is easily extensible. I did this to make it easier to
> understand.
> 
> This...
> 
> [nigel@laptop-linux nigel]$ ls -l /proc/swsusp/
> total 0
> --w-------    1 root     root            0 Jul 15 08:28 activate
> -rw-------    1 root     root            0 Jul 15 08:28 async_io_limit
> -rw-------    1 root     root            0 Jul 15 08:28 beeping
> -rw-------    1 root     root            0 Jul 15 08:28 checkpage
> -rw-------    1 root     root            0 Jul 15 08:28 debug_sections
> -rw-------    1 root     root            0 Jul 15 08:28 default_console_level
> -rw-------    1 root     root            0 Jul 15 08:28 enable_escape
> -rw-------    1 root     root            0 Jul 15 08:28 image_size_limit
> -r--------    1 root     root            0 Jul 15 08:28 interface_version
> -r--------    1 root     root            0 Jul 15 08:28 last_result
> -rw-------    1 root     root            0 Jul 15 08:28 log_everything
> -rw-------    1 root     root            0 Jul 15 08:28 no_async_reads
> -rw-------    1 root     root            0 Jul 15 08:28 no_async_writes
> -rw-------    1 root     root            0 Jul 15 08:28 no_output
> -rw-------    1 root     root            0 Jul 15 08:28 nopageset2
> -rw-------    1 root     root            0 Jul 15 08:28 pause_between_steps
> -rw-------    1 root     root            0 Jul 15 08:28 progressbar_granularity_limit
> -rw-------    1 root     root            0 Jul 15 08:28 reboot
> -rw-------    1 root     root            0 Jul 15 08:28 slow
> -r--------    1 root     root            0 Jul 15 08:28 version
> [nigel@laptop-linux nigel]$ 
> 
> is easier to understand and configure. The /proc/sys/kernel/swsusp
> interface is still there to make it easy to save & restore them all at
> once.

Ouch.. But how many of these /proc tweaks need to stay there once
debugging is done? I do not like any configuration options for
swsusp... It should just work. [Okay, we probably need to have resume=
parameter.]

For 2.4.X I don't care. For official tree, it has to "just work" with
as little configuration as possible. [Besides enable_escape, what else
might user want to tweak?]
								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-14 20:43                       ` Pavel Machek
@ 2003-07-14 21:20                         ` Nigel Cunningham
  0 siblings, 0 replies; 53+ messages in thread
From: Nigel Cunningham @ 2003-07-14 21:20 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Vojtech Pavlik, Jamie Lokier, Dmitry Torokhov, swsusp-devel,
	Linux Kernel Mailing List

Without debugging code it could look more like..

> > [nigel@laptop-linux nigel]$ ls -l /proc/swsusp/
> > total 0
> > -rw-------    1 root     root            0 Jul 15 08:28 enable_escape
> > -rw-------    1 root     root            0 Jul 15 08:28 image_size_limit
> > -r--------    1 root     root            0 Jul 15 08:28 interface_version
> > -r--------    1 root     root            0 Jul 15 08:28 last_result
> > -r--------    1 root     root            0 Jul 15 08:28 version
> > [nigel@laptop-linux nigel]$ 
> > 
> Ouch.. But how many of these /proc tweaks need to stay there once
> debugging is done? I do not like any configuration options for
> swsusp... It should just work. [Okay, we probably need to have resume=
> parameter.]

It does just work, but there is room for preferences too. I like
flexibility, and try to build it into my code.

> For 2.4.X I don't care. For official tree, it has to "just work" with
> as little configuration as possible. [Besides enable_escape, what else
> might user want to tweak?]

The limit on the size of the image (they may want a smaller image than
the amount of swap they have).

-- 
Nigel Cunningham
495 St Georges Road South, Hastings 4201, New Zealand

You see, at just the right time, when we were still powerless,
Christ died for the ungodly.
	-- Romans 5:6, NIV.


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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
       [not found]                       ` <20030714230219.GB11283@elf.ucw.cz>
@ 2003-07-15  6:36                         ` Vojtech Pavlik
  2003-07-15 10:08                           ` Pavel Machek
  0 siblings, 1 reply; 53+ messages in thread
From: Vojtech Pavlik @ 2003-07-15  6:36 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Vojtech Pavlik, Nigel Cunningham, Jamie Lokier, Dmitry Torokhov,
	swsusp-devel, Linux Kernel Mailing List

On Tue, Jul 15, 2003 at 01:02:19AM +0200, Pavel Machek wrote:

> > > > > Having listened to the arguments, I'll make pressing Escape to cancel
> > > > > the suspend a feature which defaults to being disabled and can be
> > > > > enabled via a proc entry in 2.4. I won't add code to poll for ACPI (or
> > > > > APM) events :>
> > > > 
> > > > I'd suggest making it a mappable function in the keymap, like reboot is
> > > > for example. Both for initiating and stopping the suspend. How about
> > > > that?
> > > 
> > > Any user can load his own keymap, I believe... And I do not like
> > > having special /proc options for esc key...
> > 
> > So what? He can press ctrl-alt-del or whatever if he has access to the
> > keyboard anyway. Nevertheless I don't see any way to cause harm by
> > cancelling a sw-suspend other than if a server was shutting down due to
> > the UPS batteries being empty. And in that case the machine will be in a
> > locked room anyway.
> 
> ctrl-alt-del maps to "echo you lost" on many machines. It just signals
> init, does nothing more.
> 
> That UPS is bad enough... It should be okay to have server locked but
> have its keyboard/monitor publicly available.

I'm very much sure this feature (having a server locked, while
keyboard/screen is accessible) is much LESS useful than being able to
stop an suspend in progress. That's if the suspend isn't lightning fast,
of course, which is is not.

Unfortunately, while you can route the start-suspend command through
userspace (init, whatever) like the reboot command is, but I fear when
the suspend is in progress, it's not possible to talk to userspace
anymore ...

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-15  6:36                         ` Vojtech Pavlik
@ 2003-07-15 10:08                           ` Pavel Machek
  2003-07-15 11:11                             ` Markus Gaugusch
  0 siblings, 1 reply; 53+ messages in thread
From: Pavel Machek @ 2003-07-15 10:08 UTC (permalink / raw)
  To: Vojtech Pavlik
  Cc: Nigel Cunningham, Jamie Lokier, Dmitry Torokhov, swsusp-devel,
	Linux Kernel Mailing List

Hi!

> > > > > I'd suggest making it a mappable function in the keymap, like reboot is
> > > > > for example. Both for initiating and stopping the suspend. How about
> > > > > that?
> > > > 
> > > > Any user can load his own keymap, I believe... And I do not like
> > > > having special /proc options for esc key...
> > > 
> > > So what? He can press ctrl-alt-del or whatever if he has access to the
> > > keyboard anyway. Nevertheless I don't see any way to cause harm by
> > > cancelling a sw-suspend other than if a server was shutting down due to
> > > the UPS batteries being empty. And in that case the machine will be in a
> > > locked room anyway.
> > 
> > ctrl-alt-del maps to "echo you lost" on many machines. It just signals
> > init, does nothing more.
> > 
> > That UPS is bad enough... It should be okay to have server locked but
> > have its keyboard/monitor publicly available.
> 
> I'm very much sure this feature (having a server locked, while
> keyboard/screen is accessible) is much LESS useful than being able to
> stop an suspend in progress. That's if the suspend isn't lightning fast,
> of course, which is is not.
> 
> Unfortunately, while you can route the start-suspend command through
> userspace (init, whatever) like the reboot command is, but I fear when
> the suspend is in progress, it's not possible to talk to userspace
> anymore ...

No, userspace is frozen at that point.

... and so I believe right thing is to
make magic sysrq combination for aborting suspend...


-- 
				Pavel
Written on sharp zaurus, because my Velo1 broke. If you have Velo you don't need...


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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-15 10:08                           ` Pavel Machek
@ 2003-07-15 11:11                             ` Markus Gaugusch
  2003-07-15 11:31                               ` Pavel Machek
  0 siblings, 1 reply; 53+ messages in thread
From: Markus Gaugusch @ 2003-07-15 11:11 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Vojtech Pavlik, Jamie Lokier, Dmitry Torokhov, swsusp-devel,
	Linux Kernel Mailing List

On Jul 15, Pavel Machek <pavel@suse.cz> wrote:
> ... and so I believe right thing is to make magic sysrq combination for
> aborting suspend...
Pavel,
SWSusp is mainly useful for desktop users. Although there may be cases
where it is enabled on production machines, it should be aimed at desktop
users as much as possible. The features to toggle reboot and abort suspend
are really, really cool. And combining them with sysrq would just make
them very very ugly. Someone mentioned the Gnome2 disaster, and I can only
second that. Configurability IS important. And it should be easy as well
(/proc is easy enough, good people or distributors can write a script and
provide it to end users, etc.).
To make the abort of swsusp configurable is the best compromise you can
have, IMHO. I don't know why you are so stubborn and don't try to see the
'normal' people (I'm not one of those, but I'm trying to understand!!).

Markus

-- 
__________________    /"\
Markus Gaugusch       \ /    ASCII Ribbon Campaign
markus@gaugusch.at     X     Against HTML Mail
                      / \

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

* Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-15 11:11                             ` Markus Gaugusch
@ 2003-07-15 11:31                               ` Pavel Machek
  0 siblings, 0 replies; 53+ messages in thread
From: Pavel Machek @ 2003-07-15 11:31 UTC (permalink / raw)
  To: Markus Gaugusch
  Cc: Vojtech Pavlik, Jamie Lokier, Dmitry Torokhov, swsusp-devel,
	Linux Kernel Mailing List

Hi!

> > ... and so I believe right thing is to make magic sysrq combination for
> > aborting suspend...
> Pavel,
> SWSusp is mainly useful for desktop users. Although there may be cases
> where it is enabled on production machines, it should be aimed at desktop
> users as much as possible. The features to toggle reboot and abort suspend
> are really, really cool. And combining them with sysrq would just make
> them very very ugly. Someone mentioned the Gnome2 disaster, and I can only
> second that. Configurability IS important. And it should be easy as well
> (/proc is easy enough, good people or distributors can write a script and
> provide it to end users, etc.).
> To make the abort of swsusp configurable is the best compromise you can
> have, IMHO. I don't know why you are so stubborn and don't try to see the
> 'normal' people (I'm not one of those, but I'm trying to
> understand!!).

At one point I was suggesting that Esc feature perhaps could be done
by Esc and controlled same way magic sysrq is. No, nigel insisted that
it has to have separate config option.

I believe that's simply stupid.

Anyway, escape key has pretty well defined meaning: send ^[ to the
console. Altrough it might be nice for escape to return you back to
LILO during early boot, we are not doing that.

Kernel should do its job and policy should be in userland. "Escape
always stops suspend" is a security hole. => "Escape stops suspends"
has no place in kernel.

You might want Esc to mean ^C when user accidentaly starts "cat", but
you can't have that.

And now: special (and very ugly and very hacky) mechanism was
developed to control kernel from console. It is called magic
sysrq. Its ugly, but its also usefull. It is usable over serial
line. Aborting suspend fits in there.

Esc controlled by magic sysrq proc control is extremely ugly, but at
least it is not security hole any more, becuase user can already do
bad stuff to the computer.

Anyway, this thread is long and boring... If you are trying to
convince me with 10 000 mails "its important for users"... please
don't do that.
								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-13 13:35       ` Jamie Lokier
  2003-07-13 19:31         ` Pavel Machek
@ 2003-07-15 16:23         ` Kent Borg
  2003-07-15 16:27           ` Pavel Machek
  2003-07-15 17:27           ` Jamie Lokier
  1 sibling, 2 replies; 53+ messages in thread
From: Kent Borg @ 2003-07-15 16:23 UTC (permalink / raw)
  To: Jamie Lokier
  Cc: Pavel Machek, Dmitry Torokhov, Nigel Cunningham, swsusp-devel,
	Linux Kernel Mailing List

On Sun, Jul 13, 2003 at 02:35:17PM +0100, Jamie Lokier wrote:
> I'd be inclined to initiate suspend-to-disk when the laptop's lid is
> closed

Please don't suspend my notebook when the lid is closed.  I frequently
want it running when closed.  It is OK to turn off the backlight when
closed (which my Vaio does), but don't show down my CPU or network
just because I am not typing or looking at the screen.


-kb, the Kent who sometimes just closes his notebook before hopping
off the bus, and who sometimes plugs it in to power and network when
at home but leaves the lid closed.

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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-15 16:23         ` Kent Borg
@ 2003-07-15 16:27           ` Pavel Machek
  2003-07-15 17:27           ` Jamie Lokier
  1 sibling, 0 replies; 53+ messages in thread
From: Pavel Machek @ 2003-07-15 16:27 UTC (permalink / raw)
  To: Kent Borg
  Cc: Jamie Lokier, Pavel Machek, Dmitry Torokhov, Nigel Cunningham,
	swsusp-devel, Linux Kernel Mailing List

Hi!

> > I'd be inclined to initiate suspend-to-disk when the laptop's lid is
> > closed
> 
> Please don't suspend my notebook when the lid is closed.  I frequently
> want it running when closed.  It is OK to turn off the backlight when
> closed (which my Vaio does), but don't show down my CPU or network
> just because I am not typing or looking at the screen.

Of course, this *needs* to be configurable (== handled by
userland). If you are using external keyboard/mouse you do not want
your notebook open. I hate HP for putting powerswitch so that you have
to open notebook to turn it on/off...
								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-15 16:23         ` Kent Borg
  2003-07-15 16:27           ` Pavel Machek
@ 2003-07-15 17:27           ` Jamie Lokier
  2003-07-15 19:05             ` Nigel Cunningham
  1 sibling, 1 reply; 53+ messages in thread
From: Jamie Lokier @ 2003-07-15 17:27 UTC (permalink / raw)
  To: Kent Borg
  Cc: Pavel Machek, Dmitry Torokhov, Nigel Cunningham, swsusp-devel,
	Linux Kernel Mailing List

Kent Borg wrote:
> On Sun, Jul 13, 2003 at 02:35:17PM +0100, Jamie Lokier wrote:
> > I'd be inclined to initiate suspend-to-disk when the laptop's lid is
> > closed
> 
> Please don't suspend my notebook when the lid is closed.

keep reading...

> > or when I press the suspend button
    ~~

I.e. switch between those two modes according to how the laptop is
being used at the time.  When travelling I use the lid switch to
suspend (well I used to before I dropped it and broke the lid switch
:) - at home I use the button.

I'd hope that suspend-to-disk could be activated in the same way
(whatever way it is) that suspend-to-ram is now.

- Jamie

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

* Re: Thoughts wanted on merging Software Suspend enhancements
  2003-07-15 17:27           ` Jamie Lokier
@ 2003-07-15 19:05             ` Nigel Cunningham
  0 siblings, 0 replies; 53+ messages in thread
From: Nigel Cunningham @ 2003-07-15 19:05 UTC (permalink / raw)
  To: Jamie Lokier
  Cc: Kent Borg, Pavel Machek, Dmitry Torokhov, swsusp-devel,
	Linux Kernel Mailing List

I already activate swsusp using either the sleep button (
/proc/acpi/events -> acpid -> script) or the gkrellm acpi addin that
monitors battery levels. I'm sure acpid could do the lid switch too.

That's for initiating the suspend, of course. As I said, I'm not about
to bloat swsusp further by adding code to test for the switches during
suspend.

Regards,

Nigel

On Wed, 2003-07-16 at 05:27, Jamie Lokier wrote:
> Kent Borg wrote:
> > On Sun, Jul 13, 2003 at 02:35:17PM +0100, Jamie Lokier wrote:
> > > I'd be inclined to initiate suspend-to-disk when the laptop's lid is
> > > closed
> > 
> > Please don't suspend my notebook when the lid is closed.
> 
> keep reading...
> 
> > > or when I press the suspend button
>     ~~
> 
> I.e. switch between those two modes according to how the laptop is
> being used at the time.  When travelling I use the lid switch to
> suspend (well I used to before I dropped it and broke the lid switch
> :) - at home I use the button.
> 
> I'd hope that suspend-to-disk could be activated in the same way
> (whatever way it is) that suspend-to-ram is now.
> 
> - Jamie
-- 
Nigel Cunningham
495 St Georges Road South, Hastings 4201, New Zealand

You see, at just the right time, when we were still powerless,
Christ died for the ungodly.
	-- Romans 5:6, NIV.


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

end of thread, other threads:[~2003-07-15 19:07 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-11 22:45 Thoughts wanted on merging Software Suspend enhancements Nigel Cunningham
2003-07-12 14:00 ` Pavel Machek
2003-07-12 14:55   ` Nigel Cunningham
2003-07-12 15:37     ` Pavel Machek
2003-07-12 19:38       ` Nigel Cunningham
2003-07-12 20:15         ` Pavel Machek
2003-07-12 20:22           ` [Swsusp-devel] " Nigel Cunningham
2003-07-12 22:52             ` Pavel Machek
2003-07-13  2:17               ` Jan Rychter
2003-07-12 20:20       ` Nigel Cunningham
2003-07-12 22:56         ` Pavel Machek
2003-07-13 13:27         ` Jamie Lokier
2003-07-13 19:23           ` Pavel Machek
2003-07-13 19:29             ` Jamie Lokier
2003-07-13 18:17       ` [Swsusp-devel] " Michael Frank
2003-07-13 19:29         ` Pavel Machek
2003-07-12 22:34   ` Dmitry Torokhov
2003-07-12 22:51     ` Pavel Machek
2003-07-13 13:35       ` Jamie Lokier
2003-07-13 19:31         ` Pavel Machek
2003-07-13 21:01           ` [Swsusp-devel] " Nigel Cunningham
2003-07-13 21:09             ` Pavel Machek
2003-07-13 21:21               ` Jan Rychter
2003-07-14  1:54               ` Nigel Cunningham
2003-07-14  3:41                 ` Michael Frank
2003-07-14 13:11                 ` Pavel Machek
2003-07-14 17:30                   ` Jan Rychter
2003-07-14 18:44                     ` Nigel Cunningham
2003-07-14 20:12                 ` Vojtech Pavlik
2003-07-14 20:18                   ` Pavel Machek
2003-07-14 20:30                     ` Nigel Cunningham
2003-07-14 20:43                       ` Pavel Machek
2003-07-14 21:20                         ` Nigel Cunningham
2003-07-14 20:41                     ` Vojtech Pavlik
     [not found]                       ` <20030714230219.GB11283@elf.ucw.cz>
2003-07-15  6:36                         ` Vojtech Pavlik
2003-07-15 10:08                           ` Pavel Machek
2003-07-15 11:11                             ` Markus Gaugusch
2003-07-15 11:31                               ` Pavel Machek
     [not found]             ` <Pine.LNX.4.53.0307132305500.1090@phoenix.kerstin.at>
2003-07-14  1:15               ` Jamie Lokier
2003-07-14  1:26                 ` Lyle Seaman
2003-07-14  1:43                   ` Jamie Lokier
2003-07-14  1:55                     ` Lyle Seaman
2003-07-14  1:57                       ` Nigel Cunningham
2003-07-14  2:17                       ` Lyle Seaman
2003-07-14 20:10           ` Vojtech Pavlik
2003-07-14 20:21             ` Nigel Cunningham
2003-07-14 20:29               ` Pavel Machek
2003-07-14 20:32                 ` Nigel Cunningham
2003-07-14 20:38                   ` Pavel Machek
2003-07-15 16:23         ` Kent Borg
2003-07-15 16:27           ` Pavel Machek
2003-07-15 17:27           ` Jamie Lokier
2003-07-15 19:05             ` Nigel Cunningham

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