5.7x version issues

I don’t think I had khadas mcu enabled in that version.
Please update
sudo pacman -Syyu

3 Likes

What are the differences between temp0 and 1-2-3?

@Spikerguy @numbqq @Electr1

iirc the three temp points represent the speed at which the fan will spin at, at trip point 0, fan turns off,
trip 1, fan at speed low
trip 2, fan at speed medium
trip 3, fan at speed high…

In this respect, it makes sense to do it this way, right? 60 degrees for 0, 65 for 1, 75 for 2 and 85 for 3

Do you mean auto-switching modes, depending on the temperature?

yes I mean it. Because I don’t want it to spin too fast when it passes 60 degrees! I want it to rotate at different speeds at certain temperatures. So the noise will be very low! @Vladimir.v.v

Actually it works very well on android, but it seems not very efficient here!

yes, that is what I meant,
usually changing the fan curves, to become less aggressive will only make it warm up the system faster…

It doesn’t work that way. Regardless of 0,1 and 2, only trip3 works.

For example, it does not work before 70 degrees in the codes below.

sudo echo 55000 > /sys/class/thermal/thermal_zone0/trip_point_0_temp

sudo echo 60000 > /sys/class/thermal/thermal_zone0/trip_point_1_temp

sudo echo 65000 > /sys/class/thermal/thermal_zone0/trip_point_2_temp

sudo echo 70000 > /sys/class/thermal/thermal_zone0/trip_point_3_temp

Just to clarify the thermal zones and different trip points (which took me some time to understand (and please correct me if I’m wrong):

There are two thermal zones:

/sys/class/thermal/thermal_zone0
/sys/class/thermal/thermal_zone1

The easy way to identify what are they for is to print the type file:

$ cat /sys/class/thermal/thermal_zone0/type 
cpu-thermal
$ cat /sys/class/thermal/thermal_zone1/type 
ddr-thermal

So 0 is cpu and 1 is the ram. The one we care is (of course) zone 0. Now for the trip points, there are 4; 0 to 3, as well we can check their type:

$ cat /sys/class/thermal/thermal_zone0/trip_point_0_type 
passive
$ cat /sys/class/thermal/thermal_zone0/trip_point_1_type 
hot
$ cat /sys/class/thermal/thermal_zone0/trip_point_2_type 
critical
$ cat /sys/class/thermal/thermal_zone0/trip_point_3_type 
active

This is the part that I don’t quite get, but I think the trip point 1 and 2 (hot and critical) works either by activating all the available cooling devices or shutting down the board.

For the cooling devices, there are 3: /sys/class/thermal/cooling_device0 to 2. The type for 0 and 1 is thermal-cpufreq-0 and thermal-cpufreq-1 while 2 is khadas-mcu-fan. So it should be the cpu frequency of both cores and the fan.

If this is so, then probably trip point 0 (passive) is handled by the passive cooling devices (thermal-cpufreq), in order to keep the temp below the trip point, the cpu will slow down to consume less and generate less heat.

trip point 3 (active) is the one taking care of the fan, it will use the active cooling device (fan) to keep the temp below the trip point.

At least this is what I figured out in 5.10.0-rc6 kernel for ubuntu focal minimal. For my case, the ideal scenario of having the fan running constantly at low speed is just not possible, once the trip temp of the trip point 3 is reached, the fan fires up and usually goes to high right await until it gets the temp back down.

There’s some documentation about fan settings at boot (How To Setup the Cooling Fan | Khadas Documentation), but for me in this kernel, it does nothing (I suppose it most be for older kernels).

What I ended up doing is hooking a spare 5v fan on top of the heat sink and setting the temp’s trip points to:

$ cat /sys/class/thermal/thermal_zone0/trip_point_*_temp
85000
95000
110000
60000

With the extra fan my temp is around: 56800 so it doesn’t trigger the powerful fan, and the cpu frequency stays at top on high load (/sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq vs cpuinfo_max_freq)

Could someone please confirm if I’m correct?

1 Like