Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fancontrol-gui generates invalid /etc/fancontrol configuration file. #78

Open
zelifcam opened this issue Jan 16, 2023 · 0 comments
Open

Comments

@zelifcam
Copy link

zelifcam commented Jan 16, 2023

Fancontrol-gui APP actually just populates a text file /etc/fancontrol. I've noticed that the fancontrol-gui app has been generating an invalid fancontrol file.

FIRST BE SURE TO FIRST USE THE FANCONTROL-GUI APP to GENERATE A CONFIG.
If done properly you will see something similar to the one I have below.

Check if fancontrol.service is actually enabled and running?
As you can see, it's enabled, but failing to start because of a failed device path.
$ sudo systemctl status fancontrol.service

× fancontrol.service - Start fan control, if configured
     Loaded: loaded (/usr/lib/systemd/system/fancontrol.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Mon 2023-01-16 10:22:12 MST; 3s ago
   Duration: 118ms
    Process: 114665 ExecStart=/usr/sbin/fancontrol (code=exited, status=1/FAILURE)
   Main PID: 114665 (code=exited, status=1/FAILURE)
        CPU: 203ms

Jan 16 10:22:12 arch-workstation fancontrol[114665]:   MAXTEMP=47
Jan 16 10:22:12 arch-workstation fancontrol[114665]:   MINSTART=255
Jan 16 10:22:12 arch-workstation fancontrol[114665]:   MINSTOP=0
Jan 16 10:22:12 arch-workstation fancontrol[114665]:   MINPWM=0
Jan 16 10:22:12 arch-workstation fancontrol[114665]:   MAXPWM=255
Jan 16 10:22:12 arch-workstation fancontrol[114665]:   AVERAGE=1
Jan 16 10:22:12 arch-workstation fancontrol[114665]: Device path of hwmon12 has changed
Jan 16 10:22:12 arch-workstation fancontrol[114665]: Configuration appears to be outdated, please run pwmconfig again
Jan 16 10:22:12 arch-workstation systemd[1]: fancontrol.service: Main process exited, code=exited, status=1/FAILURE
Jan 16 10:22:12 arch-workstation systemd[1]: fancontrol.service: Failed with result 'exit-code'.

Take a look at /etc/fancontrol and see if it is missing the line break:

Screenshot_20230116_103456

Here's the config file fixed:

cat /etc/fancontrol                           
# This file was created by Fancontrol-GUI
INTERVAL=10
DEVPATH=hwmon4=devices/pci0000:00/0000:00:18.3
hwmon12=devices/platform/nct6775.656/hwmon/hwmon12
DEVNAME=hwmon4=zenpower hwmon12=nct6798 
FCTEMPS=hwmon12/pwm1=hwmon4/temp1_input hwmon12/pwm2=hwmon4/temp1_input hwmon12/pwm3=hwmon4/temp1_input hwmon12/pwm6=hwmon4/temp1_input 
FCFANS=hwmon12/pwm1=hwmon12/fan1_input hwmon12/pwm2=hwmon12/fan2_input hwmon12/pwm3=hwmon12/fan3_input hwmon12/pwm6=hwmon12/fan6_input 
MINTEMP=hwmon12/pwm1=30 hwmon12/pwm2=30 hwmon12/pwm3=49 hwmon12/pwm6=30 
MAXTEMP=hwmon12/pwm1=49 hwmon12/pwm2=49 hwmon12/pwm3=60 hwmon12/pwm6=47 
MINSTART=hwmon12/pwm1=255 hwmon12/pwm2=255 hwmon12/pwm3=255 hwmon12/pwm6=255 
MINSTOP=hwmon12/pwm1=0 hwmon12/pwm2=0 hwmon12/pwm3=0 hwmon12/pwm6=0 
MINPWM=hwmon12/pwm1=0 hwmon12/pwm2=0 hwmon12/pwm3=0 hwmon12/pwm6=0 
MAXPWM=hwmon12/pwm1=255 hwmon12/pwm2=255 hwmon12/pwm3=255 hwmon12/pwm6=255 
AVERAGE=hwmon12/pwm1=1 hwmon12/pwm2=1 hwmon12/pwm3=1 hwmon12/pwm6=1 

Restart the service:
$ sudo systemctl restart fancontrol.service

Here it is working:
$ sudo systemctl status fancontrol.service

┌─[admin@arch-workstation] - [~] - [2023-01-16 10:28:43]
└─[0] <> sudo systemctl status fancontrol.service
● fancontrol.service - Start fan control, if configured
     Loaded: loaded (/usr/lib/systemd/system/fancontrol.service; enabled; preset: disabled)
     Active: active (running) since Mon 2023-01-16 10:25:54 MST; 2min 57s ago
   Main PID: 145121 (fancontrol)
      Tasks: 2 (limit: 77033)
     Memory: 1.5M
        CPU: 414ms
     CGroup: /system.slice/fancontrol.service
             ├─145121 /bin/bash /usr/sbin/fancontrol
             └─166454 sleep 10

Jan 16 10:25:54 arch-workstation fancontrol[145121]:   Controls hwmon12/fan6_input
Jan 16 10:25:54 arch-workstation fancontrol[145121]:   MINTEMP=30
Jan 16 10:25:54 arch-workstation fancontrol[145121]:   MAXTEMP=47
Jan 16 10:25:54 arch-workstation fancontrol[145121]:   MINSTART=255
Jan 16 10:25:54 arch-workstation fancontrol[145121]:   MINSTOP=0
Jan 16 10:25:54 arch-workstation fancontrol[145121]:   MINPWM=0
Jan 16 10:25:54 arch-workstation fancontrol[145121]:   MAXPWM=255
Jan 16 10:25:54 arch-workstation fancontrol[145121]:   AVERAGE=1
Jan 16 10:25:54 arch-workstation fancontrol[145121]: Enabling PWM on fans...
Jan 16 10:25:54 arch-workstation fancontrol[145121]: Starting automatic fan control...

This fix allows my fan curves to work, but breaks the ability to use the fancontrol-gui app as it will complain the config file is wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant