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

Various fixes #25

Merged
merged 1 commit into from
Nov 13, 2021
Merged

Various fixes #25

merged 1 commit into from
Nov 13, 2021

Conversation

JoshIles
Copy link
Contributor

  • Added support for Fan Speed Steps.
  • Made changes to C/Python clients to include "zenpower" for AMD Zen family CPUs in wait_for_hwmon.
  • Made changes to C/Python clients to delete the nbfc state file when the service is stopped so that nbfc status will correctly report "service not running".
  • Improved formatting in C client for nbfc status and error messages.
  • Updated the "Acer Nitro AN515-43.json" config to account for the 0 UpThreshold entry since it was not picked up by 376ce6b (it was a manually added json).
  • Fixed incorrect current fan speed reporting when the fan speed is 0 on some notebooks*.

*I personally had this issue, and it seems it was caused by the range check in the for-loop of Fan_UpdateCurrentSpeed (src/fan.c). For example, when the fan speed is 0 on my HP EliteBook 8560p, Fan_ECReadValue returns 255 (FF) which is outside of the minSpeedValueReadAbs/maxSpeedValueReadAbs range. As such, the my.currentSpeed update was never being run. The solution was to move the update outside of the for-loop, which is in line with the original NBFC service.

@jwhendy
Copy link

jwhendy commented Nov 12, 2021

Killer! My woes are handled:

  • accurate current speed report
  • bonus that you fixed the reported speed steps (which didn't seem to impact behavior, but is nice to see as accurate)

Sample output from running stress-ng and watching it ramp/descend.

$ nbfc status -a
Read-only               : False
Selected config name    : HP ZBook Fury 15 G7
Temperature             : 64.83

Fan display name        : Right fan
Auto control enabled    : True
Critical mode enabled   : False
Current fan speed       : 0.0
Target fan speed        : 40.0
Fan speed steps         : 225

Fan display name        : Left Fan
Auto control enabled    : True
Critical mode enabled   : False
Current fan speed       : 0.0
Target fan speed        : 40.0
Fan speed steps         : 225


$ nbfc status -a
Read-only               : False
Selected config name    : HP ZBook Fury 15 G7
Temperature             : 58.81

Fan display name        : Right fan
Auto control enabled    : True
Critical mode enabled   : False
Current fan speed       : 56.44
Target fan speed        : 60.0
Fan speed steps         : 225

Fan display name        : Left Fan
Auto control enabled    : True
Critical mode enabled   : False
Current fan speed       : 56.44
Target fan speed        : 60.0
Fan speed steps         : 225


$ nbfc status -a
Read-only               : False
Selected config name    : HP ZBook Fury 15 G7
Temperature             : 48.48

Fan display name        : Right fan
Auto control enabled    : True
Critical mode enabled   : False
Current fan speed       : 0.0
Target fan speed        : 0.0
Fan speed steps         : 225

Fan display name        : Left Fan
Auto control enabled    : True
Critical mode enabled   : False
Current fan speed       : 0.0
Target fan speed        : 0.0
Fan speed steps         : 225

Thanks so much!!

@batmalin
Copy link
Contributor

Thank you mate! I have currently no time to even look at the project but soon I will be back on here.

@braph braph merged commit bc43731 into nbfc-linux:main Nov 13, 2021
@braph
Copy link
Contributor

braph commented Nov 13, 2021

Thank you, excellent work!

@JoshIles JoshIles deleted the various-fixes branch November 14, 2021 02:13
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.

None yet

4 participants