Keyboard stops working after being idle for 2 seconds

Hello!

It seems that something is causing the keyboard to stop working when it’s idle for 2 seconds. I always need to press a key before starting to type to wake it up. The LEDs of the keyboard also turn off.

ny help is appreciated!

Operating System: KDE Linux 2026-06-24
KDE Plasma Version: 6.7.80
KDE Frameworks Version: 6.28.0
Qt Version: 6.11.1
Kernel Version: 7.0.12-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 32 GiB of RAM (31.3 GiB usable)
Graphics Processor: AMD Radeon RX 9070 XT
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: X570 GAMING X

I’ve identified that the issue stems from the powertop tool, and I managed to keep the keyboard on by running powertop and toggling the state of the keyboard USB device from “Good” to “Bad” in the Tunables tab, however this change does not persist after a reboot and I don’t know how I’d make it persist, if anyone has more insight i’d be very happy.

Perhaps the root of the issue is the keyboard driver/firmware behaving incorrectly?

Oh, it’s this!

A very annoying issue. Basically a bug in Powertop; see Keyboard and mouse latency after running `powertop --auto-tune` · Issue #101 · fenrus75/powertop · GitHub

Powertop - ArchWiki has a workaround; see the part where it says:

You can also add this line to the [Service] section in order to prevent your plugged-in USB input devices from getting disconnected on boot:

Ok, so I really have problems getting the service code to work, it would always crash in the ExecStartPost script.

Jun 28 05:04:55 kde-linux sh[1210]: /bin/sh: -c: line 2: syntax error near unexpected token `|' while looking for matching `)'
Jun 28 05:04:55 kde-linux sh[1210]: /bin/sh: -c: line 2: ` | cut -d ":" -f 1 | sort -u); do echo on >| "/sys/bus/usb/devices/$f/power/control"; done'

The simple fix for me, at least for now is simply disabling the service that starts powertop

systemctl disable kde-linux-powertop.service

The workaround, which is included in KDE Linux has now been fixed, so there’s no need to disable the service anymore, yay! :slight_smile: mkosi.extra/usr/lib/disable-usb-autosuspend-for-input-devices · c736a6495681a6b18a8d098a1bd2becd3e5b6905 · KDE Linux / KDE Linux · GitLab