Immediate wake up from suspend caused by USB 3.0 devices (Solution)

Hi.

That’s an old issue that some systems do have. I tried the workaround shown in arch wiki, and it did not work for me.

I found a solution through systemd. I created this service in /etc/systemd/system:

[Unit]
Description=Script upon suspend/resume
Before=sleep.target
StopWhenUnneeded=yes

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=modprobe -r xhci_pci xhci_hcd
ExecStop=-modprobe xhci_pci xhci_hcd

[Install]
WantedBy=sleep.target

Worked flawlessly.

2 Likes