KsenijaS / krakenx

Python script to control NZXT cooler Kraken X52/X62 in Linux
GNU General Public License v2.0
181 stars 20 forks source link

Add support for fan and pump speed profiles based on liquid temperature #24

Closed jonasmalacofilho closed 6 years ago

jonasmalacofilho commented 6 years ago

Profiles are automatically validated, normalized and interpolated between 20°C and 60°C, in 2°C steps. For why this is necessary, check the discussion in #11 (in particular this comment).

Apart from parsing and validation code, the protocol implementation is, essentially, a port from the relevant parts of liquidctl.


The syntax extends the --fan_speed and --pump_speed options (and their shorthands -fs and -ps) to accept comma-separated lists of tuples:

# colctl --fan_speed 50 --pump_speed 60 [...]
# colctl --fan_speed "(20,30),(30,50),(40,90),(45,100)" [...]

I am not sure about these parentheses though. While they improve readability (compared with what I did for liquidctl), it is somewhat annoying that they need to quoted or escaped in Linux/Unix shells (not sure about Command Prompt/Power Shell). What do you think?


The default profiles are adaptions of what I use on my Kraken X62. But since I had to rely on my notes to convert the noise levels and performance from the NF-A14s I currently use to the stock Aer P 140s, they might be a bit off.

The goal was to provide sane defaults, that would stay within acceptable noise levels while still being more aggressive than CAM's (not at all) 'performance' profile. Can some of you test if what I am proposing achieves that?

For reference, these are CAM's base profiles, if my notes are to be trusted:

$ echo silent
# colctl -fs '(35,25),(40,35),(45,45),(50,55),(55,75)' -ps '(35,60),(40,70),(45,80),(50,90),(55,100)'

$ echo performance
# colctl -fs '(35,50),(40,60),(45,70),(50,80),(55,90)' -ps '(35,70),(40,80),(45,85),(50,90),(55,95)'

Note: we cannot forget about the smaller X52 and, even, the tiny X42.

jneumaier commented 6 years ago

Looks great! I also forget about Unix shells and escapes, but I think it is a very good syntax overall. Another easy solution could be something like 20-30,30-50,40-90,45-100, 20/30,30/50,40/90,45/100 or some similar notation. I think these characters would work without escaping in this context. I like both solutions. I will test the new features in detail on the weekend to be sure and rebase/merge the code then.

jonasmalacofilho commented 6 years ago

I'll wait for someone else besides me to test this before merging.

Despite what we're discussing in #11 (sharing the driver), a large part of this involves the UI and, in my opinion, should be merged before that big change to the internals.

jneumaier commented 6 years ago

Works like a charm!