Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1484626
 поиск   регистрация   авторизация 
 
Группа :: Система/Ядро и оборудование
Пакет: hibernate

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

Патч: hibernate-xhacks.patch


--- scriptlets.d/xhacks-orig	2005-01-08 18:40:48.000000000 +0100
+++ scriptlets.d/xhacks	2005-01-08 18:57:14.000000000 +0100
@@ -4,6 +4,7 @@
 AddConfigHandler XHacksOptions
 AddConfigHelp "SwitchToTextMode <boolean>" "If your X driver is unable to resume properly, you can try switching to a text console first by setting this to yes."
 AddConfigHelp "UseDummyXServer <boolean>" "Some X drivers can be reinitialised by launching a dummy X server after resuming to restore the state of the graphics card. Set this to yes to do so."
+AddConfigHelp "WiggleConsole <boolean>" "Switch to temporary console and back once more after resume. Solves display problems with some graphic cards."
 
 XHacksSuspend() {
     if [ x"$XHACKS_LEAVE_X" = "x1" ] ; then
@@ -36,6 +37,13 @@
     if [ -n "$XHACKS_ORIGINAL_VT" ] ; then
 	vecho 3 "xhacks: changing console back to $XHACKS_ORIGINAL_VT"
 	chvt $XHACKS_ORIGINAL_VT
+	
+        if [ x"$XHACKS_WIGGLE" = "x1" ] ; then
+	    # switch to temporary console and back
+	    [ -z "$SWSUSPVT" ] && dest_vt=15 || dest_vt="$SWSUSPVT"
+	    chvt $dest_vt
+	    chvt $XHACKS_ORIGINAL_VT
+	fi
     fi
 }
 
@@ -75,6 +83,9 @@
 	    BoolIsOn "$1" "$2" && XHACKS_NVIDIA=1 || return 0
 	    # only break from case statement if we need something done
 	    ;;
+	wiggleconsole)
+	    BoolIsOn "$1" "$2" && XHACKS_WIGGLE=1 || return 0
+	    ;;
 	*)
 	    return 1
     esac
 
design & coding: Vladimir Lettiev aka crux © 2004-2005