Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

pwmconfig produces a /etc/fancontrol which does not please

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
DoubleHP
Posts: 72
Joined: 2016-10-09 08:55
Has thanked: 1 time

pwmconfig produces a /etc/fancontrol which does not please

#1 Post by DoubleHP »

Code: Select all

# pwmconfig
# pwmconfig revision 6243 (2014-03-20)
This program will search your sensors for pulse width modulation (pwm)
controls, and test each one to see if it controls a fan on
your motherboard. Note that many motherboards do not have pwm
circuitry installed, even if your sensor chip supports pwm.

We will attempt to briefly stop each fan using the pwm controls.
The program will attempt to restore each fan to full speed
after testing. However, it is ** very important ** that you
physically verify that the fans have been to full speed
after the program has completed.

Found the following devices:
   hwmon0 is acpitz
   hwmon1 is coretemp
   hwmon2 is nct6776

Found the following PWM controls:
   hwmon2/pwm1           current value: 255
   hwmon2/pwm2           current value: 255

Giving the fans some time to reach full speed...
Found the following fan sensors:
   hwmon2/fan1_input     current speed: 1235 RPM
   hwmon2/fan2_input     current speed: 1290 RPM

Warning!!! This program will stop your fans, one at a time,
for approximately 5 seconds each!!!
This may cause your processor temperature to rise!!!
If you do not want to do this hit control-C now!!!
Hit return to continue:

Testing pwm control hwmon2/pwm1 ...
  hwmon2/fan1_input ... speed was 1235 now 0
    It appears that fan hwmon2/fan1_input
    is controlled by pwm hwmon2/pwm1
Would you like to generate a detailed correlation (y)?
    PWM 255 FAN 1204
    PWM 240 FAN 1236
    PWM 225 FAN 1222
    PWM 210 FAN 1146
    PWM 195 FAN 1115
    PWM 180 FAN 1062
    PWM 165 FAN 980
    PWM 150 FAN 904
    PWM 135 FAN 834
    PWM 120 FAN 782
    PWM 105 FAN 693
    PWM 90 FAN 625
    PWM 75 FAN 0
    Fan Stopped at PWM = 75

  hwmon2/fan2_input ... speed was 1290 now 1298
    no correlation

Testing pwm control hwmon2/pwm2 ...
  hwmon2/fan1_input ... speed was 1235 now 1221
    no correlation
  hwmon2/fan2_input ... speed was 1290 now 0
    It appears that fan hwmon2/fan2_input
    is controlled by pwm hwmon2/pwm2
Would you like to generate a detailed correlation (y)?
    PWM 255 FAN 1243
    PWM 240 FAN 1255
    PWM 225 FAN 1278
    PWM 210 FAN 1208
    PWM 195 FAN 1160
    PWM 180 FAN 1089
    PWM 165 FAN 1012
    PWM 150 FAN 922
    PWM 135 FAN 884
    PWM 120 FAN 787
    PWM 105 FAN 700
    PWM 90 FAN 637
    PWM 75 FAN 0
    Fan Stopped at PWM = 75


Testing is complete.
Please verify that all fans have returned to their normal speed.

The fancontrol script can automatically respond to temperature changes
of your system by changing fanspeeds.
Do you want to set up its configuration file now (y)?
What should be the path to your fancontrol config file (/etc/fancontrol)?
Loading configuration from /etc/fancontrol ...

Select fan output to configure, or other action:
1) hwmon2/pwm2         3) Change INTERVAL     5) Save and quit
2) hwmon2/pwm1         4) Just quit           6) Show configuration
select (1-n): 5

Saving configuration to /etc/fancontrol...
Configuration saved
# systemctl start fancontrol.service
Job for fancontrol.service failed because the control process exited with error code.
See "systemctl status fancontrol.service" and "journalctl -xe" for details.
# systemctl status fancontrol.service -l
â fancontrol.service - fan speed regulator
   Loaded: loaded (/lib/systemd/system/fancontrol.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2018-03-14 19:10:40 CET; 4min 23s ago
     Docs: man:fancontrol(8)
           man:pwmconfig(8)
  Process: 5350 ExecStartPre=/usr/sbin/fancontrol --check (code=exited, status=1/FAILURE)

Mar 14 19:10:40 leon-host systemd[1]: Starting fan speed regulator...
Mar 14 19:10:40 leon-host fancontrol[5350]: Loading configuration from /etc/fancontrol ...
Mar 14 19:10:40 leon-host fancontrol[5350]: Some mandatory settings missing, please check your config file!
Mar 14 19:10:40 leon-host systemd[1]: fancontrol.service: Control process exited, code=exited status=1
Mar 14 19:10:40 leon-host systemd[1]: Failed to start fan speed regulator.
Mar 14 19:10:40 leon-host systemd[1]: fancontrol.service: Unit entered failed state.
Mar 14 19:10:40 leon-host systemd[1]: fancontrol.service: Failed with result 'exit-code'.
should I report a bug ? The config file is freshly generated; whole system is freshly updated; and service complains ...

shirish
Posts: 845
Joined: 2010-12-08 12:59

Re: pwmconfig produces a /etc/fancontrol which does not plea

#2 Post by shirish »

please share more details, is it a laptop, desktop, what sort of hardware build. Giving some inputs like that we may know what you are running.
Intel Dual-Core CPU E5400 (soc 775) @ 2.70GHz, onboard Intel G33, Asus MB P5KPL-AM IN (Intel G31), D-Link 2750u modem+router, 64-bit Debian Testing, Mate 1.26

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: pwmconfig produces a /etc/fancontrol which does not plea

#3 Post by debiman »

1) read 'man pwmconfig' and/or 'man fancontrol' and/or further documentation - pay special attention to mandatory settings
2) edit /etc/fancontrol accordingly

DoubleHP
Posts: 72
Joined: 2016-10-09 08:55
Has thanked: 1 time

Re: pwmconfig produces a /etc/fancontrol which does not plea

#4 Post by DoubleHP »

Hardware:
http://www.asrock.com/mb/Intel/Q1900M%20Pro3/

Apt source liste:

Code: Select all

deb http://debian.mirrors.ovh.net/debian/ stretch main non-free contrib

Code: Select all

# cat /etc/fancontrol
# Configuration file generated by pwmconfig, changes will be lost
INTERVAL=10
DEVPATH=hwmon2=devices/platform/nct6775.656
DEVNAME=hwmon2=nct6776
FCTEMPS=
FCFANS=hwmon2/pwm2=hwmon2/fan2_input hwmon2/pwm1=hwmon2/fan1_input
MINTEMP=
MAXTEMP=
MINSTART=
MINSTOP=

Code: Select all

# systemctl restart fancontrol.service
Job for fancontrol.service failed because the control process exited with error code.
See "systemctl status fancontrol.service" and "journalctl -xe" for details.
# systemctl status fancontrol.service -l
â fancontrol.service - fan speed regulator
   Loaded: loaded (/lib/systemd/system/fancontrol.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2018-03-17 12:15:49 CET; 3s ago
     Docs: man:fancontrol(8)
           man:pwmconfig(8)
  Process: 27786 ExecStartPre=/usr/sbin/fancontrol --check (code=exited, status=1/FAILURE)

Mar 17 12:15:49 leon-host systemd[1]: Starting fan speed regulator...
Mar 17 12:15:49 leon-host fancontrol[27786]: Loading configuration from /etc/fancontrol ...
Mar 17 12:15:49 leon-host fancontrol[27786]: Some mandatory settings missing, please check your config file!
Mar 17 12:15:49 leon-host systemd[1]: fancontrol.service: Control process exited, code=exited status=1
Mar 17 12:15:49 leon-host systemd[1]: Failed to start fan speed regulator.
Mar 17 12:15:49 leon-host systemd[1]: fancontrol.service: Unit entered failed state.
Mar 17 12:15:49 leon-host systemd[1]: fancontrol.service: Failed with result 'exit-code'.
Debiman: I have installed this machine 2 years ago; it all went fine, and have been working very well, without doing anything manually. This week, I have performed a dist-upgrade, and this package refuses to work. In short, the update broke the system (that's why usually don't do any update). Said this way, there is a bug at the distribution level.

But, from 20 experience with Linux, the sensor package have always been fragile, and most bugs I have met were in fact due to upstream issues, not to Debian maint. That's why I come in the forum, before/instead of opening a bug.

It's not my job to fix /etc/fancontrol ; the file is generated by pwmconfig; so pwmconfig should generate a correct file. I only here to help fixing the bug other people may encontour. But I don't have hours to spend on this bug; if I can't fix within minutes, I give up.

In particular, I consider there are two bugs:
- pwmconfig not being able to produce a working conf
- systemctl status fancontrol.service -l reporting a missing mandatory field, without saying which one; telling which field is missing would be hugely helpfull. In particular, the "mandatory" word is not found in man fancontrol. How do I guess which field is mandatory (and even worse, what should be it's value) when this is not even explained in plain words in the doc ? Or maybe they use a synonime ...

Old working conf from backup:

Code: Select all

$ ls -l /mnt/Home_2014/Arch_2014/arch/leon-host/etc/fancontrol
-rw-r--r-- 1 root root 259 2017-01-02 14:52 /mnt/Home_2014/Arch_2014/arch/leon-host/etc/fancontrol
$ cat /mnt/Home_2014/Arch_2014/arch/leon-host/etc/fancontrol
# Configuration file generated by pwmconfig, changes will be lost
INTERVAL=300
DEVPATH=hwmon2=devices/platform/nct6775.656
DEVNAME=hwmon2=nct6776
FCTEMPS=
FCFANS=hwmon2/pwm2=hwmon2/fan2_input hwmon2/pwm1=hwmon2/fan1_input
MINTEMP=
MAXTEMP=
MINSTART=
MINSTOP=
Gotta go, back in 2h for testing a few things.

DoubleHP
Posts: 72
Joined: 2016-10-09 08:55
Has thanked: 1 time

Re: pwmconfig produces a /etc/fancontrol which does not plea

#5 Post by DoubleHP »

The wollowing conf file allows service to start:

Code: Select all

# cat /etc/fancontrol
# Configuration file generated by pwmconfig, changes will be lost
INTERVAL=10
DEVPATH=hwmon2=devices/platform/nct6775.656
DEVNAME=hwmon2=nct6776
FCTEMPS=hwmon2/pwm1=hwmon1/device/temp1_input hwmon2/pwm2=hwmon1/device/temp1_input
FCFANS=hwmon2/pwm2=hwmon2/fan2_input hwmon2/pwm1=hwmon2/fan1_input
MINTEMP=hwmon2/pwm1=20
MAXTEMP=hwmon2/pwm1=30
MINSTART=hwmon2/pwm1=140
MINSTOP=hwmon2/pwm1=100
You should not use my values, because I piccked random values, just to satisfy the service (I am not quoting here relevant values; I will customise numbers later).

Also note that the services claims that those variables are mandatory, but only asks for pwm1; pwm2 is declared in fctemps, but not in mintemp ... what is completely unconsistent ... but acceptable for the service. To me, this security is stupid. I will report bugs.

DoubleHP
Posts: 72
Joined: 2016-10-09 08:55
Has thanked: 1 time

Re: pwmconfig produces a /etc/fancontrol which does not plea

#6 Post by DoubleHP »

fancontrol: fancontrol.service error message is not helping
https://bugs.debian.org/cgi-bin/bugrepo ... bug=893232

fancontrol: pwmconfig produces a /etc/fancontrol which does not please fancontrol.service
https://bugs.debian.org/cgi-bin/bugrepo ... bug=893234

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: pwmconfig produces a /etc/fancontrol which does not plea

#7 Post by debiman »

DoubleHP wrote:I have installed this machine 2 years ago; it all went fine, and have been working very well, without doing anything manually. This week, I have performed a dist-upgrade, and this package refuses to work. In short, the update broke the system
that's a very black and white approach; if i were you i'd just try to solve the problem, instead of throwing blame around.
But, from 20 experience with Linux, the sensor package have always been fragile, and most bugs I have met were in fact due to upstream issues, not to Debian maint. That's why I come in the forum, before/instead of opening a bug.
does not compute.
if you're convinced the problem is upstream, you should not post on debian forums at all.
It's not my job to fix /etc/fancontrol ; the file is generated by pwmconfig; so pwmconfig should generate a correct file. I only here to help fixing the bug other people may encontour. But I don't have hours to spend on this bug; if I can't fix within minutes, I give up.
fine.
don't fix it then, and enjoy your useless pwmconfig install.
DoubleHP wrote:The wollowing conf file allows service to start:
(...)
You should not use my values, because I piccked random values, just to satisfy the service
do you think that will yield useful results?
:facepalm:
________________________________________

all that said, maybe there are alternatives to the infamous, useless, buggy, ignorant pwmconfig?
you know, constructive approach, instead of moaning and criticizing?

WeLoveDebian
Posts: 109
Joined: 2014-03-16 23:00

Re: pwmconfig produces a /etc/fancontrol which does not plea

#8 Post by WeLoveDebian »

This is all wrong.

First, install lm-sensors, then do:

# sensors-detect

If asks to add a module to load at startup, say yes.
Note the name of the module, then do:

# modprobe it87

(that's the name of my module)

Now you can use whatever sensors and fan you want to configure. My CPU fan is called "hwmon3/pwm1" and the sensor is "hwmon3/temp2_input".

Here's my fancontrol config:

Code: Select all

# Configuration file generated by pwmconfig, changes will be lost
INTERVAL=10
DEVPATH=hwmon3=devices/platform/it87.552
DEVNAME=hwmon3=it8620
FCTEMPS=hwmon3/pwm1=hwmon3/temp2_input
FCFANS= hwmon3/pwm1=hwmon3/fan1_input
MINTEMP=hwmon3/pwm1=20
MAXTEMP=hwmon3/pwm1=35
MINSTART=hwmon3/pwm1=150
MINSTOP=hwmon3/pwm1=0
MAXPWM=hwmon3/pwm1=135
Finally, enable and start the service:

# systemctl enable fancontrol

# systemctl start fancontrol

WeLoveDebian
Posts: 109
Joined: 2014-03-16 23:00

Re: pwmconfig produces a /etc/fancontrol which does not plea

#9 Post by WeLoveDebian »

It's not my job to fix /etc/fancontrol ; the file is generated by pwmconfig; so pwmconfig should generate a correct file
No, you should run pwmconfig and configure it accordingly. Select which fan and sensor input you want to configure, and set all minimum/maximum temps/rpm's, then save the config file and restart the fancontrol service.

In your specific case, instead of pressing 5 to save and quit, you should've pressed 1 and/or 2 to configure one or both of those fans, to only then save and quit.

DoubleHP
Posts: 72
Joined: 2016-10-09 08:55
Has thanked: 1 time

Re: pwmconfig produces a /etc/fancontrol which does not plea

#10 Post by DoubleHP »

I had previously installed and configured everything, and it was working fine.

aptitude upgrade
installed a new version of package that broke previously working system.

Post Reply