Talk:Fan speed control

From ArchWiki
Latest comment: 20 February 2023 by Siavoshkc in topic Smart Fan IV mode

amdgpu sysfs section

I'm aware that there is already an entry about it in the ATI driver section. However, it seems we want all the fan information at one central place, so we might just want to link from there to here, and perhaps also on the amdgpu page. Also, most users these days use amdgpu and not ati/radeon anymore. If you argue that the solution via script is redundant to fancontrol: Relying entirely on sysfs and bash doesn't require any additional binary, which might help avoiding additional bugs and other troubles. It can also be more flexible to adjust to one's own needs. Of course it could also be placed in the amdgpu article, if you want mostly CPU related fan control around here. Aufkrawall (talk) 19:55, 22 April 2018 (UTC)Reply[reply]

Drastic updates to this page

Hi all. I've updated this page + moved "ThinkPad Fan Control" to this page too. What do you think? I've also created AUR script for "NBFC" tool, which I will update in the near future. There are many grammar mistakes and might be more logic mistakes, so I am calling everyone willing to help - contribute to this page. -- Erkexzcx (talk) 12:49, 10 September 2017 (UTC)Reply[reply]

More details on manual settings

https://bbs.archlinux.org/viewtopic.php?pid=604431#p604431 I found this post very enlightening. Read it if you're interested in the details (esp. on manual setting of fans). Maybe something like this should be in the main article? --Unhammer 02:45, 1 October 2009 (EDT)

Thanks for the link, finally found the path to where fan speeds can be set manually. For me it is /sys/class/hwmon/hwmon?/device/hwmon/hwmon?/pwm? . Perfect for testing fans at specific speeds for buzzing/clicking sounds. KubaF (talk) 12:19, 22 March 2020 (UTC)Reply[reply]
That's the same as /sys/class/hwmon/hwmon?/pwm? because device is a link to the absolute path. Darxus (talk) 05:57, 15 November 2020 (UTC)Reply[reply]

Increasing fan_div?

I found this section not very helpful. What is the fan divisor, why would I need to increase it? "Edit /etc/sensors3.conf and look up the exact chipset." How do I find the chipset that I'm supposed to be looking up?

By the way, how many motherboards simply don't have the capability for software fan control? E.g. how do I know when I should give up on these instructions? For instance my MSI Wind has a directory /sys/devices/platform/msi-laptop-pf/, since I don't see anything related to fan control there, perhaps that means I'm out of luck? Whereas my Thinkpad has /sys/devices/platform/thinkpad_hwmon/fan1_input, etc... I wonder if these kind of hints should be incorporated into the instructions. Herodotus (talk) 19:23, 2 January 2016 (UTC)Reply[reply]

Also editing sensors3.conf is wrong and there are many chips not in there. Ziusudra (talk) 06:06, 26 February 2016 (UTC)Reply[reply]
The real problem is that the only thing that should be in the #Sensor driver section is a link to the Lm_sensors page saying to get the fan and temp readings working and the explanation of the module loading order. Ziusudra (talk) 05:14, 27 February 2016 (UTC)Reply[reply]
Not quite sure if it's related, but I am unable to set anything using fan_div instructions. I always give following message using sensors -s:
Error: File /etc/sensors.d/fan-speed-control.conf, line 2: Unknown feature name coretemp-isa-0000: No such subfeature known

Yet it should be the way to control it, since I was able to do it on windows using very specific laptops fan control app [1]. Also, the following command sets fan speed:

echo "100" > /sys/class/hwmon/hwmon1/pwm1

Erkexzcx (talk) 20:48, 14 May 2017 (UTC)Reply[reply]

Linking a permanent solution for the problem of inconsistent hwmon device paths.

Googling the issue brings up a multitude of forum threads of the same issue, however many of them work around the problem and use the absolute paths instead. There is the solution to manually load the modules using /etc/modules-load.d/modules.conf, however I do not know if this is guaranteed to fix the issue. Does anybody know if that solution works well, or if there is another way to reliably keep the hwmon paths persistent instead of using a workaround? Jmarmstrong1207 (talk) 17:44, 1 August 2019 (UTC)Reply[reply]

At the time of this writing, (section 9.2.1) fan speed control#Solution non definitive answer is:
If this does not work, I highly recommend finding another program to control your fans. If you cannot find any, then you could try using the alternative solution below.
The alternative solution below is (section 9.2.2) fan speed control#Alternative solution: absolute paths.
Regid (talk) 19:06, 19 November 2022 (UTC)Reply[reply]

fancon utility

I found the interesting utility to control a fan speed: https://github.com/hbriese/fancon It would be nice to add the instructions to this page. Unikum (talk) 06:50, 5 May 2020 (UTC)Reply[reply]

Fancon is great when your fans make noise at specific RPM, as you can set the ranges that it should use. But sadly fancon segfaults on Arch, yet works on Ubuntu, and the author does not care. KubaF (talk) 20:23, 16 June 2021 (UTC)Reply[reply]


Lenovo Yoga Fan Control support

Came across this git repo: https://github.com/senior-sigan/lenovo-yoga-fan-control which contains source to compile a utility to read/control fan speed through Lenovo's unique implementation of Fan control and sensors. According to the README in the repo:

There is a CPU temperature sensor connected to the EC via SMBus; note that this SMBus is not accessible by the CPU, and so the Linux i2c drivers cannot see any devices on this bus.

The fan is connected to a fan controller in the EC, which allows the fan speed to be varied (using PWM) between 0% and 100% duty cycle. By default, the EC sets the fan speed very strange. All time works on 60% of maximum fan speed.

I believe with some tweaking, one should be able to get this to compile on a more recent version of Arch. That said, I'm currently having difficulty compiling and installing gcc49AUR on my current system, although without explicitly installing gcc49, the cmake CMakeLists.txt and make commands work without any error or issue. Didn't want to edit the main page, so figured I'd put it in the Discussion in case someone more experienced than I can vet this. --Shayaknyc (talk) 19:48, 10 September 2021 (UTC)Reply[reply]

Ok, so managed to compile without gcc49. Compiled without issue. Had to manually copy the binary to /usr/bin/yoga_fan and copy the yoga_fan.service file to /etc/systemd/system/ to run sudo systemctl enable yoga_fan and sudo systemctl start yoga_fan. When running sudo systemctl status yoga_fan received this output:

● yoga_fan.service - Yoga Fan Control
    Loaded: loaded (/etc/systemd/system/yoga_fan.service; enabled; vendor preset: disabled)
    Active: active (running) since Fri 2021-09-10 15:56:48 EDT; 4min 1s ago
   Process: 24664 ExecStart=/usr/bin/yoga_fan (code=exited, status=0/SUCCESS)
  Main PID: 24666 (yoga_fan)
     Tasks: 1 (limit: 9342)
    Memory: 316.0K
       CPU: 19ms
    CGroup: /system.slice/yoga_fan.service
            └─24666 /usr/bin/yoga_fan

Sep 10 15:56:48 Lenovo systemd[1]: Starting Yoga Fan Control...
Sep 10 15:56:48 Lenovo yoga_fan[24666]: Lenovo yoga fan control[24666]: Open ports
Sep 10 15:56:48 Lenovo systemd[1]: Started Yoga Fan Control.

Now, when I run sensors it's at least showing me the CPU temps, which it didn't before running the program:

BAT1-acpi-0
Adapter: ACPI interface
in0:          16.17 V

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +58.0°C  (high = +87.0°C, crit = +105.0°C)
Core 0:        +58.0°C  (high = +87.0°C, crit = +105.0°C)
Core 1:        +56.0°C  (high = +87.0°C, crit = +105.0°C)

acpitz-acpi-0
Adapter: ACPI interface
temp1:        +57.0°C  (crit = +110.0°C)

That said, not really sure it's doing much in the way of actual fan control, but at least the sensors are more robust. --Shayaknyc (talk) 20:05, 10 September 2021 (UTC)Reply[reply]

Smart Fan IV mode

Some systems have hardware support for smart fan controls. This is not discussed in the main article.

For example Nuvoton NCT6796D chip supports Smart Fan IV mode. As per kernel documentation:

This mode offers multiple slopes to control the fan speed. The slopes can be controlled by setting the pwm and temperature attributes. When the temperature rises, the chip will calculate the DC/PWM output based on the current slope. There are up to seven data points depending on the chip type. Subsequent data points should be set to higher temperatures and higher pwm values to achieve higher fan speeds with increasing temperature. The last data point reflects critical temperature mode, in which the fans should run at full speed.

ControlFANs is a software which lets us set fan temperature-to-PWM slopes and control their speed without putting fans into manual mode (unlike Fancontrol (lm-sensors)). The author explains: "You could use it to setup the kernel auto point for every FAN who support it."

Siavoshkc (talk) 17:31, 20 February 2023 (UTC)Reply[reply]