Resumes immediately after suspend: How to diagnose

ok so ath11k_pci breaking on hibernate gave me a clue; it seems to be a hardware/firmware issue. other threads about it:

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

I have no idea how this was just working on Debian. maybe it wasn’t and I just didn’t test it enough. the culprit is probably the T14S Gen 3’s wifi card:

0000:01:00.0 Network controller [0280]: Qualcomm Technologies, Inc QCNFA765 Wireless Network Adapter [17cb:1103] (rev 01)

workarounds suggested in the threads didn’t work for me, but a combination of removing the module and disabling the ACPI wakeups did (if you don’t do the latter, it will resume on stuff like closing down the lid). here’s a beautiful (horrible) script that seems to work:

#!/bin/sh
for dev in $(grep enabled /proc/acpi/wakeup|cut -f 1); do
    echo -n "disabling acpi wakeup: "
    echo $dev | sudo tee /proc/acpi/wakeup
done

set -x
sudo systemctl stop NetworkManager
sudo rmmod ath11k_pci
sudo rmmod ath11k
echo freeze | sudo tee /sys/power/state
$HOME/.local/bin/lock &  # a sway lock script
sleep 1  # avoid a modprobe fail (maybe)
sudo modprobe ath11k
sudo modprobe ath11k_pci
sudo systemctl restart NetworkManager

You can’t use systemctl suspend up there because it’s asynchronous. Script works for hibernate too, just pass “disk” to /sys/power/state rather than “freeze” (=s2idle).

1 Like