pwmconfig generate wrong config when multiple fans are on same pwm

Bug #1887586 reported by Joachim R.
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lm-sensors (Ubuntu)

Bug Description

WARNING, the package reported by ubuntu-bug is "lm-sensors", but pwmconfig and fancontrol are installed by "fancontrol" package.

When running pwmconfig, after the detection step you can configure min/max temp. If you answer 't' when prompted
"Enter the minimum PWM value (0-255)
at which the fan STOPS spinning (press t to test) (100):" can get the following error :
"cat: hwmon2/fan4_input+hwmon2/fan3_input+hwmon2/fan2_input: Aucun fichier ou dossier de ce type
/usr/sbin/pwmconfig: ligne 717 : [: -gt : opérateur unaire attendu"

If you ask pwmconfig to show the generated config, you can read
"Settings for hwmon2/pwm2:
  Depends on hwmon1/temp1_input
  Controls hwmon2/fan4_input+hwmon2/fan3_input+hwmon2/fan2_input"
...which is exactly the FCFANS value in /etc/fancontrol:
"FCFANS=hwmon2/pwm2=hwmon2/fan4_input+hwmon2/fan3_input+hwmon2/fan2_input hwmon2/pwm1=hwmon2/fan1_input"

The error occurring during PWM value test is due to this wrong path value with '+' sign.
This kind of value is generated when more than one fan is found on the same hwmonX/pwmY. On my computer, hwmon2 is coretemp-related, and hwmon2/pwm2 is controlling 4 fans.

The generated path with '+' doesn't exist, hence pwmconfig test scripts and fancontrol service should split the path using '+' as separator char to recover right paths to fanX_input files.

I checked what I have under "/sys/class/hwmon/", everything is fine: I can find all hwmon/fan and pwm items formerly detected by pwmconfig.

So the bug is just that fancontrol and pwmconfig scripts are not able to read the FCFANS value they generated in case of more than one fan by "pwm" !

ProblemType: Bug
DistroRelease: Ubuntu 19.10
Package: fancontrol 1:3.5.0-3ubuntu1
ProcVersionSignature: Ubuntu 5.3.0-62.56-generic 5.3.18
Uname: Linux 5.3.0-62-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu8.9
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Wed Jul 15 01:16:57 2020
Dependencies: lsb-base 11.0.1ubuntu1
EcryptfsInUse: Yes
InstallationDate: Installed on 2012-08-02 (2902 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
PackageArchitecture: all
 PATH=(custom, no user)
SourcePackage: lm-sensors
UpgradeStatus: Upgraded to eoan on 2019-12-03 (224 days ago)

Revision history for this message
Joachim R. (jro) wrote :
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu

The next step is to identify whether this bug is present in the upstream
project, introduced in Debian packaging, or introduced in Ubuntu's
modifications. If Ubuntu has not introduced the problem, we should get a bug
filed in the appropriate upstream bug tracker. Are you able to help with
this, please?

You can describe the issue at:

as it seems that the issue could be present in upstream source code.

If you do end up filing a bug upstream, please link to it here. Thanks!

Changed in lm-sensors (Ubuntu):
status: New → Triaged
importance: Undecided → Low
no longer affects: lm-sensors (Ubuntu Groovy)
Changed in lm-sensors (Ubuntu Focal):
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

BTW lm-sensors is the "source package" that gives life to pwmconfig, thus the reason why this was opened against the first one.

Revision history for this message
Joachim R. (jro) wrote :
Changed in lmsensors:
status: Unknown → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.