summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-drivers/ati-drivers/files')
-rw-r--r--x11-drivers/ati-drivers/files/ati-powermode-opt-path-1.patch33
-rw-r--r--x11-drivers/ati-drivers/files/ati-powermode-opt-path.patch22
2 files changed, 33 insertions, 22 deletions
diff --git a/x11-drivers/ati-drivers/files/ati-powermode-opt-path-1.patch b/x11-drivers/ati-drivers/files/ati-powermode-opt-path-1.patch
new file mode 100644
index 0000000..88b89a8
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-powermode-opt-path-1.patch
@@ -0,0 +1,33 @@
+diff -ur common.orig/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh
+--- common.orig/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh 2006-07-28 04:22:36.000000000 +0100
++++ common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh 2006-08-04 12:19:42.000000000 +0100
+@@ -17,6 +17,10 @@
+ fi
+ }
+
++aticonfig='/opt/bin/aticonfig'
++
++# default high power state
++default_state=`$aticonfig --lsp | grep 'default state' | cut -c 3`
+
+ grep -q closed /proc/acpi/button/lid/*/state
+ if [ $? = 0 ]; then
+@@ -46,7 +50,7 @@
+ getXuser;
+ if [ x"$XAUTHORITY" != x"" ]; then
+ export DISPLAY=":$displaynum"
+- su $user -c "/usr/X11R6/bin/aticonfig --set-powerstate=1 --effective=now"
++ su $user -c "$aticonfig --set-powerstate=1 --effective=now"
+ fi
+ done
+ else
+@@ -56,7 +60,7 @@
+ getXuser;
+ if [ x"$XAUTHORITY" != x"" ]; then
+ export DISPLAY=":$displaynum"
+- su $user -c "/usr/X11R6/bin/aticonfig --set-powerstate=3 --effective=now"
++ su $user -c "$aticonfig --set-powerstate=$default_state --effective=now"
+ fi
+ done
+ fi
+
diff --git a/x11-drivers/ati-drivers/files/ati-powermode-opt-path.patch b/x11-drivers/ati-drivers/files/ati-powermode-opt-path.patch
deleted file mode 100644
index fb6119e..0000000
--- a/x11-drivers/ati-drivers/files/ati-powermode-opt-path.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-=== modified file 'common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh'
---- common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh 2007-02-09 12:25:40 +0000
-+++ common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh 2007-02-09 12:28:54 +0000
-@@ -46,7 +46,7 @@
- getXuser;
- if [ x"$XAUTHORITY" != x"" ]; then
- export DISPLAY=":$displaynum"
-- su $user -c "/usr/X11R6/bin/aticonfig --set-powerstate=1 --effective=now"
-+ su $user -c "/opt/bin/aticonfig --set-powerstate=1 --effective=now"
- fi
- done
- else
-@@ -56,7 +56,7 @@
- getXuser;
- if [ x"$XAUTHORITY" != x"" ]; then
- export DISPLAY=":$displaynum"
-- su $user -c "/usr/X11R6/bin/aticonfig --set-powerstate=3 --effective=now"
-+ su $user -c "/opt/bin/aticonfig --set-powerstate=3 --effective=now"
- fi
- done
- fi
-