
CPUの最大周波数を指定された最大値に設定しようとしていますが、scaling_available_frequencies
カーネルが私を無視しているようです。
私のカーネル:
# uname -a
Linux valfenda 5.10.32-051032-generic #202104210836 SMP Wed Apr 21 13:18:19 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
しかし5.8も同じだ。
私のプロセッサは、Radeon Graphics、8コアを備えたAMD Ryzen 7 4700Uです。
# cpufreq-info -c0
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to [email protected], please.
analyzing CPU 0:
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 4294.55 ms.
hardware limits: 1.40 GHz - 2.00 GHz
available frequency steps: 2.00 GHz, 1.70 GHz, 1.40 GHz
available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
current policy: frequency should be within 1.40 GHz and 1.40 GHz.
The governor "performance" may decide which speed to use
within this range.
current CPU frequency is 1.40 GHz (asserted by call to hardware).
cpufreq stats: 2.00 GHz:0.05%, 1.70 GHz:0.04%, 1.40 GHz:99.91% (199)
次の行に注意してくださいfrequency should be within 1.40 GHz and 1.40 GHz
。
私は試した:
# cat scaling_available_frequencies
2000000 1700000 1400000
# cut -d' ' -f1 scaling_available_frequencies > scaling_max_freq
# cat scaling_max_freq
1400000
そして:
# cpufreq-set -u2GHz
# cpufreq-info | ag 'current policy'
current policy: frequency should be within 1.40 GHz and 1.40 GHz.
current policy: frequency should be within 1.40 GHz and 1.40 GHz.
current policy: frequency should be within 1.40 GHz and 1.40 GHz.
current policy: frequency should be within 1.40 GHz and 1.40 GHz.
current policy: frequency should be within 1.40 GHz and 1.40 GHz.
current policy: frequency should be within 1.40 GHz and 1.40 GHz.
current policy: frequency should be within 1.40 GHz and 1.40 GHz.
current policy: frequency should be within 1.40 GHz and 1.40 GHz.
変わりません。
私のモジュール:
# lsmod
Module Size Used by
msr 16384 0
btrfs 1351680 0
blake2b_generic 20480 0
xor 24576 1 btrfs
raid6_pq 114688 1 btrfs
ufs 81920 0
qnx4 16384 0
hfsplus 110592 0
hfs 61440 0
minix 45056 0
ntfs 106496 0
msdos 20480 0
jfs 196608 0
xfs 1511424 0
rfcomm 81920 4
nf_conntrack_netlink 49152 0
xfrm_user 36864 1
xfrm_algo 16384 1 xfrm_user
xt_addrtype 16384 2
br_netfilter 28672 0
ccm 20480 6
xt_CHECKSUM 16384 1
xt_MASQUERADE 20480 4
xt_conntrack 16384 2
cmac 16384 5
algif_hash 16384 2
ipt_REJECT 16384 2
algif_skcipher 16384 2
nf_reject_ipv4 16384 1 ipt_REJECT
af_alg 32768 10 algif_hash,algif_skcipher
xt_tcpudp 20480 9
ip6table_mangle 16384 1
ip6table_nat 16384 1
iptable_mangle 16384 1
iptable_nat 16384 1
nf_nat 49152 3 ip6table_nat,iptable_nat,xt_MASQUERADE
nf_conntrack 147456 4 xt_conntrack,nf_nat,nf_conntrack_netlink,xt_MASQUERADE
nf_defrag_ipv6 24576 1 nf_conntrack
nf_defrag_ipv4 16384 1 nf_conntrack
nf_tables 208896 0
libcrc32c 16384 5 nf_conntrack,nf_nat,btrfs,nf_tables,xfs
nfnetlink 20480 3 nf_conntrack_netlink,nf_tables
ip6table_filter 16384 1
ip6_tables 32768 3 ip6table_filter,ip6table_nat,ip6table_mangle
iptable_filter 16384 1
bpfilter 16384 0
bridge 233472 1 br_netfilter
stp 16384 1 bridge
llc 16384 2 bridge,stp
bnep 24576 2
overlay 131072 0
joydev 28672 0
amdgpu 5988352 40
snd_hda_codec_realtek 139264 1
snd_hda_codec_generic 81920 1 snd_hda_codec_realtek
ledtrig_audio 16384 1 snd_hda_codec_generic
snd_hda_codec_hdmi 65536 1
snd_hda_intel 53248 5
iommu_v2 20480 1 amdgpu
iwlmvm 413696 0
snd_intel_dspcfg 28672 1 snd_hda_intel
soundwire_intel 40960 1 snd_intel_dspcfg
gpu_sched 40960 1 amdgpu
soundwire_generic_allocation 16384 1 soundwire_intel
soundwire_cadence 32768 1 soundwire_intel
ttm 102400 1 amdgpu
snd_acp3x_pdm_dma 16384 1
snd_hda_codec 147456 4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
mac80211 970752 1 iwlmvm
drm_kms_helper 233472 1 amdgpu
snd_hda_core 94208 5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_hwdep 16384 1 snd_hda_codec
snd_acp3x_rn 16384 1
soundwire_bus 77824 3 soundwire_intel,soundwire_generic_allocation,soundwire_cadence
snd_soc_dmic 16384 1
libarc4 16384 1 mac80211
cec 53248 1 drm_kms_helper
edac_mce_amd 32768 0
snd_soc_core 282624 4 soundwire_intel,snd_acp3x_rn,snd_soc_dmic,snd_acp3x_pdm_dma
rc_core 57344 1 cec
i2c_algo_bit 16384 1 amdgpu
binfmt_misc 24576 1
btusb 57344 0
kvm_amd 102400 0
snd_seq_midi 20480 0
iwlwifi 376832 1 iwlmvm
snd_seq_midi_event 16384 1 snd_seq_midi
btrtl 24576 1 btusb
fb_sys_fops 16384 1 drm_kms_helper
snd_compress 28672 1 snd_soc_core
ac97_bus 16384 1 snd_soc_core
kvm 798720 1 kvm_amd
snd_pcm_dmaengine 16384 1 snd_soc_core
snd_rawmidi 36864 1 snd_seq_midi
btbcm 16384 1 btusb
syscopyarea 16384 1 drm_kms_helper
snd_pcm 118784 9 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,soundwire_intel,snd_compress,snd_soc_core,snd_hda_core,snd_acp3x_pdm_dma,snd_pcm_dmaengine
btintel 28672 1 btusb
crct10dif_pclmul 16384 1
nls_iso8859_1 16384 1
snd_seq 73728 2 snd_seq_midi,snd_seq_midi_event
sysfillrect 16384 1 drm_kms_helper
ghash_clmulni_intel 16384 0
bluetooth 651264 31 btrtl,btintel,btbcm,bnep,btusb,rfcomm
aesni_intel 372736 11
snd_seq_device 16384 3 snd_seq,snd_seq_midi,snd_rawmidi
snd_timer 40960 2 snd_seq,snd_pcm
crypto_simd 16384 1 aesni_intel
cryptd 24576 4 crypto_simd,ghash_clmulni_intel
sysimgblt 16384 1 drm_kms_helper
snd 94208 25 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_rawmidi
glue_helper 16384 1 aesni_intel
ecdh_generic 16384 2 bluetooth
cfg80211 843776 3 iwlmvm,iwlwifi,mac80211
soundcore 16384 1 snd
ecc 32768 1 ecdh_generic
input_leds 16384 0
snd_rn_pci_acp3x 20480 0
rapl 20480 0
ccp 102400 1 kvm_amd
snd_pci_acp3x 20480 0
serio_raw 20480 0
hp_wmi 20480 0
sparse_keymap 16384 1 hp_wmi
efi_pstore 16384 0
wmi_bmof 16384 0
hid_multitouch 28672 0
k10temp 16384 0
ucsi_acpi 16384 0
typec_ucsi 36864 1 ucsi_acpi
typec 53248 1 typec_ucsi
mac_hid 16384 0
hp_accel 28672 0
lis3lv02d 24576 1 hp_accel
hp_wireless 16384 0
acpi_tad 20480 0
sch_fq_codel 20480 2
cuse 16384 3
parport_pc 45056 0
ppdev 24576 0
lp 20480 0
parport 65536 3 parport_pc,lp,ppdev
drm 548864 20 gpu_sched,drm_kms_helper,amdgpu,ttm
ip_tables 32768 3 iptable_filter,iptable_nat,iptable_mangle
x_tables 45056 12 ip6table_filter,xt_conntrack,iptable_filter,xt_tcpudp,xt_addrtype,xt_CHECKSUM,ip6_tables,ipt_REJECT,ip_tables,ip6table_mangle,xt_MASQUERADE,iptable_mangle
autofs4 45056 2
hid_generic 16384 0
rtsx_pci_sdmmc 28672 0
crc32_pclmul 16384 0
nvme 45056 4
ahci 40960 0
rtsx_pci 94208 1 rtsx_pci_sdmmc
i2c_piix4 28672 0
xhci_pci 20480 0
libahci 36864 1 ahci
nvme_core 122880 6 nvme
xhci_pci_renesas 20480 1 xhci_pci
wmi 32768 2 hp_wmi,wmi_bmof
video 49152 0
i2c_hid 32768 0
hid 135168 3 i2c_hid,hid_multitouch,hid_generic
他の同様の質問を見ましたが、満足のいく答えはありません。
答え1
デフォルトでは、最新のRHEL-9.2は以下で実行されています。
- コンピュータ:Dell XPS L412Z(別名14Z - 2011年頃)
- Red Hat Enterprise Linux 9
- kernel-5.14.0-162.23.1.el9_1.x86_64 - 最近
dnf update
- プロセッサー: Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz
- バッテリーパック:DELL YMYF6252(クローン?)
私もあなたと同じ問題を抱えています...
つまり、私が何をしても、私のコンピュータは798MHzで動作し続けています。 CPUをロードし、4つのCPUがそれぞれ実行されていても、while true; do true; done
まだ798MHzを維持します。
私はそれらをすべて試しましたcpufreq governors
:保守的なオンデマンドユーザースペースの省電力パフォーマンス schedutil
再起動しても効果はありません。しかし、私は一つを見つけました。奇妙な解決策。
# cpupower -c 0 frequency-info ↲
analyzing CPU 0:
driver: intel_cpufreq
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 20.0 us
hardware limits: 800 MHz - 3.50 GHz
available cpufreq governors: conservative ondemand userspace powersave performance schedutil
current policy: frequency should be within 800 MHz and 3.50 MHz.
The governor "performance" may decide which speed to use
within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 798 MHz (asserted by call to kernel)
boost state support:
Supported: yes
Active: yes
3300 MHz max turbo 4 active cores
3300 MHz max turbo 3 active cores
3300 MHz max turbo 2 active cores
3500 MHz max turbo 1 active cores
ファンは低速で動作し続け、CPU/コア温度は約+50.0°Cです。
# sensors ↲
...
Package id 0: +54.0°C (high = +86.0°C, crit = +100.0°C)
修理する?
- AC電源アダプタからラップトップを外します...
突然、4xwhile true; do true; done &
ロードノートパソコンのファンが再び動作し、CPUが2.72 GHzで動作していることがわかりました!
これでCPUとファンの両方がスピードアップしました。
# cpupower -c 0 frequency-info ↲
...
current CPU frequency: 2.82 GHz (asserted by call to kernel)
その後、ACアダプターを接続しましたが、Dellノートパソコンが正常に動作しました。奇妙な
その後、ラップトップは798MHzで停止した状態に戻りました。プラグを抜いて再接続すると問題が解決しました。ただし、ノートブックはACアダプターを使用して一時停止/再開(または電源サイクル)されます。プラグを抜く問題を解決しているようです。
これは私のラップトップのための十分な解決策です。しかし、何年も続いてきた同様の基本的なバグがあるようです。例えば。
他の場所でも同様の質問があります。
- 2021年:linux:cpupowerを使用してCPU周波数レギュレータを設定することはできません。
- 2021年:linux:cpupowerを使用してCPU周波数レギュレータを設定できません(ACPIエラー)。
- 2018:解決済み - CPU周波数が800MHzで停止
- 2018:解決済み - Dell XPS 9550 CPU倍率が8で停止する
- 2017年:cpufrequtilsは、私のCPUがより高い周波数でパフォーマンスを発揮できることを示しています。なぜ最大周波数に到達できないのですか?
- 2017年:奇妙なCPUFreqスケーリングの問題:ガバナーに関係なく、最大CPUFreqがウェイク時に徐々に低下します。- 2017年:アプリケーションが遅延しているにもかかわらず(CPUリソースを活用)、CPUが最大のパフォーマンスで動作しないのはなぜですか?
- 2012年:プロセッサは、負荷がかかってもアンダークロック状態を維持します。
- 2011年:cpufreqポリシーは奇妙に動作し、現在のポリシーの最大値は制限されています。
答え2
以下は、すべてのCPUコアを最大周波数に設定します。 cpupowerユーティリティをインストールする必要があるかもしれません。
cd /sys/devices/system/cpu/
sudo cpupower frequency-set -g performance