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
[Description of the bug or feature]
The fan barely runs until the temperature gets to 90 degrees and then suddenly the fan starts running like crazy. Is there a workaround to get the fan to work properly like in Windows?
and There is a popping sound when I start the computer.
Environment
Hardware model: Surface Laptop 5
Kernel version: Linux sevenzip 6.8.8-arch1-1-surface Update to upstream #1 SMP PREEMPT_DYNAMIC Tue, 30 Apr 2024 07:52:55 +0000 x86_64 GNU/Linux
Similar issue to what I am having on the SLS2. Fans don't start at all. Core temperature reaches critical level and the laptop shuts down as a safety measure. This is happening even when the laptop is at idle.
Both SL5 and SLS2 likely have an EC interface via SAM. We currently have support for this on the SP9 and SL6. While we can't control the exact fan speed, it allows setting a fan curve. Specifically, this is tied to the platform profile, so changing that (e.g. with surface profile set performance) should also change the fan curve.
Below are two patches which should hopefully enable that for the SL5 and SLS2 respectively. It would be great if you can test them. If you don't know how to compile a kernel, I can also prepare a branch of the out-of-tree SAM driver, but it might take me some time to get around to it.
For testing, switch the platform profile (surface profile set <x>) a couple of times and check if behavior under load improves. I've also added thermal sensor support, so also run sensors and check if they that shows some new SAM related sensors (maybe post that here if you're not sure). During all of that, keep an eye on the dmesg log to ensure that there are no errors when running the commends (and ideally upload it here).
From 22f5f945498e0d9d0dc35c9ec8295899b8ac32ca Mon Sep 17 00:00:00 2001
From: Maximilian Luz <[email protected]>
Date: Mon, 10 Jun 2024 21:47:47 +0200
Subject: [PATCH 1/2] platform/surface: aggregator_registry: Add fan and
thermal sensor support for Surface Laptop 5
---
drivers/platform/surface/surface_aggregator_registry.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
index 07a4c4e1120d3..4dc79f791d390 100644
--- a/drivers/platform/surface/surface_aggregator_registry.c+++ b/drivers/platform/surface/surface_aggregator_registry.c@@ -265,7 +265,9 @@ static const struct software_node *ssam_node_group_sl5[] = {
&ssam_node_root,
&ssam_node_bat_ac,
&ssam_node_bat_main,
- &ssam_node_tmp_perf_profile,+ &ssam_node_tmp_perf_profile_with_fan,+ &ssam_node_tmp_sensors,+ &ssam_node_fan_speed,
&ssam_node_hid_main_keyboard,
&ssam_node_hid_main_touchpad,
&ssam_node_hid_main_iid5,
--
2.45.1
From 2294324190ce5366889069534a40e00962c9b692 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <[email protected]>
Date: Mon, 10 Jun 2024 21:48:02 +0200
Subject: [PATCH 2/2] platform/surface: aggregator_registry: Add fan and
thermal sensor support for Surface Laptop Studio 2
---
drivers/platform/surface/surface_aggregator_registry.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
index 4dc79f791d390..77f903a04d128 100644
--- a/drivers/platform/surface/surface_aggregator_registry.c+++ b/drivers/platform/surface/surface_aggregator_registry.c@@ -312,7 +312,9 @@ static const struct software_node *ssam_node_group_sls2[] = {
&ssam_node_root,
&ssam_node_bat_ac,
&ssam_node_bat_main,
- &ssam_node_tmp_perf_profile,+ &ssam_node_tmp_perf_profile_with_fan,+ &ssam_node_tmp_sensors,+ &ssam_node_fan_speed,
&ssam_node_pos_tablet_switch,
&ssam_node_hid_sam_keyboard,
&ssam_node_hid_sam_penstash,
--
2.45.1
Hi @qzed!
I currently hitting the following issue:#1461. If I am able to find a work around I will test the code changes you mentioned above
BR,
Ciaran
However, unlike Windows, there is a delay of about 30 seconds between the temperature increase and the fan starting, and the default fan speed when using battery is a whopping 0. Is there a solution?
This appears to be probably due to a kernel patch that enabled fan speed adjustment but not cpu clock adjustment. (Under overload, CPU temperature exceeds 80 degrees Celsius in Linux, but does not exceed 60 degrees Celsius in Windows due to aggressive CPU scheduling.)
This appears to be probably due to a kernel patch that enabled fan speed adjustment but not cpu clock adjustment. (Under overload, CPU temperature exceeds 80 degrees Celsius in Linux, but does not exceed 60 degrees Celsius in Windows due to aggressive CPU scheduling.)
In Windows, the clock is adjusted so that the temperature does not exceed 50 degrees when operating on battery and 60 degrees when connected to power, but Linux does not do this and randomly turns on turbo boost up to 4400mhz. That's why the temperature can soar to 90 degrees even when the fan is running.
Ah yeah. The linux kernel itself does not do any sort of management of this. You might want try and set up thermald, which can do things like scale down the frequency when the CPU gets hot.
Activity
sevenzip2 commentedon Jun 9, 2024
In fact, there is no fan sound at all. Please help me.
sevenzip2 commentedon Jun 9, 2024
popping sound problem can solved by add ~/.xinit pactl set-sink-mute 0 0
CiaranWinna commentedon Jun 10, 2024
Similar issue to what I am having on the SLS2. Fans don't start at all. Core temperature reaches critical level and the laptop shuts down as a safety measure. This is happening even when the laptop is at idle.
qzed commentedon Jun 10, 2024
Both SL5 and SLS2 likely have an EC interface via SAM. We currently have support for this on the SP9 and SL6. While we can't control the exact fan speed, it allows setting a fan curve. Specifically, this is tied to the platform profile, so changing that (e.g. with
surface profile set performance) should also change the fan curve.Below are two patches which should hopefully enable that for the SL5 and SLS2 respectively. It would be great if you can test them. If you don't know how to compile a kernel, I can also prepare a branch of the out-of-tree SAM driver, but it might take me some time to get around to it.
For testing, switch the platform profile (
surface profile set <x>) a couple of times and check if behavior under load improves. I've also added thermal sensor support, so also runsensorsand check if they that shows some new SAM related sensors (maybe post that here if you're not sure). During all of that, keep an eye on the dmesg log to ensure that there are no errors when running the commends (and ideally upload it here).sevenzip2 commentedon Jun 11, 2024
Very sorry for that, I don't know how to patch a kernel.
CiaranWinna commentedon Jun 14, 2024
Hi @qzed!
I currently hitting the following issue:#1461. If I am able to find a work around I will test the code changes you mentioned above
BR,
Ciaran
sevenzip2 commentedon Jun 26, 2024
I compiled the kernel manually... and it worked! Please merge it into an official patch soon.
sevenzip2 commentedon Jun 26, 2024
However, unlike Windows, there is a delay of about 30 seconds between the temperature increase and the fan starting, and the default fan speed when using battery is a whopping 0. Is there a solution?
sevenzip2 commentedon Jun 26, 2024
It seems like the default fan speed should be 3000, but there seems to be a bug.
sevenzip2 commentedon Jun 27, 2024
This appears to be probably due to a kernel patch that enabled fan speed adjustment but not cpu clock adjustment. (Under overload, CPU temperature exceeds 80 degrees Celsius in Linux, but does not exceed 60 degrees Celsius in Windows due to aggressive CPU scheduling.)
Update v6.9 patches
qzed commentedon Jun 30, 2024
The patches I proposed above are included in the next release (v6.9.7).
qzed commentedon Jun 30, 2024
Could you elaborate on that?
sevenzip2 commentedon Jun 30, 2024
In Windows, the clock is adjusted so that the temperature does not exceed 50 degrees when operating on battery and 60 degrees when connected to power, but Linux does not do this and randomly turns on turbo boost up to 4400mhz. That's why the temperature can soar to 90 degrees even when the fan is running.
qzed commentedon Jun 30, 2024
Ah yeah. The linux kernel itself does not do any sort of management of this. You might want try and set up
thermald, which can do things like scale down the frequency when the CPU gets hot.sevenzip2 commentedon Jul 1, 2024
Are there any examples of settings for the Sensor on Surface Laptop 5?
sevenzip2 commentedon Jul 1, 2024
Sorry, thermald didn't really help either. I'm thinking of giving up using Linux on this computer.
qzed commentedon Jul 2, 2024
You should probably be able to adapt one of the configs here (maybe from the Pro 7): https://github.com/linux-surface/linux-surface/tree/master/contrib/thermald. You probably need to make sure that it's not trying to load things from ACPI because at least in the past that didn't work.