foucault / nvfancontrol

NVidia dynamic fan control for Linux and Windows
GNU General Public License v3.0
208 stars 20 forks source link

Monitor (-m) flag modifies fan speed on exit #29

Closed koitsu closed 3 years ago

koitsu commented 3 years ago

When using -m -j on Windows, upon exiting the program (Ctrl-C), the fan speeds are reset to 0. In other words: -m isn't just "pure monitoring". When using -d, I can clearly see at the end the message Resetting fan control (I suspect this is the cause).

I'm using the version provided here since I have an RTX GPU (in contrast, 0.5.0 crashes).

Testing methodology:

  1. Launch EVGA Precision X1 and set fan speed to 44%. Verify fan RPMs are around 1674 or so.
  2. Run nvcontrol -m -j -- fan speeds look fine (still 44%).
  3. SIGINT/Ctrl-C nvcontrol -- instantly fan speeds drop to 0 and stasy that way until Precision X1 is re-run. (This EVGA card's BIOS, by default, actually turns off the fans entirely if a certain load isn't met)

System details: Windows 7 SP1 x64 with an NVIDIA RTX 2060 SUPER (EVGA RTX 2060 Super SC Ultra Black Gaming, model 08G-P4-3065-KR).

foucault commented 3 years ago

Hello! This seems common to windows and linux so I removed windows from title. I suspect this happens because nvfancontrol will put the fan back to automatic control when exiting. Since your fans are managed by an external tool (which uses manual control too) setting it back to automatic will revert to the default behaviour of the GPU's firmware, which is probably to turn off the fan under some load/temperature combination. Can you confirm that by loading the GPU enough to trigger the fan without using X1 and then using monitor mode? It should not affect the automatic operation at all.

I believe a better solution would be not to touch anything related to the fans if running in monitor mode. Should be relatively straightforward.

koitsu commented 3 years ago

I suspect this happens because nvfancontrol will put the fan back to automatic control when exiting. Since your fans are managed by an external tool (which uses manual control too) setting it back to automatic will revert to the default behaviour of the GPU's firmware, which is probably to turn off the fan under some load/temperature combination. Can you confirm that by loading the GPU enough to trigger the fan without using X1 and then using monitor mode? It should not affect the automatic operation at all.

I did exactly as you've asked -- your theory is correct.

I believe a better solution would be not to touch anything related to the fans if running in monitor mode. Should be relatively straightforward.

I concur that this would be the correct solution. I suspect the code for this should be quite easy. Thank you!

foucault commented 3 years ago

I think I fixed it. Give it a try!

nvfancontrol-rtx.zip

koitsu commented 3 years ago

I can confirm this fixes the problem. Thank you so much!

foucault commented 3 years ago

The fix is now in master, will be in the new release whenever that happens.