-
Notifications
You must be signed in to change notification settings - Fork 64
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
thinkfan doesn't work on devices with no pwmN_enable #171
Comments
If the |
I'm seeing this exact same error on Arch with a corsair commander pro.
|
Does it make sense for you to avoid the |
The error message you're seeing ( |
Since I removed thinkfan and am using a different script, I can't confirm this right away, but I believe you are correct. However, that file 100% is not created when setup by udev/lm_sensors on any of the three machines I have with this type of USB fan controller on it. |
@vmatare There were mutliple Permission denied errors, I'll have to install the original version of the script again to get the original error message. @koutheir I didn't realize there was a lm-sensors branch. I'll try that to see if it works out of the box. If it does, it might be good to add a hint to the README or install instructions for other users like me. Thinkfan is great, but I'm not sure people realize how versatile it is. |
I set up another machine with thinkfan, so I have the full error message:
This is triggered by the HwmonFanDriver in fans.cpp, which tries to set _enable to on the Hwmon path, which does not exist for all devices.
The destructor is trying to reset the value, therefore also causing the error. The error message is a bit misleading, but I removed the _enable code in the HwmonFanDriver, and now thinkfan works fine for my use case. For increased compatibility it might be good to only show a warning, but not throwing an exception if _enable doesn't exist. |
Thanks a lot for the investigation. I was under the impression that the |
The lm-sensors branch handles setting PWM the same way, and throws the same error. Unless I'm missing a way to set fans via a different driver than Hwmon? |
Oh right, sorry, you probably do. The config syntax for lm-sensors isn't properly documented, yet. Take a look at this comment: So basically you want to run
Then sensors:
- chip: drivetemp-scsi-3-0
ids: [ temp1 ] |
I did try this with sensors, but I didn't realize it works under "fans:" as well. I looked at the code for fans, and only saw an Hwmon and Tp driver. |
Yes, lm-sensors support is currently implemented only for temperature inputs. We're considering extending it to fans, as well, but currently I'm concentrating on implementing a clean and efficient retry logic for sensor read errors. |
Keep up the great work, I really like thinkfan and its capabilities! Would you be open to accept a change to the Hwmon driver, so that it doesn't throw an exception, but rather posts a warning? If I find the time I can see if I can make a pull request... |
Sorry about the mixup with libsensors & fans, apparently paying half-attention is sometimes not good enough^^
For the case of the missing
So yes, that might actually be the best way to address this issue (Although the documentation is quite ambiguous as to what "the feature" actually refers to in the case of |
lm-sensors seems to only support sensor inputs and has it's own issues.
Just to add a quick note: For example: My Corsair comander pro alternates between being identified as "corsaircpro-hid-3-2" and "corsaircpro-hid-3-13" in lm_sensors. Since that device has 6 fan headers missing the "pwmN_enable" function and 4 temperature probes, I would need the _enable bit to be optional and the 'name' functionality of the hwmon device declarations. So, using LM_sensors throws the same error for the missing file and fails if I reboot three times. |
I was trying to use thinkfan on a Mint Linux machine using a Corsair Commander Pro for fan control. I was running into the issue that the service would not start up:
ERROR: ~HwmonFanDriver: Resetting fan control in /sys/class/hwmon/hwmon8/pwm3: Permission denied
At first I thought it's a permission problem as stated, but it's due to thinkfan trying to enable the PWM channel through pwmN_enable, which does not exist in all configurations, e.g. the USB fan controller under Mint Linux I'm using.
I was now working around it by changing the HwmonFanDriver::init() function to now throw an error if pwmN_enable doesn't exist, and compiled and installed manually, which works fine.
Maybe there is a possibility to account for PWM controllers / systems that do not require pwm_enable?
The text was updated successfully, but these errors were encountered: