Fedora41, kernel-6.13.5, Keyboard and mouse frequently malfunction

Fedora41, kernel-6.13.5, my keyboard and mouse frequently malfunction. I have no other options except restarting by long pressing the power button.

So long as your system is still running you only need a short press on the power button shut it down in a controller way. Does that work?
If so when you reboot you can check the system journal for error messages.

How is the keyboard and mouse connected to your computer?
USB?

Does your system work if you boot to the previous 6.12 kernel?

Yes, I press on the power button shut it down when it dosen’t work.
My mouse and keyboard are wireless.

Unfortunately, I have deleted the previous version of the kernel. I know this is a bad habit.

This still happens from time to time.

Given the power button stops working I believe you have a hardware issue.

Make sure your BIOS is up to date.
Check that your system is well ventilated and that any fans are dust free.
Would also be worth checking that you memory is working by running memtest over night.

I believe you can get an old kernel with sudo dnf downgrade kernel

The same problem is also in 6.13.6-100 (on FC40).
Looks like a problem in xhci_hcd and seems to appear after either a screen lock, suspend or possibly just a timeout due to the above.
I’m no driver/kernel hacker, so someone with more knowledge should look into it.

This is what dmesg says regarding the specific timeslot:
[28107.267481] xhci_hcd 0000:00:14.0: xHCI host not responding to stop endpoint command
[28107.267523] xhci_hcd 0000:00:14.0: xHCI host controller not responding, assume dead
[28107.267564] xhci_hcd 0000:00:14.0: HC died; cleaning up
[28107.267611] usb 3-3: USB disconnect, device number 30
[28107.267655] xhci_hcd 0000:00:14.0: Timeout while waiting for stop endpoint command
[28107.268618] usb 3-4: USB disconnect, device number 3
[28107.270138] usb 3-6: USB disconnect, device number 31
[28107.270145] usb 3-6.1: USB disconnect, device number 32
[28107.270418] usb 3-6.2: USB disconnect, device number 33
[28107.270766] usb 3-6.5: USB disconnect, device number 34
[28107.271341] usb 3-7: USB disconnect, device number 5
[28107.312782] usb 3-8: USB disconnect, device number 6
[28107.313128] usb 3-10: USB disconnect, device number 8

Probably the same as All USB devices and bluetooth randomly disconnected until reboot - #14 by wisperwind which is fixed with the latest kernel (6.13.7).