Hello community,
here is the log from the commit of package pm-utils for openSUSE:Factory
checked in at Wed Dec 16 12:47:43 CET 2009.
--------
--- pm-utils/pm-utils.changes 2009-06-21 14:24:28.000000000 +0200
+++ /mounts/work_src_done/STABLE/pm-utils/pm-utils.changes 2009-12-15 10:00:20.000000000 +0100
@@ -1,0 +2,20 @@
+Tue Dec 15 09:56:22 CET 2009 - mvyskocil@suse.cz
+
+- suspend-to-file support (bnc#309522)
+
+-------------------------------------------------------------------
+Wed Nov 25 10:30:41 UTC 2009 - mvyskocil@suse.cz
+
+- Updated to 1.2.6.1 - fixed bnc#378883
+- install all upstream hooks (fixes at least bnc#552346)
+- moved ndiswrapper hook to separate package
+- backported the smart suspend support
+- Obsoleted patches:
+ * pm-utils-0.99.3-README-fix.diff
+ * pm-utils-0.99.4-QUIRK-variables-changed.diff
+ * pm-utils-0.99.4-fix-broken-dbus-send.diff
+ * pm-utils-0.99.4-on_ac_power-no-dbus-fallback.diff
+ * pm-utils-0.99.4-suse.diff
+- removed powersave command
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
01ndiswrapper
pm-utils-0.99.3-README-fix.diff
pm-utils-0.99.4.20071229.tar.bz2
pm-utils-0.99.4-configfile.diff
pm-utils-0.99.4-fix-broken-dbus-send.diff
pm-utils-0.99.4-on_ac_power-no-dbus-fallback.diff
pm-utils-0.99.4-QUIRK-variables-changed.diff
pm-utils-0.99.4-suse.diff
pm-utils-0.99.4-uswsusp-support.diff
pm-utils-suse-20090621.tar.bz2
powersave
README.update
README.upstream-hooks
rtcwake.config
New:
----
pm-utils-1.2.6.1-fix-broken-dbus-send.diff
pm-utils-1.2.6.1-grub.patch
pm-utils-1.2.6.1-logging.patch
pm-utils-1.2.6.1-on_ac_power-no-dbus-fallback.diff
pm-utils-1.2.6.1-smart-uswsusp.patch
pm-utils-1.2.6.1.tar.bz2
pm-utils-suse-73f6e713970bff833abf162fd8515e9aaf75cd17.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ pm-utils.spec ++++++
--- /var/tmp/diff_new_pack.6UX6ro/_old 2009-12-16 12:47:14.000000000 +0100
+++ /var/tmp/diff_new_pack.6UX6ro/_new 2009-12-16 12:47:14.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package pm-utils (Version 0.99.4.20071229)
+# spec file for package pm-utils (Version 1.2.6.1)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -17,31 +17,30 @@
# norootforbuild
+%define pm_libdir %{_prefix}/lib/%{name}/
+%define pm_sysconfdir %{_sysconfdir}/pm/config.d/
Name: pm-utils
-Url: http://webcvs.freedesktop.org/pm-utils/
-Version: 0.99.4.20071229
-Release: 17
-%define pm_utils_suse_version 20090621
+Version: 1.2.6.1
+Release: 1
Summary: Tools to suspend and hibernate computers
-License: GPL v2 or later
+License: GPLv2+
Group: System/Base
+Url: http://pm-utils.freedesktop.org/wiki/
Source: %{name}-%{version}.tar.bz2
-Patch1: pm-utils-0.99.4-on_ac_power-no-dbus-fallback.diff
-Patch2: pm-utils-0.99.4-QUIRK-variables-changed.diff
-Patch3: pm-utils-0.99.4-uswsusp-support.diff
-Patch4: pm-utils-0.99.4-configfile.diff
-Patch5: pm-utils-0.99.3-README-fix.diff
-Patch6: pm-utils-0.99.4-fix-broken-dbus-send.diff
-Patch99: pm-utils-0.99.4-suse.diff
-Source1: pm-utils-suse-%{pm_utils_suse_version}.tar.bz2
-Source2: README.upstream-hooks
-Source3: README.update
-Source4: rtcwake.config
-Source5: 01ndiswrapper
-Source6: powersave
+#PATCH-FIX-OPENSUSE: on_ac_power don't produce veird errors if HAL or D-BUS are broken
+Patch1: pm-utils-1.2.6.1-on_ac_power-no-dbus-fallback.diff
+#PATCH-FIX-OPENSUSE: backport the smarter swsusp to 1.2.6.1
+Patch2: pm-utils-1.2.6.1-smart-uswsusp.patch
+#PATCH-FIX-OPENSUSE: fixes a dbus-send call
+Patch3: pm-utils-1.2.6.1-fix-broken-dbus-send.diff
+#PATCH-FIX-OPENSUSE: more SUSE friendly grub handler
+Patch4: pm-utils-1.2.6.1-grub.patch
+#PATCH-FIX-OPENSUSE: setup also kernel loglevel to show up the progress bar
+Patch5: pm-utils-1.2.6.1-logging.patch
+# http://gitorious.org/opensuse/pm-utils-suse
+Source1: pm-utils-suse-73f6e713970bff833abf162fd8515e9aaf75cd17.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Prefix: /usr
Requires: hal
%description
@@ -58,56 +57,66 @@
David Zeuthen
Richard Hughes
+%package ndiswrapper
+License: GPLv2+
+Summary: The pm-utils hook for ndiswrapper
+Group: System/Base
+Supplements: ndiswrapper
+Requires: %{name} = %{version}
+
+%description ndiswrapper
+pm-utils provide simple shell command line tools to suspend and
+hibernate computers that can be used to run vendor or distro supplied
+scripts on suspend and resume. This package installs the 75ndiswrapper hook.
+
+
%prep
-%setup -b 1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p0
-%patch6 -p1
-%patch99 -p1
+%setup -q -b 1
+%patch1 -p1 -b .no-dbus-fallback
+%patch2 -p1 -b .smart-swsusp
+%patch3 -p1 -b .broken-dbus
+%patch4 -p1 -b .grub
+%patch5 -p1 -b .logging
%build
-export CFLAGS="$RPM_OPT_FLAGS"
-./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man
-make
+%{configure} \
+ --docdir=%{_defaultdocdir}/%{name} \
+ --libdir=%{_prefix}/lib
+%{__make}
%install
-make install DESTDIR=$RPM_BUILD_ROOT
-mkdir -p examples/hooks
-for i in 01grub 20video 49bluetooth 55battery 60sysfont 65alsa 90clock 99video; do
- mv $RPM_BUILD_ROOT/usr/lib/pm-utils/sleep.d/$i examples/hooks
-done
-cp %{S:2} hooks
-cp %{S:3} $RPM_BUILD_ROOT/etc/pm/
-cp %{S:4} $RPM_BUILD_ROOT/etc/pm/config.d/
-cp %{S:5} examples/hooks
-install -m 755 %{S:6} $RPM_BUILD_ROOT/usr/bin/
-cd ../pm-utils-suse
-cp hooks/sleep.d/* $RPM_BUILD_ROOT/usr/lib/pm-utils/sleep.d/
-cp hooks/power.d/* $RPM_BUILD_ROOT/usr/lib/pm-utils/power.d/
-mkdir -p $RPM_BUILD_ROOT/var/log/
-touch $RPM_BUILD_ROOT/var/log/pm-suspend.log
+%{makeinstall}
+#FIXME: should be installed by make install
+%{__install} -m 644 man/*.1 %{buildroot}/%{_mandir}/man1
+%{__install} -m 644 man/*.8 %{buildroot}/%{_mandir}/man8
+#SUSE hooks
+pushd ../pm-utils-suse
+%{__install} -m 0755 hooks/sleep.d/* %{buildroot}/%{pm_libdir}/sleep.d/
+%{__install} -m 0755 hooks/power.d/* %{buildroot}/%{pm_libdir}/power.d/
+%{__install} -m 0644 hooks/config.d/* %{buildroot}/%{pm_sysconfdir}/
+popd
+%{__install} -d -m 0755 %{buildroot}/%{_localstatedir}/log
+touch %{buildroot}/%{_localstatedir}/log/pm-suspend.log
%clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
%files
%defattr (-,root,root)
-%dir /etc/pm
-%dir /etc/pm/config.d
-%dir /etc/pm/power.d
-%dir /etc/pm/sleep.d
-%doc /etc/pm/README.update
-%config(noreplace) /etc/pm/config.d/rtcwake.config
-/usr/sbin/*
-/usr/bin/*
-/usr/lib/pm-utils
-%_mandir/man1/*
%doc README ChangeLog AUTHORS ../pm-utils-suse/doc/README.smart-suspend-to-RAM
-%doc examples
+%{_bindir}/*
+%{_sbindir}/*
+%{_sysconfdir}/pm/
+%config(noreplace) %{_sysconfdir}/pm/config.d/rtcwake.config
+%{pm_libdir}
+%exclude %{pm_libdir}/sleep.d/75ndiswrapper
+%{_mandir}/man1/*
+%{_mandir}/man8/*
%ghost %verify(not md5 size mtime) /var/log/pm-suspend.log
-%_bindir/powersave
+%{_prefix}/lib/pkgconfig/%{name}.pc
+
+%files ndiswrapper
+%defattr (-,root,root)
+%{pm_libdir}/sleep.d/75ndiswrapper
%changelog
++++++ pm-utils-0.99.4-fix-broken-dbus-send.diff -> pm-utils-1.2.6.1-fix-broken-dbus-send.diff ++++++
--- pm-utils/pm-utils-0.99.4-fix-broken-dbus-send.diff 2008-10-22 18:40:06.000000000 +0200
+++ /mounts/work_src_done/STABLE/pm-utils/pm-utils-1.2.6.1-fix-broken-dbus-send.diff 2009-11-25 13:44:45.000000000 +0100
@@ -1,20 +1,20 @@
-Index: b/pm/hooks/10NetworkManager
-================================================================================
---- pm-utils-0.99.4.20071229/pm/hooks/10NetworkManager
-+++ pm-utils-0.99.4.20071229/pm/hooks/10NetworkManager
-@@ -5,6 +5,7 @@
- suspend_nm() {
- # Tell NetworkManager to shut down networking
- dbus-send --system \
-+ --print-reply --reply-timeout=200 \
- --dest=org.freedesktop.NetworkManager \
- /org/freedesktop/NetworkManager \
- org.freedesktop.NetworkManager.sleep
-@@ -13,6 +14,7 @@
- resume_nm() {
- # Wake up NetworkManager and make it do a new connection
- dbus-send --system \
-+ --print-reply --reply-timeout=200 \
- --dest=org.freedesktop.NetworkManager \
- /org/freedesktop/NetworkManager \
- org.freedesktop.NetworkManager.wake
+Index: pm-utils-1.2.6.1/pm/sleep.d/55NetworkManager
+===================================================================
+--- pm-utils-1.2.6.1.orig/pm/sleep.d/55NetworkManager 2009-06-14 03:56:09.000000000 +0200
++++ pm-utils-1.2.6.1/pm/sleep.d/55NetworkManager 2009-11-19 14:54:22.541343347 +0100
+@@ -12,6 +12,7 @@
+ {
+ # Tell NetworkManager to shut down networking
+ dbus_send --system \
++ --print-reply --reply-timeout=200 \
+ --dest=org.freedesktop.NetworkManager \
+ /org/freedesktop/NetworkManager \
+ org.freedesktop.NetworkManager.sleep
+@@ -22,6 +23,7 @@
+ # Wake up NetworkManager and make it do a new connection
+ dbus_send --system \
+ --dest=org.freedesktop.NetworkManager \
++ --print-reply --reply-timeout=200 \
+ /org/freedesktop/NetworkManager \
+ org.freedesktop.NetworkManager.wake
+ }
++++++ pm-utils-1.2.6.1-grub.patch ++++++
Index: pm-utils-1.2.6.1/pm/sleep.d/01grub
===================================================================
--- pm-utils-1.2.6.1.orig/pm/sleep.d/01grub 2009-06-14 03:56:09.000000000 +0200
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,34 +0,0 @@
-#!/bin/sh
-# Ensure grub will load the correct kernel on resume from hibernate,
-# TODO: This is rather redhat specific, and very grub specific.
-
-default_resume_kernel()
-{
- [ "$1" = "suspend" ] && return $NA
- case $(uname -m) in
- i?86|x86_64|athlon)
- ;;
- *) # this is only valid for x86 and x86_64
- return $NA
- ;;
- esac
-
- [ -x /sbin/grubby -a -x /sbin/grub ] || return $NA
- [ -e "/boot/vmlinuz-$(uname -r)" ] || return 1
- out=$(/sbin/grubby --info /boot/vmlinuz-$(uname -r) |grep index)
- [ -n "${out}" ] || return 1
- current=${out#index=}
- echo "savedefault --default=${current} --once" | \
- /sbin/grub --device-map=/boot/grub/device.map \
- --batch --no-floppy --no-curses >/dev/null
-
- return 0
-}
-
-case "$1" in
- hibernate|suspend)
- default_resume_kernel $2
- ;;
- *) exit $NA
- ;;
-esac
Index: pm-utils-1.2.6.1/pm/sleep.d/99Zgrub
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ pm-utils-1.2.6.1/pm/sleep.d/99Zgrub 2009-11-24 10:04:24.095542647 +0100
@@ -0,0 +1,193 @@
+#!/bin/bash
+#
+# Stefan Seyfried, SUSE Linux Products GmbH 2006, GPL v2
+# mostly taken from the powersave project.
+
+GRUBONCE="/usr/sbin/grubonce"
+GRUBDEFAULT="/boot/grub/default"
+GRUBDEFSAVE="/var/run/suspend.grubonce.default"
+
+#####################################################################
+# gets a list of available kernels from /boot/grub/menu.lst
+# kernels are in the array $KERNELS, output to stdout to be eval-ed.
+getkernels()
+{
+ # DEBUG "Running getkernels()" INFO
+ local MENU_LST="/boot/grub/menu.lst"
+ local I DUMMY MNT ROOTDEV
+ declare -i I=0 J=-1
+
+ # we need the root partition later to decide if this is the kernel to select
+ while read ROOTDEV MNT DUMMY; do
+ [ "$ROOTDEV" = "rootfs" ] && continue # not what we are searching for
+ if [ "$MNT" = "/" ]; then
+ break
+ fi
+ done < /proc/mounts
+
+ # build an array KERNELS with all the kernels in /boot/grub/menu.lst
+ # the array MENU_ENTRIES contains the corresponding menu entry numbers
+ # DEFAULT_BOOT contains the default entry.
+ while read LINE; do
+ case $LINE in
+ title*)
+ let J++ # increase for every menu entry, even for non-linux
+ # DEBUG "Found grub menu entry #${J}: '${LINE}'" INFO
+ ;;
+ default*)
+ DUMMY=($LINE) # "default 0 #maybe a comment"
+ echo "DEFAULT_BOOT=${DUMMY[1]}" # ^^[0]^^ 1 ^^[2]^ 3 ^^[4]^^
+ # DEBUG "Default boot entry is '${DUMMY[1]}'" INFO
+ ;;
+ kernel*noresume*)
+ # we probably found the "failsafe" kernel that won't resume...
+ echo " Skipping grub entry #${J}, because it has the noresume option" >&2
+ ;;
+ kernel*root=*)
+ local ROOT
+ ROOT=${LINE#*root=}
+ DUMMY=($ROOT)
+ ROOT=${DUMMY[0]}
+ if [ "$(stat -Lc '%t:%T' $ROOT)" != "$(stat -Lc '%t:%T' $ROOTDEV)" ]; then
+ echo " Skipping grub entry #${J}, because its root= parameter ($ROOT)" >&2
+ echo " does not match the current root device ($ROOTDEV)." >&2
+ continue
+ fi
+ DUMMY=($LINE) # kernel (hd0,1)/boot/vmlinuz-ABC root=/dev/hda2
+ echo "KERNELS[$I]='${DUMMY[1]##*/}'" # vmlinuz-ABC
+ echo "MENU_ENTRIES[$I]=$J"
+ # DEBUG "Found kernel entry #${I}: '${DUMMY[1]##*/}'" INFO
+ let I++
+ ;;
+ kernel*)
+ # a kernel without "root="? We better skip that one...
+ echo " Skipping grub entry #${J}, because it has no root= option" >&2
+ ;;
+ *) ;;
+ esac
+ done < $MENU_LST
+}
+
+#############################################################
+# runs grubonce from the grub package to select which kernel
+# to boot on next startup
+grub-once()
+{
+ if [ -x "$GRUBONCE" ]; then
+ rm -f "$GRUBDEFSAVE"
+ if [ -e "$GRUBDEFAULT" ]; then
+ echo " saving original $GRUBDEFAULT"
+ cp "$GRUBDEFAULT" "$GRUBDEFSAVE"
+ fi
+ echo " running '$GRUBONCE $1'"
+ $GRUBONCE $1
+ else
+ echo "WARNING: $GRUBONCE not found, not preparing bootloader"
+ fi
+}
+
+#############################################################
+# restore grub default after (eventually failed) resume
+grub-once-restore()
+{
+ echo "INFO: running grub-once-restore"
+ rm -f "$GRUBDEFAULT"
+ if [ -e "$GRUBDEFSAVE" ]; then
+ echo " restoring original $GRUBDEFAULT"
+ mv "$GRUBDEFSAVE" "$GRUBDEFAULT"
+ fi
+}
+
+#############################################################################
+# try to find a kernel image that matches the actually running kernel.
+# We need this, if more than one kernel is installed. This works reasonably
+# well with grub, if all kernels are named "vmlinuz-`uname -r`" and are
+# located in /boot. If they are not, good luck ;-)
+find-kernel-entry()
+{
+ NEXT_BOOT=-1
+ ARCH=`uname -m`
+ declare -i I=0
+ # DEBUG "running kernel: $RUNNING" DIAG
+ while [ -n "${KERNELS[$I]}" ]; do
+ BOOTING="${KERNELS[$I]}"
+ if IMAGE=`readlink /boot/$BOOTING` && [ -e "/boot/${IMAGE##*/}" ]; then
+ # DEBUG "Found kernel symlink $BOOTING => $IMAGE" INFO
+ BOOTING=$IMAGE
+ fi
+ case $ARCH in
+ ppc*) BOOTING="${BOOTING#*vmlinux-}" ;;
+ *) BOOTING="${BOOTING#*vmlinuz-}" ;;
+ esac
+ if [ "$RUNNING" == "$BOOTING" ]; then
+ NEXT_BOOT=${MENU_ENTRIES[$I]}
+ echo " running kernel is grub menu entry $NEXT_BOOT (${KERNELS[$I]})"
+ break
+ fi
+ let I++
+ done
+ # if we have not found a kernel, issue a warning.
+ # if we have found a kernel, we'll do "grub-once" later, after
+ # prepare_suspend finished.
+ if [ $NEXT_BOOT -eq -1 ]; then
+ echo "WARNING: no kernelfile matching the running kernel found"
+ fi
+}
+
+#############################################################################
+# if we did not find a kernel (or BOOT_LOADER is not GRUB) check,
+# if the running kernel is still the one that will (probably) be booted for
+# resume (default entry in menu.lst or, if there is none, the kernel file
+# /boot/vmlinuz points to.)
+# This will only work, if you use "original" SUSE kernels.
+# you can always override with the config variable set to "yes"
+prepare-grub()
+{
+ echo "INFO: running prepare-grub"
+ eval `getkernels`
+ RUNNING=`uname -r`
+ find-kernel-entry
+
+ RET=0
+
+ if [ $NEXT_BOOT -eq -1 ]; then
+ # which kernel is booted with the default entry?
+ BOOTING="${KERNELS[$DEFAULT_BOOT]}"
+ # if there is no default entry (no menu.lst?) we fall back to
+ # the default of /boot/vmlinuz.
+ [ -z "$BOOTING" ] && BOOTING="vmlinuz"
+ if IMAGE=`readlink /boot/$BOOTING` && [ -e "/boot/${IMAGE##*/}" ]; then
+ BOOTING=$IMAGE
+ fi
+ BOOTING="${BOOTING#*vmlinuz-}"
+ echo "running kernel: '$RUNNING', probably booting kernel: '$BOOTING'"
+ if [ "$BOOTING" != "$RUNNING" ]; then
+ echo "ERROR: kernel version mismatch, cannot suspend to disk"
+ echo "running: $RUNNING booting: $BOOTING" >> $INHIBIT
+ RET=1
+ fi
+ else
+ # set the bootloader to the running kernel
+ echo " preparing boot-loader: selecting entry $NEXT_BOOT, kernel /boot/$BOOTING"
+ T1=`date +"%s%N"`
+ sync; sync; sync # this is needed to speed up grub-once on reiserfs
+ T2=`date +"%s%N"`
+ echo " grub-once: `grub-once $NEXT_BOOT`"
+ T3=`date +"%s%N"`
+ S=$(((T2-T1)/100000000)); S="$((S/10)).${S:0-1}"
+ G=$(((T3-T2)/100000000)); G="$((G/10)).${G:0-1}"
+ echo " time needed for sync: $S seconds, time needed for grub: $G seconds."
+ fi
+
+ return $RET
+}
+
+
+###### main()
+
+if [ "$1" = hibernate ] || [ "$1" = suspend -a "$2" = suspend_hybrid ]; then
+ prepare-grub
+fi
+if [ "$1" = thaw ] || [ "$1" = resume -a "$2" = suspend_hybrid ]; then
+ grub-once-restore
+fi
Index: pm-utils-1.2.6.1/pm/sleep.d/Makefile.am
===================================================================
--- pm-utils-1.2.6.1.orig/pm/sleep.d/Makefile.am 2009-06-14 03:56:09.000000000 +0200
+++ pm-utils-1.2.6.1/pm/sleep.d/Makefile.am 2009-11-24 14:32:04.410515086 +0100
@@ -4,7 +4,7 @@
00auto-quirk \
00logging \
00powersave \
- 01grub \
+ 99Zgrub \
49bluetooth \
55NetworkManager \
75modules \
Index: pm-utils-1.2.6.1/pm/sleep.d/Makefile.in
===================================================================
--- pm-utils-1.2.6.1.orig/pm/sleep.d/Makefile.in 2009-11-13 04:30:00.000000000 +0100
+++ pm-utils-1.2.6.1/pm/sleep.d/Makefile.in 2009-11-24 14:32:24.400365561 +0100
@@ -162,7 +162,7 @@
00auto-quirk \
00logging \
00powersave \
- 01grub \
+ 99Zgrub \
49bluetooth \
55NetworkManager \
75modules \
++++++ pm-utils-1.2.6.1-logging.patch ++++++
Index: pm-utils-1.2.6.1/pm/sleep.d/00logging
===================================================================
--- pm-utils-1.2.6.1.orig/pm/sleep.d/00logging 2009-06-14 03:56:09.000000000 +0200
+++ pm-utils-1.2.6.1/pm/sleep.d/00logging 2009-11-24 09:01:10.010044035 +0100
@@ -1,14 +1,33 @@
#!/bin/sh
# Log some extra information at the beginning of a suspend/resume cycle.
# TODO: Make this hook only run when PM_DEBUG is true?
+# SUSE: setup also kernel loglevel to show a progress bar
. "${PM_FUNCTIONS}"
case "$1" in
hibernate|suspend)
[ -n "$PM_LOGFILE" ] || exit 0
- /bin/uname -a
- lsmod
- free
+ # save the old loglevel
+ read KERNEL_LOGLEVEL DUMMY < /proc/sys/kernel/printk
+ echo "export KERNEL_LOGLEVEL=$KERNEL_LOGLEVEL" >> /var/run/pm-suspend
+ # set the loglevel so we see the progress bar.
+ # if the level is higher than needed, we leave it alone.
+ if [ $KERNEL_LOGLEVEL -lt 5 ]; then
+ echo 5 > /proc/sys/kernel/printk
+ fi
+ echo "$1 initiated: `date`"
+ echo
+ echo "`/bin/uname -a`"
+ echo "kernel command line: '`cat /proc/cmdline`'"
+ echo "`lsmod`"
+ echo
+ echo "`free`"
+ echo
+ ;;
+ thaw|resume)
+ if [ -n "$KERNEL_LOGLEVEL" ] ; then
+ echo $KERNEL_LOGLEVEL > /proc/sys/kernel/printk
+ fi
;;
esac
++++++ pm-utils-0.99.4-on_ac_power-no-dbus-fallback.diff -> pm-utils-1.2.6.1-on_ac_power-no-dbus-fallback.diff ++++++
--- pm-utils/pm-utils-0.99.4-on_ac_power-no-dbus-fallback.diff 2008-09-24 21:12:02.000000000 +0200
+++ /mounts/work_src_done/STABLE/pm-utils/pm-utils-1.2.6.1-on_ac_power-no-dbus-fallback.diff 2009-11-25 13:44:50.000000000 +0100
@@ -1,15 +1,13 @@
-Index: b/src/on_ac_power
+Index: pm-utils-1.2.6.1/src/on_ac_power
===================================================================
---- a/src/on_ac_power
-+++ b/src/on_ac_power
-@@ -29,19 +29,30 @@
- # along with this program; if not, write to the Free Software
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--- pm-utils-1.2.6.1.orig/src/on_ac_power 2009-06-14 03:56:09.000000000 +0200
++++ pm-utils-1.2.6.1/src/on_ac_power 2009-11-19 12:38:03.213061128 +0100
+@@ -31,17 +31,28 @@
#
# Check for AC/DC/etc adapters
--ac_adapters=$(hal-find-by-capability --capability ac_adapter)
-+ac_adapters=$(hal-find-by-capability --capability ac_adapter 2>/dev/null)
+-ac_adapters="$(hal-find-by-capability --capability ac_adapter)"
++ac_adapters="$(hal-find-by-capability --capability ac_adapter 2>/dev/null)"
+error=$?
-# If there are no AC adapters, it is most likely a desktop.
@@ -22,8 +20,8 @@
-# If any of them are online, then we're done.
-for device in $ac_adapters ; do
-- present=$(hal-get-property --udi $device --key ac_adapter.present)
-- [ "$present" == "true" ] && exit 0
+- present="$(hal-get-property --udi "$device" --key ac_adapter.present)"
+- [ "$present" = "true" ] && exit 0
-done
+ # If any of them are online, then we're done.
+ for device in $ac_adapters ; do
++++++ pm-utils-1.2.6.1-smart-uswsusp.patch ++++++
Index: pm-utils-1.2.6.1/pm/defaults
===================================================================
--- pm-utils-1.2.6.1.orig/pm/defaults 2009-11-26 08:36:38.139432418 +0100
+++ pm-utils-1.2.6.1/pm/defaults 2009-11-26 08:36:44.727431671 +0100
@@ -27,8 +27,45 @@
# tuxonice If your system has support for tuxonice, use this.
#
# The system defaults to "kernel" if this is commented out.
-# SLEEP_MODULE="kernel"
+SLEEP_MODULE="uswsusp"
+#######################################################################
+# the variables below here are specific to the SUSE package right now
+# and are used only if SLEEP_MODULE is uswsusp
+
+# what options should be passed to s2ram?
+# see http://en.opensuse.org/S2ram for more information
+# If this option is set, it overrides S2RAM_QUIRKS_SOURCE below
+S2RAM_OPTS=""
+
+# where should pm-utils get the s2ram quirks from?
+# s2ram - use the whitelist in s2ram, if the machine is known.
+# hal - use the quirks passed in by HAL on the command line
+# everything else: try to be smart in figuring out the correct
+# quirks.
+# if S2RAM_OPTS is set, it overrides S2RAM_QUIRKS_SOURCE!
+S2RAM_QUIRKS_SOURCE=""
+
+# IWL power management
+# 6: Radio always on, default AC
+# 1-5: BATTERY levels, the higher the value, the more power is saved
+# Empty string is meant for not touching any power management features at all
+IWL_PM="5"
+
+# SATA power management
+# Possible values are: min_power, medium_power, max_performance
+# Empty string is meant for not touching any power management features at all
+SATA_PM="medium_power"
+
+# SOUND power management
+# Specifies the timeout after a sound card enters a low power mode
+# Empty string is meant for not touching any power management features at all
+SOUND_PM="10"
+
+# a location of s2disk (s2both) command
+S2DISK_CONF="/etc/suspend.conf"
+
+#######################################################################
# These variables will be handled specially when we load files in
# /etc/pm/config.d.
# Multiple declarations of these environment variables will result in
Index: pm-utils-1.2.6.1/pm/module.d/uswsusp
===================================================================
--- pm-utils-1.2.6.1.orig/pm/module.d/uswsusp 2009-11-26 08:36:38.139432418 +0100
+++ pm-utils-1.2.6.1/pm/module.d/uswsusp 2009-11-26 08:38:47.431855927 +0100
@@ -5,6 +5,7 @@
uswsusp_hooks()
{
disablehook 99video "disabled by uswsusp"
+ disablehook 90chvt "disabled by uswsusp"
}
# Since we disabled 99video, we need to take responsibility for proper
@@ -35,8 +36,66 @@
# if we were told to ignore quirks, do so.
# This is arguably not the best way to do things, but...
[ "$QUIRK_NONE" = "true" ] && OPTS=""
+ S2RAM_OPTS="$S2RAM_OPTS $OPTS"
+ echo "INFO: S2RAM_OPTS from HAL quirks: '$S2RAM_OPTS'."
}
+# this function tries to assemble the best s2ram options from various sources, falling back
+# to other methods...
+get_s2ram_opts()
+{
+ # if S2RAM_OPTS is set - then use it. The user told us so. Obey his wish.
+ if [ -n "$S2RAM_OPTS" ]; then
+ echo "INFO: using user-supplied options: S2RAM_OPTS='$S2RAM_OPTS' for suspending."
+ return
+ fi
+
+ # The user did not tell us the options, so let's check if he expressed a preference for
+ # quirks passed by HAL via the command line...
+ if [ "$S2RAM_QUIRKS_SOURCE" = "hal" ]; then
+ # use the quirks from HAL
+ S2RAM_OPTS="--force "
+ uswsusp_get_quirks
+ return
+ fi
+
+ # ...or if he prefers the s2ram built in list...
+ if [ "$S2RAM_QUIRKS_SOURCE" = "s2ram" ]; then
+ if /usr/sbin/s2ram -n >/dev/null; then
+ echo "INFO: using s2ram built-in database, machine is supported."
+ return
+ else
+ echo "WARN: S2RAM_QUIRKS_SOURCE=s2ram, but machine is unknown, continuing..."
+ fi
+ fi
+
+ # still nothing. So let's try to be smart.
+ # first check if a "good" kernel module is loaded.
+ for MODULE in i915 fglrx nvidia; do
+ if [ -d /sys/module/$MODULE ]; then
+ echo "INFO: module $MODULE is loaded, trusting it to restore video after resume."
+ S2RAM_OPTS="--force"
+ return
+ fi
+ done
+
+ # now we check if s2ram knows the machine.
+ if /usr/sbin/s2ram -n >/dev/null; then
+ echo "INFO: machine is in s2ram database, using it."
+ return;
+ fi
+
+ # s2ram does not know the machine, ask HAL...
+ echo "INFO: no quirks found, using info passed by HAL."
+ uswsusp_get_quirks
+ if [ -n "$S2RAM_OPTS" ]; then
+ S2RAM_OPTS+="--force "
+ fi
+
+ # if we came here and S2RAM_OPTS is empty, suspend won't work :-(
+}
+
+
# Since we disabled 99video, we also need to handle displaying
# help info for the quirks we handle.
uswsusp_help()
@@ -70,8 +129,8 @@
SUSPEND_MODULE="uswsusp"
do_suspend()
{
- uswsusp_get_quirks
- s2ram --force $OPTS
+ get_s2ram_opts
+ s2ram $S2RAM_OPTS
}
if [ "$METHOD" = "suspend" ]; then
add_before_hooks uswsusp_hooks
@@ -87,7 +146,11 @@
HIBERNATE_MODULE="uswsusp"
do_hibernate()
{
- s2disk
+ if [ -z "${S2DISK_CONF}" ]; then
+ s2disk
+ else
+ s2disk --config $S2DISK_CONF
+ fi
}
fi
@@ -98,8 +161,12 @@
SUSPEND_HYBRID_MODULE="uswsusp"
do_suspend_hybrid()
{
- uswsusp_get_quirks
- s2both --force $OPTS
+ get_s2ram_opts
+ if [ -z "${S2DISK_CONF}" ]; then
+ s2both $S2RAM_OPTS
+ else
+ s2both --config $S2DISK_CONF $S2RAM_OPTS
+ fi
}
if [ "$METHOD" = "suspend_hybrid" ]; then
add_before_hooks uswsusp_hooks
++++++ pm-utils-0.99.4.20071229.tar.bz2 -> pm-utils-1.2.6.1.tar.bz2 ++++++
++++ 23420 lines of diff (skipped)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org