CPU/GPU fan control with safety via hwmon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everyone,

I'm currently conceptualizing an upstream implementation for the fan control on our Sirius 16 Gen 1 & 2 devices which has the following custom WMI functions (pseudo code):

void SMOD(bool mode): Toggle firmware controlled fans vs manually (aka via the commands below) controlled fans
bool GMOD(): Get current SMOD setting
int GCNT(): Get number of fans
enum GTYP(int index): Returns "CPU-fan" or "GPU-fan"
void SSPD(int index, int value): Set fan speed target as a fraction of max speed
int GSPD(int index): Get current fan speed target as a fraction of max speed
int GRPM(int index): Get current actual fan speed in revolutions per minute
int GTMP(int index): Get temperature of thing fan with respective index is pointed at (CPU or GPU die, see GTYP)

However there are some physical limitations that are not in the firmware and I would like to implement as low as possible in software, aka the driver, to avoid hardware damage:

1. Valid fan speeds are 0% (fan off) and 25-100%. Values from 1%-24% must not be written.

2. As long as GTMP is > 80°C fan speed must be at least 30%.

We would love to see the same driver enforced restrictions in the Uniwil driver Armin is working on and the Clevo driver Juno Computers is working on.

My Idea so far:

1. Round SSPD input: 0-12% -> 0%, 13-25% -> 25%

2. Periodically check GTMP (every second should be enough) in driver and if the temperature is over 80°C set current and incoming speed commands to at at least 30%.

Is this legitimate with the hwmon design?

Second question: Is there a good way to implement a userspace controlled switch between auto and manual mode?

Kind regards,

Werner Sembach





[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux