clockworkpi / DevTerm

This code repository offers downloads for the latest images of various DevTerm models, as well as kernel patches, keyboard firmware, the source code for screen and printer drivers, hardware schematics, assembly instructions, and essential technical documents.
GNU Lesser General Public License v2.1
387 stars 68 forks source link

A06 fan control updates #36

Closed kemenril closed 2 years ago

kemenril commented 2 years ago

Hey everybody,

Not sure if you're willing to consider a pull for this, but the fan control daemon on my A06 was bothering me a great deal when I got the machine. I've patched it up a bit to do the following things:

Lowers the threshold for which the fan comes on -- you could take or leave that bit.

Rather than turning the fan on and then off every time through the loop, turn it on when the fan reaches the threshold temp, and leave it until it gets below the threshold again by a margin which can be set in a variable. It actually checks each thermal zone separately and keeps the fan active until they're all cool.

Print some messages to stderr so that when you run systemctl status on the service, you can see whether the fan has been active, where the thresholds are, and when they're being hit.

I've made a few recent updates, but the much similar, previous version did cure an overheating problem I was having at the start.

andypiper commented 2 years ago

LGTM! more efficient by not turning on and off so frequently.