blikvm icon indicating copy to clipboard operation
blikvm copied to clipboard

FAN is getting different speed setting every second

Open Chavell3 opened this issue 2 years ago • 7 comments

Hi Team,

I just recently found from the log, that the FAN speed is set multiple times within just a second. Maybe that could be changed, so maybe just every 5min or 10min the temperature is checked and the FAN speed is adjusted. I wouldn't think that this would be a risk for the CPU. But it would probably increase the FAN's lifetime.

Or I think maybe the temperature is checked every minute and if the CPU temp raises like 6 or 7 Celsius(as there is always some small mismatch of like 1Celsius when reading it 2 times one after the other) then adjust the FAN speed

Example from my log:

[2023-10-16 10:37:05 kvmd-fan.service] --- Temp: 46.251
[2023-10-16 10:37:05 kvmd-fan.service] --- set_speed: 31 %
[2023-10-16 10:37:05 kvmd-fan.service] --- Temp: 45.764
[2023-10-16 10:37:05 kvmd-fan.service] --- set_speed: 28 %
[2023-10-16 10:37:05 kvmd-fan.service] --- Temp: 45.764
[2023-10-16 10:37:05 kvmd-fan.service] --- set_speed: 28 %
[2023-10-16 10:37:05 kvmd-fan.service] --- Temp: 46.251
[2023-10-16 10:37:05 kvmd-fan.service] --- set_speed: 31 %
[2023-10-16 10:37:05 kvmd-fan.service] --- Temp: 48.199
[2023-10-16 10:37:05 kvmd-fan.service] --- set_speed: 40 %
[2023-10-16 10:37:05 kvmd-fan.service] --- Temp: 46.738
[2023-10-16 10:37:05 kvmd-fan.service] --- set_speed: 33 %
[2023-10-16 10:37:05 kvmd-fan.service] --- Temp: 46.251
[2023-10-16 10:37:05 kvmd-fan.service] --- set_speed: 31 %
[2023-10-16 10:37:05 kvmd-fan.service] --- Temp: 46.251
[2023-10-16 10:37:05 kvmd-fan.service] --- set_speed: 31 %
[2023-10-16 10:37:05 kvmd-fan.service] --- Temp: 47.712
[2023-10-16 10:37:05 kvmd-fan.service] --- set_speed: 38 %
[2023-10-16 10:37:05 kvmd-fan.service] --- Temp: 45.764
[2023-10-16 10:37:05 kvmd-fan.service] --- set_speed: 28 %
[2023-10-16 10:37:05 kvmd-fan.service] --- Temp: 46.251
[2023-10-16 10:37:05 kvmd-fan.service] --- set_speed: 31 %
[2023-10-16 10:37:05 kvmd-fan.service] --- Temp: 45.764
[2023-10-16 10:37:05 kvmd-fan.service] --- set_speed: 28 %
[2023-10-16 10:37:05 kvmd-fan.service] --- Temp: 46.738
[2023-10-16 10:37:05 kvmd-fan.service] --- set_speed: 33 %
[2023-10-16 10:37:05 kvmd-fan.service] --- Temp: 46.251
[2023-10-16 10:37:05 kvmd-fan.service] --- set_speed: 31 %
[2023-10-16 10:37:05 kvmd-fan.service] --- Temp: 45.277
[2023-10-16 10:37:05 kvmd-fan.service] --- set_speed: 26 %
[2023-10-16 10:37:05 kvmd-fan.service] --- Temp: 46.251
[2023-10-16 10:37:05 kvmd-fan.service] --- set_speed: 31 %

Thanks.

Chavell3 avatar Oct 16 '23 08:10 Chavell3

Which image do you use(pikvm or blikvm)? Which hardware do you have?(v1 v2 v3 or v4)

blikvm avatar Oct 16 '23 11:10 blikvm

I use the Pikvm image and the v3 Hat hardware

Chavell3 avatar Oct 17 '23 07:10 Chavell3

https://github.com/ThomasVon2021/blikvm/blob/master/package/kvmd-fan/kvmd-fan.py You can update to use this code.

blikvm avatar Oct 18 '23 01:10 blikvm

did I just had an old config file with that issue? or what was changed in the config file? because I see the latest change of that file was in August (well I just replaced my config file and did no backup, so I can't compare it anymore) now, no information regarding the fan status is printed anymore...

Chavell3 avatar Oct 25 '23 14:10 Chavell3

You can take a look at the python code, it's very simple. If you want to add more monitoring, I think it should be simple too. It's not quite sure what the previous version of the fan program you have is, but there is no problem in updating to the latest version of the current github repository.

blikvm avatar Oct 25 '23 16:10 blikvm

I had a look today into my log files, the issue persists although I used your latest config. It seems that is only appears the time that script runs, that it checks and adjusts the fan speed multiple times in a second... weird

Chavell3 avatar Oct 30 '23 14:10 Chavell3

In the code, you can see

time.sleep(5)

That mean every loop will sleep 5s, I don't know how this time do you get:

[2023-10-16 10:37:05 kvmd-fan.service] 

The script don't have print time.

blikvm avatar Oct 31 '23 09:10 blikvm