From e18e9c2935760575351901a76e70e036ef8190fc Mon Sep 17 00:00:00 2001 From: Lars Schellhas van Kisfeld Date: Wed, 2 Dec 2026 12:51:38 +0100 Subject: [PATCH 1/3] platform/surface: aggregator_registry: Add thermal sensors and fan speed for Surface Pro 8 The Surface Pro 8 EC provides the same thermal sensor (TMP, function 2) and fan speed (FAN, instance 1) interfaces as the newer devices that already list them, but the Surface Pro 8 node group does not include them. Add both nodes so that surface_temp and surface_fan can bind. The group is used only for the ACPI ID MSHW0263, so no other device gets the nodes. The platform profile node stays as it is, without the has_fan property. Evidence: a Surface Pro 8 (SKU Surface_Pro_8_1983, i7-1185G7, with the Wi-Fi variant of the Windows power management configuration, kernel 7.3.6-1-surface) answered the read requests that the two drivers send. They were sent through the SSAM debug device because the kernel had no nodes for the device, in two runs a quarter of an hour apart: - TMP 0x04 (available sensors), SAM target: mask 0x07ff, i.e. the sensors 1 to 11. - TMP 0x0e (name) for each of them: I_RTS1 to I_RTS8 and I_VTS1 to I_VTS3, in the layout that surface_temp expects. - TMP 0x01 (temperature) for each of them: 31 to 39 degrees C at idle. During a CPU load of 150 s the readings rose (sensor 1 from 36 to 56 degrees C) and fell again afterwards. - FAN 0x01, instance 1: 0 rpm at idle, about 3000 rpm under the same load. Not tested: no device has run a kernel with this patch, so the binding of surface_temp and surface_fan to the nodes was not observed on a Surface Pro 8. The LTE model is probably served by the same group, so it would get the nodes too. Neither its ACPI ID nor its EC was measured. The Windows driver package has one SAM firmware image for the Wi-Fi and the LTE model, which suggests the same interfaces, but that is not a measurement. The analysis, the patch and this changelog were prepared with the help of an AI coding assistant (Claude, Anthropic). The evidence is the tester's report; I did not test on a Surface Pro 8 myself. I reviewed the change. Link: https://github.com/larsschellhas/linux-surface-power/issues/4#issuecomment-7235148141 Link: https://github.com/larsschellhas/linux-surface-power/issues/4#issuecomment-7235296370 Assisted-by: LLM checkpatch Signed-off-by: Lars Schellhas van Kisfeld --- drivers/platform/surface/surface_aggregator_registry.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c index e0c20a4355a8..e11045b3af2b 100644 --- a/drivers/platform/surface/surface_aggregator_registry.c +++ b/drivers/platform/surface/surface_aggregator_registry.c @@ -427,6 +427,8 @@ static const struct software_node *ssam_node_group_sp8[] = { &ssam_node_bat_ac_dptf, &ssam_node_bat_main_dptf, &ssam_node_tmp_perf_profile, + &ssam_node_tmp_sensors, + &ssam_node_fan_speed, &ssam_node_kip_tablet_switch, &ssam_node_hid_kip_keyboard, &ssam_node_hid_kip_penstash, From 61f998786a023217a53ff8d2fb4ba297ed9c2366 Mon Sep 17 00:00:00 2001 From: Lars Schellhas van Kisfeld Date: Wed, 2 Dec 2026 12:52:37 +0100 Subject: [PATCH 2/3] platform/surface: aggregator_registry: Add thermal sensors and fan speed for Surface Laptop 4 (Intel) The Surface Laptop 4 (Intel) EC provides the same thermal sensor (TMP, function 2) and fan speed (FAN, instance 1) interfaces as the newer devices that already list them, but its node group does not include them. Add both nodes so that surface_temp and surface_fan can bind. The Intel models use the ACPI ID MSHW0250, which shared ssam_node_group_sl3_dptf with MSHW0110 (Surface Laptop 3 and 4, 15", AMD). Give MSHW0250 a group of its own: it has every node of ssam_node_group_sl3_dptf plus the two new ones. MSHW0110 keeps its group unchanged. Update the comments of the group and of the ID list. The Surface Laptop 4 models and where they end up: 13.5", Intel MSHW0250 new group ID: registry entry since 2021, and the Windows driver package (below) 15", Intel MSHW0250 new group ID and readings measured (below) 15", AMD MSHW0110 unchanged ID: registry entry since 2021 13.5", AMD not known no registry entry names it No model loses a node: a model on MSHW0250 gains the two nodes, a model on MSHW0110 keeps what it had. The 15" Intel model was not named in the comments before; it reports MSHW0250, so the ID list now names it. The ACPI ID of the 13.5" AMD model is not known to me. If it is MSHW0110, nothing changes for it. If it is MSHW0250, it gets the two nodes without a measurement. The Windows driver package for the Surface Laptop 4 with Intel processor (26.091.11858.0) carries the power management configuration for the 13.5" and the 15" model. Its integration driver binds to ACPI\MSHW0250, and to no other ID. Evidence: a Surface Laptop 4 (15", Intel, SKU Surface_Laptop_4_1978:1979, i7-1185G7, ACPI ID MSHW0250, kernel 7.2.15-4-omarchy, which has no nodes for the device) answered the read requests that the two drivers send. They were sent through the SSAM debug device: - TMP 0x04 (available sensors), SAM target: mask 0x07f6, i.e. the sensors 2, 3 and 5 to 11. surface_temp makes only the sensors in the mask visible. - TMP 0x0e (name) for each of them: I_RTS2, I_RTS3, I_RTS5 to I_RTS8 and I_VTS1 to I_VTS3, in the layout that surface_temp expects. - TMP 0x01 (temperature) for each of them: 31 to 47 degrees C when the run started. During a CPU load of 150 s the readings rose (sensor 2 from 47 to 60 degrees C). - FAN 0x01, instance 1: about 4900 rpm when the run started and up to about 7900 rpm under the load. Not tested: no device has run a kernel with this patch, so the binding of surface_temp and surface_fan to the nodes was not observed. Only the 15" Intel model was measured. The driver package has one SAM firmware image for both sizes, which suggests the same interfaces on the 13.5" model, but that is not a measurement. The analysis, the patch and this changelog were prepared with the help of an AI coding assistant (Claude, Anthropic). The evidence is the tester's report; I did not test on a Surface Laptop 4 myself. I reviewed the change. Link: https://github.com/larsschellhas/linux-surface-power/issues/6 Assisted-by: LLM checkpatch Signed-off-by: Lars Schellhas van Kisfeld --- .../surface/surface_aggregator_registry.c | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c index e11045b3af2b..e11ff8d625ea 100644 --- a/drivers/platform/surface/surface_aggregator_registry.c +++ b/drivers/platform/surface/surface_aggregator_registry.c @@ -308,7 +308,7 @@ static const struct software_node *ssam_node_group_sl3[] = { NULL, }; -/* Devices for Surface Laptop 3 (15", AMD) and 4 (13", Intel; 15", AMD), with DPTF. */ +/* Devices for Surface Laptop 3 (15", AMD) and 4 (15", AMD), with DPTF. */ static const struct software_node *ssam_node_group_sl3_dptf[] = { &ssam_node_root, &ssam_node_bat_ac_dptf, @@ -320,6 +320,20 @@ static const struct software_node *ssam_node_group_sl3_dptf[] = { NULL, }; +/* Devices for Surface Laptop 4 (13", 15", Intel). */ +static const struct software_node *ssam_node_group_sl4[] = { + &ssam_node_root, + &ssam_node_bat_ac_dptf, + &ssam_node_bat_main_dptf, + &ssam_node_tmp_perf_profile, + &ssam_node_tmp_sensors, + &ssam_node_fan_speed, + &ssam_node_hid_main_keyboard, + &ssam_node_hid_main_touchpad, + &ssam_node_hid_main_iid5, + NULL, +}; + /* Devices for Surface Laptop 5. */ static const struct software_node *ssam_node_group_sl5[] = { &ssam_node_root, @@ -570,8 +584,8 @@ static const struct acpi_device_id ssam_platform_hub_acpi_match[] = { /* Surface Laptop 3 (15", AMD) and 4 (15", AMD) */ { "MSHW0110", (unsigned long)ssam_node_group_sl3_dptf }, - /* Surface Laptop 4 (13", Intel) */ - { "MSHW0250", (unsigned long)ssam_node_group_sl3_dptf }, + /* Surface Laptop 4 (13", 15", Intel) */ + { "MSHW0250", (unsigned long)ssam_node_group_sl4 }, /* Surface Laptop 5 */ { "MSHW0350", (unsigned long)ssam_node_group_sl5 }, From eeaa24dcfc4fd6d2b95e1de12673347da94d98a4 Mon Sep 17 00:00:00 2001 From: Lars Schellhas van Kisfeld Date: Wed, 2 Dec 2026 12:53:15 +0100 Subject: [PATCH 3/3] platform/surface: aggregator_registry: Add thermal sensors and fan speed for Surface Pro 7+ The Surface Pro 7+ EC provides the same thermal sensor (TMP, function 2) and fan speed (FAN, instance 1) interfaces as the newer devices that already list them, but the Surface Pro 7+ node group does not include them. Add both nodes so that surface_temp and surface_fan can bind. The group is used only for the ACPI ID MSHW0119, so no other device gets the nodes. The platform profile node stays as it is, without the has_fan property. Evidence: a Surface Pro 7+ (SKU Surface_Pro_7+_1960, i7-1165G7, ACPI ID MSHW0119) answered the read requests that the two drivers send. They were sent through the SSAM debug device because the kernel had no nodes for the device: - TMP 0x04 (available sensors), SAM target: mask 0x0fff, i.e. the sensors 1 to 12. surface_temp supports up to 16. - TMP 0x0e (name) for each of them: I_RTS1 to I_RTS8 and I_VTS1 to I_VTS4, in the layout that surface_temp expects. - TMP 0x01 (temperature) for each of them: 28.5 to 38.4 degrees C at idle (kernel 7.3.6-arch1-1-surface). - FAN 0x01, instance 1: 0 rpm at idle in the same run, and 3614 rpm in an earlier run on the same device (kernel 7.3.4-arch1-2-surface). Not tested: the temperatures were read once, at idle, without a load run, so it was not observed that they follow the load. No device has run a kernel with this patch, so the binding of surface_temp and surface_fan to the nodes was not observed. Only this one device, a model with a fan, was measured. Whether Surface Pro 7+ models without a fan exist under the same ACPI ID, and what the fan request returns there, is not known. If such a model does not answer, reading fan1_input fails there; the node can then be restricted. The analysis, the patch and this changelog were prepared with the help of an AI coding assistant (Claude, Anthropic). The evidence is the tester's reports; I did not test on a Surface Pro 7+ myself. I reviewed the change. Link: https://github.com/larsschellhas/linux-surface-power/issues/2 Link: https://github.com/larsschellhas/linux-surface-power/issues/2#issuecomment-7342698573 Assisted-by: LLM checkpatch Signed-off-by: Lars Schellhas van Kisfeld --- drivers/platform/surface/surface_aggregator_registry.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c index e11ff8d625ea..5caa704921c9 100644 --- a/drivers/platform/surface/surface_aggregator_registry.c +++ b/drivers/platform/surface/surface_aggregator_registry.c @@ -431,6 +431,8 @@ static const struct software_node *ssam_node_group_sp7_dptf[] = { &ssam_node_bat_ac_dptf, &ssam_node_bat_main_dptf, &ssam_node_tmp_perf_profile, + &ssam_node_tmp_sensors, + &ssam_node_fan_speed, NULL, };