The error message you're seeing (cat: hwmon3/fan1_input: No such device) suggests that pwmconfig is having trouble accessing or recognizing the fan speed input file for the sensor it detected. This is often due to:
- The sensor not being properly initialized.
- Incompatible or missing kernel modules.
- Misconfiguration in the sensor setup.
Here's a step-by-step guide to troubleshoot and possibly resolve these issues:
Step 1: Verify Sensor Modules
Ensure that the appropriate sensor modules are loaded. You can check which modules are loaded using lsmod and then load any missing ones manually if needed.
-
List Loaded Modules:
lsmod | grep -E "coretemp|nct6775|it87|w83627ehf|lm90|k10temp"
-
Manually Load Modules:
You can manually load a module if it is not already loaded. For example:
sudo modprobe nct6775
-
Check dmesg for Errors:
dmesg | grep pwm
Step 2: Rerun sensors-detect
Rerun sensors-detect to ensure that it correctly identifies all available sensors.
sudo sensors-detect
Confirm the prompts to detect and load available drivers.
Step 3: Inspect /sys/class/hwmon/
Check the /sys/class/hwmon/ directory to verify the presence of hwmon entries corresponding to your fans and other sensors.
tree /sys/class/hwmon/
Ensure that each hwmon device has relevant files, including fan1_input, pwm1, etc.
Step 4: Automated and Manual Verification
Before running pwmconfig, it’s helpful to manually verify the presence of the files it's trying to access.
-
List hwmon Entries:
ls -l /sys/class/hwmon/
-
List Specific Device Entries:
Once you identify which hwmon represents your motherboard sensors:
ls -l /sys/class/hwmon/hwmon3/
Make sure that the relevant fan1_input and pwm1 files exist.
Step 5: Run pwmconfig with Debugging
Attempt to run pwmconfig again, but watch closely for specific error messages or prompts that might point to the exact issue.
sudo pwmconfig
If pwmconfig still produces the same error, you might want to manually edit the /etc/fancontrol configuration file to skip the problematic entry.
Step 6: Manually Edit /etc/fancontrol
If you know which entries to correct, edit the /etc/fancontrol file:
sudo nano /etc/fancontrol
Manually set the PWM and corresponding fan entries to avoid the missing files. You can reference the correct paths from your manual inspection of /sys/class/hwmon.
Example of /etc/fancontrol
You need to map the PWM and fan inputs correctly based on your inspection in step 4:
INTERVAL=10
DEVPATH=hwmon3=devices/platform/coretemp.0 hwmon0=devices/platform/nct6775
DEVNAME=hwmon3=coretemp hwmon0=nct6775
FCTEMPS=hwmon0/pwm1=hwmon3/temp1_input
FCFANS=hwmon0/pwm1=hwmon0/fan1_input
MINTEMP=hwmon0/pwm1=30
MAXTEMP=hwmon0/pwm1=70
MINSTART=hwmon0/pwm1=30
MINSTOP=hwmon0/pwm1=15
In this example, replace hwmon3/temp1_input and hwmon0/fan1_input with the paths appropriate for your actual hwmon entries.
Step 7: Start fancontrol Service
After manually configuring fancontrol, start or restart the service.
sudo service fancontrol start
To check if fancontrol is working correctly:
sudo service fancontrol status
Step 8: Monitoring
Use watch -n 1 sensors to verify if the fan speeds are being regulated according to your configuration.
watch -n 1 sensors
Conclusion
The errors during the pwmconfig run usually stem from mismatches between detected PWM controls and their associated inputs. Carefully verifying the sensor modules and paths, and manually configuring /etc/fancontrol can often resolve these issues.