FAN never stops in sleep mode (on VIM2)


I use fan on my VIM2.
VIM2 drives the fan in automatic mode (the fan turns on at 50 degrees).
If the fan is on and VIM2 goes into a sleep mode, the fan never stops!!!
The fan stops when resuming from sleep only.

How to fix it?


Did you means depth sleep or early suspend?
It need to modify the Fan driver drivers/misc/khadas-fan.c


I mean on depth sleep - fan never stops.


I’m sorry to reply for you so late. You can refer to this commit


Thank you, Terry!

What about:



Hi, terry.

Found some bug:
If I turn fan on “always on” mode, It does stop after some time. This is chaotic and there is no pattern.
You need to go to the settings, switch to another position, and then turn on again. But after some time, fan does stop again…

How to fix it?


Can you provide below informations for me when it happens?

# adb shell
# cat /sys/class/fan/ctrl/mode
# cat /sys/class/fan/ctrl/level
# cat /sys/class/fan/ctrl/enable

BTW, you can give me more informations.

# adb shell
# getprop