-
Notifications
You must be signed in to change notification settings - Fork 61
/
setmyfancurve.sh
executable file
·105 lines (90 loc) · 4.09 KB
/
setmyfancurve.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/bin/bash
set -e
echo "MODEL"
dmidecode -s system-version
echo "BIOS"
dmidecode -s bios-version
echo ""
hwmondir=`find /sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/hwmon -mindepth 1 -name "hwmon*"`
echo "Using hwmon directory: ${hwmondir}"
# Disable (0) or Enable (1) switching to minifancurve when everything seems very cool
# echo 1 > ${hwmondir}/minifancurve
# 1. Fan: Set the fan speed (rmp) of the first fan for the first 6 points (first must be 0)
# If you want more, just continue
echo 0 > ${hwmondir}/pwm1_auto_point1_pwm
echo 1500 > ${hwmondir}/pwm1_auto_point2_pwm
echo 1900 > ${hwmondir}/pwm1_auto_point3_pwm
echo 2100 > ${hwmondir}/pwm1_auto_point4_pwm
echo 2200 > ${hwmondir}/pwm1_auto_point5_pwm
echo 2500 > ${hwmondir}/pwm1_auto_point6_pwm
# 2. Fan: Set the fan speed (rmp) of the first fan for the first 6 points; first must be 0)
# If you want more, just continue
echo 0 > ${hwmondir}/pwm2_auto_point1_pwm
echo 1600 > ${hwmondir}/pwm2_auto_point2_pwm
echo 2000 > ${hwmondir}/pwm2_auto_point3_pwm
echo 2200 > ${hwmondir}/pwm2_auto_point4_pwm
echo 2300 > ${hwmondir}/pwm2_auto_point5_pwm
echo 2500 > ${hwmondir}/pwm2_auto_point6_pwm
# CPU lower temperature for each level for the first 6 points; first must be 0
echo 0 > ${hwmondir}/pwm1_auto_point1_temp_hyst
echo 46 > ${hwmondir}/pwm1_auto_point2_temp_hyst
echo 52 > ${hwmondir}/pwm1_auto_point3_temp_hyst
echo 56 > ${hwmondir}/pwm1_auto_point4_temp_hyst
echo 58 > ${hwmondir}/pwm1_auto_point5_temp_hyst
echo 67 > ${hwmondir}/pwm1_auto_point6_temp_hyst
# CPU upper temperature for each level for the first 6 points;
echo 49 > ${hwmondir}/pwm1_auto_point1_temp
echo 55 > ${hwmondir}/pwm1_auto_point2_temp
echo 59 > ${hwmondir}/pwm1_auto_point3_temp
echo 63 > ${hwmondir}/pwm1_auto_point4_temp
echo 72 > ${hwmondir}/pwm1_auto_point5_temp
echo 77 > ${hwmondir}/pwm1_auto_point6_temp
# GPU lower temperature for each level for the first 6 points; first must be 0
echo 0 > ${hwmondir}/pwm2_auto_point1_temp_hyst
echo 56 > ${hwmondir}/pwm2_auto_point2_temp_hyst
echo 57 > ${hwmondir}/pwm2_auto_point3_temp_hyst
echo 58 > ${hwmondir}/pwm2_auto_point4_temp_hyst
echo 59 > ${hwmondir}/pwm2_auto_point5_temp_hyst
echo 60 > ${hwmondir}/pwm2_auto_point6_temp_hyst
# GPU upper temperature for each level for the first 6 points;
echo 59 > ${hwmondir}/pwm2_auto_point1_temp
echo 60 > ${hwmondir}/pwm2_auto_point2_temp
echo 61 > ${hwmondir}/pwm2_auto_point3_temp
echo 62 > ${hwmondir}/pwm2_auto_point4_temp
echo 63 > ${hwmondir}/pwm2_auto_point5_temp
echo 64 > ${hwmondir}/pwm2_auto_point6_temp
# IC lower temperature for each level for the first 6 points; first must be 0
echo 0 > ${hwmondir}/pwm3_auto_point1_temp_hyst
echo 56 > ${hwmondir}/pwm3_auto_point2_temp_hyst
echo 57 > ${hwmondir}/pwm3_auto_point3_temp_hyst
echo 58 > ${hwmondir}/pwm3_auto_point4_temp_hyst
echo 59 > ${hwmondir}/pwm3_auto_point5_temp_hyst
echo 60 > ${hwmondir}/pwm3_auto_point6_temp_hyst
# IC upper temperature for each level for the first 6 points;
echo 59 > ${hwmondir}/pwm3_auto_point1_temp
echo 60 > ${hwmondir}/pwm3_auto_point2_temp
echo 61 > ${hwmondir}/pwm3_auto_point3_temp
echo 62 > ${hwmondir}/pwm3_auto_point4_temp
echo 63 > ${hwmondir}/pwm3_auto_point5_temp
echo 64 > ${hwmondir}/pwm3_auto_point6_temp
# Acceleration time (larger = slower acceleartion) for each level for the first 6 points;
echo 5 > ${hwmondir}/pwm1_auto_point1_accel
echo 5 > ${hwmondir}/pwm1_auto_point2_accel
echo 5 > ${hwmondir}/pwm1_auto_point3_accel
echo 4 > ${hwmondir}/pwm1_auto_point4_accel
echo 2 > ${hwmondir}/pwm1_auto_point5_accel
echo 2 > ${hwmondir}/pwm1_auto_point6_accel
# Decleration time (larger = slower acceleartion) for each level for the first 6 points;
echo 4 > ${hwmondir}/pwm1_auto_point1_decel
echo 4 > ${hwmondir}/pwm1_auto_point2_decel
echo 4 > ${hwmondir}/pwm1_auto_point3_decel
echo 3 > ${hwmondir}/pwm1_auto_point4_decel
echo 2 > ${hwmondir}/pwm1_auto_point5_decel
echo 2 > ${hwmondir}/pwm1_auto_point6_decel
echo "Writing fancurve succesful!"
cat /sys/kernel/debug/legion/fancurve
echo "Writing fancurve succesful!"
echo "MODEL"
dmidecode -s system-version
echo "BIOS"
dmidecode -s bios-version