From 76fae5afe61029d4200cb2c7e63658ecfbce8fbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Thu, 28 Jan 2010 15:30:20 +0100 Subject: [PATCH] Fix handling quirks (find_native usage) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently we look for quirks in output of find_native function call. This is incorrect as find_native adds parameters on it's own and what it reports is only success/failure. Signed-off-by: Rafał Miłecki --- pm/sleep.d/98-video-quirk-db-handler | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pm/sleep.d/98-video-quirk-db-handler b/pm/sleep.d/98-video-quirk-db-handler index 50224d9..ff8e924 100755 --- a/pm/sleep.d/98-video-quirk-db-handler +++ b/pm/sleep.d/98-video-quirk-db-handler @@ -383,7 +383,7 @@ case $1 in elif QUIRKS=$(find_native "$PM_LKW_QUIRKS"); then # Known working quirks from our last run are still valid. # Use them. - add_parameters $QUIRKS + : else # Our known working quirks from the last run are either # nonexistent or invalid. Either way, start over. @@ -393,13 +393,14 @@ case $1 in QUIRKS=$(find_native "$f") && break done # some default quirks if we did not get any. - [[ -z $QUIRKS ]] && QUIRKS="--quirk-vbe-post - --quirk-dpms-on --quirk-dpms-suspend + if [[ -z "$(get_parameters)" ]]; then + add_parameters "--quirk-vbe-post + --quirk-dpms-on --quirk-dpms-suspend --quirk-vbestate-restore - --quirk-vbemode-restore + --quirk-vbemode-restore --quirk-vga-mode-3" - add_parameters $QUIRKS - savestate video_quirks "$QUIRKS" + fi + savestate video_quirks "$(get_parameters)" fi if have_smart_intel; then # Intel without KMS does not require most quirks, no matter -- 1.6.4.2