Set the CPU frequency

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


In the Kirkstone release of the Yocto Reference BSP for the Apalis iMX8, the CPU governor is set to ‘ondemand’, which may not provide optimal performance compared to the ‘shedutil’ governor used in the Dunfell release. To address the performance issues you’re experiencing, it is advisable to switch back to ‘shedutil’ or another suitable governor.

For setting the governor and CPU frequency, the following methods are recommended:

  1. Kernel Command Line: This is generally recommended for persistent configurations as it allows for early configuration during boot, ensuring that the desired governor is applied consistently.

  2. Device Tree: Modifying the device tree can provide a more permanent configuration, but it may require recompilation and is less flexible than other methods.

  3. Systemd Service: This approach allows for dynamic adjustments based on system load and can be easier to manage across reboots. However, it may not be as effective for low-level settings like CPU frequency and governor, which are better handled at the kernel level.

Given your situation, using the kernel command line for setting the governor would be a good starting point. Testing different configurations in a controlled environment can help determine the best approach for your specific application needs.

Please, also check if these links can help you solve your problem:

Low Power Design: Lower CPU Frequencies.