Comment 9 for bug 198808

Revision history for this message
Martin Pitt (pitti) wrote :

After a more in-depth discussion we clarified the situation now. The problem is that many of the machines which do not have any FDI rules at all need some of the quirks to circumvent some kernel problems (the quirks mentioned in the affected patch).

So, this is what should happen:

 (1) laptop model has no matching FDI rule -> use the default quirks in the current patch
 (2) laptop model has matching FDI rule -> use them as they are, and do not add quirks

So the current patch provides (1), but breaks (2). To fix this, I propose that the script checks if any of $HAL_PROP_POWER_MANAGEMENT_QUIRK_* is set, it uses the upstream behaviour, otherwise it enables the kernel related ones mentioned in the patch.

In addition, we need another case:

 (3) the proprietary nvidia and fglrx drivers, and intel >= i915 [1] 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.

This 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 nvidia.

This could be checked with:

 * nvidia: lsmod | grep -qw nvidia
 * fglrx: lsmod | grep -qw fglrx
 * intel: use "lspci -n | grep -w 0300:" to find the graphics card, and then either
    * cut out the same line from "lspci", search for ([0-9]+)G and compare $1 for >= 915, or
    * cut out the product ID from lspci -n and compare it against >= 2592 (the product ID of the 915GM), since they seem to be ordered chronologically

The intel one is quite a hack, though, I'd appreciate other suggestions. But it's certainly better than what we have now.

[1] http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-hardy.git;a=commitdiff;h=37bf83ea3a1841ec63d2d9b54b485bb90386ce5b