View difference between Paste ID: T6nwSa9n and PbtsYyq5
SHOW: | | - or go back to the newest paste.
1
#!/bin/sh
2
#
3
# ATI open-source driver power management script created by Potoc.
4
#
5
#
6
# A "default" érték az alapértelmezett teljesítmény-állapot profilon hajtja a videokártyát. Ez az alap viselkedés.
7
# Az "auto" érték a "mid" és a "high" értékben definiált szinten tartja a kártyát, attól függően, hogy akkuról, vagy hálózatról megy-e a gép.
8
# A "low" érték kényszeríti a GPU-t az alacsony fogyasztású profil használatára. Néhány laptopon hibát okozhat, ezért sem használja az "auto" mód.
9
# A "low" érték vissza tudja szorítani a fogyasztást és a ventillátor sebességét, de nem lesz akkora a videoteljesítmény.
10
# A "mid" érték az arany középutat választja, közepes fogyasztást és teljesítményt ígér. Ha a képernyő kikapcsol, átvált "low" üzemmódba.
11
# A "high" érték a legmagasabb órajelen pörgeti a kártyát, terheléstől függetlenül. Nagy hangja lesz a videokártyának, nagy lesz a fogyasztás, cserébe a # legnagyobb teljesítményt nyújtja. Átvált "low" üzemmódba a képernyő kikapcsolásakor.
12
#
13
# A "dynpm" érték dinamikusan változtatja a kártya órajelét, tehát nagy órajelen fog menni a kártya a nagy GPU teljesítményt igénylő alkalmazások
14
# futásakor, kis órajelen amikor nincs terhelve. Ha ez van használatban, akkor zavaróan villoghat a kijelző a GPU órajel változtásakor, szóval más
15
# profilt kell használni ha ilyen jellegű probléma adódik. Főleg Compiz Fusion-t futtató embereknek szól!
16
#
17
# "default" uses the default clocks and does not change the power state. This is the default behavior.
18
# "auto" selects between "mid" and "high" power states based on the whether the system is on battery power or not. The "low" power state are selected
19
#  when # the monitors are in the dpms off state.
20
# "low" forces the gpu to be in the low power state all the time. Note that "low" can cause display problems on some laptops; this is why auto
21
#  does not use "low" when displays are active. (Can reduce power consumption and fan speed.)
22
# "mid" forces the gpu to be in the "mid" power state all the time. The "low" power state is selected when the monitors are in the dpms off state.
23
# "high" forces the gpu to be in the "high" power state all the time. The "low" power state is selected when the monitors are in the dpms off state.
24
# (When the high value is in use, the fan will be noisy, there is more power consumption, but we have better performance)
25
# 
26
#
27
# The "dynpm" method dynamically changes the clocks based on the number of pending fences, so performance is ramped up when running GPU intensive apps,  
28
# and ramped down when the GPU is idle. The reclocking is attemped during vertical blanking periods, but due to the timing of the reclocking functions, 
29
# doesn't not always complete in the blanking period, which can lead to flicker in the display. Due to this, dynpm only works when a single head is 
30
# active. 
31
# Dynpm can cause display flickering especially on Compiz Fusion! Use the others instead if you experience problems!
32
#
33
# >>>>>>>Copied from X.org Wiki<<<<<<<<
34
35
[ -n "$1" ] || { 
36
echo "Usage:
37
Run it as root!
38
  
39
sudo ./atiscript.sh [parameter]
40
  
41
  Usable parameters:
42
43
    --low     : low power consumption
44
    --mid     : mid power consumption
45
    --high    : high performance
46
    --default : runs card at default power state
47-
    --auto    : vary between "mid" and "high" 
47+
    --auto    : vary between mid and high 
48
    --dynamic : frequency depends on load
49
    --help    : display full help
50
      ";
51
return ;}
52
53
54
case "$1" in
55
--low)
56
57
echo profile > /sys/class/drm/card0/device/power_method
58
echo low > /sys/class/drm/card0/device/power_profile
59
60
  ;;
61
62
--mid)
63
64
echo profile > /sys/class/drm/card0/device/power_method
65
echo mid > /sys/class/drm/card0/device/power_profile
66
67
  ;;
68
69
--high)
70
71
echo profile > /sys/class/drm/card0/device/power_method
72
echo high > /sys/class/drm/card0/device/power_profile
73
74
  ;;
75
76
--default)
77
78
echo profile > /sys/class/drm/card0/device/power_method
79
echo default > /sys/class/drm/card0/device/power_profile
80
81
;;
82
83
--auto)
84
85
echo profile > /sys/class/drm/card0/device/power_method
86
echo auto > /sys/class/drm/card0/device/power_profile
87
88
;;
89
90
--dynamic)
91
92
echo dynpm > /sys/class/drm/card0/device/power_method
93
94
;;
95
96
--help)
97
echo ' '
98
echo '"default" uses the default clocks and does not change the power state. This is the default behavior.'
99
echo '"auto" selects between "mid" and "high" power states based on the whether the system is on battery power or not.' 
100
echo 'The "low" power state are selected when echo ''the monitors are in the dpms off state.'
101
echo '"low" forces the gpu to be in the low power state all the time. Note that "low" can cause display problems on some laptops; this is why auto'
102
echo 'does not use "low" when displays are active. (Can reduce power consumption and fan speed.)'
103
echo '"mid" forces the gpu to be in the "mid" power state all the time. The "low" power state is selected when the monitors are in the dpms off state.'
104
echo 'high" forces the gpu to be in the "high" power state all the time. The "low" power state is selected when the monitors are in the dpms off state.'
105
echo '(When the high value is in use, the fan will be noisy, there is more power consumption, but we have better performance)' 
106
echo ' '
107
echo ' '
108
echo 'The "dynpm" method dynamically changes the clocks based on the number of pending fences,' 
109
echo 'so performance is ramped up when running GPU intensive apps,'
110
echo 'and ramped down when the GPU is idle. The reclocking is attemped during vertical blanking' 
111
echo 'periods, but due to the timing of the reclocking functions,' 
112
echo 'doesnt not always complete in the blanking period, which can lead to flicker in the display.'
113
echo 'Due to this, dynpm only works when a single head is active.' 
114
echo 'Dynpm can cause display flickering especially on Compiz Fusion! Use the others instead if'
115
echo 'you experience problems!'
116
echo ' '
117
echo ' '
118
echo '>>>>>>>Copied from X.org Wiki<<<<<<<<'
119
120
esac
121
122
exit 0