Over the last few months I’ve had issues putting my Framework into Suspend or Hibernate.
Before I realized what was happening I would return to a completely drained battery.
I did manage to determine roughly what was causing the instant wake-up signals. I haven’t solved it, but I’ve stopped the problem. Jump to the end if you want the punch line.
I’m going to document how I troubleshooted and found out what was going on. Hopefully this helps someone else. My background here is that this is my first Linux device in a long while.
Framework Batch: #4 (Oct 2021)
Framework Firmware: Latest one IIRC.
Framework CPU: 11th Gen Intel(R) Core™ i7-1165G7 @ 2.80GHz
Framework RAM: 16GB
OS: Manjaro Linux 21.3.1
Kernel: 5.19rc3-1 (currently)
Secure boot is turned off.
No other OS installed.
After putting the system into Suspend (S3) or Hibernate (S4) sleep states, the computer will resume within seconds.
The power button changes from solid on to slow pulsing as the system beings to sleep. After a second (longer if it’s trying to Hibernate) it will turn solid back on as the wake-up process begins.
- tail/follow the systemd journal, while generating my own “start/stop” log entries:
journalctl -f in one terminal session, and
echo 'SUSPENDING NOW' | systemd-cat -p warning && systemctl suspend -i in another to trigger a suspend and a log entry. One I’m logged back in I trigger another log event:
echo 'awake' | systemd-cat -p warning
- Here’s a post on the Archlinux bbs on
read through the Arch Wiki extensively.
Various google searches on tracking down the journal entries about USB devices lead me all over to posts like this post here
- remove all framework expansion ports
- have no additional input devices plugged in
- turn off bluetooth (`systemctl disable --now bluetooth.service)
- turn off networking (
systemctl disable --now NetworkManager.service)
- turn off xfce4-power-manager (
- try different kernels:
- 5.15.49-1 (LTS version, listed as recommended)
- 5.16.20-2 (started here. It is now listed as Unsupported)
- 5.19rc3-1 (experimental)
With these services turned off and with these kernels active, there was no difference for me nor produced any changes in the journal that I could detect (not exhaustive inspection).
- try to learn about APCI and follow the Archlinux article on wakeup triggers.
cat /proc/acpi/wakeup(only showing the enabled devices here. There are so, so many disabled entries…)
|Device||S-state||Status Sysfs node|
lspcito look up the Sysfs node pci values to figure out what each of the above entries means, while comparing the 4 character code to an incomplete reference guide (that I can’t find anymore).
lspci | grep 00:14.0 OR
lspci | grep USB
00:0d.0 USB controller: Intel Corporation Tiger Lake-LP Thunderbolt 4 USB Controller (rev 01) 00:0d.2 USB controller: Intel Corporation Tiger Lake-LP Thunderbolt 4 NHI #0 (rev 01) 00:0d.3 USB controller: Intel Corporation Tiger Lake-LP Thunderbolt 4 NHI #1 (rev 01) 00:14.0 USB controller: Intel Corporation Tiger Lake-LP USB 3.2 Gen 2x1 xHCI Host Controller (rev 20)
- Discover that
powertopis a thing and use that. Checking the WakeUp Section shows:
>> Disabled Wake-on-lan status for device wlp170s0 Enabled Wake status for USB device usb3 Disabled Wake status for USB device usb1 Enabled Wake status for USB device 3-9 Disabled Wake status for USB device usb4 Disabled Wake status for USB device 3-10 Disabled Wake status for USB device usb2
Disabling USB device usb3 and USB device 3-9 via powertop or via the
echo 'disabled' > '/sys/bus/usb/devices/<device_name>/power/wakeup'; command
This lets my laptop suspend and hibernate without issue.
I can turn on bluetooth, networking and the xfce4-power-manager back on without issue.
Well, apparently at least the built in keyboard and trackpad. Though I don’t know for sure what else.
So to wake from suspend/hibernate, the lid needs to be opened or the power button needs to be short pressed. But this is better than the alternative.
If anyone knows how I can narrow down why those usb devices are acting up, or tips on understanding this area of Linux, that would be rad.