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.

@hellomiakoda I’ve not encountered the same issues as you and I’ve had Linux on many machines. I don’t have a solution right now but I will ask colleagues in the morning. My advice is to test and keep retesting. I imagine it will be something ridiculous like one of those settings not getting on with Linux. Also, double check and ensure you have the recent firmware for that Thinkpad, they have been known to release a bad firmware occasionally.
@JaxxAI I doubt there's an update. I know I checked that when I got it, 2nd hand. God, I do not remember how to update this thing's firmware. I really hope it's not some windows BS, but if it is, I have a drive I can chuck in for that. Oh, if it makes any difference, It's in legacy BIOS mode. I don't remember what the issue was exactly, but I remember there was a show stopping issue when I tried installing when I got it that made me switch from EUFI to BIOS.
@JaxxAI Same issue applies to MediCat. So if we need the details of what that EUFI issue was, I can dig out my MediCat and boot that EUFI.
I can't for the life of me remember what it was, just that it renders the laptop completely unusable.
@JaxxAI I tried a live boot Manjaro in EUFI mode after the update just to see if that's fixed... Booting Linux in EUFI just hangs. Yep, I remember now. That is with Secure Boot disabled.
Curiosity solved on that specific thing, lol. (I do not care, I don't see much detriment to using BIOS mode anyway)
@JaxxAI Well I'll be damned. There was indeed an update. Flashing it now. Conveniently, they offered a bootable ISO, not just the Windows utility.