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

Sync fans based on temp instead of duty #477

Merged
merged 1 commit into from
Aug 15, 2024
Merged

Sync fans based on temp instead of duty #477

merged 1 commit into from
Aug 15, 2024

Conversation

crawfxrd
Copy link
Member

@crawfxrd crawfxrd commented Jul 5, 2024

Fans may be different sizes, placed in asymmetrical positions, or have different amounts of venting through the chassis. These characteristics affect the ability for each fan, separately, to dissipate heat and generate noise.

Replace syncing fans to the highest duty calculated for each fan, based on separate thermal sensors, to using the highest reported temperature across all sensors to calculate each fan's duty for that highest temperature.

In other words: The old behavior synced fans based on the output value (duty), while this new behavior syncs fans based on the input value (temperature).

This allows tuning fans separately to better manage total system thermals and mitigate noise.

Tested by modifying FAN2 points on oryp6 to always run at 80% and then verifying that "CPU fan" spins up/down to different values than "GPU fan".

Resolves: #390.

@crawfxrd crawfxrd force-pushed the fan-sync-temp branch 2 times, most recently from 348a582 to b560216 Compare July 5, 2024 21:58
Base automatically changed from fan2 to master July 17, 2024 22:28
Fans may be different sizes, placed in asymmetrical positions, or have
different amounts of venting through the chassis. These characteristics
affect the ability for each fan, separately, to dissipate heat and
generate noise.

Replace syncing fans to the highest duty calculated for each fan, based
on separate thermal sensors, to using the highest reported temperature
across all sensors to calculate each fan's duty for that highest
temperature.

In other words: The old behavior synced fans based on the *output* value
(duty), while this new behavior syncs fans based on the *input* value
(temperature).

This allows tuning fans separately to better manage total system
thermals and mitigate noise.

Signed-off-by: Tim Crawford <[email protected]>
@crawfxrd crawfxrd marked this pull request as ready for review July 18, 2024 00:06
@crawfxrd crawfxrd requested review from a team July 18, 2024 00:06
@XV-02
Copy link

XV-02 commented Jul 23, 2024

Would we expect the fan with a steady-state fan-curve to boost above that duty cycle on initial spin-up?

To build firmware leveraging this, just to confirm, I should only need the fan2 branch in firmware-open and this branch for ec, right?

@crawfxrd
Copy link
Member Author

Would we expect the fan with a steady-state fan-curve to boost above that duty cycle on initial spin-up?

Maybe for a second while it ramps up? I'm not sure how long it would take to become stable.

To build firmware leveraging this, just to confirm, I should only need the fan2 branch in firmware-open and this branch for ec, right?

Correct.

Copy link

@XV-02 XV-02 left a comment

Choose a reason for hiding this comment

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

The fan over-ramp seemed to last no more than 5 seconds before it settled down. I'd wondered if it was somehow a result of the Heat-up timing, as that's a 5 second sample period, or potentially a result of the fan-smoothing?

I was testing on a gaze16-3060-b with the fan duty values for Fan2 set at 80% for all temps over 60°C. After reaching steady state on Fan2, I saw Fan1 adjust to match the temps being reported by the system, including dipping below Fan2's duty cycle.

That seems to be the desired behaviour. I think this is working well enough for approval.

I would like to see system76/firmware-open#563 merged before this, but as far as I could tell, there were no critical issues with this branch and the current master for firmware-open.

Copy link
Member

@leviport leviport left a comment

Choose a reason for hiding this comment

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

Re-approving based on Daniel's testing. Since he's now out of the org, his checkmark turned gray, so I just wanted to make sure the QA approval was still valid.

@jackpot51 jackpot51 merged commit 710b479 into master Aug 15, 2024
47 checks passed
@jackpot51 jackpot51 deleted the fan-sync-temp branch August 15, 2024 15:34
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.

Sync fans based on temp instead of duty
4 participants