[RESOLVED] Suspend behavior on AMD running Fedora 39

I’ve noticed a specific issue where if you are running Fedora on battery only, close the lid, then plug in the charger where one of two things occurs when you open the lid again.

  1. The charger doesn’t work. It just slowly drains and the charge notification icon doens’t show charging. No logs or dmesg output suggesting a problem. Replugging the charger doesn’t do anything. Replugging the charger from the wall doesn’t help either. The only fix for this is to power off the laptop, then back on.

  2. Resume doesn’t work, the device connected sound repeats until I disconnect the charger, then wait for a bit for things to settle, then it resumes normally. Charging works. You can replug the charger all day long.

I’m guessing it’s sometthing firmware/kernel related, but just in case…For the second, I get the following from journalctl:

[   70.808916] ------------[ cut here ]------------
[   70.808924] Voluntary context switch within RCU read-side critical section!
[   70.808929] WARNING: CPU: 3 PID: 675 at kernel/rcu/tree_plugin.h:320 rcu_note_context_switch+0x5e0/0x660
[   70.808942] Modules linked in: uinput xt_MASQUERADE xt_mark nft_compat rfcomm snd_seq_dummy snd_hrtimer ip6table_nat tun nf_conntrack_netbios_ns nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nf_tables nfnetlink qrtr bnep sunrpc binfmt_misc vfat fat mt7921e mt7921_common mt76_connac_lib snd_sof_amd_rembrandt snd_hda_codec_realtek snd_sof_amd_renoir snd_sof_amd_acp mt76 snd_hda_codec_generic snd_sof_pci snd_sof_xtensa_dsp ledtrig_audio snd_sof snd_hda_codec_hdmi snd_sof_utils mac80211 snd_hda_intel snd_soc_core snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec intel_rapl_msr snd_compress intel_rapl_common ac97_bus snd_pcm_dmaengine uvcvideo edac_mce_amd snd_pci_ps btusb snd_hda_core snd_rpl_pci_acp6x btrtl uvc snd_pci_acp6x videobuf2_vmalloc btbcm kvm_amd snd_hwdep hid_sensor_als videobuf2_memops hid_sensor_trigger snd_seq btintel videobuf2_v4l2 btmtk libarc4
[   70.809059]  snd_seq_device hid_sensor_iio_common videobuf2_common kvm bluetooth snd_pcm cfg80211 cros_ec_lpcs snd_pci_acp5x industrialio_triggered_buffer videodev cros_ec irqbypass kfifo_buf snd_rn_pci_acp3x rapl snd_timer snd_acp_config mc industrialio pcspkr k10temp snd_soc_acpi thunderbolt snd soundcore rfkill snd_pci_acp3x i2c_piix4 joydev amd_pmf amd_pmc platform_profile loop zram amdgpu i2c_algo_bit drm_ttm_helper ttm drm_suballoc_helper amdxcp iommu_v2 crct10dif_pclmul drm_buddy crc32_pclmul nvme crc32c_intel gpu_sched polyval_clmulni polyval_generic nvme_core drm_display_helper hid_sensor_hub video ucsi_acpi ghash_clmulni_intel hid_multitouch typec_ucsi sha512_ssse3 sp5100_tco ccp cec typec nvme_common wmi i2c_hid_acpi i2c_hid serio_raw ip6_tables ip_tables fuse
[   70.809163] CPU: 3 PID: 675 Comm: kworker/3:3 Not tainted 6.5.2-301.fc39.x86_64 #1
[   70.809168] Hardware name: Framework Laptop 13 (AMD Ryzen 7040Series)/FRANMDCP07, BIOS 03.02 09/27/2023
[   70.809171] Workqueue: events power_supply_changed_work
[   70.809180] RIP: 0010:rcu_note_context_switch+0x5e0/0x660
[   70.809184] 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 68 9d 8f a2 c6 05 c3 8a 30 02 01 e8 60 71 f4 ff <0f> 0b e9 7b fa ff ff 49 83 bc 24 98 00 00 00 00 49 8b 84 24 a0 00
[   70.809188] RSP: 0018:ffffafa3c0cb7940 EFLAGS: 00010086
[   70.809191] RAX: 0000000000000000 RBX: ffff9261be6f4c80 RCX: 0000000000000027
[   70.809194] RDX: ffff9261be6e1548 RSI: 0000000000000001 RDI: ffff9261be6e1540
[   70.809196] RBP: 0000000000000000 R08: 0000000000000000 R09: ffffafa3c0cb77d0
[   70.809198] R10: 0000000000000003 R11: ffffffffa3345d28 R12: ffff9261be6f3e00
[   70.809200] R13: ffff92528cae4000 R14: 0000000000000002 R15: ffff92528cae4000
[   70.809202] FS:  0000000000000000(0000) GS:ffff9261be6c0000(0000) knlGS:0000000000000000
[   70.809205] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   70.809207] CR2: 00005649792348b0 CR3: 0000000a15222000 CR4: 0000000000750ee0
[   70.809210] PKRU: 55555554
[   70.809211] Call Trace:
[   70.809215]  <TASK>
[   70.809218]  ? rcu_note_context_switch+0x5e0/0x660
[   70.809221]  ? __warn+0x81/0x130
[   70.809232]  ? rcu_note_context_switch+0x5e0/0x660
[   70.809236]  ? report_bug+0x171/0x1a0
[   70.809244]  ? prb_read_valid+0x1b/0x30
[   70.809248]  ? srso_alias_return_thunk+0x5/0x7f
[   70.809256]  ? handle_bug+0x3c/0x80
[   70.809261]  ? exc_invalid_op+0x17/0x70
[   70.809265]  ? asm_exc_invalid_op+0x1a/0x20
[   70.809279]  ? rcu_note_context_switch+0x5e0/0x660
[   70.809283]  ? srso_alias_return_thunk+0x5/0x7f
[   70.809288]  __schedule+0xc0/0x14c0
[   70.809294]  ? srso_alias_return_thunk+0x5/0x7f
[   70.809298]  ? acpi_ut_allocate_object_desc_dbg+0x3d/0x70
[   70.809309]  schedule+0x5e/0xd0
[   70.809312]  schedule_timeout+0x151/0x160
[   70.809320]  __down_common+0x11a/0x230
[   70.809324]  ? srso_alias_return_thunk+0x5/0x7f
[   70.809331]  down_timeout+0x55/0x60
[   70.809336]  acpi_os_wait_semaphore+0x4c/0x80
[   70.809342]  acpi_ut_acquire_mutex+0x45/0xa0
[   70.809347]  acpi_ns_delete_namespace_subtree+0x1f/0x90
[   70.809354]  acpi_ds_terminate_control_method+0x120/0x150
[   70.809360]  acpi_ps_parse_aml+0xe7/0x3d0
[   70.809367]  acpi_ps_execute_method+0x13f/0x270
[   70.809372]  acpi_ns_evaluate+0x128/0x2d0
[   70.809377]  acpi_evaluate_object+0x14d/0x2f0
[   70.809384]  acpi_evaluate_integer+0x6f/0x130
[   70.809390]  ? __pfx___power_supply_is_system_supplied+0x10/0x10
[   70.809394]  acpi_ac_get_state+0x42/0x90
[   70.809399]  get_ac_property+0x27/0x50
[   70.809403]  __power_supply_is_system_supplied+0x43/0xa0
[   70.809408]  class_for_each_device+0x144/0x180
[   70.809418]  power_supply_is_system_supplied+0x3f/0x70
[   70.809425]  amd_pmf_get_power_source+0xe/0x20 [amd_pmf]
[   70.809435]  amd_pmf_power_slider_update_event+0x42/0x80 [amd_pmf]
[   70.809444]  amd_pmf_pwr_src_notify_call+0xad/0xc0 [amd_pmf]
[   70.809453]  notifier_call_chain+0x5a/0xd0
[   70.809460]  atomic_notifier_call_chain+0x32/0x50
[   70.809465]  power_supply_changed_work+0x7c/0xe0
[   70.809471]  process_one_work+0x1de/0x3f0
[   70.809478]  worker_thread+0x51/0x390
[   70.809483]  ? __pfx_worker_thread+0x10/0x10
[   70.809487]  kthread+0xe5/0x120
[   70.809493]  ? __pfx_kthread+0x10/0x10
[   70.809498]  ret_from_fork+0x31/0x50
[   70.809504]  ? __pfx_kthread+0x10/0x10
[   70.809509]  ret_from_fork_asm+0x1b/0x30
[   70.809521]  </TASK>
[   70.809522] ---[ end trace 0000000000000000 ]---
[   71.754008] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[   76.361961] ucsi_acpi USBC000:00: ucsi_handle_connector_change: ACK failed (-110)
[   80.271135] Freezing user space processes failed after 20.002 seconds (1 tasks refusing to freeze, wq_busy=0):
[   80.271193] task:fwupd           state:D stack:0     pid:3768  ppid:1      flags:0x00004006
[   80.271204] Call Trace:
[   80.271207]  <TASK>
[   80.271216]  __schedule+0x3ee/0x14c0
[   80.271228]  ? srso_alias_return_thunk+0x5/0x7f
[   80.271258]  ? srso_alias_return_thunk+0x5/0x7f
[   80.271269]  schedule+0x5e/0xd0
[   80.271275]  schedule_timeout+0x98/0x160
[   80.271283]  ? __pfx_process_timeout+0x10/0x10
[   80.271291]  wait_for_completion_timeout+0x83/0x170
[   80.271303]  amdgpu_dm_process_dmub_aux_transfer_sync+0x67/0x1e0 [amdgpu]
[   80.271922]  dm_dp_aux_transfer+0xdc/0x1a0 [amdgpu]
[   80.272410]  drm_dp_dpcd_access+0xaa/0x130 [drm_display_helper]
[   80.272419]  drm_dp_dpcd_probe+0x43/0xf0 [drm_display_helper]
[   80.272426]  drm_dp_dpcd_read+0xc3/0x100 [drm_display_helper]
[   80.272433]  auxdev_read_iter+0xa1/0x1b0 [drm_display_helper]
[   80.272441]  vfs_read+0x1fe/0x350
[   80.272446]  ksys_read+0x6f/0xf0
[   80.272448]  do_syscall_64+0x5d/0x90
[   80.272451]  ? srso_alias_return_thunk+0x5/0x7f
[   80.272453]  ? ksys_lseek+0x89/0xb0
[   80.272455]  ? srso_alias_return_thunk+0x5/0x7f
[   80.272456]  ? syscall_exit_to_user_mode+0x2b/0x40
[   80.272458]  ? srso_alias_return_thunk+0x5/0x7f
[   80.272459]  ? do_syscall_64+0x6c/0x90
[   80.272461]  ? srso_alias_return_thunk+0x5/0x7f
[   80.272462]  ? srso_alias_return_thunk+0x5/0x7f
[   80.272464]  ? syscall_exit_to_user_mode+0x2b/0x40
[   80.272465]  ? srso_alias_return_thunk+0x5/0x7f
[   80.272466]  ? do_syscall_64+0x6c/0x90
[   80.272467]  ? do_syscall_64+0x6c/0x90
[   80.272469]  ? do_syscall_64+0x6c/0x90
[   80.272470]  ? syscall_exit_to_user_mode+0x2b/0x40
[   80.272471]  ? srso_alias_return_thunk+0x5/0x7f
[   80.272472]  ? do_syscall_64+0x6c/0x90
[   80.272474]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[   80.272477] RIP: 0033:0x7f0444f7d15a
[   80.272503] RSP: 002b:00007fff26386f60 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
[   80.272505] RAX: ffffffffffffffda RBX: 000056482cc3d890 RCX: 00007f0444f7d15a
[   80.272506] RDX: 0000000000000001 RSI: 00007fff2638701c RDI: 000000000000000e
[   80.272506] RBP: 00007fff26386f80 R08: 0000000000000000 R09: 0000000000000000
[   80.272507] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000004b0
[   80.272508] R13: 0000000000000001 R14: 00007fff2638701c R15: 000056482cc3da30
[   80.272513]  </TASK>
[   80.272716] OOM killer enabled.
[   80.272717] Restarting tasks ... done.
[   80.275217] random: crng reseeded on system resumption
[   80.515724] PM: suspend exit
[   80.515812] PM: suspend entry (s2idle)
[   80.523764] Filesystems sync: 0.007 seconds
[   80.524436] Freezing user space processes
[   81.993277] ucsi_acpi USBC000:00: ucsi_handle_connector_change: ACK failed (-110)
[   81.993290] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[   87.625735] ucsi_acpi USBC000:00: ucsi_handle_connector_change: ACK failed (-110)
[   92.234123] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[   98.889674] ucsi_acpi USBC000:00: ucsi_handle_connector_change: ACK failed (-110)
[  100.531120] Freezing user space processes failed after 20.006 seconds (1 tasks refusing to freeze, wq_busy=0):
[  100.531166] task:fwupd           state:D stack:0     pid:3768  ppid:1      flags:0x00004006
[  100.531172] Call Trace:
[  100.531174]  <TASK>
[  100.531180]  __schedule+0x3ee/0x14c0
[  100.531189]  ? srso_alias_return_thunk+0x5/0x7f
[  100.531193]  ? srso_alias_return_thunk+0x5/0x7f
[  100.531197]  schedule+0x5e/0xd0
[  100.531199]  schedule_timeout+0x98/0x160
[  100.531203]  ? __pfx_process_timeout+0x10/0x10
[  100.531208]  wait_for_completion_timeout+0x83/0x170
[  100.531216]  amdgpu_dm_process_dmub_aux_transfer_sync+0x67/0x1e0 [amdgpu]
[  100.531461]  dm_dp_aux_transfer+0xdc/0x1a0 [amdgpu]
[  100.531642]  drm_dp_dpcd_access+0xaa/0x130 [drm_display_helper]
[  100.531657]  drm_dp_dpcd_probe+0x43/0xf0 [drm_display_helper]
[  100.531665]  drm_dp_dpcd_read+0xc3/0x100 [drm_display_helper]
[  100.531672]  auxdev_read_iter+0xa1/0x1b0 [drm_display_helper]
[  100.531681]  vfs_read+0x1fe/0x350
[  100.531689]  ksys_read+0x6f/0xf0
[  100.531693]  do_syscall_64+0x5d/0x90
[  100.531697]  ? srso_alias_return_thunk+0x5/0x7f
[  100.531699]  ? ksys_lseek+0x89/0xb0
[  100.531701]  ? srso_alias_return_thunk+0x5/0x7f
[  100.531703]  ? syscall_exit_to_user_mode+0x2b/0x40
[  100.531706]  ? srso_alias_return_thunk+0x5/0x7f
[  100.531707]  ? do_syscall_64+0x6c/0x90
[  100.531709]  ? srso_alias_return_thunk+0x5/0x7f
[  100.531711]  ? srso_alias_return_thunk+0x5/0x7f
[  100.531712]  ? syscall_exit_to_user_mode+0x2b/0x40
[  100.531714]  ? srso_alias_return_thunk+0x5/0x7f
[  100.531715]  ? do_syscall_64+0x6c/0x90
[  100.531717]  ? do_syscall_64+0x6c/0x90
[  100.531718]  ? do_syscall_64+0x6c/0x90
[  100.531719]  ? syscall_exit_to_user_mode+0x2b/0x40
[  100.531721]  ? srso_alias_return_thunk+0x5/0x7f
[  100.531722]  ? do_syscall_64+0x6c/0x90
[  100.531724]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[  100.531729] RIP: 0033:0x7f0444f7d15a
[  100.531776] RSP: 002b:00007fff26386f60 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
[  100.531778] RAX: ffffffffffffffda RBX: 000056482cc3d890 RCX: 00007f0444f7d15a
[  100.531780] RDX: 0000000000000001 RSI: 00007fff2638701c RDI: 000000000000000e
[  100.531781] RBP: 00007fff26386f80 R08: 0000000000000000 R09: 0000000000000000
[  100.531782] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000004b0
[  100.531783] R13: 0000000000000001 R14: 00007fff2638701c R15: 000056482cc3da30
[  100.531789]  </TASK>
[  100.532028] OOM killer enabled.
[  100.532029] Restarting tasks ... done.
[  100.534639] random: crng reseeded on system resumption
[  100.772638] PM: suspend exit
[  100.885286] usb 1-4: reset full-speed USB device number 2 using xhci_hcd
[  101.282269] usb 1-4: reset full-speed USB device number 2 using xhci_hcd
[  102.473105] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  103.909758] wlp1s0: authenticate with 2c:c8:1b:ed:68:57
[  103.945002] wlp1s0: send auth to 2c:c8:1b:ed:68:57 (try 1/3)
[  103.947224] wlp1s0: authenticated
[  103.948087] wlp1s0: associate with 2c:c8:1b:ed:68:57 (try 1/3)
[  103.966239] wlp1s0: RX AssocResp from 2c:c8:1b:ed:68:57 (capab=0x401 status=0 aid=4)
[  103.993693] wlp1s0: associated
[  112.711984] ucsi_acpi USBC000:00: ucsi_handle_connector_change: ACK failed (-110)
[  112.711977] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  118.344647] ucsi_acpi USBC000:00: ucsi_handle_connector_change: ACK failed (-110)
[  122.952556] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  123.975978] ucsi_acpi USBC000:00: ucsi_handle_connector_change: ACK failed (-110)
[  133.191933] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  143.432380] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  153.672571] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  163.911928] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  174.151810] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  184.392005] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  194.632299] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  204.872431] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  215.112671] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  225.352896] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  235.593540] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  245.833124] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  256.074021] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  266.312995] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  276.552864] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  286.792759] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  297.032678] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  307.272602] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  317.513052] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  327.752236] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  337.992071] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
[  348.232327] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
1 Like

What happens not closing the lid, but using the pull down menu and choosing suspend? Same behavior. Working on replicating an Ubuntu issue atm, will circle back to this later this afternoon.

That works fine for me. I even went so far as to suspend from the menu, close the lid, then plug in the power supply. Still resumes fine.

EDIT: as soon as I said that I realized I am back in the 6.5.2 kernel, not the 6.5.7. Retrying later.
2nd EDIT: Well, now I don’t know what to think. 6.5.7 refuses to show charging or an adapter connected.

OK. So the way I got it to work on 6.5.7 was to unplug the charger from the wall and plug it back in. That made everything happy again.

Okay, this is good progress.

Things will be in flux for a bit, as the USB power stuff is BIOS related.

On kernel 6.5.7, let’s try the lid again. (I’m on Ubuntu ATM on my 03.02 BIOS machine, but suspend with the lid should work the same on Fedora. Give it a try with your new update and report back.

Re-tested Fedora 39 lid suspend, on a fully updated installation (fresh install today), 03.02 BIOS.

03.02 BIOS, suspend is not working. It “kinda works” sometimes, but takes minutes to wake.
03.03 (internal testing branch) suspend is working and resumes with a keyboard tap.

2 Likes

3.03 solved this issue.

2 Likes