Package: fancontrol
Version: 1:3.6.0-7.1
Severity: normal
X-Debbugs-Cc: linus.luess...@c0d3.blue

Dear Maintainer,

If pwmconfig detects "no correlation" between the configured pwm1
speed and the resulting output value in fan1_input in my case (due to
the too low DELAY value, as reported in another ticket) and if I then
choose to perform the auto-detection for the "minimum PWM value" then
this hangs indefinitly on:

```
function TestMinStop()
{
[...]
                fanspeed=$(cat $faninput)
```

Because $faninput is an empty string. See more detailed output below.

Regards, Linus





*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***


-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, arm64

Kernel: Linux 6.1.0-1-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages fancontrol depends on:
ii  init-system-helpers        1.65.2
ii  sysvinit-utils [lsb-base]  3.06-2

fancontrol recommends no packages.

fancontrol suggests no packages.

-- no debconf information


```
$ sudo pwmconfig
# pwmconfig version 3.6.0
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 BAT0
   hwmon2 is nvme
   hwmon3 is amdgpu
   hwmon4 is AC
   hwmon5 is k10temp
   hwmon6 is thinkpad
   hwmon7 is ath11k_hwmon

Found the following PWM controls:
   hwmon6/pwm1           current value: 0

Giving the fans some time to reach full speed...
Found the following fan sensors:
   hwmon6/fan1_input     current speed: 4926 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 hwmon6/pwm1 ...
~~~ i: hwmon6/pwm1, calling: pwmset hwmon6/pwm1 0 (fan1_input: 65535, pwm1: 255)
~~~ i: hwmon6/pwm1, after calling: pwmset hwmon6/pwm1 0 (fan1_input: 65535, 0)
~~~ i: hwmon6/pwm1, after calling: pwmset hwmon6/pwm1 0; sleep 5 (fan1_input: 
4918, 0)
~~~ CURRENT_SPEED: 4918, SPEEDS: 4926
~~~ j in GOODFAN: hwmon6/fan1_input in hwmon6/fan1_input
  hwmon6/fan1_input ... speed was 4926 now 4918
~~~ S: 4918, threshold: 3694, OS: 4926
    no correlation

No correlations were detected.
There is either no fan connected to the output of hwmon6/pwm1,
or the connected fan has no rpm-signal connected to one of
the tested fan sensors. (Note: not all motherboards have
the pwm outputs connected to the fan connectors,
check out the hardware database on http://www.almico.com/forumindex.php)

Did you see/hear a fan stopping during the above test (n)? y

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)? 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) hwmon6/pwm1
2) Change INTERVAL
3) Just quit
4) Save and quit
5) Show configuration
select (1-n): 1

Devices:
hwmon0 is acpitz
hwmon1 is BAT0
hwmon2 is nvme
hwmon3 is amdgpu
hwmon4 is AC
hwmon5 is k10temp
hwmon6 is thinkpad
hwmon7 is ath11k_hwmon

Current temperature readings are as follows:
hwmon0/temp1_input      20
hwmon2/temp1_input      38
hwmon2/temp2_input      38
hwmon2/temp3_input      38
hwmon3/temp1_input      32
hwmon5/temp1_input      32
hwmon6/temp1_input      32
cat: hwmon6/temp2_input: No such device or address
/usr/sbin/pwmconfig: line 908: let: S= / 1000: syntax error: operand expected 
(error token is "/ 1000")
hwmon6/temp2_input      
hwmon6/temp3_input      32
hwmon6/temp4_input      0
hwmon6/temp5_input      32
hwmon6/temp6_input      32
hwmon6/temp7_input      32
cat: hwmon6/temp8_input: No such device or address
/usr/sbin/pwmconfig: line 908: let: S= / 1000: syntax error: operand expected 
(error token is "/ 1000")
hwmon6/temp8_input      
hwmon7/temp1_input      34
~~~ fanactive: , REPL: 1

Select a temperature sensor as source for hwmon6/pwm1:
1) hwmon0/temp1_input                      4) hwmon2/temp3_input                
     7) hwmon6/temp1_input                    10) hwmon6/temp4_input            
        13) hwmon6/temp7_input                    16) None (Do not affect this 
PWM output)
2) hwmon2/temp1_input                      5) hwmon3/temp1_input                
     8) hwmon6/temp2_input                    11) hwmon6/temp5_input            
        14) hwmon6/temp8_input
3) hwmon2/temp2_input                      6) hwmon5/temp1_input                
     9) hwmon6/temp3_input                    12) hwmon6/temp6_input            
        15) hwmon7/temp1_input
select (1-n): 7

Enter the low temperature (degree C)
below which the fan should spin at minimum speed (20): 

Enter the high temperature (degree C)
over which the fan should spin at maximum speed (60): 

Enter the minimum PWM value (0-255)
at which the fan STOPS spinning (press t to test) (100): t
~~~ calling: TestMinStop 

Now we decrease the PWM value to figure out the lowest usable value.
We will use a slightly greater value as the minimum speed.
TestMinStop: calling: pwmenable hwmon6/pwm1
TestMinStop: calling: pwmset hwmon6/pwm1 255
TestMinStop: calling: sleep 2
TestMinStop: calling: cat 
```

Reply via email to