Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commander Core: Add fixed speed support #405

Merged
merged 5 commits into from
Jan 18, 2022

Conversation

ParkerMc
Copy link
Contributor

@ParkerMc ParkerMc commented Dec 27, 2021

Adds pump and fan detection to initialize.
Adds support for setting a fixed percentage as the speed to the pump and each fan.

Related: #218


Checklist:

  • Adhere to the development process
  • Conform to the style guide
  • Verify that the changes work as expected on real hardware
  • Add automated tests cases
  • Verify that all (other) automated tests (still) pass
  • Update the README and other applicable documentation pages
  • Update the liquidctl.8 Linux/Unix/Mac OS man page
  • Update or add applicable docs/*guide.md device guides
  • Submit relevant data, scripts or dissectors to https://github.com/liquidctl/collected-device-data

New CLI flag?

  • Adjust the completion scripts in extra/completions/

New device?

  • Regenerate extra/linux/71-liquidctl.rules (instructions in the file header)
  • Add entry to the README's supported device list with applicable notes (at least en)

New driver?

  • Document the protocol in docs/developer/protocol/

@ParkerMc
Copy link
Contributor Author

Still working on documentation, tests, and updating collected device data, but everything else is ready for feedback.

@ParkerMc ParkerMc marked this pull request as ready for review January 17, 2022 02:03
Copy link
Member

@jonasmalacofilho jonasmalacofilho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation looks great. I especially like how you were able to only change the mode of the specified channel, without storing anything on the liquidctl side.

Just one comment on the documentation, and a nitpick on the casing of a status attribute name.

├── AIO LED count 29
├── RGB port 1 LED count 8
├── RGB port 2 LED count 8
├── RGB port 3 LED count N/A
├── RGB port 4 LED count N/A
├── RGB port 5 LED count N/A
├── RGB port 6 LED count N/A
├── AIO Pump Yes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: AIO pump.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should AIO pump become just AIO?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that makes sense. Or maybe even AIO port.

Also, since these are all booleans, maybe AIO port connected or AIO port in use? (And similarly for the fan ports).

Comment on lines 63 to 64
Note: There is a hardware minimum speed when setting a fixed duty cycle. Anything below that point just runs at the minimum.
This means that 0 is not stopped and a lot of the lower speeds mean the same speed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, I think it's better to explicitly state the allowed range. Something like:

The firmware limits the minimum pump and fan speeds in fixed mode: for the pump, it is {}%; for the fans, it is {}%.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So iCUE, limits between 0% and 20%. I can set it to 0% or anything 20% and higher. I have two different types of fans now ML and LL, when set to 0% the ML's will stop and the LL's will not. So I'll have to test the differences more thoroughly.
As for the pump, iCUE limits it to 3 preset settings. Quiet, Balanced, Extreme, and Variable Speed. I will figure out what exactly those are and test lower ones to see how exactly the pump responds.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see. In that case, let's leave them unrestrained for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rewrote that note so it makes more sense.

liquidctl/driver/commander_core.py Outdated Show resolved Hide resolved
@@ -99,7 +114,27 @@ def set_speed_profile(self, channel, profile, **kwargs):
raise NotSupportedByDriver

def set_fixed_speed(self, channel, duty, **kwargs):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any thoughts on displaying the fan/pump mode and target fixed speed (if set) that are set here in the status message? Maybe potentially under --verbose? If so is there a device that does this already or format ideas?
This can be another PR, I just had the idea.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be nice.

For the pump/fan mode, take a look at the Commander Pro and Smart Device (V1): those specific devices only report PWM or DC, but you could extend that idea for whether their running in fixed PWM or on-board profile modes. IIRC, they use enums with a suitable __str__() implementation for the pretty/human output.

For the target duty cycle (if set), take a look at the Corsair Platinum coolers.

@ParkerMc
Copy link
Contributor Author

I especially like how you were able to only change the mode of the specified channel, without storing anything on the liquidctl side.

That was actually a goal I had because I really don't want it to change speed and mess up the fan curve when I switch between windows and linux unless I specifically tell it to. Protocol made it decently easy, just have to add the read and modify the data.

@jonasmalacofilho jonasmalacofilho merged commit 04ae5d6 into liquidctl:main Jan 18, 2022
@jonasmalacofilho
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants