--- hal-system-power-suspend-linux.old 2008-01-03 20:58:51.000000000 -0600 +++ hal-system-power-suspend-linux 2008-01-03 21:07:54.000000000 -0600 @@ -14,6 +14,13 @@ read seconds_to_sleep +# if the nvidia module is loaded, let it worry about the video card. +if grep -q nvidia /proc/modules; then + NON_FREE_NVIDIA=true +else + NON_FREE_NVIDIA=false +fi + # Make a suitable command line argument so that the tools can do the correct # quirks for video resume. # Passing the quirks to the tool allows the tool to not depend on HAL for data. @@ -22,12 +29,12 @@ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_S3_MODE" = "true" ] && QUIRKS="$QUIRKS --quirk-s3-mode" [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_DPMS_SUSPEND" = "true" ] && QUIRKS="$QUIRKS --quirk-dpms-suspend" [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_DPMS_ON" != "false" ] && QUIRKS="$QUIRKS --quirk-dpms-on" -[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBESTATE_RESTORE" != "false" ] && QUIRKS="$QUIRKS --quirk-vbestate-restore" -[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBEMODE_RESTORE" != "false" ] && QUIRKS="$QUIRKS --quirk-vbemode-restore" -[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VGA_MODE_3" != "false" ] && QUIRKS="$QUIRKS --quirk-vga-mode3" -[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBE_POST" != "false" ] && QUIRKS="$QUIRKS --quirk-vbe-post" +[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBESTATE_RESTORE" != "false" -a "$NON_FREE_NVIDIA" = "false" ] && QUIRKS="$QUIRKS --quirk-vbestate-restore" +[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBEMODE_RESTORE" != "false" -a "$NON_FREE_NVIDIA" = "false" ] && QUIRKS="$QUIRKS --quirk-vbemode-restore" +[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VGA_MODE_3" != "false" -a "$NON_FREE_NVIDIA" = "false" ] && QUIRKS="$QUIRKS --quirk-vga-mode3" +[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBE_POST" != "false" -a "$NON_FREE_NVIDIA" = "false" ] && QUIRKS="$QUIRKS --quirk-vbe-post" [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_RADEON_OFF" = "true" ] && QUIRKS="$QUIRKS --quirk-radeon-off" -[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_RESET_BRIGHTNESS" != "false" ] && QUIRKS="$QUIRKS --quirk-reset-brightness" +[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_RESET_BRIGHTNESS" != "false" -a "$NON_FREE_NVIDIA" = "false" ] && QUIRKS="$QUIRKS --quirk-reset-brightness" [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_NONE" = "true" ] && QUIRKS="$QUIRKS --quirk-none" # Urh. Do any BIOSen handle this correctly?