[RESPONDED] Waking from suspend w/ lid closed

Apparently, the FW16 does not go to sleep when the cover is closed, and maybe it also turns off the fan. People complained that flexing the display pressed keys and turned it on.

Frozen/bricked again. I have been running kernel 6.8.9 since 2024-05-19, so it seems clear that switching to 6.8.x did not improve the situation.
That being said, maybe @TenPin benefits from Ubuntu-specific extra patches?

Not sure it’s Ubuntu fixes. I’m running kernel 6.9.1 on kubuntu 24.04 and I’m still seeing this issue. Always after having the laptop closed in my backpack

It was @Mario_Limonciello who alerted me that 6.8.0-20-ubuntu had the suspend fixes I needed.

I have no idea whether those fixes are in the mainline kernel.

I’m now up to 6.8.0-31-ubuntu and suspend/resume continues to function flawlessly.

On the 16 there is a problem where key presses work “through” the lid at the moment. So if you flex the lid (for example other stuff in your backpack pushing on the lid) then it could cause a wakeup.

I feel you can probably turn off wakeup from XHCI PME and it will work around the problem.

1 Like

I tried this, but did not a difference when I manually slept the machine then clicked some keys. Did you need to reboot or restart the usb devices?

This isn’t a general solution, each laptop is going to have a different USB layout. You’d have to run lsusb.py to list out the devices, find the address for the keyboard and replace “1-4.3” in the command for the keyboard address.

Also, this command is only for the session so you’d have to rerun it every time you boot the laptop. My main problem is the touchpad waking the laptop during sleep, and this only fixes the keyboard so I’m just waiting for the bios fix at this point

Yet another failed wake up here (not whining, just keeping track of how often it happens).

@Clay_Rosenthal By “this issue”, do you mean your laptop waking up while in your backpack or do you mean your laptop not waking up? This topic mentions both issues but was (and apparently remains) primarily about the former.

Any updates? My laptop wakes up in my bag EVERY TIME so I just shut it down every time I have to carry it somewhere. We need a UEFI update ASAP to address this issue so the keyboard is disabled when the lid is closed.

Doing no tasks, even in suspend mode, my FW16 still gets hot.

It must be doing something in order to convert energy to heat, whether that is charging the battery, doing updates while “sleeping” (apparently a windows thing).

As a cheesy workaround, drop this script into /lib/systemd/system-sleep/20-disable-wakeup.sh and make it executable by root:

#!/bin/bash
shopt -s nullglob
case $1 in
    pre)
        systemctl stop bluetooth
        for d in /sys/bus/usb/devices/*/power/wakeup /sys/bus/i2c/devices/*/power/wakeup; do
            echo disabled > "$d"
        done
        ;;
    post)
        systemctl start bluetooth;;
esac

That will disable wakeup by all USB and i2c devices as well as disable bluetooth (which I have seen cause weird hangs during the suspend process).

You can then test it by running systemctl suspend, waiting for the laptop to sleep, and then do touchpad and keyboard stuff. It should stay asleep until you close/reopen the lid or hit the power button.

3 Likes

Thanks, very helpful! Though I’d like to be able to wake up the laptop via keyboard, just not when the lid is closed. But I don’t presume we have access to the lid state in Linux, right?

Lid state is somewhere in /proc/acpi/button – on my system, it is at
/proc/acpi/button/lid/LID0/state. It will probably be the same for all systems.

Modifying my cheesy little script to account for lid state and multiple keyboards is left as an exercise for the reader – when I have an external keyboard it runs thru a USB 3.2 dock that provides system power as well, and my patterns always have the lid open when I am using the system – if the lid is closed, I want the system to be asleep.

Yes. I want it to sleep too when the lid is closed. But when the lid is open and the system is in suspend, that’s a mode where I want to be able to use the keyboard to wake up the system. I’ll post a script here once I get it to work.

I applaud you, just tested the script and does exactly what I need. Of course not a permanent solution, but it can do the job until a new BIOS patch rolls along.

Interesting. It has now been 24 days (and counting) since my last freeze-on-resume, i.e. we are getting close to a situation where the laptop just works ©.

The two noticeable changes in my habits are:

  • suspending less often (but still suspending and resuming at least once per day)
  • turning bluetooth off (bluetoothd is running but bluetoothctl show | grep Power returns Powered: no PowerState: off-blocked)

On Fedora 40, my laptop is also waking from sleep in my backpack. I have confirmed this several times by hearing the beep of a connection being made on my bluetooth headphones within about a minute of shutting the laptop lid and putting it in my backpack. They disconnect automatically upon shutting the lid, so I know that it is suspending at least initially.

3 Likes

The fact that there hasn’t been a UEFI update to fix this is frankly mind-boggling to me.

3 Likes