Hardware
Lenovo T14s Gen 3 AMD
This is my current notebook. Running Ubuntu 24.04. It functions reliably.
Workaround for waking up after closing the lid
At the end of my working day I suspend my notebook while being plugged in my usb-c dock. The next day I take the notebook and close the lid. Unfortunately this wakes up the notebook. There is a workaround available.
It is similar to the one described on Reddit
Create a file at: /usr/lib/systemd/system-sleep/on-wakeup.sh
. Make it executable with: chmod +x
.
#!/bin/bash
PATH=/sbin:/usr/sbin:/bin:/usr/bin
# If waking from sleep...
if [[ "${1}" == "post" ]]; then
# AFTER RESUME
echo "$(date) Have resumed..." >> /tmp/wake.log
grep -q closed /proc/acpi/button/lid/LID/state
if [ $? = 0 ]
then
echo "$(date) Have resumed and lid is closed, attempting to suspend..." >> /tmp/wake.log
echo freeze > /sys/power/state
fi
fi
The difference with the original script is that in my case I needed to change LID0
to LID
.