Blame

102248 deseven 2025-07-08 21:12:40 1
# Power Mode and Fan Control
2
3
### Problem
7d5b7b deseven 2025-11-10 13:35:32 4
No fan and power mode control is available is available for Linux or Windows on Sixunited's AXB35 board.
102248 deseven 2025-07-08 21:12:40 5
64aadb deseven 2025-11-10 13:29:49 6
### Solution for Linux
102248 deseven 2025-07-08 21:12:40 7
There is a [ec-su_axb35-linux kernel module](https://github.com/cmetz/ec-su_axb35-linux) written by Christoph Metz.
8
9
It allows you to:
10
- read current fan speeds and modes
11
- switch modes of each of the three available fans
12
- control fan speed in `fixed` mode
13
- control fan speed with custom curves in `curve` mode
14
- read current power mode
15
- change current power mode
16
- read current APU temperature
17
18
#### Generic Installation
caf28c deseven 2025-07-11 20:29:16 19
1. Install module building dependencies (depends on your distro, on debian/ubuntu install `build-essential` and `linux-headers-$(uname -r)` packages).
102248 deseven 2025-07-08 21:12:40 20
2. Clone the repo with `git clone https://github.com/cmetz/ec-su_axb35-linux.git`.
caf28c deseven 2025-07-11 20:29:16 21
3. Build and install the module with `cd ec-su_axb35-linux && sudo make install`.
102248 deseven 2025-07-08 21:12:40 22
4. Try loading the module with `modprobe ec_su_axb35` and check your `dmesg` afterwards. You should see the `Sixunited AXB35-02 EC driver loaded` message.
23
5. Run `scripts/info.sh` and check that all information is there.
24
6. Run `scripts/test_fan_mode_fixed.sh`, it should test your fans on all 6 fixed levels.
caf28c deseven 2025-07-11 20:29:16 25
7. If everything is good, you can make the module automatically load on system boot with `sudo echo ec_su_axb35 >> /etc/modules`. If it says "permission denied", drop into root console with `su` or `sudo su -` and try again.
102248 deseven 2025-07-08 21:12:40 26
27
#### Usage
28
Reading and writing all of the parameters happens through sysfs with `/sys/class/ec_su_axb35` path. You can find detailed information in [the repo's readme file](https://github.com/cmetz/ec-su_axb35-linux/blob/main/README.md).
29
30
Some examples:
31
- `cat /sys/class/ec_su_axb35/fan2/rpm` to get current rpm of fan2
32
- `echo fixed > /sys/class/ec_su_axb35/fan3/mode && echo 2 > /sys/class/ec_su_axb35/fan3/level` to switch fan3 to fixed mode and set speed to level 2
33
- `echo balanced > /sys/class/ec_su_axb35/apu/power_mode` to set power mode to balanced (85W)
34
6a2028 deseven 2025-07-08 21:13:39 35
You can also call `su_axb35_monitor` anywhere to monitor all available values in realtime:
36
![su_axb35_monitor](./su_axb35_monitor.png)
102248 deseven 2025-07-08 21:12:40 37
38
To apply specific settings at system startup, place them in your `rc.local` file or utilize any other methods for executing commands during boot, such as creating a systemd unit. In the future, these parameters will also be configurable through module options.
39
40
#### Custom Curves
41
The custom curves define temperature thresholds for fan power levels:
42
- **Ramp-up curve** (`/sys/class/ec_su_axb35/fanX/rampup_curve`): temperature points where fan increases to the next level
259b3c deseven 2025-07-09 10:35:12 43
- **Ramp-down curve** (`/sys/class/ec_su_axb35/fanX/rampdown_curve`): temperature points where fan decreases to the previous level
102248 deseven 2025-07-08 21:12:40 44
45
For example, with these settings:
46
- `rampup_curve = 60,70,83,95,97`
47
- `rampdown_curve = 40,50,80,94,96`
48
49
**When CPU is heating up:**
50
- Below 60°: Fan at level 0 (minimum)
51
- At 60°: Increases to level 1
52
- At 70°: Increases to level 2
53
- At 83°: Increases to level 3
54
- At 95°: Increases to level 4
55
- At 97°: Increases to level 5 (maximum)
56
57
**When CPU is cooling down:**
58
- Above 96°: Fan stays at level 5
59
- Below 96°: Decreases to level 4
60
- Below 94°: Decreases to level 3
61
- Below 80°: Decreases to level 2
62
- Below 50°: Decreases to level 1
63
- Below 40°: Decreases to level 0
64
65
This creates a buffer at each level that prevents the fan from rapidly switching between speeds when temperature fluctuates around threshold values.
66
67
Curves are being applied only when `curve` mode is set on a specific fan, each fan has their own curves.
68
64aadb deseven 2025-11-10 13:29:49 69
70
### Solution for Windows
71
Based on the research made for the Linux module [a Windows implementation has been written as well](https://github.com/deseven/ec-su_axb35-win). The only major limitation is the need to disable Secure Boot, everything else should be pretty simple, just follow the readme in the repo.
72
73
bb7af8 deseven 2025-07-10 15:03:48 74
### Fine-tuning Power Limits
64aadb deseven 2025-11-10 13:29:49 75
If you want more gradual control over power modes, there's a [RyzenAdj](https://github.com/FlyGoat/RyzenAdj) utility (or [UXTU](https://amdaputuningutility.com) for Windows).
bb7af8 deseven 2025-07-10 15:03:48 76
77
Main 3 parameters we are interested in are:
78
- `STAPM LIMIT` (sustained power draw)
79
- `PPT LIMIT FAST` (boost power draw)
80
- `PPT LIMIT SLOW` (average power draw)
81
82
Default values on all 3 selectable power modes (use `ryzenadj --info` to read them):
83
84
| Power Mode | STAPM LIMIT | PPT LIMIT FAST | PPT LIMIT SLOW |
85
| ----------- | ----------- | -------------- | -------------- |
86
| Quiet | 54.0 | 100.0 | 54.0 |
87
| Balanced | 85.0 | 120.0 | 120.0 |
88
| Performance | 120.0 | 140.0 | 120.0 |
89
90
Example on setting the power limit to static 100W with no boost:
91
`ryzenadj --stapm-limit=100000 --fast-limit=100000 --slow-limit=100000`
92
93
**Note that changing the power mode via the EC controller (using `ec-su_axb35-linux` or otherwise) resets these values to their defaults.**
94
102248 deseven 2025-07-08 21:12:40 95
### Relevant Pages
bb7af8 deseven 2025-07-10 15:03:48 96
- [[Guides/Hardware-Monitoring]]
97
- [[Guides/Power-Modes-and-Performance]]