Open adamliyi opened 3 years ago
It is caused by incorrect bios setting:
ACPI-> Enable CPPC [Disabled]
Change to enable CPPC.
# ls /sys/devices/system/cpu/cpu0/cpufreq
ls: cannot access '/sys/devices/system/cpu/cpu0/cpufreq': No such file or directory
[root@adam_mj_cent83 ~]# modprobe cppc_cpufreq
[root@adam_mj_cent83 ~]# ls /sys/devices/system/cpu/cpu0/cpufreq
affected_cpus cpuinfo_min_freq scaling_available_governors scaling_governor scaling_setspeed
cpuinfo_cur_freq cpuinfo_transition_latency scaling_cur_freq scaling_max_freq
cpuinfo_max_freq related_cpus scaling_driver scaling_min_freq
After 'enable CPPC' in BIOS, cpupower works as expected:
# cpupower frequency-info
analyzing CPU 0:
driver: cppc_cpufreq
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: Cannot determine or is not supported.
hardware limits: 1000 MHz - 2.80 GHz
available cpufreq governors: conservative ondemand userspace powersave performance schedutil
current policy: frequency should be within 2.00 GHz and 2.80 GHz.
The governor "performance" may decide which speed to use
within this range.
current CPU frequency: 1.40 GHz (asserted by call to hardware)
If we disable CPPC in bios, cppc_cpufreq driver cannot get initialized (tested with 5.10.27 LTS kernel)
# modprobe cppc_cpufreq
modprobe: ERROR: could not insert 'cppc_cpufreq': No such device
Remaining issue: user may disable ‘CPPC’ to get fixed frequency. In this case, since ‘cpupower frequency-info’ cannot work, how do we know current core frequency in OS.
kernel: 5.10.27
strace shows there is no cpufreq in sysfs: '/sys/devices/system/cpu/cpu0/cpufreq/'.