system76 / thelio-io-windows

WIP Windows driver for System76 Thelio Io
GNU General Public License v3.0
16 stars 8 forks source link

feature requests: implement service stop, configuration file, fan speed back-off #14

Open draeath opened 1 year ago

draeath commented 1 year ago

I had a brain storm this morning and thought of three things I would like to see implemented. I may have a stab at implementing them myself, if only as an exercise in learning Rust:

  1. Implement "stop" support for the service. Right now it can only stop, if one wants to stop the service they have to kill the process.
  2. Implement a fan speed "back-off" such that, as the CPU cools, the fan doesn't immediately spin down. This helps mitigate frequent "pulses" of fan speed in response to short CPU utilization spikes. Imagine a dampener on deceleration only.
  3. Implement some sort of configuration - perhaps via file, perhaps via registry. Back-off could be configured via this. I'd suggest the current fan speed profiles hard-coded in be left as-is as a fallback, in case of an exception when reading in and validating the configuration.
draeath commented 1 year ago

Had a brain storm today, and I think replacing the "speed vs temperature" implementation with a PID controller could perhaps do the job nicely. If it works, that might be something worth porting to the original Linux implementation?

There are a few PID controller rust implementations out there, for example this, this, or this (non-exhaustive list)