fbelavenuto / arpl

Automated Redpill Loader
GNU General Public License v3.0
7.17k stars 1.54k forks source link

Intel C-States don't work - CPU is always running at max speed #702

Open ByteRipper2022 opened 1 year ago

ByteRipper2022 commented 1 year ago

Hi folks,

I've bought an HP 800 G2 PC (I5-6500 - 8GB Ram - 280w platinum PSU) for my new Xpenology setup. This system has been choosen because it offers 5 SATA ports, a powerful CPU and has been built for efficiency. The data sheet mentions 16 watts as power consumption for this model with one 3,5" HDD. With my three 3,5" disks I expected something about 30-35 watts in total. Unfortunately it takes more thant 50 watts what's significantly more.

While looking for the reason for this behavior I noticed that the CPU is running at maximum speed (=3,6 Ghz turbo) even if the load is <5%. Unfortunately I was not able to find a solution for this behavior. To lower the frequency a bit I disabled the turbo mode in bios. I also switched the governor mode to powersave without success.

Maybe someone has an idea what's preventing the cpu from speeding down on idle workloads.

Some further input:

`**grep . /sys/devices/system/cpu/cpu0/cpufreq/***

/sys/devices/system/cpu/cpu0/cpufreq/affected_cpus:0 /sys/devices/system/cpu/cpu0/cpufreq/bios_limit:3200000 /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq:3200000 /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq:3200000 /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq:800000 /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_transition_latency:10000 /sys/devices/system/cpu/cpu0/cpufreq/freqdomain_cpus:0 1 2 3 /sys/devices/system/cpu/cpu0/cpufreq/related_cpus:0 /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies:3200000 3000000 2900000 2700000 2600000 2400000 2200000 2100000 1900000 1800000 1600000 1400000 1300000 1100000 1000000 800000 /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors:powersave performance userspace /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq:3192107 /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver:acpi-cpufreq /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor:powersave /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq:3200000 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq:800000 /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed: grep: /sys/devices/system/cpu/cpu0/cpufreq/stats: Is a directory`

`*cat /sys/devices/system/cpu/cpu/cpufreq/scaling_cur_freq**

3192091 3192082 3192106 3192096`

`cat /proc/cpuinfo

processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 94 model name : Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz stepping : 3 microcode : 0xf0 cpu MHz : 3200.000 cache size : 6144 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 4 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 22 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb invpcid_single intel_pt ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d arch_capabilities bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs bogomips : 6383.92 clflush size : 64 cache_alignment : 64 address sizes : 39 bits physical, 48 bits virtual power management:`

AuxXxilium commented 1 year ago

You disabled C1E Support in Bios?

ByteRipper2022 commented 1 year ago

Like on all business pcs bios options are very limted. There is just one option regarding power which is enabled:

Setting: Extended Idle Power States (enable/disable) Description: Allows certain operating systems to decrease the processors power consumption when the processor is idle. Default is enabled.

sergejostir commented 1 year ago

The ondemand governor in acpi-cpufreq is not avaialble. We should use intel_pstate, but arpl prefers the old acpi-cpufreq for some reason https://github.com/fbelavenuto/arpl-modules/blob/984ab4c5f992c3f4fbe5d42a4dcfc76d6a540dd6/src/4.x/drivers/cpufreq/Makefile#L21

I already asked how to use intel_pstate instead, but got no response https://github.com/fbelavenuto/arpl/issues/619

ByteRipper2022 commented 1 year ago

I already expected something like that. That's why I switched from DVA3221 to DVA1622. The former one has an older processor which doesn't support speedstep. I hoped that J4125 Chipset which is used by the DVA1622 and which supports speedstep would solve the problem. Unfortunately not.

What's a bit strange: Using the DVA1622 modell the "cpufreq_ondemand" mdule is selected and is also listed in the user-config.yml but this governor isn't listed as available in the running system.

AuxXxilium commented 1 year ago

Looks like your dsm is buggy. have you tried to update dsm will full image from syno website in update dsm assistant?

AuxXxilium commented 1 year ago

The ondemand governor in acpi-cpufreq is not avaialble. We should use intel_pstate, but arpl prefers the old acpi-cpufreq for some reason

https://github.com/fbelavenuto/arpl-modules/blob/984ab4c5f992c3f4fbe5d42a4dcfc76d6a540dd6/src/4.x/drivers/cpufreq/Makefile#L21

I already asked how to use intel_pstate instead, but got no response https://github.com/fbelavenuto/arpl/issues/619

you know that arpl kernel is only for booting and dsm kernel is used for dsm?