Cooling CPU in software S905X2/S922?

If my S912 box is typical it has 2 sets of 4 cores the first set of 4 cores uses
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
and is set to ondemand Minimum frequency 1Ghz (1000000) Maximum 1.5Ghz (1512000)
Available Frequencies 100000 250000 500000 667000 1000000 1200000 1512000

The second set of 4 are controlled by
/sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
and is set to ondemand Minimum frequency 1Ghz (1000000) Maximum 1Ghz (100000). So the scaling governor has no effect.
Available Frequencies 100000 250000 500000 667000 1000000

I tried the following but it only makes a couple of degrees C difference as the S912 has already got the ondemand governor enabled. The box does idle at 600Mhz even playing UHD content.

#!/bin/bash
echo 500000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
echo 500000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

On the S905x2 the default is ‘performance’ so the cpus run flat out all the time so there is a dramatic drop in power/temperature by changing the governor to interactive/schedutil.

1 Like

In my S912 I have tried

echo 667000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
echo 667000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

and I am very satisfied to go from 1000Mhz to 667Mhz minimum CPU speed. In idle conditions I have seen temperatures of 57ºC (66ºC playing HDTV) for the first time, which has its logic:

Heat generated in low speed state:

1000Mhz = 100% heat generated (default)
667Mhz = 67% heat generated (2/3 = 0.67)*

With a speed of 500Mhz I have not seen added advantages.

(*) https://en.wikipedia.org/wiki/CPU_power_dissipation

1 Like

I don’t think P(ower)=F() requency^2 is an accurate measure for this type of CPU at these frequencies. Any reduction in power is a good thing looking at the S905X2 stats most of the core are sat around 80% of the time Waiting For Interrupts.

I had to go back to the default settings. One of the HDTV channels has micro freezes at intervals of a few seconds.

What is this console? Can you share infor please?

Has anybody tested this on an S905 device?

Changing the governor from performance to interactive will reduce GUI performance and overall user experience.

I turned it off before I upgraded although the box 9.2.1 seems kinder to the CPU but I have not done many tests.

Ondemand doesn’t do much of the job with default parameters. Almost all the time the frequency is at maximum, 1908, as in performance mode, even in idle.
Do you know how to make the value 100 to remain in the up_threshold file (
/ sys / devices / system / cpu / cpufreq / policy0 / ondemand / up_threshold) after restart?
I can change, it works, but after restart it returns to the initial value 50.
Thanks.

Put this line in file /storage/.config/autostart.sh

echo 100 >/sys/devices/system/cpu/cpufreq/policy0/ondemand/up_threshold

In x96 I only have policy0, do I put just the first line?

Yes. just first one.

Something is wrong, it does not work. Again it is the value 50 and the frequency at 1908. After restart.

Maybe something set the value after boot - try to delay setting yours value. If doesn’t work use longer delay (20 seconds).

(
  sleep 5
  echo 100 >/sys/devices/system/cpu/cpufreq/policy0/ondemand/up_threshold
)&

sorry I was wrong. i was watching by mistake on vim3 and there was 100. on s905x3 it did not change in 100, it remained at 50

I understand that these settings are not kept after reboot because they are done in the virtual file system / sys. To start with the desired settings I would have to create in / etc a rc.locale where should be the line
echo 100> / sys / devices / system / cpu / cpu0 / cpufreq / ondemand / up_threshold

I can not create rc.locale or other file in /etc, probably for security reasons this option was blocked.

Can someone guide me how can I get over this restriction?

Thanks.

As I wrote above use file /storage/.config/autostart.sh.

tried with autostart several variants, delay, with -c, -n, and others that I can not remember. only with the value 50 starts.
where do I find the file from which it loads the value 50 at startup? maybe I can edit it.
I noticed that only the value of 100 ondemand works beautifully ondemand governor. With 99 he behaves about the same as with 50.

Value 50 is set from initramfs when system boots and this can’t be changed: https://github.com/CoreELEC/CoreELEC/blob/coreelec-9.2/packages/sysutils/busybox/scripts/init#L1064

I tried with autostart.sh and it is set just fine. But you must use sleep and running it in background. Maybe instead of delaying for 5 seconds you need to use higher value. Use 15.