rpms/pm-utils/F-8 pm-utils-0.99.4-no-nv-suspend.patch, NONE, 1.1 pm-utils.spec, 1.82, 1.83
Jeremy Katz (katzj)
fedora-extras-commits at redhat.com
Tue Oct 23 20:08:57 UTC 2007
Author: katzj
Update of /cvs/pkgs/rpms/pm-utils/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20348
Modified Files:
pm-utils.spec
Added Files:
pm-utils-0.99.4-no-nv-suspend.patch
Log Message:
* Tue Oct 23 2007 Jeremy Katz <katzj at redhat.com> - 0.99.4-6
- Set suspend to not supported by default on machines with nVidia graphics
using the nv driver based on testing results. Can be overriden if you
know your machine works by setting ALLOW_NV_SUSPEND="yes" in a file
in /etc/pm/config.d/
pm-utils-0.99.4-no-nv-suspend.patch:
--- NEW FILE pm-utils-0.99.4-no-nv-suspend.patch ---
diff -up pm-utils-0.99.4/src/pm-is-supported.nv pm-utils-0.99.4/src/pm-is-supported
--- pm-utils-0.99.4/src/pm-is-supported.nv 2007-10-23 15:50:20.000000000 -0400
+++ pm-utils-0.99.4/src/pm-is-supported 2007-10-23 15:50:31.000000000 -0400
@@ -21,15 +21,46 @@ help_options() {
echo
}
+get_video_type() {
+ vendor=""
+ vendor=$(/sbin/lspci -mn|awk '{if ($2 ~ /^"0300"$/ ) {print $3;exit;}}')
+ vendor=$(eval echo $vendor)
+ [ -z "$vendor" ] && return 1
+ case "$vendor" in
+ 1002)
+ echo ATI
+ return 0
+ ;;
+ 10de)
+ echo nVidia
+ return 0
+ ;;
+ 8086)
+ echo Intel
+ return 0
+ ;;
+ *)
+ echo $vendor
+ return 0
+ ;;
+ esac
+}
+
export LC_COLLATE=C
ARG=${1#--}
[ -f /sys/power/state ] || exit 1
+. /usr/lib/pm-utils/functions
+
case "$ARG" in
suspend)
grep -q mem /sys/power/state || exit 1
+ videovendor=$(get_video_type)
+ if [ "$videovendor" = "nVidia" -a "$(grep "Driver.*nvidia" /etc/X11/xorg.conf)" = "" -a -z "$ALLOW_NV_SUSPEND" ]; then
+ exit 1
+ fi
;;
hibernate)
[ -f /sys/power/disk ] || exit 1
Index: pm-utils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/pm-utils/F-8/pm-utils.spec,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- pm-utils.spec 10 Oct 2007 05:50:17 -0000 1.82
+++ pm-utils.spec 23 Oct 2007 20:08:24 -0000 1.83
@@ -2,7 +2,7 @@
Summary: Power management utilities and scripts for Fedora
License: GPLv2
Version: 0.99.4
-Release: 5%{?dist}
+Release: 6%{?dist}
Group: System Environment/Base
URL: http://pm-utils.freedesktop.org
ExclusiveArch: i386 x86_64 ia64 ppc ppc64 %{?arm}
@@ -33,6 +33,7 @@
Patch1: pm-utils-0.99.4-manpage-typo.patch
Patch2: pm-utils-0.99.3-cfg.patch
Patch3: pm-utils-0.99.4-logfile.patch
+Patch4: pm-utils-0.99.4-no-nv-suspend.patch
%description
@@ -46,6 +47,7 @@
%patch1 -p1 -b .manpage-typo
%patch2 -p1 -b .cfg
%patch3 -p1 -b .logfile
+%patch4 -p1 -b .nonvsuspend
%build
@@ -119,6 +121,12 @@
%ghost %verify(not md5 size mtime) %{_localstatedir}/log/pm-suspend.log
%changelog
+* Tue Oct 23 2007 Jeremy Katz <katzj at redhat.com> - 0.99.4-6
+- Set suspend to not supported by default on machines with nVidia graphics
+ using the nv driver based on testing results. Can be overriden if you
+ know your machine works by setting ALLOW_NV_SUSPEND="yes" in a file
+ in /etc/pm/config.d/
+
* Wed Oct 10 2007 Till Maas <opensource till name> - 0.99.4-5
- Require vbetool only for x86 archs (RH #325741)
- add missing BR for docbook-utils
More information about the fedora-extras-commits
mailing list