• [6.9.2] Auto Fan Control Assumes PWM Enable SysFS Attribute Exists


    HarryMuscle
    • Closed

    This is a bug report for the Auto Fan Control functionality.  The code (in the include/SystemFan.php file and possibly others) is hard coded to assume that the pwmX_enable sysfs attribute exists, however, this is an optional attribute that some drivers do not implement.  For example, we're working on developing a driver for an embedded controller chip used in many QNAP NAS devices so that Unraid and other Linux based OSes can read and control fan speeds, however, this embedded controller chip doesn't provide a enable/disable PWM function (PWM is always enabled) therefore according to the hwmon/sysfs standards our driver should not be creating a PWM enable sysfs attribute. However, without that attribute we get the following error from Auto Fan Control:

     

    <br /><b>Warning</b>: file_get_contents(/sys/devices/platform/qnap-ec/hwmon/hwmon2/pwm7_enable): failed to open stream: No such file or directory in <b>/usr/local/emhttp/plugins/dynamix.system.autofan/include/SystemFan.php</b> on line <b>40</b><br /><br /><b>Warning</b>: file_put_contents(/sys/devices/platform/qnap-ec/hwmon/hwmon2/pwm7_enable): failed to open stream: Permission denied in <b>/usr/local/emhttp/plugins/dynamix.system.autofan/include/SystemFan.php</b> on line <b>42</b><br /><br /><b>Warning</b>: file_put_contents(/sys/devices/platform/qnap-ec/hwmon/hwmon2/pwm7_enable): failed to open stream: Permission denied in <b>/usr/local/emhttp/plugins/dynamix.system.autofan/include/SystemFan.php</b> on line <b>50</b><br />

     

    Is it possible to change the code to check if this attribute exists before trying to open it and if it doesn't exist assume PWM is enabled? Or is the concern that without this attribute the code doesn't know if PWM is enabled and the developers don't feel comfortable assuming that it is enabled?

     

    There are also reports of the same issue with other drivers.  Here's one just for reference: 

     

     

    Thanks,

    Harry




    User Feedback

    Recommended Comments

    This is a plugin, not part of stock Unraid, any issues should be reported in the existing pllugin support thread.

    Link to comment
    1 minute ago, JorgeB said:

    This is a plugin, not part of stock Unraid, any issues should be reported in the existing pllugin support thread.

    According to the GitHub page for Dynamix (https://github.com/bergware/dynamix) the plugins are now part of Unraid.  This was also confirmed in the Dynamix support thread:

     

    So we seem to be getting conflicting information.  Any way to confirm who exactly supports the Auto Fan Control related code and how to get in touch with them?

     

    Thanks,

    Harry

    Link to comment
    15 minutes ago, HarryMuscle said:

    So we seem to be getting conflicting information.

    No, the Dynamix UI is part of Unraid, not the plugins, you were given the same info in the plugins support thread.

    Link to comment


    Guest
    This is now closed for further comments

  • Status Definitions

     

    Open = Under consideration.

     

    Solved = The issue has been resolved.

     

    Solved version = The issue has been resolved in the indicated release version.

     

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

    Retest = Please retest in latest release.


    Priority Definitions

     

    Minor = Something not working correctly.

     

    Urgent = Server crash, data loss, or other showstopper.

     

    Annoyance = Doesn't affect functionality but should be fixed.

     

    Other = Announcement or other non-issue.