No cpufreq in /sys/devices/system/cpu/cpu0

Hello the OpenSUSE community!

I have installed Tumbleweed (JeOS) on a SolidRun Cubox-i (ARMv7), and I see there is no cpufreq folder in /sys/devices/system/cpu/cpu0, and the /sys/devices/system/cpu/cpufreq/ folder is empty. However, with 13.2, this folder was present and populated.

This is problematic for me because I adjust the CPU frequency with the CPU temperature. Did something changed between 13.2 and Tumbleweed about this?

Am Fri, 03 Jun 2016 18:06:01 GMT
schrieb Neraste <Neraste@no-mx.forums.microfocus.com>:

> I see there is no cpufreq folder in /sys/devices/system/cpu/cpu0, and
> the /sys/devices/system/cpu/cpufreq/ folder is empty. However, with
> 13.2, this folder was present and populated.

Report the output of

uname -r

grep FREQ /boot/config-*


Never attribute to malice that which can be adequately explained by stupidity.
(R.J. Hanlon)

Here you go:

uname -r

4.5.4-1-default

If I update the kernel to 4.6, it is the same (no cpufreq).
I have noticed, with the 13.2 image, I have a Cubox-i kernel (3.14).

grep FREQ /boot/config-*

CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_GOV_COMMON=y
CONFIG_CPU_FREQ_STAT=m
CONFIG_CPU_FREQ_STAT_DETAILS=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=m
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPUFREQ_DT=m
CONFIG_ARM_BIG_LITTLE_CPUFREQ=y
CONFIG_ARM_DT_BL_CPUFREQ=m
CONFIG_ARM_VEXPRESS_SPC_CPUFREQ=y
CONFIG_ARM_EXYNOS5440_CPUFREQ=y
CONFIG_ARM_HIGHBANK_CPUFREQ=m
CONFIG_ARM_HISI_ACPU_CPUFREQ=m
CONFIG_ARM_IMX6Q_CPUFREQ=m
# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set
CONFIG_ARM_OMAP2PLUS_CPUFREQ=y
CONFIG_ARM_S5PV210_CPUFREQ=y
CONFIG_ARM_SCPI_CPUFREQ=m
CONFIG_ARM_SPEAR_CPUFREQ=y
# CONFIG_ARM_STI_CPUFREQ is not set
CONFIG_ARM_TEGRA20_CPUFREQ=y
CONFIG_ARM_TEGRA124_CPUFREQ=m
CONFIG_QORIQ_CPUFREQ=m
CONFIG_DEVFREQ_THERMAL=y
CONFIG_DB8500_CPUFREQ_COOLING=m
CONFIG_PM_DEVFREQ=y
# DEVFREQ Governors
CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
CONFIG_DEVFREQ_GOV_PERFORMANCE=m
CONFIG_DEVFREQ_GOV_POWERSAVE=m
CONFIG_DEVFREQ_GOV_USERSPACE=m
# DEVFREQ Drivers
CONFIG_ARM_EXYNOS5_BUS_DEVFREQ=y
CONFIG_ARM_TEGRA_DEVFREQ=m
CONFIG_PM_DEVFREQ_EVENT=y
CONFIG_DEVFREQ_EVENT_EXYNOS_PPMU=y

Am Fri, 03 Jun 2016 23:46:01 GMT
schrieb Neraste <Neraste@no-mx.forums.microfocus.com>:

> --------------------
> uname -r
>
> 4.5.4-1-default
> --------------------
>
>

Well, I am not really familiar with the ARM platform, so take all of the
following with a (sometimes huge) grain of salt.

After updating to Leap (from 13.1) on my x86-machine cpufreq-modules were also
not loaded “automagically”, maybe it is similar in your case.

I had to fix that manually but in contrast to the ARM platform, I had an idea
what to look for.

> I have noticed, with the 13.2 image, I have a Cubox-i kernel (3.14).>

  • Just to get an idea, you could get that kernel RPM package, unpack it
    without installing (rpm2cpio FILENAME | cpio -udi) and have a look at its
    configuration file comparing the respective CPUFREQ-options to the ones in
    4.5/4.-6 kernels.

  • Also have a look at the output of “lsmod” (search for cpu or freq in module names).

  • Maybe only the path has changed? (although I doubt it)

find /sys -iname “cpufreq

>
> Code:
> --------------------
> grep FREQ /boot/config-*
>
> CONFIG_CPU_FREQ=y
> CONFIG_CPU_FREQ_GOV_COMMON=y
> CONFIG_CPU_FREQ_STAT=m
> CONFIG_CPU_FREQ_STAT_DETAILS=y
> # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
> # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
> # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
> CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
> # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
> CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
> CONFIG_CPU_FREQ_GOV_POWERSAVE=y
> CONFIG_CPU_FREQ_GOV_USERSPACE=m
> CONFIG_CPU_FREQ_GOV_ONDEMAND=y
> CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
> CONFIG_CPUFREQ_DT=m
> CONFIG_ARM_BIG_LITTLE_CPUFREQ=y
> CONFIG_ARM_DT_BL_CPUFREQ=m
> CONFIG_ARM_VEXPRESS_SPC_CPUFREQ=y
> CONFIG_ARM_EXYNOS5440_CPUFREQ=y
> CONFIG_ARM_HIGHBANK_CPUFREQ=m
> CONFIG_ARM_HISI_ACPU_CPUFREQ=m
> CONFIG_ARM_IMX6Q_CPUFREQ=m
> # CONFIG_ARM_KIRKWOOD_CPUFREQ is not set
> CONFIG_ARM_OMAP2PLUS_CPUFREQ=y
> CONFIG_ARM_S5PV210_CPUFREQ=y
> CONFIG_ARM_SCPI_CPUFREQ=m
> CONFIG_ARM_SPEAR_CPUFREQ=y
> # CONFIG_ARM_STI_CPUFREQ is not set
> CONFIG_ARM_TEGRA20_CPUFREQ=y
> CONFIG_ARM_TEGRA124_CPUFREQ=m
> CONFIG_QORIQ_CPUFREQ=m
> CONFIG_DEVFREQ_THERMAL=y
> CONFIG_DB8500_CPUFREQ_COOLING=m

  • So most of the CPUFREQ stuff is compiled into the kernel ("=y"), only a few
    CONFIG-options are set to build modules.

  • There are no options for ACPI which I presume is due to ARM platform (ACPI is
    -if I remember correctly- a pure x86 feature), the only modular option that
    “looks familiar” is this one:

> CONFIG_CPU_FREQ_GOV_USERSPACE=m

so try

modprobe cpufreq_userspace

and try the above lsmod/find commands again to see if anything has changed.

Also check the kernel ring buffer (dmesg) output when loading the module.

There are also some other candidates which I don’t know the respective modules
for:

> CONFIG_ARM_DT_BL_CPUFREQ=m
> CONFIG_ARM_TEGRA124_CPUFREQ=m
> CONFIG_ARM_HIGHBANK_CPUFREQ=m
> CONFIG_ARM_HISI_ACPU_CPUFREQ=m
> CONFIG_ARM_IMX6Q_CPUFREQ=m
> CONFIG_ARM_SCPI_CPUFREQ=m
> CONFIG_QORIQ_CPUFREQ=m
> CONFIG_CPU_FREQ_STAT=m
> CONFIG_QORIQ_CPUFREQ=m
> CONFIG_DB8500_CPUFREQ_COOLING=m

So try to find modules which might correspond to these options

find /lib/modules -type f -iname “cpufreq

or

find /lib/modules -type f -iname “cpu

or

find /lib/modules -type f -iname “freq

try to load them one by one and see what changes in /sys related to cpufreq.

If you are successful in finding a missing module, auto loading can be achieved
via /etc/modules-load.d/ mechanism provided by systemd, see

man modules-load.d

for more information.

AK


Never attribute to malice that which can be adequately explained by stupidity.
(R.J. Hanlon)