summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2009-12-10 22:36:18 -0600
committerVictor Lowther <victor.lowther@gmail.com>2009-12-10 22:36:18 -0600
commit8680e685ab091d74eb5063393806a3a3f1894f5d (patch)
tree9f1f7f8793d6fbbe273e2d03a370ba744ac2e1b1
parentf3886cadd361f9f1659c2f555e5a0e74ed9422b6 (diff)
parent2c7982708aea4296cdd238b224fc9b0b99f117b8 (diff)
Merge branch 'pm-utils-1.2'
-rw-r--r--configure.ac2
-rw-r--r--man/pm-action.xml18
-rw-r--r--pm/functions.in2
-rwxr-xr-xpm/module.d/uswsusp2
-rwxr-xr-xpm/sleep.d/98smart-kernel-video27
-rwxr-xr-xpm/sleep.d/99video10
6 files changed, 38 insertions, 23 deletions
diff --git a/configure.ac b/configure.ac
index 61de169..ae0632c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
AC_PREREQ(2.52)
-AC_INIT(pm-utils, 1.2.6)
+AC_INIT(pm-utils, 1.2.6.1)
AC_CONFIG_SRCDIR(src)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_CONFIG_HEADER(config.h)
diff --git a/man/pm-action.xml b/man/pm-action.xml
index 2bde946..034c0fe 100644
--- a/man/pm-action.xml
+++ b/man/pm-action.xml
@@ -71,25 +71,19 @@
<cmdsynopsis>
<command>pm-hibernate</command>
- <group choice="opt">
- <option>--help</option>
- </group>
+ <arg>--help</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>pm-suspend</command>
- <group choice="opt">
- <option>--quirk-*</option>
- <option>--help</option>
- </group>
+ <arg>--quirk-*</arg>
+ <arg>--help</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>pm-suspend-hybrid</command>
- <group choice="opt">
- <option>--quirk-*</option>
- <option>--help</option>
- </group>
+ <arg>--quirk-*</arg>
+ <arg>--help</arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -277,7 +271,7 @@
</listitem>
</varlistentry>
<varlistentry>
- <term><option>--quirk-vga-mode3</option></term>
+ <term><option>--quirk-vga-mode-3</option></term>
<listitem>
<para>
This option will try to force the video card into a standard
diff --git a/pm/functions.in b/pm/functions.in
index 0aba5ea..4fb9d1f 100644
--- a/pm/functions.in
+++ b/pm/functions.in
@@ -8,7 +8,7 @@
is_set()
{
case ${1-UNSET} in
- true|yes|TRUE|YES|on|ON|1'') return 0;;
+ true|yes|TRUE|YES|on|ON|1|'') return 0;;
false|FALSE|no|NO|off|OFF|0|UNSET) return 1;;
*) return 2;;
esac
diff --git a/pm/module.d/uswsusp b/pm/module.d/uswsusp
index 53f304e..264db25 100755
--- a/pm/module.d/uswsusp
+++ b/pm/module.d/uswsusp
@@ -25,7 +25,7 @@ uswsusp_get_quirks()
vbe-post) OPTS="$OPTS --vbe_post" ;;
vbemode-restore) OPTS="$OPTS --vbe_mode" ;;
vbestate-restore) OPTS="$OPTS --vbe_save" ;;
- vga-mode3) ;; # no-op
+ vga-mode-3) ;; # no-op
save-pci) OPTS="$OPTS --pci_save" ;;
none) QUIRK_NONE="true" ;;
*) continue ;;
diff --git a/pm/sleep.d/98smart-kernel-video b/pm/sleep.d/98smart-kernel-video
index 4259397..7eb2f95 100755
--- a/pm/sleep.d/98smart-kernel-video
+++ b/pm/sleep.d/98smart-kernel-video
@@ -17,13 +17,13 @@ remove_all_video_quirks()
--quirk-s3-bios \
--quirk-vbe-post \
--quirk-vbe-post \
- --quirk-vga-mode3 \
+ --quirk-vga-mode-3 \
--quirk-vbemode-restore \
--quirk-vbestate-restore \
--quirk-reset-brightness \
--quirk-radeon-off \
--quirk-no-fb \
- --quirk-pci-save
+ --quirk-save-pci
}
# Test to see if the kernel has a video driver that is smart enough to
@@ -54,9 +54,30 @@ have_fglrx()
remove_all_video_quirks
}
+have_smart_intel()
+{
+ # currently, intel kernel modesetting is not quite smart enough
+ # we still need acpi s3 kernel modesetting hooks, so don't remove those
+ # options if they were passed.
+ [ -d /sys/module/i915 ] || return 1
+ local kernel_rev="$(uname -r |awk -F '[_-]' '{print $1}')"
+ [ "$kernel_rev" \> "2.6.26" -o "$kernel_rev" = "2.6.26" ] || return 1
+ remove_parameters --quirk-dpms-on \
+ --quirk-dpms-suspend \
+ --quirk-vbe-post \
+ --quirk-vbe-post \
+ --quirk-vga-mode3 \
+ --quirk-vbemode-restore \
+ --quirk-vbestate-restore \
+ --quirk-reset-brightness \
+ --quirk-radeon-off \
+ --quirk-no-fb \
+ --quirk-pci-save
+}
+
smart_kernel_video()
{
- have_kms || have_nvidia || have_fglrx || return $NA
+ have_kms || have_nvidia || have_fglrx || have_smart_intel || return $NA
}
case $1 in
diff --git a/pm/sleep.d/99video b/pm/sleep.d/99video
index 29f2f2c..452a88a 100755
--- a/pm/sleep.d/99video
+++ b/pm/sleep.d/99video
@@ -25,9 +25,9 @@ for opt in $PM_CMDLINE; do
vbe-post) QUIRK_VBE_POST="true" ;;
vbemode-restore) QUIRK_VBEMODE_RESTORE="true" ;;
vbestate-restore) QUIRK_VBESTATE_RESTORE="true" ;;
- vga-mode3) QUIRK_VGA_MODE_3="true" ;;
+ vga-mode-3) QUIRK_VGA_MODE_3="true" ;;
no-fb) QUIRK_NOFB="true" ;;
- pci-save) QUIRK_PCI_SAVE="true" ;;
+ save-pci) QUIRK_SAVE_PCI="true" ;;
no-chvt) QUIRK_NO_CHVT="true" ;;
none) QUIRK_NONE="true" ;;
*) continue ;;
@@ -165,7 +165,7 @@ suspend_video()
quirk "${QUIRK_VBESTATE_RESTORE}" && vbe_savestate
quirk "${QUIRK_VBEMODE_RESTORE}" && vbe_savemode
quirk "${QUIRK_RADEON_OFF}" && radeon_off
- quirk "${QUIRK_PCI_SAVE}" && pci_save
+ quirk "${QUIRK_SAVE_PCI}" && save_pci
quirk "${QUIRK_VGA_MODE_3}" && vbe vbemode set 3
quirk "${QUIRK_DPMS_SUSPEND}" && vbe dpms suspend
save_fbcon
@@ -173,7 +173,7 @@ suspend_video()
resume_video()
{
# We might need to do one or many of these quirks
- quirk "${QUIRK_PCI_SAVE}" && pci_restore
+ quirk "${QUIRK_SAVE_PCI}" && restore_pci
quirk "${QUIRK_VBE_POST}" && vbe_post
quirk "${QUIRK_VBESTATE_RESTORE}" && vbe_restorestate
quirk "${QUIRK_VBEMODE_RESTORE}" && vbe_restoremode
@@ -197,7 +197,7 @@ help() {
echo " --quirk-vbe-post"
echo " --quirk-vbemode-restore"
echo " --quirk-vbestate-restore"
- echo " --quirk-vga-mode3"
+ echo " --quirk-vga-mode-3"
echo " --quirk-none"
}