Keyboard stops working after suspension

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.

How can I fix this?

Hi Davide. Welcome to :fedora: .

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?

Hi! Thank you.

  1. I’m sorry for the inaccuracy, it is the laptop sleep mode, it is suspends to RAM (edited the post accordingly)
  2. 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.
  3. 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).

Yes. This happens also without any peripheral attached, and I have to use an USB keyboard to log in.

I get no entries in the logs around the time i suspend the laptop:

$sudo journalctl -b -S "2024-02-09 11:20:00" -U "2024-02-09 11:25:00"
-- No entries --

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)

Here are system information:

$inxi -Fzxx
System:
  Kernel: 6.10.6-200.fc40.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.41-37.fc40
  Console: pty pts/1 wm: gnome-shell DM: GDM Distro: Fedora Linux 40
    (Workstation Edition)
Machine:
  Type: Laptop System: LENOVO product: 82XM v: IdeaPad Slim 3 15ABR8
    serial: <filter> Chassis: type: 10 v: IdeaPad Slim 3 15ABR8 serial: <filter>
  Mobo: LENOVO model: LNVNB161216 v: SDK0T76463WIN serial: <filter>
    part-nu: LENOVO_MT_82XM_BU_idea_FM_IdeaPad Slim 3 15ABR8 UEFI: LENOVO
    v: KYCN31WW date: 03/18/2024
Battery:
  ID-1: BAT0 charge: 14.2 Wh (30.2%) condition: 47.0/47.0 Wh (100.0%)
    volts: 10.8 min: 11.3 model: BYD L22B3PF2 serial: <filter>
    status: discharging
CPU:
  Info: 8-core model: AMD Ryzen 7 7730U with Radeon Graphics bits: 64
    type: MT MCP arch: Zen 3 rev: 0 cache: L1: 512 KiB L2: 4 MiB L3: 16 MiB
  Speed (MHz): avg: 477 high: 1638 min/max: 400/4546 cores: 1: 400 2: 400
    3: 1638 4: 400 5: 400 6: 400 7: 400 8: 400 9: 400 10: 400 11: 400 12: 400
    13: 400 14: 400 15: 400 16: 400 bogomips: 63881
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: AMD Barcelo vendor: Lenovo driver: amdgpu v: kernel arch: GCN-5
    pcie: speed: 8 GT/s lanes: 16 ports: active: eDP-1 empty: DP-1,HDMI-A-1
    bus-ID: 04:00.0 chip-ID: 1002:15e7 temp: 35.0 C
  Device-2: Chicony Integrated Camera driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 1-3:2 chip-ID: 04f2:b7b9
  Display: server: X.Org v: 24.1.2 with: Xwayland v: 24.1.2
    compositor: gnome-shell driver: dri: radeonsi gpu: amdgpu display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96
  Monitor-1: eDP-1 model: AU Optronics 0xe48d res: 1920x1080 dpi: 143
    diag: 395mm (15.5")
  API: OpenGL v: 4.6 vendor: amd mesa v: 24.1.6 glx-v: 1.4 es-v: 3.2
    direct-render: yes renderer: AMD Radeon Graphics (radeonsi renoir LLVM
    18.1.6 DRM 3.57 6.10.6-200.fc40.x86_64) device-ID: 1002:15e7
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
Audio:
  Device-1: AMD Renoir Radeon High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel pcie: speed: 8 GT/s lanes: 16
    bus-ID: 04:00.1 chip-ID: 1002:1637
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Lenovo driver: N/A
    pcie: speed: 8 GT/s lanes: 16 bus-ID: 04:00.5 chip-ID: 1022:15e2
  Device-3: AMD Family 17h/19h HD Audio vendor: Lenovo driver: snd_hda_intel
    v: kernel pcie: speed: 8 GT/s lanes: 16 bus-ID: 04:00.6 chip-ID: 1022:15e3
  API: ALSA v: k6.10.6-200.fc40.x86_64 status: kernel-api
  Server-1: JACK v: 1.9.22 status: off
  Server-2: PipeWire v: 1.0.7 status: n/a (root, process) with:
    1: pipewire-pulse status: active 2: wireplumber status: active
    3: pipewire-alsa type: plugin
Network:
  Device-1: MEDIATEK MT7921 802.11ax PCI Express Wireless Network Adapter
    vendor: Lenovo driver: mt7921e v: kernel pcie: speed: 2.5 GT/s lanes: 1
    bus-ID: 02:00.0 chip-ID: 14c3:7961
  IF: wlp2s0 state: up mac: <filter>
Bluetooth:
  Device-1: Foxconn / Hon Hai MediaTek Bluetooth Adapter driver: btusb v: 0.8
    type: USB rev: 2.1 speed: 480 Mb/s lanes: 1 bus-ID: 3-4:4 chip-ID: 0489:e0cd
  Report: btmgmt ID: hci0 rfk-id: 0 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: <filter> bt-v: 5.2 lmp-v: 11
Drives:
  Local Storage: total: 953.87 GiB used: 17.56 GiB (1.8%)
  ID-1: /dev/nvme0n1 vendor: solidgm model: SSDPFINW010TZL size: 953.87 GiB
    speed: 63.2 Gb/s lanes: 4 serial: <filter> temp: 29.9 C
Partition:
  ID-1: / size: 371.53 GiB used: 17.19 GiB (4.6%) fs: btrfs
    dev: /dev/nvme0n1p6
  ID-2: /boot size: 973.4 MiB used: 329 MiB (33.8%) fs: ext4
    dev: /dev/nvme0n1p5
  ID-3: /boot/efi size: 256 MiB used: 48.9 MiB (19.1%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-4: /home size: 371.53 GiB used: 17.19 GiB (4.6%) fs: btrfs
    dev: /dev/nvme0n1p6
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 34.0 C mobo: N/A gpu: amdgpu temp: 35.0 C
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 16 GiB note: est. available: 13.48 GiB used: 1.64 GiB (12.2%)
  Processes: 368 Power: uptime: 8m wakeups: 1 Init: systemd v: 255
    target: graphical (5) default: graphical
  Packages: pm: flatpak pkgs: 8 Compilers: N/A Shell: Sudo v: 1.9.15p5
    running-in: gnome-terminal inxi: 3.3.34

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 installed kernel version 6.9.12-100.fc39.x86_64 but I keep encountering the same problem

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.

Might be the laptop issue as well. The system logs after suspend, as detailed in the above posts, could provide some hints.

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.