No USB/Bluetooth after sleep

Hello,

I’m struggling with issue after S3 Sleep, I’m losing Bluetooth and some of the USB ports.
It persist even after system reboot or power off and on, the only thing that helps is to discharge capacitors by turning off powers supply, pressing power button for few seconds and then everything is back to normal, at least until I suspend PC again.

I though that I solved it by updating BIOS and turning on ErP mode, it indeed was working fine for first few suspends but today I encountered same issue again.

Here’s logs from dmesg right after wake up:

[18823.844147] ACPI: PM: Waking up from system sleep state S3
[18824.235694] pcieport 0000:00:02.2: PME: Spurious native interrupt!
[18824.235813] pcieport 0000:00:02.1: PME: Spurious native interrupt!
[18824.235816] pcieport 0000:00:02.1: PME: Spurious native interrupt!
[18824.236206] [drm] PCIE GART of 1024M enabled (table at 0x000000F47FC00000).
[18824.236224] amdgpu 0000:7b:00.0: amdgpu: PSP is resuming...
[18824.236653] amdgpu 0000:03:00.0: amdgpu: PCIE GART of 512M enabled (table at 0x00000083DAB00000).
[18824.236675] amdgpu 0000:03:00.0: amdgpu: PSP is resuming...
[18824.237566] xhci_hcd 0000:15:00.0: xHC error in resume, USBSTS 0x401, Reinit
[18824.237568] usb usb3: root hub lost power or was reset
[18824.237569] usb usb4: root hub lost power or was reset
[18824.237757] nvme nvme1: D3 entry latency set to 10 seconds
[18824.238603] xhci_hcd 0000:13:00.0: xHC error in resume, USBSTS 0x401, Reinit
[18824.238604] usb usb1: root hub lost power or was reset
[18824.238605] usb usb2: root hub lost power or was reset
[18824.239540] nvme nvme1: 16/0/0 default/read/poll queues
[18824.257843] amdgpu 0000:7b:00.0: amdgpu: reserve 0xa00000 from 0xf47e000000 for PSP TMR
[18824.291513] nvme nvme0: 16/0/0 default/read/poll queues
[18824.318144] amdgpu 0000:7b:00.0: amdgpu: RAS: optional ras ta ucode is not available
[18824.323841] amdgpu 0000:7b:00.0: amdgpu: RAP: optional rap ta ucode is not available
[18824.323842] amdgpu 0000:7b:00.0: amdgpu: SECUREDISPLAY: optional securedisplay ta ucode is not available
[18824.323844] amdgpu 0000:7b:00.0: amdgpu: SMU is resuming...
[18824.325405] amdgpu 0000:7b:00.0: amdgpu: SMU is resumed successfully!
[18824.325520] amdgpu 0000:7b:00.0: amdgpu: kiq ring mec 2 pipe 1 q 0
[18824.328326] amdgpu 0000:7b:00.0: amdgpu: [drm] DMUB hardware initialized: version=0x05002E00
[18824.331406] amdgpu 0000:7b:00.0: amdgpu: ring gfx_0.0.0 uses VM inv eng 0 on hub 0
[18824.331407] amdgpu 0000:7b:00.0: amdgpu: ring gfx_0.1.0 uses VM inv eng 1 on hub 0
[18824.331407] amdgpu 0000:7b:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 4 on hub 0
[18824.331408] amdgpu 0000:7b:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 5 on hub 0
[18824.331408] amdgpu 0000:7b:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 6 on hub 0
[18824.331409] amdgpu 0000:7b:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 7 on hub 0
[18824.331409] amdgpu 0000:7b:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 8 on hub 0
[18824.331409] amdgpu 0000:7b:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 9 on hub 0
[18824.331409] amdgpu 0000:7b:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 10 on hub 0
[18824.331410] amdgpu 0000:7b:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 11 on hub 0
[18824.331410] amdgpu 0000:7b:00.0: amdgpu: ring kiq_0.2.1.0 uses VM inv eng 12 on hub 0
[18824.331411] amdgpu 0000:7b:00.0: amdgpu: ring sdma0 uses VM inv eng 13 on hub 0
[18824.331411] amdgpu 0000:7b:00.0: amdgpu: ring vcn_dec_0 uses VM inv eng 0 on hub 8
[18824.331411] amdgpu 0000:7b:00.0: amdgpu: ring vcn_enc_0.0 uses VM inv eng 1 on hub 8
[18824.331412] amdgpu 0000:7b:00.0: amdgpu: ring vcn_enc_0.1 uses VM inv eng 4 on hub 8
[18824.331412] amdgpu 0000:7b:00.0: amdgpu: ring jpeg_dec uses VM inv eng 5 on hub 8
[18824.333677] amdgpu 0000:7b:00.0: [drm] Cannot find any crtc or sizes
[18824.333694] amdgpu 0000:7b:00.0: [drm] Cannot find any crtc or sizes
[18824.442017] usb 3-12: WARN: invalid context state for evaluate context command.
[18824.469455] amdgpu 0000:03:00.0: amdgpu: RAP: optional rap ta ucode is not available
[18824.469456] amdgpu 0000:03:00.0: amdgpu: SECUREDISPLAY: optional securedisplay ta ucode is not available
[18824.469457] amdgpu 0000:03:00.0: amdgpu: SMU is resuming...
[18824.469459] amdgpu 0000:03:00.0: amdgpu: smu driver if version = 0x0000002e, smu fw if version = 0x00000032, smu fw program = 0, smu fw version = 0x00684b00 (104.75.0)
[18824.469460] amdgpu 0000:03:00.0: amdgpu: SMU driver if version not matched
[18824.498040] amdgpu 0000:03:00.0: amdgpu: SMU is resumed successfully!
[18824.498234] amdgpu 0000:03:00.0: amdgpu: program CP_MES_CNTL : 0x4000000
[18824.498236] amdgpu 0000:03:00.0: amdgpu: program CP_MES_CNTL : 0xc000000
[18824.512637] amdgpu 0000:03:00.0: amdgpu: [drm] DMUB hardware initialized: version=0x0A000700
[18824.539962] ata10: SATA link down (SStatus 0 SControl 300)
[18824.539976] ata9: SATA link down (SStatus 0 SControl 300)
[18824.539990] ata7: SATA link down (SStatus 0 SControl 300)
[18824.548440] ata3: SATA link down (SStatus 0 SControl 330)
[18824.548464] ata4: SATA link down (SStatus 0 SControl 330)
[18824.548486] ata1: SATA link down (SStatus 0 SControl 330)
[18824.596044] ata8: SATA link down (SStatus 0 SControl 300)
[18824.604523] ata2: SATA link down (SStatus 0 SControl 330)
[18824.614706] usb 3-12: reset full-speed USB device number 7 using xhci_hcd
[18824.614714] usb 1-6: reset high-speed USB device number 2 using xhci_hcd
[18824.883475] usb 3-7: WARN: invalid context state for evaluate context command.
[18824.906336] amdgpu 0000:03:00.0: amdgpu: ring gfx_0.0.0 uses VM inv eng 0 on hub 0
[18824.906339] amdgpu 0000:03:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
[18824.906340] amdgpu 0000:03:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
[18824.906340] amdgpu 0000:03:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 7 on hub 0
[18824.906341] amdgpu 0000:03:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 8 on hub 0
[18824.906341] amdgpu 0000:03:00.0: amdgpu: ring sdma0 uses VM inv eng 9 on hub 0
[18824.906341] amdgpu 0000:03:00.0: amdgpu: ring sdma1 uses VM inv eng 10 on hub 0
[18824.906342] amdgpu 0000:03:00.0: amdgpu: ring vcn_unified_0 uses VM inv eng 0 on hub 8
[18824.906343] amdgpu 0000:03:00.0: amdgpu: ring jpeg_dec uses VM inv eng 1 on hub 8
[18825.056007] usb 3-7: reset full-speed USB device number 3 using xhci_hcd
[18825.497913] usb 3-2: reset high-speed USB device number 2 using xhci_hcd
[18826.390681] usb 3-2.2: WARN: invalid context state for evaluate context command.
[18826.471887] usb 3-2.2: reset full-speed USB device number 4 using xhci_hcd
[18826.755979] usb 3-2.5: reset high-speed USB device number 5 using xhci_hcd
[18827.797158] usb 3-2.1: WARN: invalid context state for evaluate context command.
[18827.869965] usb 3-2.1: reset full-speed USB device number 6 using xhci_hcd
[18841.852110] xhci_hcd 0000:13:00.0: Abort failed to stop command ring: -110
[18841.852177] xhci_hcd 0000:13:00.0: xHCI host controller not responding, assume dead
[18841.852181] xhci_hcd 0000:13:00.0: HC died; cleaning up
[18841.852200] xhci_hcd 0000:13:00.0: Timeout while waiting for setup device command
[18842.262678] usb 2-1: device not accepting address 2, error -22
[18842.263834] OOM killer enabled.
[18842.263836] Restarting tasks: Starting
[18842.263885] usb 2-1: USB disconnect, device number 2
[18842.263891] usb 1-6: USB disconnect, device number 2
[18842.264911] Restarting tasks: Done
[18842.264917] efivarfs: resyncing variable state
[18842.266565] efivarfs: finished resyncing variable state
[18842.266647] random: crng reseeded on system resumption
[18842.266652] PM: suspend exit
[18842.278531] sd 12:0:0:0: [sda] Synchronizing SCSI cache
[18842.302166] amdgpu 0000:03:00.0: amdgpu: VM memory stats for proc kscreenlocker_g(43694) task kscreenloc:cs0(43661) is non-zero when fini
[18842.303113] Realtek Internal NBASE-T PHY r8169-0-1000:00: attached PHY driver (mii_bus:phy_addr=r8169-0-1000:00, irq=MAC)
[18842.447355] sd 12:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[18842.454377] xhci_hcd 0000:13:00.0: WARN Can't disable streams for endpoint 0x84, streams are already disabled!
[18842.454379] xhci_hcd 0000:13:00.0: WARN xhci_free_streams() called with non-streams endpoint
[18842.468392] xhci_hcd 0000:13:00.0: WARN Can't disable streams for endpoint 0x1, streams are already disabled!
[18842.468394] xhci_hcd 0000:13:00.0: WARN xhci_free_streams() called with non-streams endpoint
[18843.226507] r8169 0000:10:00.0 enp16s0: Link is Down
[18846.221332] r8169 0000:10:00.0 enp16s0: Link is Up - 1Gbps/Full - flow control rx

Just in case, my MOBO is Gigabyte x870e Aorus Elite

If anyone have the same issue, verify if your motherboard is not using MT7925 driver. Looks like it has some quirks under Linux.
Here’s documentation I found ASUS Zenbook UM5606 - ArchWiki
After adding udev rule looks like problem is solved, I did suspend/resume actions many times and it’s working correcly so far.