CPU 주파수를 설정할 수 없습니다.

CPU 주파수를 설정할 수 없습니다.

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년경)
  • 레드햇 엔터프라이즈 리눅스 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 전원 어댑터에서 노트북을 분리하세요...

갑자기 4x while true; do true; done &로드 노트북 팬이 다시 작동하고 CPU가 이제 2.72GHz로 실행되고 있음을 발견했습니다!

이제 CPU와 팬 모두 속도가 향상되었습니다.

# cpupower -c 0 frequency-info ↲
...
  current CPU frequency: 2.82 GHz (asserted by call to kernel)

그런 다음 AC 어댑터를 연결했는데 Dell 노트북이 제대로 작동했습니다.이상한

그런 다음 노트북은 798MHz에서 멈추는 상태로 되돌아갔습니다. 플러그를 뽑았다가 다시 연결하면 문제가 해결되었습니다. 하지만 노트북은 AC 어댑터를 사용하여 일시 중지/재개(또는 전원 주기)됩니다.플러그를 뽑다문제를 해결하는 것 같습니다.

이것은 내 노트북에 대한 충분한 해결 방법입니다. 하지만 몇 년 동안 지속되어 온 비슷한 기본 버그가 있는 것 같습니다. 예를 들어요.

다른 곳에서도 비슷한 질문이 있습니다.

답변2

다음은 모든 CPU 코어를 최대 주파수로 설정합니다. cpupower 유틸리티를 설치해야 할 수도 있습니다.

cd /sys/devices/system/cpu/
sudo cpupower frequency-set -g performance

관련 정보