Cooling CPU in software S905X2/S922?

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.

I used that

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

does not change the value 50. something wrong?

SOLVED!!

I put sleep to 60, and passed to 100.

Thank you very much!

1 Like

60 :slight_smile:

I don’t know yet why value can’t be set without delay.

I suspect that the files from policy0 / ondemand are created a little later, and the command

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

without delay has nothing to change, the up_threshold file does not exist at the time autostart.sh is read and executed.

No, the file is there. But cat-ing it’s value just shows nothing. No value, not even 50 set from initramfs. Looks like the value is used sometime later. In my case I have to use delay of 5 seconds (4 is not enough).

Aha. I will try later on vim3 with sleep 5. Probably this value should be adjusted according to the performance of the device. CPU, sd / usb, emmc, etc.
Since I have not played yet with sleep time for X96, but this is no longer so important.