You are not logged in.

#1 2025-02-28 04:55:22

Sachiel
Member
Registered: 2007-04-06
Posts: 19
Website

[SOLVED] Mouse and keyboard stop working randomly

This is what I am experiencing: randomly, the keyboard and mouse stop working. I know the PC (not a laptop) is not frozen because if there is any ongoing animation, like a cursor blinking, it keeps going. And if I push the physical power button, the MATE (the DE I use) dialog for shutting down the system pops up.

I can't pinpoint to anything in particular triggering it. Some times it happens while using Firefox, some times while using PyCharm, others while using Kitty, etc. It can happen while the system is idle because I am reading something, or in the middle of writing, between keystrokes.

Both keyboard and mouse are connected to the PC through a USB hub, but when the issue happens, connecting them to any other USB port of the PC does not solve the issue.

I boot directly into MATE through LightDM, so no idea if this would happen while I'm on a TTY.

Even if I doubted that it was due to USB going to sleep, because some times it happens on the middle of typing, I tried disabling USB autosuspend for the HUB, the mouse and the keyboard as per https://wiki.archlinux.org/title/Power_ … utosuspend, but the problem persists.

Every time it happens the only thing I can do is press the power button, and MATE auto-shutdowns the system after 60 seconds. Then I boot it up and everything is working again. Given that, how can I investigate what did go wrong after the fact?

Last edited by Sachiel (2025-03-11 04:11:59)

Offline

#2 2025-03-02 13:10:26

ms
Member
From: Bandung, Indonesia
Registered: 2010-07-28
Posts: 85
Website

Re: [SOLVED] Mouse and keyboard stop working randomly

> Given that, how can I investigate what did go wrong after the fact?

You can inspect the system log on previous reboot using

  $ journalctl -b -1

See the following systemd journal wiki page for more information: https://wiki.archlinux.org/title/Systemd/Journal

Offline

#3 2025-03-04 15:32:50

allencch
Member
Registered: 2011-03-25
Posts: 120

Re: [SOLVED] Mouse and keyboard stop working randomly

I experienced similar situation, and twice so far, which appears recently, like 1st time was happened several weeks ago, 2nd time today.

Checked the journalctl, these are suspicious

Mar 04 23:19:33 mycomputer kernel: xhci_hcd 0000:00:14.0: xHCI host not responding to stop endpoint command
Mar 04 23:19:33 mycomputer kernel: xhci_hcd 0000:00:14.0: xHCI host controller not responding, assume dead
Mar 04 23:19:33 mycomputer kernel: xhci_hcd 0000:00:14.0: HC died; cleaning up
Mar 04 23:19:33 mycomputer kernel: xhci_hcd 0000:00:14.0: Timeout while waiting for stop endpoint command
Mar 04 23:19:33 mycomputer kernel: usb 1-3: USB disconnect, device number 11
Mar 04 23:19:33 mycomputer kernel: usb 1-6: USB disconnect, device number 2
Mar 04 23:19:33 mycomputer kernel: usb 1-9: USB disconnect, device number 3
Mar 04 23:19:33 mycomputer kernel: usb 1-14: USB disconnect, device number 4

Offline

#4 2025-03-04 19:34:02

TheCalculator
Member
Registered: 2025-03-04
Posts: 2

Re: [SOLVED] Mouse and keyboard stop working randomly

Hello I have had the same issue occur twice. Suddenly all USB devices suddenly stop working. On both occasions I was using a keyboard and mouse plugged in via a USB hub. The first occurrence was last Sunday.
Fortunately it seems my laptops internal keyboard still seems to function. I checked journelctl and similar output to @allencch.

Mar 04 18:46:50 Luna kernel: xhci_hcd 0000:00:14.0: xHCI host not responding to stop endpoint command
Mar 04 18:46:50 Luna kernel: xhci_hcd 0000:00:14.0: xHCI host controller not responding, assume dead
Mar 04 18:46:50 Luna kernel: xhci_hcd 0000:00:14.0: HC died; cleaning up
Mar 04 18:46:50 Luna kernel: xhci_hcd 0000:00:14.0: Timeout while waiting for stop endpoint command
Mar 04 18:46:50 Luna kernel: usb 1-4: USB disconnect, device number 26
Mar 04 18:46:50 Luna kernel: usb 1-4.2: USB disconnect, device number 27
Mar 04 18:46:50 Luna kernel: usb 2-4: USB disconnect, device number 3
Mar 04 18:46:50 Luna kernel: usb 1-4.3: USB disconnect, device number 28
Mar 04 18:46:50 Luna kernel: usb 1-8: USB disconnect, device number 4
Mar 04 18:46:50 Luna kernel: usb 1-10: USB disconnect, device number 5

I also checked lsusb and "sudo systemctl status" but I didn't think to save their outputs and have rebooted since.
But lsusb only listed four root hubs and systemctl didn't report any failed modals.


My hardware is a Thinkpad T490. I am running

Linux Luna 6.13.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 27 Feb 2025 18:09:44 +0000 x86_64 GNU/Linux

If there is any other useful information I can give or any commands that can give helpful information either now or if and when it happens again I can run please let me know. :-)

Many thanks

Last edited by TheCalculator (2025-03-04 19:37:26)

Offline

#5 2025-03-04 20:03:47

loqs
Member
Registered: 2014-03-06
Posts: 18,386

Re: [SOLVED] Mouse and keyboard stop working randomly

@TheCalculator have you looked at https://bbs.archlinux.org/viewtopic.php … 3#p2229853?

Offline

#6 2025-03-05 05:00:56

Sachiel
Member
Registered: 2007-04-06
Posts: 19
Website

Re: [SOLVED] Mouse and keyboard stop working randomly

I confirm I have the same output on my journalctl as allencch and TheCalculator. I added the option "usbcore.autosuspend=-1" to GRUB to see if that makes a difference. I'll report back as soon as it fails (if it fails), or in a week of two if it doesn't happen again.

Offline

#7 2025-03-05 12:25:10

TheCalculator
Member
Registered: 2025-03-04
Posts: 2

Re: [SOLVED] Mouse and keyboard stop working randomly

@loqs I hadn't thanks showing me. After reading that thread and kernel commit in the latest post it seems problem has been found patch has been submitted into the kernel, so now know we just need to wait for new arch kernel to be released with the fix.

Offline

#8 2025-03-11 04:11:32

Sachiel
Member
Registered: 2007-04-06
Posts: 19
Website

Re: [SOLVED] Mouse and keyboard stop working randomly

Sachiel wrote:

I confirm I have the same output on my journalctl as allencch and TheCalculator. I added the option "usbcore.autosuspend=-1" to GRUB to see if that makes a difference. I'll report back as soon as it fails (if it fails), or in a week of two if it doesn't happen again.

I wanted to report that this fixed the issue for me. Also, I see kernel 6.13.6-arch1-1 is already on the repos. I installed it, and will remove the usbcore option to see if the new kernel has the patch mentioned above and the issue does not reappear.

Offline

Board footer

Powered by FluxBB