Skip to content

Corsair Commander Core: Add support for speed curve profiles#687

Merged
jonasmalacofilho merged 1 commit intoliquidctl:mainfrom
agireud:corsair_commander_core
May 10, 2024
Merged

Corsair Commander Core: Add support for speed curve profiles#687
jonasmalacofilho merged 1 commit intoliquidctl:mainfrom
agireud:corsair_commander_core

Conversation

@agireud
Copy link
Contributor

@agireud agireud commented Apr 3, 2024

Continues where #454 left off and implements support for speed curve configuration for the pump/fans in the Corsair Commander Core driver. Much of this is based off the initial work by @ParkerMc (thank you!) but has deviated significantly from the protocol documented in the original merge request.

Two areas are of particular interest:

  1. _CMD_READ has been split into 3 separate read commands (_CMD_READ_INITIAL,_CMD_READ_MORE,_CMD_READ_FINAL) which are necessary to continue reading data from the device when the data exceeds the device->host packet size.

  2. The addition of _CMD_WRITE_MORE which allows writing data to the device when the data exceeds the host->device packet size. (Based off the work @ParkerMc did for OpenRGB).

I am currently running this on my Gentoo Linux system without any hiccups and the fan duties are adjusting appropriately based on temperature readings in all cases I've tested. The Corsair Commander Core is running the latest v2.11.221 firmware.

I've verified all existing tests are passing and also added two new tests for speed curve profiles. If anyone is available to aid with further testing that would be helpful.

Note: Missing from this implementation is the ability to specify which temperature sensor is utilized by a speed curve profile, but extending support should be straight forward once this gets merged. Currently it is hard coded to utilize the built-in water temperature sensor.

Closes: #454, #447
Related: #218, #520, #623


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/add documentation
    • README, with ["new/changed in" notes]
    • applicable docs/*guide.md device guides, with ["new/changed in" notes]
    • liquidctl.8 Linux/Unix/Mac OS man page
    • protocol documentation in docs/developer/protocol
  • 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 and git MRLV

New driver?

  • Document the protocol in docs/developer/protocol/

@ParkerMc
Copy link
Contributor

ParkerMc commented Apr 3, 2024

I only took a quick glance but looks around what I expected. I'm glad my guess with the read more command worked out. Thanks for finishing the implmentation!
If you plan to work more on the driver (like adding RGB) let me know and I can give you some more pointers on what I've learned.

@agireud agireud marked this pull request as draft April 6, 2024 04:14
@agireud agireud marked this pull request as ready for review April 12, 2024 00:29
@agireud
Copy link
Contributor Author

agireud commented Apr 12, 2024

@ParkerMc turns out I spoke too soon! My previous implementation was flawed but I was able to figure out the protocol and get everything fully functional. The read commands ended up looking quite different though.

@agireud agireud changed the title Corsair Commander Core: Implement fan curve control Corsair Commander Core: Implement speed curve control Apr 12, 2024
@agireud agireud changed the title Corsair Commander Core: Implement speed curve control Corsair Commander Core: Add support for speed curves Apr 12, 2024
@agireud agireud changed the title Corsair Commander Core: Add support for speed curves Corsair Commander Core: Add support for speed curve profiles Apr 12, 2024
@jonasmalacofilho jonasmalacofilho self-requested a review May 10, 2024 05:08
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.

Looks good to me except for the small nit. I'll fix it on my end and merge it.

Thanks for the PR (and for the poke on Discord)!

Comment on lines +4 to +7
_New in 1.9.0: fixed duty cycles are now supported._<br>
_Changed in 1.11.0: the Corsair Commander Core XT is now supported._<br>
_Changed in 1.12.0: the Corsair Commander ST is now supported._<br>
_New in 1.13.1: speed curve profiles are now supported._<br>
Copy link
Member

Choose a reason for hiding this comment

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

Nit: I've generally opted to keep "New in" at the top of the sections describing the new feature. And as such they apply to the entire section, and need no further description.

In this case, it would be:

_New in 1.9.0._<br>

for the fixed speeds and

_New in git._<br>

for the newly suported speed curves.

@jonasmalacofilho jonasmalacofilho merged commit a8be683 into liquidctl:main May 10, 2024
jonasmalacofilho added a commit that referenced this pull request May 19, 2024
To be honest, it may be the case that some of the issues have indeed
been solved with a8be683 (PR #687). However, there still seems to
be a long list of remaining issues, and I think we're starting to lose
track of what works and what doesn't.

This partially reverts commits 6426a06.

Related: #520, #583, #598, #623, #705
Related: PR #687
@pflavio
Copy link

pflavio commented Jul 14, 2024

Are the drivers installed automatically or do I need to add them to my system?

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.

4 participants