Improving the suspend quirks guessworking
martin at piware.de
Thu Mar 20 13:24:25 PDT 2008
a while ago, Matthew Garrett applied a patch to Ubuntu's hal to apply
some kernel workaround suspend quirks by default, even if they weren't
specified in the hal-info FDIs (see attached patch for reference).
This was done because a lot of older hardware usually needs those
quirks, so while not applying any would be guaranteed to fail,
applying the subset mentioned in the patch by default would at least
have a good chance of succeeding. This was the default behaviour of
older releases (the pre-pm-utils era) and it worked reasonably well.
However, this patch causes a lot of problems on more recent hardware
where using the quirks actively breaks suspend.
Thus today we discussed this problem in-depth and came to the
conclusion that the following schema would deliver the best results:
(1) laptop model has no matching FDI rule -> use the default quirks
in the attached patch
(2) laptop model has matching FDI rule -> use them as they are, and
do not add any default quirks
(3) the proprietary nvidia and fglrx drivers, and intel >= i915 
know how to reset the video hardware on resume and must not use
any video quirk in /usr/lib/pm-utils/sleep.d/99video.
resume_video() should immediately return in those cases.
So the attached patch (which is currently applied in Ubuntu) provides
(1), but breaks (2), and does not handle (3) at all. To fix this, I
propose that the script checks if any of
$HAL_PROP_POWER_MANAGEMENT_QUIRK_* is set, it uses the upstream
behaviour (only enable the explicitly mentioned quirks), otherwise it
enables the kernel related ones mentioned in the patch.
(3) is particularly important since FDI rules only match hardware
models, not device drivers. E. g. the quirks are necessary if you are
using the nv driver, but detrimental if you use the proprietary nvidia
driver. This rule is hard to express with FDI files, thus I propose
some shell tests in 99video to completely disable resume_video() in
these cases. (I outlined a possible implementation in ).
Comments, flames, suggestions?
Thanks in advance, and have happy Easter holidays!
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
My 5 today: #127738 (cupsys), #134918 (restricted-manager, update-
manager), #150615 (shadow), #136556 (kdewebdev), #159965 (texlive-bin)
Do 5 a day - every day! https://wiki.ubuntu.com/5-A-Day
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/hal/attachments/20080320/abb3e9b5/attachment.pgp
More information about the hal