archdroid-org / pkgbuilds

Additional packages not available on ArchLinuxARM and automatically built and uploaded to archdroid repository.
25 stars 12 forks source link

Odroid N2+ not running at 2.4Ghz #6

Open Yeicor opened 1 year ago

Yeicor commented 1 year ago

Hi @jgmdev, thanks for maintaining this project!

Problem

I realized that the big cores are not reaching 2.4 GHz when the system is under load.

This is related to cpupower, as it indicates that the frequency is not supported by the system (probably because it considers all the cores the same, and the little cores do not support the frequency).

If you execute sudo cpupower frequency-set --max 2.4Ghz, the big cores can now reach 2.4Ghz, while the little ones still have the 2.02Ghz limit. However, this does not persist between reboots even if the cpupower service is enabled.

Solution

  1. Disable the cpupower service
  2. Write the following rules for udev (/etc/udev/rules.d/50-scaling-governor.rules):
SUBSYSTEM=="module", ACTION=="add", KERNEL=="acpi_cpufreq", RUN+="/bin/sh -c 'echo 2400000 | tee /sys/devices/system/cpu/cpu[2-5]/cpufreq/scaling_max_freq'"
KERNEL=="cpu[0-9]", SUBSYSTEM=="cpu", ATTR{cpufreq/scaling_governor}="schedutil"

Can this (or an alternative solution) be integrated into the distro so that others don't run into this problem?

jgmdev commented 1 year ago

Another option could be setting the max frequency here:

https://github.com/archdroid-org/alarm-image-generator/blob/master/mods/etc/default/cpupower#L8