-
Notifications
You must be signed in to change notification settings - Fork 1
/
conso.sh
42 lines (34 loc) · 862 Bytes
/
conso.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# Script done by LoulouCrypto
# https://www.louloucrypto.fr
echo -e "Launching Radeon Power Optimisations at startup"
sleep 1
cat >/usr/local/bin/conso.sh<<'EOF'
#!/bin/bash
# Script done by LoulouCrypto
# https://www.louloucrypto.fr
/hive/bin/./motd | grep Radeon | awk -F "[ ]" '{print "echo 0 > /sys/bus/pci/devices/0000:"$3 "/pp_dpm_mclk" }'| bash;
EOF
sleep 1
chmod +x /usr/local/bin/conso.sh
sleep 1
cat >/etc/systemd/system/amdconsotweak.service<<'EOF'
[Unit]
Description=Start amdconsotweak on boot
StartLimitIntervalSec=0
[Service]
Type=idle
User=root
ExecStartPre=/bin/sleep 60
ExecStart=/usr/local/bin/conso.sh
[Install]
WantedBy=multi-user.target
EOF
sleep 1
systemctl daemon-reload
sleep 1
systemctl enable amdconsotweak.service
sleep 1
systemctl start amdconsotweak.service
sleep 1
echo -e "Radeon Power Optimisations Done"