CH340-fan-control - USB fan control script

I own a few Android TV boxes that have poor thermal designs that are prone to overheating when under sustained load. This can either cause your device to significantly slow down or shut down entirely. This can be fixed by cutting a hole in the bottom on your TV box above the SoC and sticking a small USB fan on it. In my case I am using a AC Infinity 40mm x 20mm USB Fan that cost me £10.

Today I wrote a script to only activate my TV boxes USB fan when required by using a USB relay module. I’ve only given it minimal testing so far, I only wrote it tonight but it seems to be working OK so far for me. It only cost me about £15 altogether for the fan and the USB relay module required to use this script.

3 Likes

Hey @danboid
This is very interesting. I have rpi3b+ and beelink gt1 ultimate which doesn’t have good heatsink so this will solve its thermal issue.

Good script though. If we can get enough users to try this then maybe can pkg it for aur.

1 Like

Thanks! Yeah it would make sense to package it for the AUR after a bit more testing.

I was expecting you to tell me there was a much better, pre-existing script that someone has already written? Maybe running Linux on these TV boxes is more niche than I thought. Let me know if it works for you.

The next quest is to try and get the onboard audio working. Have you tried to build a newer kernel than the current linux-aml, specifically one that has the BananaPi M5 dtb, yet?

I’ve added a second script, CH340-interactive.py, to enable you to manually control your fan.

1 Like

I will order the usb relays for testing.

No. Maybe need to try 5.13-rc from chewitts branch.

I have bpi m5 never tested it as it have Android in emmc and its custom uboot does let chainloader uboot to start.
Maybe will just erase android and start testing it out

1 Like

Today I rebuilt the linux-aml kernel package but using:

git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git#branch=v5.14/dt64

As the source repo/branch. It built fine (after making a couple of small tweaks to the PKGBUILD) but I was unable to boot the BPi M5 dtb on my X96 Air and I think I should’ve used the for-next branch instead.

So the BPi M5 has the same eMMC bootloader issue as our TV boxes? You’d expect the SBCs to be better for things like that.

No idea at all. It all depends on the quality of the components and the design.
As I dont have the tv box in question I cannot comment. I have mixed experience with tv boxes

Which Amlogic based TV boxes do you own? Just the beelink gt1?

Seeing as the Beelink has thermal issues too, would you not have been better buying a Odroid N2+? I suppose that depends if you mainly want to run Android or Linux. Is the Android on the Beelink any good?

This is the only one having thermal issue.

All the rest of my devices have good thermals.

Odroid shipping charges to my region is twice the cost of n2. I have hc4 from them already.

I have many arm boards for testing.

Beelink GT Ultimate/GT king pro/ GS King X
Khadas Vim 1/2/3/3L
Ugoos AM6 Plus

1 Like

I know you don’t have an X96 Air but are you aware of a better Linux-capable TV box than the X96 Air Q1000 (ie 4GB RAM, gigabit ethernet, BT, at least 3x USB ports) for less than $50?

It seems the only Rockchip SoC that has HW video decoding is the 3399 and you won’t get one of them for under $100 so I suppose this question has to factor in whether you want to be able to use it for video playback under Linux, which leaves us with Amlogic, Rockchip 3399 (not seen this SoC in any TV boxes yet, only SBCs) and the rather outdated Allwinner H3 and H6, which isn’t properly supported by mainline yet - no onboard audio or in-tree hw video decoding.

The Tegra box wins but thats NVIDIA and not in the same price bracket.

I think the RK3399 is the only RK SoC in mainline with hw video decoding support but RK3288/RK3328 also have VPU support under Armbian:

The only budget TV box I’ve found so far with a suitable RK SoC is the H96 Max+ w/ RK 3328. It’s not quite as good as the X96 Air though because it only has 2 USB ports, 100 Mbit LAN, no BT whilst costing more.

I’ve got a Rock64 SBC that I’ve not used in years. It was very unstable last time I tried using it but it is based on the RK3328 so I think I’ll be dusting it down to give these buster legacy media packages a go, see if its any more usable now.

EDIT

There is also the Z28 Pro which has RK3328 + 3 USB ports but only 100Mb NIC and the A5x Max which has 4 USB ports.

Has anyone tried these fan control scripts yet? @spikerguy ?

No. I can’t until i recieve the hardware. It take a month or 2 to recieve it from aliexpress :frowning:

1 Like