You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SB3: system total power limit at 25 watts, including display backlight #117
This is observed by using s-tui to continuously monitor the power consumption, core frequency and utilization while compiling the kernel.
Running a "cold start", the system power peaks at 40 watts, and then drops to 25 watts (could be a thermal trip point, or a "long time power limit"?), where the CPU package draws 16 watts, resulting in all-core frequency at 1.6GHz. Core temperature stabilizes at 71C.
Curiously, I lowered the screen brightness to 5%, and the CPU package starts to draw more power (20+ watts) and all-core frequency goes up to 2.0GHz. Core temperature stabilizes at 78C.
So this does not solely look like a thermal throttle -- but where does that 25W limit come from?
I don't have "performance mode" -- there's no /sys/bus/surface_aggregator/devices/01:03:01:00:01/perf_mode.
I did try all the profiles -- no difference it seems.
After some more experiment with a stress tool I find it's thermal-related and not bound to a sustained loaded time. The peak power could sustain for 2 seconds, 5 seconds and so on.
And the power limit kicks in when the core goes over 90C degrees.
I'll see if I can work out a thermald configuration for this model.
Reacted by Maximilian Luz and Lars Schellhas van Kisfeld
Have to reopen this because thermald/rapl is not effective against this problem. It's like a power budget, not thermal throttle -- the same 25 watts can well push the core to 80C (dimmed screen) but a thermal limit at 70C (like ~20 watts in total) already triggers the power limit!
btw, the fan is not as fast (loud) as in Windows. A profile configuration issue?
AFAIK the fan is entirely controlled by SAM, and the only influence we or Windows can have on that is the platform profile/performance mode. Try setting that to "best performance".
So, is there a way I can intercept SAM messages under windows?
The 25 W from the first post: at boot, the firmware sets the long-term psys limit to 25 W (40 W short term), and Linux leaves it there. psys limits platform power (here without the dGPU), not only the CPU. That is why the CPU got more with a darker display.
Now: my daemon (linux-surface-power) raises psys as Windows does (45 / 100 W with the Surface PSU), and the skin temperature (48 °C) becomes the limit. Measured on 15.11. (kernel 7.2.15, about 23 °C ambient), Best performance on AC:
30 min CPU load: 32.2 W system power, 17.7 W package, skin 47.9 °C (Windows: 31–32 W and about 17 W)
CPU and dGPU load: psys power reached 58 W (old limit 40 W), and the skin limit held
Kernel:#190 (sensors and fans, display and base) and #195 (EC power data, adapter rating) are in linux-surface since 7.3.5-1. They are not submitted to mainline yet.
Weak charger and GPU (my question of 10.11.): I will not add a policy of my own; the daemon follows the firmware configuration. This dGPU has no power limit on Linux (nvidia-smi -pl is refused), so a small helper caps the GPU clock instead: 49.1 W on average for a 50 W target (about 62 W without the cap).
Status: tested on my device only. It is not part of the linux-surface packages, and the device profile is not marked as tested yet. Work continues in linux-surface/linux-surface#2383.
Activity
qzed commentedon Feb 18, 2022
Could be some total system limit for sustained power imposed by firmware. Did you try changing the performance mode?
yatli commentedon Feb 18, 2022
I don't have "performance mode" -- there's no
/sys/bus/surface_aggregator/devices/01:03:01:00:01/perf_mode.I did try all the profiles -- no difference it seems.
qzed commentedon Feb 18, 2022
Yeah sorry, meant platform profiles (those and performance modes are the same).
yatli commentedon Feb 18, 2022
Edit: see below.
After some more experiment with a stress tool I find it's thermal-related and not bound to a sustained loaded time. The peak power could sustain for 2 seconds, 5 seconds and so on.And the power limit kicks in when the core goes over 90C degrees.I'll see if I can work out a thermald configuration for this model.
yatli commentedon Feb 18, 2022
Just feel this is funny that I should share the story with you guys :D
yatli commentedon Feb 18, 2022
Have to reopen this because thermald/rapl is not effective against this problem. It's like a power budget, not thermal throttle -- the same 25 watts can well push the core to 80C (dimmed screen) but a thermal limit at 70C (like ~20 watts in total) already triggers the power limit!
yatli commentedon Feb 18, 2022
btw, the fan is not as fast (loud) as in Windows. A profile configuration issue?
yatli commentedon Feb 18, 2022
So, is there a way I can intercept SAM messages under windows?
qzed commentedon Feb 18, 2022
AFAIK the fan is entirely controlled by SAM, and the only influence we or Windows can have on that is the platform profile/performance mode. Try setting that to "best performance".
Yes, although it requires a bit of configuration and the dumps are not easily readable (you're of course welcome to write a better parser for that). There's an overview on how to do that here: https://github.com/linux-surface/surface-aggregator-module/wiki/Development. A script for transforming the output into json files is here. Documentation on the commands we know so far is here. An overall documentation on the protocol can be found at https://www.kernel.org/doc/html/latest/driver-api/surface_aggregator/ssh.html.
yatli commentedon Feb 18, 2022
Here are the two related entries when I toggle between Better Performance vs. Best Performance:
{"ctrl": {"type": 128, "len": 12, "pad": 0, "seq": 42}, "cmd": {"type": 128, "tc": 3, "outgoing": 1, "incoming": 0, "iid": 0, "rqid_lo": 83, "rqid_hi": 3, "cid": 3}, "payload": [3, 0, 0, 0]} {"ctrl": {"type": 128, "len": 12, "pad": 0, "seq": 46}, "cmd": {"type": 128, "tc": 3, "outgoing": 1, "incoming": 0, "iid": 0, "rqid_lo": 87, "rqid_hi": 3, "cid": 3}, "payload": [4, 0, 0, 0]}...which matches the documented values.
le32 though?
yatli commentedon Feb 18, 2022
Just checked the module. le32 indeed no problem.
qzed commentedon Feb 18, 2022
Yeah, le32 is correct.
qzed commentedon Feb 18, 2022
All multi-byte values in the protocol are little-endian.
62 remaining items
hwmon: surface_temp: Add support for the KIP thermal sensors
platform/surface: aggregator_registry: Add base thermal sensors for S…
hwmon: surface_fan: Add support for the KIP fans
platform/surface: aggregator_registry: Add base fans for Surface Book 3
platform/surface: aggregator_registry: Add thermal sensors and fan sp…
hwmon: surface_temp: Add support for the KIP thermal sensors
platform/surface: aggregator_registry: Add base thermal sensors for S…
hwmon: surface_fan: Add support for the KIP fans
platform/surface: aggregator_registry: Add base fans for Surface Book 3
larsschellhas commentedon Nov 27, 2026
Update 27.11.2026 (Surface Book 3 15")
The 25 W from the first post: at boot, the firmware sets the long-term psys limit to 25 W (40 W short term), and Linux leaves it there. psys limits platform power (here without the dGPU), not only the CPU. That is why the CPU got more with a darker display.
Now: my daemon (linux-surface-power) raises psys as Windows does (45 / 100 W with the Surface PSU), and the skin temperature (48 °C) becomes the limit. Measured on 15.11. (kernel 7.2.15, about 23 °C ambient), Best performance on AC:
Kernel: #190 (sensors and fans, display and base) and #195 (EC power data, adapter rating) are in linux-surface since 7.3.5-1. They are not submitted to mainline yet.
Weak charger and GPU (my question of 10.11.): I will not add a policy of my own; the daemon follows the firmware configuration. This dGPU has no power limit on Linux (
nvidia-smi -plis refused), so a small helper caps the GPU clock instead: 49.1 W on average for a 50 W target (about 62 W without the cap).Status: tested on my device only. It is not part of the linux-surface packages, and the device profile is not marked as tested yet. Work continues in linux-surface/linux-surface#2383.
platform/surface: aggregator_registry: Add thermal sensors and fan sp…
hwmon: surface_temp: Add support for the KIP thermal sensors
platform/surface: aggregator_registry: Add base thermal sensors for S…
hwmon: surface_fan: Add support for the KIP fans
platform/surface: aggregator_registry: Add base fans for Surface Book 3