You are not logged in.

#1 2025-08-07 12:15:34

midian
Member
Registered: 2019-02-21
Posts: 53

[solved] Keyboard fails to activate after resume from suspend

My new laptop is affected by this ancient bug (keyboard fails to reactivate): https://bugzilla.kernel.org/show_bug.cgi?id=209923

Basically, every 1 or 2 suspend/resume cycles, my keyboard won't work and I have to suspend/resume again to make it work.

I was wondering if there is a way to "manually" reset the keyboard (e.g. via a script I can click on my desktop), or another workaround?

Last edited by midian (2025-08-09 15:20:12)

Offline

#2 2025-08-07 15:01:58

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,226

Re: [solved] Keyboard fails to activate after resume from suspend

Have you played w/

i8042.reset=1 i8042.nopnp=1 i8042.kbdreset=1 atkbd.reset=1

?
https://wiki.archlinux.org/title/Kernel_parameters

Offline

#3 2025-08-07 16:32:44

midian
Member
Registered: 2019-02-21
Posts: 53

Re: [solved] Keyboard fails to activate after resume from suspend

I've tried those, with and without i8042.nopnp, but it still fails randomly. Now I also notice an "atkbd serio0 keyboard reset failed" in dmesg, I guess because of one of the reset options.

Offline

#4 2025-08-07 19:00:21

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,226

Re: [solved] Keyboard fails to activate after resume from suspend

Do you have a system journal covering the failure (pre- and post suspend log)
Is it s3 or s2idle (well, we'll see in the log wink)

modinfo i8042 | grep parm

There're quite some options, probe_defer and forcenorestore (on s3) sound somewhat promising…

Offline

#5 2025-08-09 04:30:05

midian
Member
Registered: 2019-02-21
Posts: 53

Re: [solved] Keyboard fails to activate after resume from suspend

Journal: https://0x0.st/8FcK.txt
(keyboard fails at 06:18:18)

modinfo: (removed)

Note: the ACPI bugs have been reported but the vendor is not interested in fixing them

Last edited by midian (2025-08-09 08:50:50)

Offline

#6 2025-08-09 07:51:42

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,226

Re: [solved] Keyboard fails to activate after resume from suspend

I know what modinfo prints here wink
The idea was to give you a hint for more i8042 parameters to poke around.

You're aware that none of the discussed kernel parameters is present in that journal?
Ftr "i8042.nopnp=1", not "i8042.nopnp"

I assume the device doesn't support deep sleep (for a cross-test)?

cat /sys/power/mem_sleep

For a brute-force solution, see https://bbs.archlinux.org/viewtopic.php … 4#p2233474

Offline

#7 2025-08-09 08:48:17

midian
Member
Registered: 2019-02-21
Posts: 53

Re: [solved] Keyboard fails to activate after resume from suspend

seth wrote:

You're aware that none of the discussed kernel parameters is present in that journal?
Ftr "i8042.nopnp=1", not "i8042.nopnp"

Yes, I tried the exact parameters you gave in a previous comment, then I removed them after experimenting. The only difference I noticed was that "atkbd serio0 keyboard reset failed" line.

seth wrote:

I assume the device doesn't support deep sleep (for a cross-test)?

cat /sys/power/mem_sleep

It says "s2idle".

I reported the sleep issue and a workaround was added to the kernel: https://repo.or.cz/linux-stable.git/com … f247f48dc5

seth wrote:

Thanks, I'm going to try it.

Last edited by midian (2025-08-09 08:49:55)

Offline

#8 2025-08-09 09:38:31

midian
Member
Registered: 2019-02-21
Posts: 53

Re: [solved] Keyboard fails to activate after resume from suspend

seth wrote:

Unfortunately...

systemd-sleep[67919]: Reloading atkbd after suspend
systemd-sleep[67920]: modprobe: FATAL: Module atkbd is builtin.
systemd-sleep[67919]: unload failed!

Last edited by midian (2025-08-09 09:38:46)

Offline

#9 2025-08-09 14:23:58

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,226

Re: [solved] Keyboard fails to activate after resume from suspend

You'll have to wait for the kernel patch to hit the repos or build the kernel yourself sad

Offline

#10 2025-08-09 14:40:25

midian
Member
Registered: 2019-02-21
Posts: 53

Re: [solved] Keyboard fails to activate after resume from suspend

I thought that patch was only for the broken suspend/hardware sleep, not for the keyboard?
Anyway, I appreciated your suggestions in this thread, thanks.

Offline

#11 2025-08-09 14:56:18

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,226

Re: [solved] Keyboard fails to activate after resume from suspend

Oh, hold on - the patch /is/ in the current linux kernel.
Fuck.

Instead of un/loading the module try

echo -n 'serio0' > '/sys/bus/serio/drivers/atkbd/unbind'

and

echo -n 'serio0' > '/sys/bus/serio/drivers/atkbd/bind'

Offline

#12 2025-08-09 15:20:01

midian
Member
Registered: 2019-02-21
Posts: 53

Re: [solved] Keyboard fails to activate after resume from suspend

It worked! I suspended 20 times and keyboard works fine.

Thanks so much!

Last edited by midian (2025-08-10 08:05:53)

Offline

Board footer

Powered by FluxBB