# cpufreq doesn't exist in /sys

## Orionos

I've been attempting to enable frequency scaling on my Atom-system. My first attempt permanently broke the installation, even when I switched back to the previous kernel (my network-drivers panicked and stayed offline), so now I'm testing on a simple install.

Since this particular Atom doesn't understand Speedstep, I need the userspace governor. Unfortunately, there are no cpufreq entries in my /sys/devices/system/cpu/cpu[0-3] folders, so nothing works. Modprobe acpi-cpufreq works, but doesn't do anything more. Can anyone tell me if I missed a kernel option that populates this? I thought I already enabled too much as it is.

grep ACPI /usr/src/linux/.config

```
# Power management and ACPI options

CONFIG_ACPI=y

CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y

CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y

CONFIG_ACPI_PROCFS_POWER=y

# CONFIG_ACPI_EC_DEBUGFS is not set

# CONFIG_ACPI_AC is not set

# CONFIG_ACPI_BATTERY is not set

CONFIG_ACPI_BUTTON=y

CONFIG_ACPI_VIDEO=y

CONFIG_ACPI_FAN=y

# CONFIG_ACPI_DOCK is not set

CONFIG_ACPI_PROCESSOR=y

# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set

CONFIG_ACPI_THERMAL=y

# CONFIG_ACPI_CUSTOM_DSDT is not set

# CONFIG_ACPI_INITRD_TABLE_OVERRIDE is not set

# CONFIG_ACPI_DEBUG is not set

# CONFIG_ACPI_PCI_SLOT is not set

# CONFIG_ACPI_CONTAINER is not set

# CONFIG_ACPI_SBS is not set

# CONFIG_ACPI_HED is not set

# CONFIG_ACPI_CUSTOM_METHOD is not set

# CONFIG_ACPI_REDUCED_HARDWARE_ONLY is not set

CONFIG_HAVE_ACPI_APEI=y

CONFIG_HAVE_ACPI_APEI_NMI=y

# CONFIG_ACPI_APEI is not set

# CONFIG_ACPI_EXTLOG is not set

CONFIG_X86_ACPI_CPUFREQ=y

CONFIG_X86_ACPI_CPUFREQ_CPB=y

CONFIG_PNPACPI=y

CONFIG_ATA_ACPI=y

# CONFIG_ACPI_I2C_OPREGION is not set

# ACPI drivers

# ACPI drivers

# CONFIG_SENSORS_ACPI_POWER is not set

# CONFIG_ACPI_INT3403_THERMAL is not set

CONFIG_DMA_ACPI=y
```

grep CPU_FREQ /usr/src/linux/.config

```
CONFIG_CPU_FREQ=y

CONFIG_CPU_FREQ_GOV_COMMON=y

CONFIG_CPU_FREQ_STAT=y

# CONFIG_CPU_FREQ_STAT_DETAILS is not set

CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y

# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set

# 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=y

CONFIG_CPU_FREQ_GOV_ONDEMAND=y

CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
```

----------

## Logicien

If you want to use cpu frequency scaling, your governor must be Ondemand (Intel) or Conservative (Amd). Than you will have a cpufreq directory in /sys. You set the default governor at Performance in your kernel .config

```
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
```

so, there is no scaling in that governor. Change your kernel .config for

```
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE 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
```

or use cpupower or cpufrequtils to set it at Ondemand at boot time.

Compiling Acpi support in modules for everything who offer this choice will reduce the size of the kernel. It's not mandatory to have Acpi in the kernel image. You dont need it for early use.

----------

## Orionos

Thanks for the reply. As it turns out through some impatient Googling the dusty corners of the Interwebz, that's probably what blew up my first system (although I still don't know why switching back my kernels didn't fix it, maybe a module got stuck somewhere). This series of Atoms only support 'Userspace' and 'Performance', they don't do frequency scaling. If I manually set the governor to ondemand/conservative, it instantly bounces back to performance.

Normally, the 'acpi-cpufreq'-module should fill those directories, I think. Governors come after. Which doesn't work in this case. I had to resort to the old-school 'p4-clockmod', which doesn't actually run the cpu at lower frequencies, it just skips cycles. I hadn't picked that before, because the description states it's for older CPU's only. When loading p4-clockmod, it instantly fills my cpufreq directories. I can then use 'cpupower' to run at 200Mhz, which may still cost electricity, but it does lower temperature and as a result spins down my fans.

Now to figure out what I can do to calm down the rest of the system.

PS 'cpufrequtils' doesn't appear to have been in the gentoo portage tree for a while, forcefully masked before that. Still in funtoo, I think. At least in the funtoo-overlay, which makes python blow up in my face, unfortunately (I want 'boot-update'!)   :Sad: 

----------

