Open sassmann opened 6 years ago
@medwatt I'd make sure Intel's turbo mode is switched off. It can temporarily run with higher CPU frequencies, but only until it gets too hot then it will reduce the frequency again. On my X1E gen2 that happens pretty quickly (30-60 seconds or so, sometimes even less).
Without it turbo I can compile, do graphics, etc, and the machine never goes because 60C even with all cores/HTs 100% busy (CPU utilization at 1600%) With turbo enabled, on the other hand, it quickly goes close to the 100C limit, until it slows down again.
(that is the same on Windows and Linux, btw, IMHO it is a misguided attempt by Intel to show better performance. Misguided because it is not sustainable, it heats up the CPU faster than it can typically cool, so it's only for short durations.)
Is this in Thinkfan 1.2-1 with kernel 5.7.9?
@TheChuckster kernel: afaik only in manjaro. mainline 5.8 only.
Do we need to do anything special for this to end up in Arch Linux like the recent linux-fedora
commit that references this issue above?
FWIW, this patch is already in linux-5.8.1.
I just wanted to mention that the patch
14232c6e788c platform/x86: thinkpad_acpi: Add support for dual fan control
only adds support for the P52/P72/X1 extreme/x1 extreme gen2. I had to build the module patched with explicit support for the P50. I don't know if the author is watching this issue, but it would be extremely nice if this worked out of the box on the P50/P70/P51/P71 as well. It seems a bit of an odd omission given that other patches here have the code for adding support for those machines. My patch is as follows (Ubuntu 20.04, kernel 5.4.0-37):+++ ../linux-source-5.4.0/drivers/platform/x86/thinkpad_acpi.c 2020-06-26 01:31:54.721961000 +0100 @@ -8325,11 +8325,19 @@ switch (fan_control_access_mode) { case TPACPI_FAN_WR_ACPI_SFAN: - if (level >= 0 && level <= 7) { - if (!acpi_evalf(sfan_handle, NULL, NULL, "vd", level)) - return -EIO; - } else + if (((level < 0) || (level > 7))) return -EINVAL; + if (tp_features.second_fan) { + if (!fan_select_fan2() || + !acpi_evalf(sfan_handle, NULL, NULL, "vd", level)) { + fan_select_fan1(); + pr_warn("Couldn't set 2nd fan level, disabling support\n"); + tp_features.second_fan = 0; + } + fan_select_fan1(); + } + if (!acpi_evalf(sfan_handle, NULL, NULL, "vd", level)) + return -EIO; break; case TPACPI_FAN_WR_ACPI_FANS: @@ -8346,6 +8354,16 @@ else if (level & TP_EC_FAN_AUTO) level |= 4; /* safety min speed 4 */ + if (tp_features.second_fan) { + if (!fan_select_fan2() || + !acpi_ec_write(fan_status_offset, level)) { + fan_select_fan1(); + pr_warn("Couldn't set 2nd fan level, disabling support\n"); + tp_features.second_fan = 0; + } + fan_select_fan1(); + + } if (!acpi_ec_write(fan_status_offset, level)) return -EIO; else @@ -8772,6 +8790,13 @@ TPACPI_QEC_IBM('7', '0', TPACPI_FAN_Q1), TPACPI_QEC_LNV('7', 'M', TPACPI_FAN_2FAN), TPACPI_Q_LNV('N', '1', TPACPI_FAN_2FAN), + TPACPI_Q_LNV3('N', '1', 'D', TPACPI_FAN_2FAN), /* P70 */ + TPACPI_Q_LNV3('N', '1', 'T', TPACPI_FAN_2FAN), /* P71 */ + TPACPI_Q_LNV3('N', '1', 'E', TPACPI_FAN_2FAN), /* P50 */ + TPACPI_Q_LNV3('N', '1', 'U', TPACPI_FAN_2FAN), /* P51 */ + TPACPI_Q_LNV3('N', '2', 'C', TPACPI_FAN_2FAN), /* P52 / P72 */ + TPACPI_Q_LNV3('N', '2', 'E', TPACPI_FAN_2FAN), /* X1 Extreme (1st gen) */ + TPACPI_Q_LNV3('N', '2', 'O', TPACPI_FAN_2FAN), /* X1 Extreme (2nd gen) */ }; static int __init fan_init(struct ibm_init_struct *iibm) @@ -8813,8 +8838,7 @@ fan_quirk1_setup(); if (quirks & TPACPI_FAN_2FAN) { tp_features.second_fan = 1; - dbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_FAN, - "secondary fan support enabled\n"); + pr_info("secondary fan support enabled\n"); } } else { pr_err("ThinkPad ACPI EC access misbehaving, fan status and control unavailable\n");
Could you help me with to apply this patch on ubuntu 20.20 kernel ?
@andreaswarnaar Please see the comments above. The comment you cite referred to an old version of the patch. The patch included in the Kernel does support the P50.
Any dual-fan support for p53?
@mudrii You can patch kernel for p53 on your own - https://github.com/civic9/thinkpad_acpi.2ndfan.patch/issues/8#issuecomment-725681881
Does anyone know if it's possible to prevent spikes from activating a particular level? For example, I currently have my fan set to turn on at 55C. Sometimes, the CPU will be at 40C, then spikes to 60C when I launch a program or open a website, then drops back to 42 or so. This causes the fan to turn on. Is there a way to avoid such things?
@medwatt look at the -b BIAS argument to thinkfan. negative value should help.\ Or/and you can also try disabling turbo (echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo) - it is not always needed, but generates a lot of heat I think.
@medwatt look at the -b BIAS argument to thinkfan. negative value should help. Or/and you can also try disabling turbo (echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo) - it is not always needed, but generates a lot of heat I think.
I just ran cat /sys/devices/system/cpu/intel_pstate/no_turbo
and got back 0. I had no idea turbo boost was disabled. Any idea why this is the case ? My power profile is set to balanced.
I just ran
cat /sys/devices/system/cpu/intel_pstate/no_turbo
and got back 0. I had no idea turbo boost was disabled. Any idea why this is the case ? My power profile is set to balanced.
Ops... my fault... 0 means turbo boost is enabled. 1 means disabled.
The Thinkpad P15 Gen 1 also has two fans. It would be wonderful to have this feature integrated into thinkfan
, even if the control is the same for both fans. Controlling only one fan does not make sense, especially in a laptop.
$ sensors
...
thinkpad-isa-0000
Adapter: ISA adapter
fan1: 3217 RPM
fan2: 3769 RPM
...
@koutheir You may be in luck. Controlling multiple fans is in fact already implemented, there's just no formal documentation yet. Take a look at this example config. It's what I use on my desktop system.
@koutheir You may be in luck. Controlling multiple fans is in fact already implemented, there's just no formal documentation yet. Take a look at this example config. It's what I use on my desktop system.
Excellent, thanks for all the work! Could you detail from which version of thinkfan dual / multiple fan control has been implemented? Not sure if I should compile the current sources or if there are deb files already available somwhere with this feature.
@cgirerd, for info, I built using master
sources, and I'm using it daily without issues. Thank you @vmatare for this nice piece of software!
If this could be useful to anybody, I published my /etc/thinkfan.conf
for my Lenovo ThinkPad P15 Gen 1 in the ArchLinux wiki.
Thank you @koutheir for the details on the setup for your system and @vmatare for the software! I am facing an issue while trying to run it though, opening a new thread to not pollute this one :)
I'm running Ubuntu's 5.13.0-27-generic kernel on an X1 Extreme Gen 4, and I only see one fan. The control for it only affects the right fan, not the left one. dmidecode | grep N1
shows nothing, but dmidecode | grep N4
shows
Version: N40ET31W (1.13 )
Version ID: N40HT30W
(That's a zero after the 4.) Can the patch be updated to handle this?
Thanks to all of you who worked on developing this patch and getting it merged upstream! I'm using an X1 Extreme Gen 4, and support was added in the 5.16 kernel, which was recently released.
I'd like to throw in a vote for separate fan controls. When my machine has a light load, I think a single fan on level 1 should be enough to keep the temps steady, and that will be quieter than two fans on level 1.
I think a single fan on level 1 should be enough to keep the temps steady, and that will be quieter than two fans on level 1.
The opposite is true, since with two fans, one can reduce their speed at level 1 with keeping the same cooling power. As the result, the total noise is significantly lower.
The physical background is that noise increases highly nonlinear with the velocity of air. When I remember right from my studies (30 years ago in fluid mechanics), it increases even with power 4.
For the same reason prefers very large, but slow fans in silent computers.
@peter-stoll You missed my point: there is no level in between 0 and 1, so if one fan at level 1 is enough, that would be quieter than two fans at level 1. On my X1 Extreme Gen 4, level 1 is 2500 rpm, well above what is often needed when 0 rpm is not enough. Two fans at level 1 would be two fans both at around 2500 rpm...
@jdchristensen , no, I understood that, but it might be I made it not clear or I have technically other assumptions. On my P1 gen 2, I can set the rpm for each level. I assume you can do as well. One can compare two options which have the same cooling power:
a) 1 Fan with with 2500 rpm, 1 Fan with 0 rpm
b) 2 Fans with reduced rpm, such that the cooling power is about the same. I'd guess that would be sqrt(1/2)*2500 ~ 1750 , so two fans with 1750 rpm.
I'd might be wrong with the exact number for the rpm in Option b), but in any case, b) will be much quiter then a), since the noise goes with power 4, but the cooling power with a much lower exponent than 4. (I'd had to check my old textbooks for the exact number).
In case that you computer can not adjust the rpms below 2500, than you proposal would indeed be an improvement, but I'd be surprised if that is not possible.
btw, I use thinkfan to adjust the rpm. One can not set the rpms directly, but some percentage, but the result is the same.
@peter-stoll For the thinkpad_acpi driver, only the top 3 bits of the pwm setting are used:
/* scale down from 0-255 to 0-7 */
newlevel = (s >> 5) & 0x07;
If you specify 0-32, you get level 0, which is off. If you specify 33, you get level 1, which is 2500 rpm. I would really love to have something in the 1000-1500 range, which would be almost silent, but it seems like the hardware doesn't support it.
The rpm values are for my X1 Extreme Gen 4. In auto mode, it only ever uses levels 0 to 3, which give rpm values 0, 2500, 3000, 3400 (roughly). The fans can go up to 5200 rpm (level 7, regulated) or 7600 rpm (full-speed, unregulated), but I have not been able to create a workload that gets them above 3400. So we are limited to just a few fan speeds in practice. Rather than having those unneeded higher levels, a finer choice of slower speeds would be better.
Hello all.
If Peter is right, we already have this functionality through setting percentages (I had no idea this was possible). I too would like something like 1000rpm on my P72. This is because I find constant low noise to be less annoying than momentary flashes of noise - and even level 1 is quite high.
On Sun, Jan 23, 2022 at 2:52 PM Dan Christensen @.***> wrote:
The rpm values are for my X1 Extreme Gen 4. In auto mode, it only ever uses levels 0 to 3, which give rpm values 0, 2500, 3000, 3400 (roughly). The fans can go up to 5200 rpm (level 7, regulated) or 7600 rpm (full-speed, unregulated), but I have not been able to create a workload that gets them above 3400. So we are limited to just a few fan speeds in practice. Rather than having those unneeded higher levels, a finer choice of slower speeds would be better.
— Reply to this email directly, view it on GitHub https://github.com/vmatare/thinkfan/issues/58#issuecomment-1019501127, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADUQ7XU6ZIHCXWNPN5HCLOTUXQIZJANCNFSM4FPRD7QQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
@LukeFernandes As I said in my previous message, the "finer" pwm controls from 0 to 255 are binned into 7 bins using the top three bits, so in the end they give you exactly the same speed options as the level 0 through level 7 options via /proc/acpi/ibm/fan.
@jdchristensen so it seems @peter-stoll is incorrect that percentages can be set.
In that case I also vote for separate fan controls. My P72 chassis gets warm even at light load and can be uncomfortable on the lap, but level 1 with both fans is overkill and can be a bit noisy. So I'd want to be able to set the right fan only to level 1.
Removed this from the 2.0 milestone because most of the discussion is about the hardware support in the kernel module. Support for multiple fans has been implemented in thinkfan for a while now, but that of course requires driver support, which in this case (I think) doesn't exist, yet...
Any update on the Thinkpad hardware support in kernel module to support more fine-grained rpms like 1000rpm (which would be enough most cases for my P1 Gen 6)? Or any hint, where to look for? I also got to the conclusion like @jdchristensen that 2300rpm (level 1) is much to high...
The P50 has 2 fans, lm-sensors shows:
in sysfs there is
It seems that thinkfan is only able to control fan1, fan2 keeps constant ~2300 RPM. thinkfan.conf used
Is there a way to control both fans?