All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 217571] New: amd_pmf: AMD 7840HS cpufreq locked at 400-544MHz after power unplugged
@ 2023-06-18 14:52 bugzilla-daemon
  2023-06-18 20:11 ` [Bug 217571] " bugzilla-daemon
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: bugzilla-daemon @ 2023-06-18 14:52 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=217571

            Bug ID: 217571
           Summary: amd_pmf: AMD 7840HS cpufreq locked at 400-544MHz after
                    power unplugged
           Product: Drivers
           Version: 2.5
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Platform_x86
          Assignee: drivers_platform_x86@kernel-bugs.osdl.org
          Reporter: allen@atr.me
        Regression: No

I'm using the newly published HP EliteBook 845 14 inch G10 with AMD Ryzen 7 PRO
7840HS CPU.

The system boot normally, with CPU Freq up to ~5.1GHz, but every time if I
unplug the AC power supply, it drops to 400-544MHz and locked there.

I've tried using cpupower to set frequency, using ryzenadj to set
--max-performance, none worked, only rebooting the system with AC power
attached could reset it back to normal.

For several times, even warm reboot could not reset, I've had to change some
setting in BIOS to trigger a cold reboot to make the CPU freq be normal again.

I'm using amd_pstate=active but I also observed the same issue with
amd_pstate=passive and acpi-cpufreq.

When the freq is locked to 400-544MHz, I get a warning in dmesg:

[   22.592078] ------------[ cut here ]------------
[   22.592081] Voluntary context switch within RCU read-side critical section!
[   22.592083] WARNING: CPU: 0 PID: 9 at kernel/rcu/tree_plugin.h:318
rcu_note_context_switch+0x5e0/0x660
[   22.592089] Modules linked in: tun ccm rfcomm hid_sensor_als
hid_sensor_trigger industrialio_triggered_buffer kfifo_buf
hid_sensor_iio_common industrialio hid_sensor_hub cmac algif_hash
algif_skcipher af_alg bnep uvcvideo btusb videobuf2_vmalloc btrtl uvc btbcm
videobuf2_memops videobuf2_v4l2 btintel btmtk videodev bluetooth
videobuf2_common mc ecdh_generic tcp_diag inet_diag snd_sof_amd_rembrandt vfat
fat snd_sof_amd_renoir iwlmvm snd_sof_amd_acp snd_sof_pci snd_hda_codec_realtek
snd_sof_xtensa_dsp snd_hda_codec_generic snd_sof snd_hda_scodec_cs35l41_spi
ledtrig_audio joydev snd_sof_utils mac80211 snd_hda_codec_hdmi mousedev
snd_soc_core snd_compress intel_rapl_msr libarc4 snd_hda_intel ac97_bus
intel_rapl_common snd_pcm_dmaengine snd_intel_dspcfg snd_pci_ps edac_mce_amd
snd_rpl_pci_acp6x snd_intel_sdw_acpi ext4 snd_hda_codec snd_acp_pci
snd_pci_acp6x snd_hda_scodec_cs35l41_i2c crc16 kvm_amd snd_hda_core
snd_hda_scodec_cs35l41 mbcache iwlwifi snd_pci_acp5x snd_hwdep
snd_hda_cs_dsp_ctls jbd2 snd_rn_pci_acp3x kvm
[   22.592117]  snd_pcm cs_dsp ucsi_acpi cfg80211 snd_timer snd_soc_cs35l41_lib
irqbypass hp_wmi snd_acp_config hid_multitouch typec_ucsi snd_soc_acpi snd
sparse_keymap rapl thunderbolt typec wmi_bmof pcspkr amd_sfh k10temp soundcore
snd_pci_acp3x rfkill i2c_piix4 roles i2c_hid_acpi amd_pmf amd_pmc i2c_hid
serial_multi_instantiate platform_profile wireless_hotkey mac_hid crypto_user
loop fuse bpf_preload ip_tables x_tables btrfs blake2b_generic libcrc32c
crc32c_generic xor raid6_pq dm_crypt cbc encrypted_keys trusted asn1_encoder
tee dm_mod hid_logitech_hidpp hid_logitech_dj usbhid amdgpu serio_raw
i2c_algo_bit atkbd drm_ttm_helper libps2 ttm crct10dif_pclmul crc32_pclmul
crc32c_intel polyval_clmulni polyval_generic gf128mul drm_suballoc_helper
vivaldi_fmap ghash_clmulni_intel nvme sha512_ssse3 drm_buddy aesni_intel
gpu_sched nvme_core crypto_simd drm_display_helper xhci_pci cryptd video i8042
ccp cec xhci_pci_renesas nvme_common serio wmi
[   22.592149] CPU: 0 PID: 9 Comm: kworker/0:1 Not tainted 6.4.0-rc6-1-mainline
#1 f389f89fcf30e775529b6bb0f192e37f43fa3079
[   22.592150] Hardware name: HP HP EliteBook 845 14 inch G10 Notebook PC/8B6E,
BIOS V82 Ver. 01.01.08 05/22/2023
[   22.592151] Workqueue: events power_supply_changed_work
[   22.592154] RIP: 0010:rcu_note_context_switch+0x5e0/0x660
[   22.592156] Code: 00 00 00 00 0f 85 07 fd ff ff 49 89 8c 24 a0 00 00 00 e9
fa fc ff ff 48 c7 c7 10 ec 63 ac c6 05 6e 95 e5 01 01 e8 90 4f f4 ff <0f> 0b e9
7b fa ff ff 49 83 bc 24 98 00 00 00 00 49 8b 84 24 a0 00
[   22.592157] RSP: 0018:ffffb60700187bc0 EFLAGS: 00010082
[   22.592158] RAX: 0000000000000000 RBX: ffff99783e834f40 RCX:
0000000000000027
[   22.592158] RDX: ffff99783e821688 RSI: 0000000000000001 RDI:
ffff99783e821680
[   22.592159] RBP: 0000000000000000 R08: 0000000000000000 R09:
ffffb60700187a50
[   22.592159] R10: 0000000000000003 R11: ffffffffaceca808 R12:
ffff99783e834040
[   22.592160] R13: ffff996900832700 R14: 0000000000000000 R15:
ffff996909fe9c50
[   22.592160] FS:  0000000000000000(0000) GS:ffff99783e800000(0000)
knlGS:0000000000000000
[   22.592161] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   22.592161] CR2: 0000563c72ba1018 CR3: 0000000e32a20000 CR4:
0000000000750ef0
[   22.592162] PKRU: 55555554
[   22.592162] Call Trace:
[   22.592164]  <TASK>
[   22.592164]  ? rcu_note_context_switch+0x5e0/0x660
[   22.592166]  ? __warn+0x81/0x130
[   22.592171]  ? rcu_note_context_switch+0x5e0/0x660
[   22.592172]  ? report_bug+0x171/0x1a0
[   22.592175]  ? prb_read_valid+0x1b/0x30
[   22.592177]  ? handle_bug+0x3c/0x80
[   22.592178]  ? exc_invalid_op+0x17/0x70
[   22.592179]  ? asm_exc_invalid_op+0x1a/0x20
[   22.592182]  ? rcu_note_context_switch+0x5e0/0x660
[   22.592183]  ? acpi_ut_delete_object_desc+0x86/0xb0
[   22.592186]  ? acpi_ut_update_ref_count.part.0+0x22d/0x930
[   22.592187]  __schedule+0xc0/0x1410
[   22.592189]  ? ktime_get+0x3c/0xa0
[   22.592191]  ? lapic_next_event+0x1d/0x30
[   22.592193]  ? hrtimer_start_range_ns+0x25b/0x350
[   22.592196]  schedule+0x5e/0xd0
[   22.592197]  schedule_hrtimeout_range_clock+0xbe/0x140
[   22.592199]  ? __pfx_hrtimer_wakeup+0x10/0x10
[   22.592200]  usleep_range_state+0x64/0x90
[   22.592203]  amd_pmf_send_cmd+0x106/0x2a0 [amd_pmf
bddfe0fe3712aaa99acce3d5487405c5213c6616]
[   22.592207]  amd_pmf_update_slider+0x56/0x1b0 [amd_pmf
bddfe0fe3712aaa99acce3d5487405c5213c6616]
[   22.592210]  amd_pmf_set_sps_power_limits+0x72/0x80 [amd_pmf
bddfe0fe3712aaa99acce3d5487405c5213c6616]
[   22.592213]  amd_pmf_pwr_src_notify_call+0x49/0x90 [amd_pmf
bddfe0fe3712aaa99acce3d5487405c5213c6616]
[   22.592216]  notifier_call_chain+0x5a/0xd0
[   22.592218]  atomic_notifier_call_chain+0x32/0x50
[   22.592219]  power_supply_changed_work+0x7c/0xe0
[   22.592220]  process_one_work+0x1c4/0x3d0
[   22.592223]  worker_thread+0x51/0x390
[   22.592225]  ? __pfx_worker_thread+0x10/0x10
[   22.592226]  kthread+0xe5/0x120
[   22.592228]  ? __pfx_kthread+0x10/0x10
[   22.592229]  ret_from_fork+0x29/0x50
[   22.592233]  </TASK>
[   22.592233] ---[ end trace 0000000000000000 ]---

This is also the case if I boot the system without AC supply plugged.

My boot parameters are:

root=/dev/mapper/vg-root rw rootflags=subvol=@ amdgpu.sg_display=0 amd_iommu=on
iommu=pt amd_pstate=active loglevel=3 cryptdevice=UUID=xxxx-xxxx:cryptdev
resume=/dev/vg/swap nowatchdog modprobe.blacklist=sp5100_tco

I've tried with linux-6.3.8, linux-zen-6.3.8 from ArchLinux, my self compiled
6.3.8 and mainline 6.4.0-rc6, 6.4.0-rc6-r269-g1b29d271614a without any luck,
they all behavior the same. It's a 100% reproducible issue for me.

With the help of FlyGoat I tried to blacklist amd_pmf as a workaround and it
works. 

Without amd_pmf CPU freq is not locked at 400-544MHz after unplugging the
power, no warning in dmesg as well.

If modprobe amd_pmf without AC power, the CPU freq get locked at 400-544MHz in
several seconds and the warning is printed to dmesg as described above,
modprobe -r amd_pmf does not fix it, only rebooting could reset.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 217571] amd_pmf: AMD 7840HS cpufreq locked at 400-544MHz after power unplugged
  2023-06-18 14:52 [Bug 217571] New: amd_pmf: AMD 7840HS cpufreq locked at 400-544MHz after power unplugged bugzilla-daemon
@ 2023-06-18 20:11 ` bugzilla-daemon
  2023-06-19  4:00 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2023-06-18 20:11 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=217571

Artem S. Tashkinov (aros@gmx.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mario.limonciello@amd.com
     Kernel Version|                            |6.3.8; 6.4.0-rc6; GIT

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 217571] amd_pmf: AMD 7840HS cpufreq locked at 400-544MHz after power unplugged
  2023-06-18 14:52 [Bug 217571] New: amd_pmf: AMD 7840HS cpufreq locked at 400-544MHz after power unplugged bugzilla-daemon
  2023-06-18 20:11 ` [Bug 217571] " bugzilla-daemon
@ 2023-06-19  4:00 ` bugzilla-daemon
  2023-06-19  7:38 ` bugzilla-daemon
  2023-06-19 14:13 ` bugzilla-daemon
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2023-06-19  4:00 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=217571

--- Comment #1 from Mario Limonciello (AMD) (mario.limonciello@amd.com) ---
Can you please turn on dynamic debugging for amd_pmf on the kernel command line
and then share a full dmesg demonstrating from boot until when this happens?

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 217571] amd_pmf: AMD 7840HS cpufreq locked at 400-544MHz after power unplugged
  2023-06-18 14:52 [Bug 217571] New: amd_pmf: AMD 7840HS cpufreq locked at 400-544MHz after power unplugged bugzilla-daemon
  2023-06-18 20:11 ` [Bug 217571] " bugzilla-daemon
  2023-06-19  4:00 ` bugzilla-daemon
@ 2023-06-19  7:38 ` bugzilla-daemon
  2023-06-19 14:13 ` bugzilla-daemon
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2023-06-19  7:38 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=217571

--- Comment #2 from Allen Zhong (allen@atr.me) ---
Created attachment 304452
  --> https://bugzilla.kernel.org/attachment.cgi?id=304452&action=edit
dmesg w/ options amd-pmf dyndbg=+pflmt

Attached is the full dmesg output from a boot without AC supply and "options
amd-pmf dyndbg=+pflmt" set on the ArchLinux default kernel.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 217571] amd_pmf: AMD 7840HS cpufreq locked at 400-544MHz after power unplugged
  2023-06-18 14:52 [Bug 217571] New: amd_pmf: AMD 7840HS cpufreq locked at 400-544MHz after power unplugged bugzilla-daemon
                   ` (2 preceding siblings ...)
  2023-06-19  7:38 ` bugzilla-daemon
@ 2023-06-19 14:13 ` bugzilla-daemon
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2023-06-19 14:13 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=217571

Mario Limonciello (AMD) (mario.limonciello@amd.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|drivers_platform_x86@kernel |shyam-sundar.s-k@amd.com
                   |-bugs.osdl.org              |

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-06-19 14:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-18 14:52 [Bug 217571] New: amd_pmf: AMD 7840HS cpufreq locked at 400-544MHz after power unplugged bugzilla-daemon
2023-06-18 20:11 ` [Bug 217571] " bugzilla-daemon
2023-06-19  4:00 ` bugzilla-daemon
2023-06-19  7:38 ` bugzilla-daemon
2023-06-19 14:13 ` bugzilla-daemon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.