On Fri, 2008-05-16 at 15:13 +0100, Matthew Garrett wrote:
> Some kernel drivers are able to restore graphics state on their own. 
> Attempting to run quirks there can be harmful. Check whether there's a 
> loaded driver which can handle suspend/resume, and if so refuse to run 
> the quirks.

I will rework this patch before applying it -- if we are not handling
quirks on resume, we should probably ignore them on suspend as well.

> diff --git a/pm/sleep.d/99video b/pm/sleep.d/99video
> index c8efd12..71decd5 100755
> --- a/pm/sleep.d/99video
> +++ b/pm/sleep.d/99video
> @@ -151,7 +157,25 @@ case "$1" in
>                       suspend_video
>               fi
>               ;;
> -     resume) resume_video ;;
> +     resume) 
> +             # Intel DRM can resume the graphics since 2.6.26
> +             if [ -d /sys/module/i915 ]; then
> +                    return 0;
> +             fi
> +
> +             # Nvidia claim their binary driver can adequately handle 
> +             # suspend/resume
> +             if [ -d /sys/module/nvidia ]; then
> +                     return 0;
> +             fi
> +
> +             # Ditto ATI
> +             if [ -d /sys/module/fglrx ]; then
> +                     return 0;
> +             fi
> +
> +             resume_video 
> +             ;;
>       thaw)
>               if [ "${HIBERNATE_RESUME_POST_VIDEO}" = "yes" ]; then
>                       resume_video
> 
-- 
Victor Lowther
Ubuntu Certified Professional

_______________________________________________
Pm-utils mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pm-utils

Reply via email to