Re: [PATCH 2/2] Fix console handling during suspend/resume

Linus Torvalds
2006-06-15T22:44:37Z

On Fri, 16 Jun 2006, Pavel Machek wrote:

> Hi!
>
> > > Okay, so .. in your model you can simply save state *during driver
> > > init*, right at boot.
> >
> > Basically.
> >
> > Except in practice user actions/setups can change it, and in practice you
> > really do want to save it later, because you may not need to save it at
> > all.
>
> _If_ user actions can change it, there's nothing that prevents user
> from changing it just after suspend started. Remember -- you wanted
> userland enabled at that point.

Yes, but I also hate havign to depend on the distribution always doing the
right thing. They usually don't.

For example, things like the user usign a mixer to set volume levels on an
audio device: it's just much _nicer_ if we save the volume levels just
before we suspend, instead of expecting crazy alsa deamon crud to notice
that it was suspended and restore things for us.

The "user level can do it" thing is clearly _true_, but at the same time,
we've often seen how user level gets less TLC than the kernel, so in most
cases, the answer is still "..but if we can do it easily in the kernel and
not involve user land, let's do it".

And in many ways it's just _easier_ to save the state just before
suspending, than save it at first boot. So it's not like there is any
_advantage_ to doing it the hard way.

Linus