Patch: remove incorrect vbestate_restore quirk for some laptops

Frederic Crozat fcrozat at mandriva.com
Thu May 3 02:25:23 PDT 2007


Le mercredi 02 mai 2007 à 20:51 +0200, Danny Kukawka a écrit :
> On Mittwoch, 2. Mai 2007, Frederic Crozat wrote:
> > Le mercredi 02 mai 2007 à 18:57 +0200, Danny Kukawka a écrit :
> > > On Mittwoch, 2. Mai 2007, Frederic Crozat wrote:
> > > > While testing Mandriva 2007 Spring, we discovered part of hal
> > > > suspend/resume scripts were still using incorrect arguments when
> > > > calling pm-utils, causing vbestate_restore to never be passed to
> > > > pm-utils.
> > > >
> > > > After we fixed that (I saw david fixed it too in parallel with commits
> > > > d695eb749f5f1ace2d90be0605a100b1cc714266 and
> > > > a0997ff7f0ced238e702f2b0e201038687ede468, sorry for not pushing patch
> > > > earlier), we discovered regressions in suspend stability, because some
> > > > laptops were incorrectly described in hal-info as needing
> > > > vbestate_restore.
> > >
> > > How did you discovered this regression. What was the exact testcase?
> > > Suspend under X or also from console/init=/bin/bash. Both have to work to
> > > remove a quirk.
> > >
> > > I ask this because I see several changes (e.g. for HPnx6125) in the
> > > quirks (you remove e.g. power_management.quirk.vbestate_restore) which
> > > s2ram explicit use (in it's own whitelist) to resume the machines
> > > correctly. I speculate in several cases of your changes the  resume with
> > > X would work okay, but not from console.
> >
> > Glad you asked.
> >
> > I plan to write a test scenario on Mandriva wiki about that, but here is
> > it :
> 
> You miss something in the testplan: suspend to ram has also to work from 
> console. And for your changes (remove vbestate_restore quirk) this wouldn't 
> work in the most cases! So I would vote against this changes until this get 
> rechecked with init=/bin/bash (start with init=/bin/bash, call suspendToRam, 
> resume and check if all work)

I don't recall seeing such regressions for console suspend but I'll try
to grab one of those problematic laptops.

Moreover, we HAD to remove those quirks : restoring vbestate was
preventing X restoring, either by completely freezing the system or
locking X. The list I gave was needed to have suspend working when using
X and it is only from laptops we tested ourselves. 

One other thing : when testing from console, you shouldn't call
pm-suspend (which is what is called by hal) or pm-hibernate directly
from command line, otherwise no quirk is used in the suspend/hibernate
process (since quirks are stored in hal fdi database and quirks command
line options are added on the fly). We patched our own version of
pm-utils do detect this and query hal properties (our pm-utils
maintainer will forward this patch on pm-utils mailing list for review /
integration soon) but it is not the case with upstream.

I'm not sure it is a good idea to test with init=/bin/bash, since it
disables a lot of stuff (including network) which might break for
suspend/resume. It might be useful for debugging but not for validation
of working / broken suspend.

-- 
Frederic Crozat <fcrozat at mandriva.com>
Mandriva



More information about the hal mailing list