Rem0o / FanControl.Releases

This is the release repository for Fan Control, a highly customizable fan controlling software for Windows.
Other
14.2k stars 446 forks source link

[bug] fan speeds get overwritten in some scenarios #1260

Open ownlyme opened 1 year ago

ownlyme commented 1 year ago

it usually happens when i changed my profile that something will start overwriting my fan speeds from time to time (increased probability when gaming or encoding video) when i restart the computer and leave fan control untouched, everything seems fine and very reliable a few times my fans even jumped to 100% for some reason. my bios has fixed fan speeds (pwm, around 20-35%) except for the cpu fan curve (which has a slightly increased probability of being unreliable)

see the video at 0:42, 6:00 and 8:50 https://user-images.githubusercontent.com/6101261/200199984-01663e6d-df93-45dd-9caf-b67c14a8bb03.mp4

Rem0o commented 1 year ago

From what I can see, it flashes the "?" on the card on the occasions you pointed out ( like 0:42 ). Whatever put that 100% command in, it wasn't Fan Control.

Maybe there is a trigger in some form ( no idea the origin just yet ) where if X happens it spins up the fans?

ownlyme commented 1 year ago

yeah it's probably something outside of fan control. but the weird part is that this doesn't happen when i freshly booted up my pc and don't mess with fan control's settings.

maybe when changing the settings (and saving), fan control "disconnects" from the fans and the mainboard doesn't let it fully take over again? or it stops being "synchronized" somehow?

i've tested it only a few hours so it could still be coincidence

Rem0o commented 1 year ago

maybe when changing the settings (and saving), fan control "disconnects" from the fans and the mainboard doesn't let it fully take over again? or it stops being "synchronized" somehow?

There is no such thing. The only moment where the fans "disconnect" from Fancontrol is when you close the app, refresh the sensors, or wake back from sleep.

ownlyme commented 1 year ago

ok it just happened again (playing northgard) even though i didnt even open the fan control gui.. will test further and report back to you. could also be something with the autostart or how the new version controls the fans (been using v70 for the longest time) Screenshot_2

ownlyme commented 1 year ago

yeah i cannot replicate it reliably, it only seems like there's a high chance of it happening when i mess with the configuration too much. is the source code available somewhere so i can debug it myself?

Rem0o commented 1 year ago

FanControl source code itself is closed. But the backend is opened (LibreHardwareMonitor). You could compile the dll yourself and attach to the FanControl process to debug that part, like if SetSoftware( float ) gets called with "100" out of the blue. My guess is not, as if the "?" appears, it means Fan Control didn't output the last control value, something else did (like an other software).

One thing that caught my eye is that the 0:42 example happens immediately after the system gets under load, as we can see from the wattage at the bottom. That also kinda goes in the same direction/theory, something sees the load, and tries to set the fan speed. I don't know exactly what else you got installed, but if you got "any" motherboard software or service running, that could be the culprit.

ownlyme commented 1 year ago

i was more thinking about fan control getting stuck due to some call not being asynchronous. not sure what the update frequency is but maybe it's too low and can't fix quickly enough when something overwrote the settings. i don't have any motherboard software or drivers installed at all. (chipset driver is directly from amd's website) when i close fan control, my fans go back to their default setting. maybe something similar happens when you fiddle around with the settings (the fan bindings getting "released") and my mainboard thinking it has to control the fans again?

Rem0o commented 1 year ago

maybe something similar happens when you fiddle around with the settings (the fan bindings getting "released") and my mainboard thinking it has to control the fans again?

Playing with the settings is asynchronous from the update operations actually done to the fans, so that doesn't matter.

There is not any kind of "binding" to the fans, it just doesn't work that way. See it as a memory address that the fan uses to set its speed. Fan Control writes to that address every second. It doesn't, and can't lock it. It doesn't "own" it. So any other software, your bios, or anything for that matter, could also be writing to that address at the same time, before, after, anytime. For Fan Control to "work", nothing must be wrote to those addresses. The sad part is that nothing can be done to prevent it AFAIK. So in the end, making sure nothing else is interring is the only way to make it work.

ownlyme commented 1 year ago

i was planning to reinstall windows soon, i could test if it still happens with a pretty fresh install. but maybe it would help if the user could adjust the update frequency? at least the frequency in which fan control sets the fan speeds to the last calculated value, should be pretty lightweight right? i was thinking about 30-50 ms or so, but ideally it should be freely adjustable. that should be quickly enough to overwrite any changes before the fans suffer too much from the acceleration.

Rem0o commented 1 year ago

at least the frequency in which fan control sets the fan speeds to the last calculated value, should be pretty lightweight right? i was thinking about 30-50 ms or so, but ideally it should be freely adjustable.

That doesn't change anything for your problem. Your external source will still override to a 100% and you'll get the same result.

ownlyme commented 1 year ago

i reinstalled windows and it seemed fine for a few days, even tried to mess around in the settings a bit and it didn't get buggy.

today i was playing a light 2d game so i launched hwinfo and loaded my advanced configuration and immediately 2 of my fans started ramping up to 100% in random intervals.

maybe my configuration is too complex and fan control lags? or could it be related to how fan control handles the stepping up/down (as it's limited to 2%) ? because my rpm readouts glitch from time to time and display either 0 rpm or 32768 rpm, 34986 rpm, 10536 rpm etc hwinfo smart.zip not sure if you can load it at all, but it requires hwinfo gadget to report gpu memory temperature at index 0 and gpu power draw at index 1, divided by 10 and formatted as "°C" ^^

btw when i close fan control, it stops happening. if i want to keep using fan control i have to reboot.

Rem0o commented 1 year ago

^ the RPM bug will happen if you play close the the limit the fan will start/stop. You shouldn't play in that area. It should be either you stop the fan, or you run it at least 600-700 rpm. Did you configure your start% and stop% manually or you used the assisted setup? I would recommend going with with Assisted setup.

ownlyme commented 1 year ago

i used the assisted setup but most of my fans don't have a minimum speed since they are running in pwm mode. also i only saw the buggy rpm readings in hwinfo under min/max stats, but haven't noticed them in fan control yet. maybe they can get buggy if they get queried too often? for example when both hwinfo and fan control access them at the same time?