Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

cpufrequtils not correctly loaded on boot

Featured Replies

Hello,

I have Rock Pi S V13 and Armbian 23.8.1 Bookworm with Linux 6.1.50-current-rockchip64.

 

When I change CPU settings (min frequency, max frequency, scaling governor) using armbian-config, the change works correctly as expected. However, these settings are lost on reboot. When I check the status of cpufrequtils service, it seems that it does not load correctly as it is not able to find the requested governor:

 

Quote

~$ systemctl status cpufrequtils.service

● cpufrequtils.service - LSB: set CPUFreq kernel parameters
     Loaded: loaded (/etc/init.d/cpufrequtils; generated)
     Active: active (exited) since Tue 2023-09-26 15:03:11 CEST; 18h ago
       Docs: man:systemd-sysv-generator(8)
    Process: 691 ExecStart=/etc/init.d/cpufrequtils start (code=exited, status=0/SUCCESS)
        CPU: 122ms

zář 26 15:03:10 labircam systemd[1]: Starting cpufrequtils.service - LSB: set CPUFreq kernel parameters...
zář 26 15:03:10 labircam cpufrequtils[691]: CPUFreq Utilities: Setting ondemand CPUFreq governor...disabled, governor not available...done.
zář 26 15:03:11 labircam systemd[1]: Started cpufrequtils.service - LSB: set CPUFreq kernel parameters.

 

But if I start it manually later, it seems to load all my settings correctly:

 

Quote

~$ sudo systemctl restart cpufrequtils

~$ systemctl status cpufrequtils.service

● cpufrequtils.service - LSB: set CPUFreq kernel parameters
     Loaded: loaded (/etc/init.d/cpufrequtils; generated)
     Active: active (exited) since Wed 2023-09-27 09:04:44 CEST; 9s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 1968 ExecStart=/etc/init.d/cpufrequtils start (code=exited, status=0/SUCCESS)
        CPU: 123ms

zář 27 09:04:44 labircam systemd[1]: Starting cpufrequtils.service - LSB: set CPUFreq kernel parameters...
zář 27 09:04:44 labircam cpufrequtils[1968]: CPUFreq Utilities: Setting ondemand CPUFreq governor...CPU0...CPU1...CPU2...CPU3...done.
zář 27 09:04:44 labircam systemd[1]: Started cpufrequtils.service - LSB: set CPUFreq kernel parameters.

 

Any ideas to fix the problem except manually reloading it later?

 

armbianmonitor: https://paste.armbian.com/owolufawif

  • Author

So the reason for this problem is when "loadcpufreq" services loads CPU modules, it takes some time to load them. "cpufrequtils" is loaded right after and data in /sys/devices/system/cpu/cpu0/cpufreq don't have to exist yet. When I put "sleep 3" at the beginning of the /etc/init.d/cpufrequtils then the CPU settings are loaded correctly.

  • Author

I don't know but I fixed this issue by waiting for governor in /etc/init.d/cpufrequtils

 

check_governor_avail() {
        info="/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors"
        for i in $(seq 1 10); do
                if [ -f $info ]; then
                        break
                fi
                sleep 1
        done

        if [ -f $info ] && grep -q "\<$GOVERNOR\>" $info ; then
                return 0;
        fi
        return 1;
}

 

  • Author

I'm not sure whether it is the correct solution, rather a workaround, especially when you don't have this problem.

Maybe the waiting should happen in "loadcpufreq", because it also checks for the governor existence before its end and reports that "none" CPU module was loaded.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.