The officially official Devuan Forum!

You are not logged in.

#1 2022-01-06 20:49:37

Micronaut
Member
Registered: 2019-07-04
Posts: 169  

pwmconfig cannot find fans

Since my system rarely needs the CPU fan running at high speed, I tried to install fancontrol to reduce it when running Linux and reduce wear on that fan. But oddly, even though SpeedFan in Windows can find it just fine, the utility that is supposed to identify fan control ports for fancontrol cannot seem to identify my CPU fan. But I do notice a long lag time between adjusting the pwm setting in Speedfan and a real change in the fan speed. Since it only waits 5 seconds, I'm wondering if this might be fixable by somehow tell pwmconfig to wait longer, like maybe 15-20 seconds. Is it possible to do this?

Offline

#2 2022-01-07 02:19:01

steve_v
Member
Registered: 2018-01-11
Posts: 127  

Re: pwmconfig cannot find fans

Micronaut wrote:

But oddly, even though SpeedFan in Windows can find it just fine, the utility that is supposed to identify fan control ports for fancontrol cannot seem to identify my CPU fan.

The super-IO chips that usually do temperature sensing and fan speed control require drivers like anything else, and there's no standard for how they're configured so motherboard manufacturers tend to just do their own thing... With total indifference toward GNU/Linux, as usual.

What does sensors-detect say, and what nodes do you get in /sys/class/hwmon/ after you load the modules it suggests?
If you get some pwm[x] nodes (and they work), you should be able to test response by echoing values into them and reading rpm back on the corresponding fan[x]_input (pretty much what pwmconfig does).
Names may vary, as may accepted ranges and scaling. Again, total lack of standards. Some inputs might be complete garbage, because the motherboard manufacturer didn't bother to document what those pins are connected to... or connect them at all.

At any rate, have a poke around in /sys/class/hwmon or /sys/devices/platform/[chip_id]/, and hit up the lm-sensors docs and/or github for details (or complaints about lack of support).
Note lm-sensors doesn't actually provide any hardware drivers itself (but it usually gets the blame when things don't work), those are shipped with the kernel. If sensors-detect doesn't find anything useful and you can't find an appropriate module to load yourself either, start grepping the kernel sources for your super-IO chip and prepare for a trip down the proverbial rabbit hole...

Micronaut wrote:

I'm wondering if this might be fixable by somehow tell pwmconfig to wait longer, like maybe 15-20 seconds. Is it possible to do this?

Both pwmconfig and fancontrol are shell scripts. Simply edit to taste.

Last edited by steve_v (2022-01-07 02:41:25)


Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Offline

#3 2022-01-08 17:42:55

Micronaut
Member
Registered: 2019-07-04
Posts: 169  

Re: pwmconfig cannot find fans

Well, it's good to find out those are scripts! I simply increased the delay time in pwmconfig to 20 seconds and it now finds the right fan. Fancontrol now technically 'works' but it has two misfeatures. One, I can't run it automatically. It's a script and has to have an open window to run in. Seems a bit kludgy? Is it possible to setup a shell script to run at startup and stay running? Two, when it exits it sets everything to MAX. This is bizarre. Why? The whole problem with fans is that they run at max by default. It should leave the fan speeds alone when it exits. Since it's a script I can probably fix that. Hopefully a shell script can't get too complex and difficult to understand...

Just FYI, here is the config file it generated which I think has all the relevant technical data:

# Configuration file generated by pwmconfig, changes will be lost
INTERVAL=10
DEVPATH=hwmon0=devices/platform/coretemp.0 hwmon2=devices/platform/f71882fg.2560
DEVNAME=hwmon0=coretemp hwmon2=f71889ed
FCTEMPS= hwmon2/device/pwm1=hwmon0/temp2_input
FCFANS= hwmon2/device/pwm1=hwmon2/device/fan1_input
MINTEMP= hwmon2/device/pwm1=40
MAXTEMP= hwmon2/device/pwm1=60
MINSTART= hwmon2/device/pwm1=150
MINSTOP= hwmon2/device/pwm1=0
MAXPWM=hwmon2/device/pwm1=255

Last edited by Micronaut (2022-01-08 18:47:28)

Offline

#4 2022-01-08 18:29:47

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 2,326  

Re: pwmconfig cannot find fans

Micronaut wrote:

Is it possible to setup a shell script to run at startup and stay running?

I think pwmconfig just needs to be run once to generate the configuration file (hence the name). So you don't need to start it automatically or keep it running at all.

Micronaut wrote:

when it exits it sets everything to MAX. This is bizarre. Why?

To cool down the machine after it has operated with the fans disabled by pwmconfig when it attempts to test if it has control over them.

It's not a problem because the /usr/sbin/fancontrol daemon should set the speed of the fans.

Disclaimer: I've never used fancontrol so perhaps wait for steve_v to correct me.


To obtain a root shell use su -. Using just su will result in "command not found" messages.

Offline

#5 2022-01-08 18:48:56

Micronaut
Member
Registered: 2019-07-04
Posts: 169  

Re: pwmconfig cannot find fans

I was not clear about the 'misfeatures' being in fancontrol, not the pwmconfig utility for setting it up. It's fancontrol that has to run in a window, unless there is also something that runs it as a daemon that was also installed and I didn't notice?

Offline

#6 2022-01-08 19:05:39

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 2,326  

Re: pwmconfig cannot find fans

The fancontrol package supplies an init script that should start the /usr/sbin/fancontrol daemon automatically.

Did you edit /usr/sbin/fancontrol directly or did you copy it out, edit that and run the copy from a terminal? The former method should be preferred but note that any alterations will be over-written if the fancontrol package is updated.


To obtain a root shell use su -. Using just su will result in "command not found" messages.

Offline

#7 2022-01-08 19:46:57

steve_v
Member
Registered: 2018-01-11
Posts: 127  

Re: pwmconfig cannot find fans

Head_on_a_Stick wrote:

I've never used fancontrol so perhaps wait for steve_v to correct me.

Nah, you're all good.
I don't actually use fancontrol either these days, since most modern BIOS implementations include similar functionality.
I have spent a fair bit of time hacking on lm-sensors / fancontrol in the past though, somewhere around 2005 IIRC.

Both of the mentioned scripts will (or at least did) set everything to max when they exit, by design, for fairly obvious safety reasons. Modern machines have overheat failsafes, but that was not always the case.


Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Offline

Board footer