I've got a weird annoyance on one of my #Linux laptops, and maybe someone knows something I don't... (details continue in self replies)
When I shut the lid, the laptop goes to sleep. Sometimes, when I open it, and it wakes up, the keyboard doesn't work at all. I can fix this by closing the lid, letting it sleep again, and then opening it. Usually that works on the first reopen, occasionally it takes 2 or 3, and on very rare occasion, I have to force restart or ssh in and reboot.
It didn't always do this. I'd say it's been about a year since this started. There seems to be no pattern. I can go a week with my usual habits of closing the lid and coming back without it happening, and another week it might be daily. The only noticable pattern is that closing the lid, unplugging the laptop lid closed, and later plugging it in having not opened it, and then leaving it for hours before finally opening the lid to resume has a much higher chance of unresponsive keyboard.

Model: Lenovo ThinkPad 11e (20D9-0020US).
Distro: Manjaro
Kernel: Linux 6.19.2-1-MANJARO (though several kernel updates have occured with no change)
DE: KDE Plasma
Currently still using X11, but this happens under Wayland as well. However, in Wayland, fixing it is flakier. Then again, this laptop is generally much flakier with Wayland, which is why I stuck to X11.

I can't remember if plugging in an external while the internal KB is unresponsive works, I don't often have one with me.

Touchpad and volume keys continue to work when the keyboard is unresponsive. I don't know if the hotkeys are getting through in that state as they normally don't do their associated functions while the lock screen is up.

It just occured to me I haven't thought to try disabling the lock screen to see if this still happens, but I'm in an environment where I really shouldn't leave a computer unlocked.

Oh, and dropping to tty doesn't work in that state either. However, ssh does, and I can clearly see all the other things the machine is doing continue normally. I just can't unlock it due to the keyboard not responding. I HAVE tried enabling OSK and can unlock by tediously entering the password with the trackpad, but they keyboard remains unresponsive after unlocking. I probably should leave the OSK available, in case it happens when I have stuff I need to save.
@hellomiakoda Makes me wonder if there is a power management setting in the bios which is also taking action and you essentially have a race condition with the Linux OS when the lid is opened. Have a look in bios for any ACPI power settings or legacy mode. Toggle the settings around. First thing that popped into my mind.
@JaxxAI I'll reboot and take a look. I'll report back in a couple minutes and let you know what I find.

@JaxxAI Well, found the following...
Wake on LAN: AC Only (changed to disabled)
Always on to USB: Enabled (changed)

Intel SpeedStep Technology: Enabled
Mode for AC: Max Performance
Mode for Battery: Battery Optimization
CPU Power Management: Enabled
(Changed all that to disabled)

I still have a slider for power profile. I'm curious if that still does anything with those BIOS features disabled.

@JaxxAI Just in case you or anyone else reading was curious....
I found the power draw in info center, and changed the power mode slider from one side to the other. It did change by about a watt and a half. I don't recall if the change was bigger with SpeedStep and all that enabled. I'll experiment with that, if I remember, after we figure out this issue. I'm super curious. I forgot I could see that in info center. Almost scared to find out what my big laptop is burning through.