-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handling of multiple fans on Lenovo P50 #58
Comments
No, currently |
Oh btw, looking at your hwmon directory listing, I see that you only seem to have a |
Would love to have this ability for the x1 extreme as well. Unsure why lm-sensors only detects one fan for me though... |
The |
Hi there, just wondering if this is still in the pipeline? There are quite a few ThinkPad dual fan laptops now, especially in the P series, and without this functionality thinkfan is less useful than it could be. |
Well, are they supported by |
I also have the issue where only 1 of the 2 fans is detected by thinkpad_acpi (on my P53), so I filed a bug here: https://bugzilla.kernel.org/show_bug.cgi?id=205405 |
There are more and more dual-fan thinkpad laptops. I use old thinkpad_acpi patch for 2-fan thinkpads, P50 and P70. I can't adapt it to P53, because I understand almost nothing in the code. But maybe someone can help P53 owners one day... I don't know why this patch has not been accepted into kernel, but I'm using it and it works (kernel version is 4.15):
fancontrol now has support for (>1)-fan configurations, so I have to use it. TIP: If you are dummy like me, you can use tools like meld to compare vanilla and patched files and merge changes into vanilla version. But not all of them! There are some minor changes in vanilla since this patch was created. |
@voidworker Wow thank you very much for this! I'll take a look and see if I can get it working with the P53. |
I merged the patch posted by @voidworker and reinstalled the sensors:
ls -la /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon6:
I will try to understand the code which has been modified but if anyone manages to find a solution, please share. I'm using this on an X1 Extreme Gen 2 by the way. |
I am sorry for my lack of expertise. Maybe it's worth asking the author of the patch?
|
Hello guys. I am am a noob so please excuse me if this makes no sense. Pop! OS supports Dual Fan Control on my Thinkpad P1 Gen 2 (X1 Extreme) but I want to use Manjaro KDE. Is it possible to extract the fan control from them? Thanks in advance :) |
@tobomobo If I were you I would stick with what's already working. Just install KDE on your PopOS. |
I would love to stay on an Arch based Distro because of the AUR packages . But thanks for the quick reply 😊 |
AUR is nice and convenient but it's not worth giving up the functionality of one of your fans... |
I mean they work both. One fan is just a little bit louder and never stops
spinning no matter what.
I think I can live with that, because I am mostly in an office Space where
my Fan noise isn't the biggest issue.
Am So., 8. Dez. 2019 um 23:15 Uhr schrieb B <[email protected]>:
… AUR is nice and convenient but it's not worth giving up the functionality
of one of your fans...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#58?email_source=notifications&email_token=ANY7FCVYKEWZ3HPDTZMZGK3QXVWZRA5CNFSM4FPRD7Q2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGHLSZI#issuecomment-563001701>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANY7FCWV7QJUCUP5ZCNIPULQXVWZRANCNFSM4FPRD7QQ>
.
|
@voidworker Thanks for your info. After minor modifications it works for me on Arch, kernel 5.4.7, Thinkpad X1 Extreme 1st gen. If anyone is interested: https://github.com/civic9/thinkpad_acpi.2ndfan.patch I use it with two instances of thinkfan, as @vmatare suggested. Everything works fine. Finally X1 extreme has become usable for me. |
@civic9 Thank you for this! I was able to read both fans by changing the BIOS string in the Could you share your thinkfan config file? I am having some issues setting the correct speed. Also, how are you running two instances automatically? Did you modify the systemd service files? |
@niciuffo
For 2nd thinkfan instance I created /etc/thinkfan2.conf (as above, but pwm2 in pwm_fan path) and /etc/systemd/system/thinkfan2.service:
In logs it shows a warning/error about existing pid file, but works fine. |
@niciuffo Where exactly did you make that change? |
Ah, my bad. The patch isn't upstream yet. |
Hello there. Noob alert. Is someone willing to explain step by step how to do this? (Using a P1 Gen2) Thanks in advance! :) |
Hey all. I looked at the Kernel code and found a better solution. Instead of creating two fan control devices I just have the one device set both fan controls. That way a single thinkfan instance it sufficient. And you rarely want different levels for the fans anyway. (and the code is simpler). Tried on my x1 extreme gen2, and it works beautifully. Here's the patch:
|
Hey thanks for improving the solution but unfortunately I am still stuck. Could you explain to me how to apply this patch or link me to the right tutorial? Help is greatly appreciated! 😊 |
You have to rebuild the thinkpad_acpi kernel module. With my change that's all you need. Thinkfan will see a single fan, any changes will apply ton both fans. I'll add detailed instructions later. @civic9 has a patch script linked above, I got the BIOS quirks from there. Thanks @civic9 ! For the actual change I looked into tp-thinkfan (for Windows) and just added the right parts to the patch. |
Update patch:
Added all the known bios version (again thanks @civic9 ), and made the error handling slightly more robust. For instructions... It's really best to look at @civic9 's build script: https://github.com/civic9/thinkpad_acpi.2ndfan.patch/blob/master/build_install.sh All I would do here is to write out the very same instructions. Cut the patch above into some file and patch it into the kernel source (as shown the script). |
Thanks for you help. I am new to this. So sorry if this is a head bump question haha. My problem is, when I start the scrip and the kernel gets pulled the terminal asks me different things. The first one is, if I want to "Compile also drivers which will not load" and many others. Do I just close out now or do I have to press yes to some things in terminal? EDIT: cp: cannot stat '/usr/lib/modules/5.5.13-1-MANJARO/build/.config': No such file or directory cp: cannot stat '/usr/lib/modules/5.5.13-1-MANJARO/build/Module.symvers': No such file or directory |
No problem at all! For all the questions... It's the first time you do Manjaro is based off Arch, so in theory it should mostly work the same. I assume that happens when you do depmod -a...? You might need install a package to have that. On Fedora is kernel-core, but I do not know how it work on Arch/Manjaro. |
This adds dual fan control for the following models: P50, P51, P52, P70, P71, P72, P1 gen1, P2 gen2, X1E gen1 and X1E gen2. Both fans are controlled together as if they were a single fan. Tested on an X1 Extreme Gen1, an X1 Extreme Gen2, and a P50. The patch is defensive, it adds only specific supported machines, and falls back to the old behavior if both fans cannot be controlled. Background: I tested the BIOS default behavior on my X1E gen2 and both fans are always changed together. So rather than adding controls for each fan, this controls both fans together as the BIOS would do. This was inspired by a discussion on dual fan support for the thinkfan tool (see link below). All BIOS IDs are taken from there. The X1E gen2 ID is verified on my machine. Thanks to GitHub users voidworker and civic9 for the earlier patches and BIOS IDs, and to users peter-stoll and sassman for testing the patch on their machines. BugLink: vmatare/thinkfan#58 Signed-off-by: Lars Hofhansl <[email protected]> [andy: massaged commit message to capitalize ID and convert to BugLink] Signed-off-by: Andy Shevchenko <[email protected]>
This adds dual fan control for the following models: P50, P51, P52, P70, P71, P72, P1 gen1, P2 gen2, X1E gen1 and X1E gen2. Both fans are controlled together as if they were a single fan. Tested on an X1 Extreme Gen1, an X1 Extreme Gen2, and a P50. The patch is defensive, it adds only specific supported machines, and falls back to the old behavior if both fans cannot be controlled. Background: I tested the BIOS default behavior on my X1E gen2 and both fans are always changed together. So rather than adding controls for each fan, this controls both fans together as the BIOS would do. This was inspired by a discussion on dual fan support for the thinkfan tool (see link below). All BIOS IDs are taken from there. The X1E gen2 ID is verified on my machine. Thanks to GitHub users voidworker and civic9 for the earlier patches and BIOS IDs, and to users peter-stoll and sassman for testing the patch on their machines. BugLink: vmatare/thinkfan#58 Signed-off-by: Lars Hofhansl <[email protected]> [andy: massaged commit message to capitalize ID and convert to BugLink] Signed-off-by: Andy Shevchenko <[email protected]>
FWIW, this patch is already in linux-5.8.1. |
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. |
Any dual-fan support for p53? |
@mudrii You can patch kernel for p53 on your own - civic9/thinkpad_acpi.2ndfan.patch#8 (comment) |
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. |
I just ran |
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 $ 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. |
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 If this could be useful to anybody, I published my |
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.
(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. |
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:
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
<#58 (comment)>,
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?
The text was updated successfully, but these errors were encountered: