Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 2bf1553

Browse files
committed
Fix bug in powertools.sh that broke all intel settings and smt/boost toggles. Adjust TDP's based on throttling tests.wq
1 parent ff4d524 commit 2bf1553

File tree

3 files changed

+23
-8
lines changed

3 files changed

+23
-8
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ CRANKSHAFT_DATA_PATH ?= .var/app/space.crankshaft.Crankshaft/data/crankshaft
1515

1616
# SSH Configuration
1717
SSH_USER ?= gamer
18-
SSH_HOST ?= 192.168.0.176
18+
SSH_HOST ?= 192.168.0.38
1919
SSH_MOUNT_PATH ?= /tmp/remote
2020
SSH_CRANKSHAFT_DATA_PATH ?= /home/$(SSH_USER)/$(CRANKSHAFT_DATA_PATH)
2121

bin/powertools.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ elif [[ $1 == "cpuBoostOn" ]]; then
3535
cpuBoostOn
3636
elif [[ $1 == "cpuBoostOff" ]]; then
3737
cpuBoostOff
38-
elif [[ $1 == "constraint_0_power_limit_uw"]]; then
38+
elif [[ $1 == "constraint_0_power_limit_uw" ]]; then
3939
intelSetTDPLong
40-
elif [[ $1 == "constraint_1_power_limit_uw"]]; then
40+
elif [[ $1 == "constraint_1_power_limit_uw" ]]; then
4141
intelSetTDPShort
42-
elif [[ $1 == "constraint_2_power_limit_uw"]]; then
42+
elif [[ $1 == "constraint_2_power_limit_uw" ]]; then
4343
intelSetTDPPeak
4444
fi
4545

src/util.ts

+19-4
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,17 @@ export class PowerTools {
6868
async getTDPRange(): Promise<TDPRange> {
6969
const cpuid = await this.getCPUID();
7070
switch (cpuid) {
71+
case 'AMD Ryzen 5 5560U with Radeon Graphics': {
72+
this.tdp_range.tdp_min_val = 2;
73+
this.tdp_range.tdp_max_val = 15;
74+
this.tdp_range.tdp_default_val = 6;
75+
this.tdp_range.tdp_max_boost = 2;
76+
break;
77+
}
78+
7179
case 'AMD Ryzen 5 4500U with Radeon Graphics':
7280
case 'AMD Ryzen 7 5700U with Radeon Graphics':
81+
case 'AMD Ryzen 7 5800U with Radeon Graphics':
7382
case '11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz':
7483
case '11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz':
7584
case '11th Gen Intel(R) Core(TM) i7-1195G7 @ 2.90GHz': {
@@ -79,16 +88,22 @@ export class PowerTools {
7988
this.tdp_range.tdp_max_boost = 2;
8089
break;
8190
}
82-
case 'AMD Ryzen 7 4800U with Radeon Graphics':
83-
case 'AMD Ryzen 7 5800U with Radeon Graphics':
91+
case 'AMD Ryzen 7 4800U with Radeon Graphics': {
92+
this.tdp_range.tdp_min_val = 5;
93+
this.tdp_range.tdp_max_val = 30;
94+
this.tdp_range.tdp_default_val = 15;
95+
this.tdp_range.tdp_max_boost = 4;
96+
break;
97+
}
8498
case 'AMD Ryzen 7 5825U with Radeon Graphics': {
8599
this.tdp_range.tdp_min_val = 5;
86-
this.tdp_range.tdp_max_val = 33;
100+
this.tdp_range.tdp_max_val = 32;
87101
this.tdp_range.tdp_default_val = 15;
88-
this.tdp_range.tdp_max_boost = 5;
102+
this.tdp_range.tdp_max_boost = 6;
89103
break;
90104
}
91105
}
106+
}
92107
return this.tdp_range;
93108
}
94109

0 commit comments

Comments
 (0)