summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2008-02-12 08:51:16 -0600
committerVictor Lowther <victor.lowther@gmail.com>2008-02-12 08:51:16 -0600
commit02e9623c6f0adb3c3b6c03d77bbfaff1c4434744 (patch)
tree8d65d99cde0216417fb3ef8c7c06cfca65bb784d
parentd5907c546116762cbb1f50b362fe163caed97c78 (diff)
This patch adds framebuffer console handling routines.
It is the only thing that we were missing from the s2ram tools.
-rwxr-xr-xpm/sleep.d/99video16
1 files changed, 16 insertions, 0 deletions
diff --git a/pm/sleep.d/99video b/pm/sleep.d/99video
index 82f0469..a513d14 100755
--- a/pm/sleep.d/99video
+++ b/pm/sleep.d/99video
@@ -30,6 +30,19 @@ else
radeon() { echo "radeontool not found" 1>&2; return 1; }
fi
+save_fbcon(){
+ local con
+ for con in /sys/class/graphics/*/state; do
+ echo 1 >"${con}"
+ done
+}
+
+resume_fbcon(){
+ local con
+ for con in /sys/class/graphics/*/state; do
+ echo 0 >"${con}"
+ done
+
resume_video()
{
if [ "${DISPLAY_QUIRK_RADEON_OFF}" = "true" ]; then
@@ -47,6 +60,8 @@ resume_video()
if [ "${DISPLAY_QUIRK_VBEMODE_RESTORE}" = "true" ]; then
vbe vbemode set "$(cat /var/run/vbemode)"
fi
+ # based on data from s2ram
+ resume_fbcon
if [ "${DISPLAY_QUIRK_DPMS_ON}" = "true" ]; then
vbe dpms on
fi
@@ -57,6 +72,7 @@ resume_video()
case "$1" in
+ suspend|hibernate|suspend_hybrid) save_fbcon ;;
resume)
resume_video
;;