Any how to for applying the 3705 fan?

Thanks good to hear. I will close this thread.
Enjoy.

1 Like

Having the same issue here, the gpio cutout pushes against the fan and can’t get a clean close. It has been one headache after another with the Diy case from short usb-c cable head, difficulty fitting the antennas around the board, to incompatibility with the fan. Someone might want to put that in a foot note with Vim 3 compatibility or redesign the diy case.

Hello, Have a look here for workarounds.

Can someone advice how to make the fan work on manjaro linux kernel 5.3.0-1 ? Tried using it but fan never started. It just starts for few seconds when I power on the device and then nothing when using the OS.

Please advice.

I have no experience with Manjaro, but this might help? https://docs.khadas.com/vim2/HowToSetupFan.html

It’s standard running on auto mode and should only be activated when the fan is needed to cool the device

1 Like

Thanks for the reply but this is when the fan module is present in the kernel.
Maybe someone from the Khadas team can advice or @hyphop Please advice how to make fan work on Manjaro Linux.

linux mainline kernel don’t have fan driver
but we still can use fan via simple i2c

next one can works without any kernel support via i2c and no need extra deps

Thanks for the reply.
Tried this but getting an error
i2c device not found b 0x18 0x88

what is missing here?

vim3 mainline kernel have poor dtb and lost some definitions

u can fix it just add i2c3 definition to dts files

check my dts for vim3 https://github.com/hyphop/khadas-linux-kernel/blob/master/files/kernel/mainline/arch/arm64/boot/dts/amlogic/krescue-vim3.dtsi

1 Like

Thank You.
I plan to add this as patch to the existing Amlogic kernel and try it with your fan receipt.

Also is there something similar for Vim1 V14 ?
Please advice so I can add both the patches to 1 build and test it.

Made a patch with your i2c3 definition and copied it to the boot and used your khadas-util but still getting the same error

‘I2c device not found by 0x18 0x88’

plz check my mainline kernel > https://github.com/hyphop/khadas-linux-kernel/releases
u can get just dtb file for vim3

reboot with new dtb and check i2c support

$ ls /dev/i2c-?
/dev/i2c-0  /dev/i2c-1  /dev/i2c-2
$ find /sys/firmware/devicetree -name "i2c@*"
$ zcat /proc/config.gz  | grep I2C_MESON
CONFIG_I2C_MESON=y
$ i2cdetect -l
1 Like

These are all present.

I have these.

This shows a list with 1d000, 1f000, 1c000, 1e000

Yes its there in kernel.

I see 2 Meson I2C adapter and 1 DesignWare HDMI.

I will share the same logs later, just ran this quickly to respond to you with my finding.

Still I am getting the same error. I will try to use your dtb and check it
Edit : tried your dtb and its still the same. I am using VIm3 pro.

EDIT2:
Here are the screenshots

HYPHOP DTB Used - https://github.com/hyphop/khadas-linux-kernel/releases/download/openwrt/meson-g12b-a311d-khadas-vim3.dtb

Spikerguy’s DTB used with i2c3 definition patch.

@hyphop Please advice.

!!! plz try to use my dtb ! becouse u lost one i2c node !!!

plz check my info

root@Tone:/#  grep "" /sys/devices/soc0/*
/sys/devices/soc0/family:Amlogic Meson
/sys/devices/soc0/machine:Khadas VIM3
/sys/devices/soc0/revision:29:b - 10:2
/sys/devices/soc0/soc_id:G12B (A311D)
root@Tone:/# uname -a
Linux Tone 5.3.0-rc6 #1 SMP PREEMPT Tue Oct 15 16:27:18 MSK 2019 aarch64 GNU/Linux
root@Tone:/# i2cdetect -y -a 0 
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- 0e -- 
10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- -- 
20: UU -- 22 -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

or i2cdetect -y -a 1 or i2cdetect -y -a 2

!!! u must find 18 is mcu with fan !!!

if u dont have it u used wrong dtb

after

root@Tone:/# fan 1
[i] set FUN SPEED: 1
root@Tone:/# fan 2
[i] set FUN SPEED: 2
root@Tone:/# fan off
[i] set FUN SPEED: 0
root@Tone:/# 
1 Like

I used your dtb only from the link I shared above. By using that dtb the i2c node was lost, but when I use the one I compiled it shows all 3 nodes.

I will try again and check.

Update: It worked on my dtb. Great. Works like a charm. Nice fan codes. @hyphop. I have this pkg ready for arch/manjaro with your fan script and have added the i2c3 definition patch in the dtb from next built onwards. And will put fan bg default in autostart.

Update 2: the script works with mainline dtb also without the i2c3 definition patch.

Update 3: worked fine with vim1 v14 but only on manual mode. Bg cannot get temp.

We can redistribute your script right?

Vim 1 mainline lost thermal sensor node in dtb but u can make it )))

Can you share the codes needs for thermal sensor node? Or should I use the same i2c3 definition from vim3?

We tested fan script in systemd using fan bg but it fails. So we tried fan monitor and it works fine. We have made arch/manjaro pkg and it will be installed by default in the next built. Can you advice why fan bg doesnt work as systemd service?

User can install khadas-utils using pacman -S khadas-utils and start the service and enable in on boot.

Thanks.

  • fan monitor - start in foreground ( suitable for systemd )
  • fan bg - same monitor but start in background (not for systemd becouse need fan as foreground process)
1 Like

https://github.com/hyphop/khadas-linux-kernel/blob/master/patches/0185-arm64-dts-VIM1-add-thermal-zones.patch