USB keyboard stops working if disconnected while system is asleep

I’m having a weird problem after upgrading my cpu of my usb keyboard ceasing to work when coming back from auto suspend if it’s been unplugged during that time.

It works just fine if it auto suspends and then comes back and the keyboard hasn’t been disconnected. It worked just fine on my old intel cpu, but after upgrading to a ryzen 7 9800x3d if I disconnect the usb device while the system is sleeping (which I do frequently in order to use a different system at my desk), it fails to register that the usb device has been plugged back in. It powers up and the keyboard’s internal functions all work (eg pressing numlock lights up numlock etc), but no key presses are generated even if i disconnect and reconnect the keyboard while the machine is on. It only recovers after a restart.

I don’t see anything screaming at me in journalctl or dmesg, but as I have to restart the system to recover (since I can’t type) it’s hard to be certain.

Steps to reproduce:

  1. let system go into auto suspend
  2. unplug usb keyboard
  3. plug usb keyboard back in
  4. recover system from auto suspend by moving the mouse
  5. note that keyboard input no longer works on login screen

Operating System: Fedora Linux 42
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1
Kernel Version: 6.15.10-200.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 9800X3D 8-Core Processor
Memory: 32 GiB of RAM (31.0 GiB usable)
Graphics Processor: NVIDIA GeForce RTX 4070

Do you have Powertop’s background/systemd service set to run automatically?

The system is a desktop so I never had it running and it lists as disabled

○ powertop.service - PowerTOP autotuner
     Loaded: loaded (/usr/lib/systemd/system/powertop.service; disabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: inactive (dead)

All right, not what I was thinking it might be, then. I don’t know and will let others take over here.

Thanks for the help!

I’m going to try to flash a newer BIOS to see if that’s the issue since it’s a new motherboard and there’s a bunch of reports of usb issues on AM5 boards. Will report back here if that works or not.

I do not think this issue is KDE specific.

Sounds like it may be a linux kernel or udev issue.

You might want to ask on https://discussion.fedoraproject.org/ where the Fedora folks hang out.

following up… bios update didn’t fix anything but moving the device onto a usb2.0 port does work to recover the keyboard. That said when I can get into the session kwin has crashed and restarted, so still not great lol. Sent along the automatic crash report and such. Presuming it’s just more AMD AM5 USB problems…