My system goes to sleep, then after a second of being off, it turns back on again.
zzz doesn't report any errors.
looked into it, apparently it's not zzz's fault, I tried the command "sudo sh -c "echo mem > /sys/power/state"" by itself and the same thing happens, I asked chatgpt and it thinks it's a USB 3 driver issue and that I should update my kernel (already on the newest version) and that I should update my mobo firmware.
I tried updating the BIOS and it still can't sleep but now it sends me to the lock screen instead of directly back to the desktop.
I disabled all the devices in /proc/acpi/wakeup/ and now sleep works fine.
This is the output if it matters.
Device S-state Status Sysfs node
GP12 S4 *disabled pci:0000:00:07.1
GP13 S4 *disabled pci:0000:00:08.1
XHC0 S4 *disabled pci:0000:09:00.3
GP30 S4 *disabled
GP31 S4 *disabled
PS2K S3 *disabled
PS2M S3 *disabled
GPP0 S4 *disabled pci:0000:00:01.1
GPP8 S4 *disabled pci:0000:00:03.1
SWUS S4 *disabled pci:0000:05:00.0
SWDS S4 *disabled pci:0000:06:00.0
PTXH S4 *disabled pci:0000:02:00.0
PT20 S4 *disabled
PT21 S4 *disabled
PT22 S4 *disabled
PT23 S4 *disabled
PT24 S4 *disabled
PT26 S4 *disabled
PT27 S4 *disabled
PT28 S4 *disabled
PT29 S4 *disabled pci:0000:03:09.0
Is it safe to keep them like this until there's a better fix?
with the help of chatgpt i narrowed it down to /proc/acpi/wakeup device GPP0, which according to lspci is a
00:01.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge (prog-if 00 [Normal decode])
Subsystem: Advanced Micro Devices, Inc. [AMD] Device 1453
Flags: bus master, fast devsel, latency 0, IRQ 27, IOMMU group 2
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: [disabled] [32-bit]
Memory behind bridge: fcf00000-fcffffff [size=1M] [32-bit]
Prefetchable memory behind bridge: [disabled] [64-bit]
Capabilities: <access denied>
Kernel driver in use: pcieport
I ended up fixing it by disabling GPP0, I made it persistent with a runit script
grep -q '^GPP0.*\*enabled' /proc/acpi/wakeup && echo GPP0 > /proc/acpi/wakeup
exit 0