[RESPONDED] Waking from suspend w/ lid closed

Is there a problem with the lid resume logic today?

I was surprised that it disabled the lid resume, since that’s not something I’ve seen anyone have problems with (and seems undesirable to disable). Did I just miss that?

Thanks for this in any case, will make some people’s lives easier, I’m sure, while we wait for bios fixes

1 Like

Some folks have had it wake while traveling, in backpacks, etc. Believed to be a keypress happening during movement.

Sitting at a desk, myself personally, I have never had a problem with the defaults.

In other words, default behavior is unchanged. The above script is a workaround for those wishing to change default behavior due to surprise waking behavior.

Default, out of the box behavior:

  • Lid close, suspend. Lid lift, resume. Lid resume is not disabled by default.

  • The script provided is an optional workaround changing default behavior.

I edited my above post to make this a bit clearer.

Thanks for this, but it would be preferable to still wake upon lid open. Lid open isn’t the cause (or at least it shouldn’t be) of the laptop powering back on while in a bag.

I agree, which is why this will be officially addressed long term in an upcoming BIOS update. :slight_smile: Workarounds are just that, temporary. Folks needed a solution, now they have a temporary option should they choose to use it in the short term.

Quote:

2 Likes

I have also had tons of issues with it waking up, primarily by the cat sitting on it (I guess it’s nice and warm), but none of the issues (for me) has been from false positives from an errant lid opening event

The workaround script (optional) also addresses cats sitting on the laptop (until the BIOS is updated). :wink:

3 Likes

While the script is working, I’ve got an unwanted side effect.

Up until now a suspend/resume always resulted in the backlight not working anymore.
I ‘fixed’ that with a hackish script:

SYS="/sys/bus/usb/devices/1-4.3"

sudo sh -c "echo 0 > $SYS/authorized"
sudo sh -c "echo 1 > $SYS/authorized"

Up until now this resulted in the keyboard being reset completely, including the firmware.
With this script this does not work anymore, resulting in a keyboard backlight not working after a first suspend/resume cycle. Only a reboot fixes this…

Any idea why this behavior has changed?

Appreciate you flagging this.

If I read this correctly, you found before using the script…you had to run your script to correct the backlight failing to return upon resume?

From there, you indicated the script I provided breaks your script correcting the behavior any longer.

Must admit, I am not seeing this with my keyboard(s). Can you provide your BIOS version of your Framework Laptop 16, and also the results of this:

sudo dmidecode -s bios-version && sudo dmidecode -s system-manufacturer && sudo dmidecode -s system-product-name && sudo lsusb | grep -w Keyboard

Product and Vendor may seem like overkill, but for folks gleaming this I want them to know this is Framework Laptop 16.

sudo dmidecode -s bios-version && sudo dmidecode -s system-manufacturer && sudo dmidecode -s system-product-name && sudo lsusb | grep -w Keyboard
03.05
Framework
Laptop 16 (AMD Ryzen 7040 Series)
Bus 001 Device 008: ID 32ac:0012 Framework Laptop 16 Keyboard Module - ANSI

Hmmm… I’m also not sure, anymore. I’ve rebooted the unit, and it seems that everything is ok now. Let me test a little bit more.

Wild…but this is a crazy important call out (even as a disclaimer at the very least for the script). Appreciate it.

No, it does not work. So the behaviour is:

  • after boot up the keyboard backlight is working
  • after suspend/resume cycle the backlight is off

This I also had in the past, and the hack script was a way to fix that on the fly.
afaik it basically restarts the keyboard by turning the power down and up again.

1 Like

Good call out, I am not seeing it on the unit in front of me. Going to test it against another similar one, see what I see. I have the same keyboard.

1 Like

Ok…

Here’s the thing: with your solution in place, indeed after the suspend/resume cycle the backlight is off.

I thought that my ‘reset-keyboard’ script wasn’t working anymore, but it actually is: after I’ve run the ‘reset-keyboard’ script I’m able to turn on the backlight with the FN+Space combo.

That does not work right after the suspend/resume cycle. But here’s the catch (and this is what got me confused): running ‘reset-keboard’ undoes your script. Which makes sense of course, but it got me doubting myself :wink:

Anyways, weird.

Got it. I am seeing different behavior. Now that I am more focused on the backlighting (office lights made this less visible until I really started looking for it). Mine stays on when it suspends. So I am addressing this to make sure it turns off when it suspends (as it would in default settings) and then come back on when resumed.

It’s hacky, but adding some items to the systemd service and testing.

For the time being (until later resolved in a BIOS update), this is what I am working with that has proven reliable for me:

NOTE: This may not disable the keyboard backlighting when you place it into suspend. By default without this script, the keyboard backlight goes out automatically. With this script,you will need to Fn space bar to turn off the backlight before you enter suspend or it may remain on. This is a side effect of the script.

Regarding Harry’s experience above, tried both RGB US English and US English. In both instances, Fn space bar to turn off the backlight before suspending was the way forward. Upon resuming in my multiple tests, Fn space bar to turn on the backlight after resume was working as well. More on their experience here.

Calling this one working with some altered work flow to dealing with backlighting before suspending.

Example video showing how it works. And it is working on multiple of my machines.
This is not the default, this is using the above script ONLY. :slightly_smiling_face:

Screenshot From 2025-01-23 16-30-00

1 Like

What happens if you do spacebar after resume? Does it change the backlight brightness?

Fn and space. Space on its own doesn’t change the brightness. Only posting this fort others reading to make sure it’s clear.

Oh, the post swallowed that I had put < fn > without spaces. Thanks for the additional clarification @Matt_Hartley .

1 Like

Just to be sure @Matt_Hartley

For me the script works great wrt to keyboard ‘unwake’, but still the backlight is not working (anymore) after a suspend/resume cycle. Also if I turn it off manually before I suspend…

Is there anything I can test to figure this out?

To be clear, as shown in the video above, resume, backlight is off on keyboard. Fn plus spacebar is not bringing it back as you tap it a few times? And this is with the latest BIOS, Framework Laptop 16?