Hi,
I am running Fedora 40 with kernel 6.10.6-200.fc40.x86_64 on a Lenovo IdeaPad Slim 3 15ABR8 with a Ryzen 7 7730U.
At startup the laptop’s keyboard is fine, but if the computer goes into sleep mode, it stops working.
I’ve found that similar problems were fixed by modifying the grub configuration, for example by including:
GRUB_CMDLINE_LINUX=“i8042.dumbkbd=1”
GRUB_CMDLINE_LINUX_DEFAULT=“quiet i8042.debug=1 i8042.noaux=1 i8042.dumbkbd”
and then running grub2-mkconfig, but this didn’t work.
In the title you’re mentioning about suspension (suspend to ram is assumed), whereas in the message you are referring to hibernation (suspend to disk). Which sleeping state is it?
Is it only the keyboard which is not working? Mouse and display do work? Does the system wake up from sleep?
Is this issue related only to the latest kernel, or does it happen with older kernels too?
I’m sorry for the inaccuracy, it is the laptop sleep mode, it is suspends to RAM (edited the post accordingly)
Only the laptop integrated keyboard does not work. Mousepad and USB attached keyboards are fine. If use any working peripherals, the system succesfully wakes up.
The issue happens with 6.10.6-200.fc40.x86_64 and 6.8.5-301.fc40.x86_64 wheter I modify the grub.cfg or not.
Does this also happen when no peripherals are attached? When it does happen, do you need to plug in an external keyboard in order to be able to log in?
Do you see anything in the logs? You could check that with journalctl -b after a system wakeup (and narrow down the output with -S and -U options, using the date/time right before the system is left idle and after it wakes up). You can also post the output here, as preformatted text (using the </> icon).
Please also post the output of inxi -Fzxx (as preformatted text too).
By filtering the logs for the name of the integrated keyboard i find:
set 02 13:03:38 fedora kernel: input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input2
set 02 11:03:44 fedora systemd-logind[1034]: Watching system buttons on /dev/input/event2 (AT Translated Set 2 keyboard)
With time interval the -b option needn’t be used. The date format is wrong (MM and DD are switched). The time interval should also be increased (since before the system is left unattended, until the system is waken up from sleep, which should certainly be more than 5 minutes).
There are several system crashes being reported in relation with kernel 6.10 and AMD Ryzen CPUs, see posts here and here. While your issue is different, it might be related. You could also check if the issue disappears by booting with kernel 6.9.
I have tried many things…
The only one which led to something close to a solution has been downgrading to Fedora 39. On kernel 6.5.6-300.fc39.x86_64 it happened randomly, while on the kernel 6.10.8-100.fc39.x86_64 it kept happening. I will try other kernels but so far it seems the best solution, hoping that next updates will fix this… @tqcharm
I have tried many different kernels. The latest where it seems not to give problems is 6.6.14-200.fc39.x86_64.
I might try other things but for now I will stick to an older kernel.
The problem presented also with Linux Mint 22 which is based on kernel 6.8, so I guess it is a laptop problem.
Power management is often a problem – there have been efforts to promote standard interfaces, but battery life and overall power demands are key selling points. Vendors compete with proprietary “enhancements”. There are USB dongles with a button or two that can be programmed as a “keyboard” to enter a specific sequence. Example.
I have left this issue aside for some time, but today booting up 6.10.10-100.fc39.x86_64+debug, i managed to pinpoint an error which might be the problem:
14:43:56 kernel: hid-generic 0003:145F:02C9.0003: input,hidraw2: USB HID v1.10 Device [SIGMACHIP Trust Keyboard] on usb-0000:04:00.4-1/input1
14:43:56 kernel: input: SIGMACHIP Trust Keyboard System Control as /devices/pci0000:00/0000:00:08.1/0000:04:00.4/usb3/3-1/3-1:1.1/0003:145F:02C9.0003/input/input18
14:43:56 kernel: hid-generic 0003:145F:02C9.0002: input,hidraw1: USB HID v1.10 Keyboard [SIGMACHIP Trust Keyboard] on usb-0000:04:00.4-1/input0
14:43:56 kernel: input: SIGMACHIP Trust Keyboard as /devices/pci0000:00/0000:00:08.1/0000:04:00.4/usb3/3-1/3-1:1.0/0003:145F:02C9.0002/input/input16
14:43:56 kernel: usb 3-1: Product: Trust Keyboard
14:42:49 kernel: atkbd serio0: Failed to deactivate keyboard on isa0060/serio0
14:40:23 kernel: ideapad_acpi VPC2004:00: Keyboard backlight control not available
16:40:01 kernel: input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input2
The error which was raised as soon as I woke up the laptop is:
14:42:49 kernel: atkbd serio0: Failed to deactivate keyboard on isa0060/serio0
Well, from what I have seen online, it seems that your issue is somewhat common. I am not even sure why the i8042-related GRUB parameters would be working, as I understand that i8042 is the designation of a PS/2 controller. Nevertheless, it seems to have worked for others with similar laptops, so it is probably worth trying.
Am I correct in understanding that you are using X.org as display server? If yes, does your issue also happen under Wayland?
Regarding passing additional GRUB parameters, how did you do that?
For temporary purposes, easiest is to edit the GRUB entry before booting (by pressing the e key on the selected boot entry) and adding the flags, then booting. This change is not persistent, but valid only for the current boot.
If instead you edited the GRUB configuration file, are you sure you ran the grub2-mkconfig correctly? Usually it is less prone to errors to use grubby for such purposes:
verify that your GRUB entries were added correctly, by running sudo grubby --info=ALL
if needed, modify the kernel arguments with sudo grubby --update-kernel=ALL --args='i8042.debug=1 i8042.noaux=1 i8042.dumbkbd'[1].
Those arguments are the ones posted in the OP, I have no means to verify if they do actually work. ↩︎
% jctlnh -b -g i8042
Sep 23 04:51:16 kernel: i8042: PNP: PS/2 Controller [PNP0303:PS2K] at 0x60,0x64 irq 1
Sep 23 04:51:16 kernel: i8042: PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp
Sep 23 04:51:16 kernel: i8042: Warning: Keylock active
Sep 23 04:51:16 kernel: serio: i8042 KBD port at 0x60,0x64 irq 1
Sep 23 04:51:16 kernel: input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input4
Sep 23 07:52:03 kernel: dell_laptop: Using i8042 filter function for receiving events
I’ve seen many suggestions of kernel options related to PS/2 keyboa rds, including atkbd.reset=1, i8042.nomux, i8042.reset, i8042.nopnp, i8042.direct, i8042.noloop, i8042.debug, i8042.noaux, i8042.dumbkbd', and i8042.notimeout but haven’t tracked down authoritative documentation other than the kernel sources. These appear to be workarounds for BIOS bugs:
True. From Davide’s post I’ve just considered that in this case the builtin keyboard was a USB one, but now that I think about it, what those journalctl logs might be referring to is the external keyboard needed to enter password after system wake-up. Besides, the last line from the snippet does refer to i8042 too.
i8042.debug [HW] Toggle i8042 debug mode
i8042.unmask_kbd_data
[HW] Enable printing of interrupt data from the KBD port
(disabled by default, and as a pre-condition
requires that i8042.debug=1 be enabled)
i8042.direct [HW] Put keyboard port into non-translated mode
i8042.dumbkbd [HW] Pretend that controller can only read data from
keyboard and cannot control its state
(Don't attempt to blink the leds)
i8042.noaux [HW] Don't check for auxiliary (== mouse) port
i8042.nokbd [HW] Don't check/create keyboard port
i8042.noloop [HW] Disable the AUX Loopback command while probing
for the AUX port
i8042.nomux [HW] Don't check presence of an active multiplexing
controller
i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX
controllers
i8042.notimeout [HW] Ignore timeout condition signalled by controller
i8042.reset [HW] Reset the controller during init, cleanup and
suspend-to-ram transitions, only during s2r
transitions, or never reset
Format: { 1 | Y | y | 0 | N | n }
1, Y, y: always reset controller
0, N, n: don't ever reset controller
Default: only on s2r transitions on x86; most other
architectures force reset to be always executed
i8042.unlock [HW] Unlock (ignore) the keylock
i8042.kbdreset [HW] Reset device connected to KBD port
i8042.probe_defer
[HW] Allow deferred probing upon i8042 probe errors
I have used code block instead of blockquote in order to retain original text formatting. ↩︎
Dude, you have no idea how grateful I am to you for raising this issue, I have the same laptop as you, I bought it in early August 2024 and was also struggling with the keyboard, changed distributions, updated the kernel, but still could not fix this bug, now I switched to Fedora and encountered the same problem, edited the grub config as you said and everything works for me! Thank you very much again and also to all the guys who helped you solve this problem, have a great day!