Gentoo Archives: gentoo-commits

From: "Jeffrey Gardner (je_fro)" <je_fro@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-drivers/ati-drivers/files/8.443.1: ati-powermode-opt-path-2.patch
Date: Mon, 24 Dec 2007 05:03:56
Message-Id: E1J6fTf-0002Zw-9J@stork.gentoo.org
1 je_fro 07/12/24 05:03:47
2
3 Added: ati-powermode-opt-path-2.patch
4 Log:
5 Fixup wrt bug #202906. Thanks to Jory Pratt and Bernd Steinhauser.
6 (Portage version: 2.1.4_rc11)
7
8 Revision Changes Path
9 1.1 x11-drivers/ati-drivers/files/8.443.1/ati-powermode-opt-path-2.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/files/8.443.1/ati-powermode-opt-path-2.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/files/8.443.1/ati-powermode-opt-path-2.patch?rev=1.1&content-type=text/plain
13
14 Index: ati-powermode-opt-path-2.patch
15 ===================================================================
16 --- ati-powermode.sh-orig 2007-12-23 22:48:55.873089378 -0600
17 +++ ati-powermode.sh 2007-12-23 22:49:59.246421379 -0600
18 @@ -4,6 +4,8 @@
19 # Control script for ACPI lid state and AC adapter state
20 #
21
22 +aticonfig='/opt/bin/aticonfig'
23 +
24 getXuser() {
25 user=`who| grep -m1 ":$displaynum " | awk '{print $1}'`
26 if [ x"$user" = x"" ]; then
27 @@ -47,7 +49,7 @@
28 done
29
30 #If PPLIB is enabled
31 -su $user -c '/usr/bin/aticonfig --pplib-cmd="get version"' | grep PPLIB
32 +su $user -c '$aticonfig --pplib-cmd="get version"' | grep PPLIB
33 if [ $? = 0 ]; then
34 echo "Has PPLIB"
35 has_pplib=1
36 @@ -61,15 +63,15 @@
37 if [ ${lid_closed} -eq 1 -o ${on_dc} -eq 1 ]; then
38 echo "Low power"
39 if [ ${has_pplib} -eq 1 ]; then
40 - su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc dc"'
41 + su $user -c '$aticonfig --pplib-cmd="notify psrc dc"'
42 else
43 - su $user -c "/usr/bin/aticonfig --set-powerstate=1 --effective=now"
44 + su $user -c "$aticonfig --set-powerstate=1"
45 fi
46 else
47 echo "high power"
48 if [ ${has_pplib} -eq 1 ]; then
49 - su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc ac"'
50 + su $user -c '$aticonfig --pplib-cmd="notify psrc ac"'
51 else
52 - su $user -c "/usr/bin/aticonfig --set-powerstate=3 --effective=now"
53 + su $user -c "$aticonfig --set-powerstate=$($aticonfig --lsp | grep 'default state' | cut -c 3)"
54 fi
55 fi
56
57
58
59 --
60 gentoo-commits@g.o mailing list