Keyboard Unresponsive after some time

I have a weird issue since updating to most recent update.

My keyboard will stop responding. Mouse works and all other USB devices but keyboard won't respond. Restarting resolves and it may work for 5-10 minutes but then will stop.

It seems like the USB is almost going into a power suspend mode but then not returning once the keyboard is used again but i am not sure.

See below for the requested term output.

Any help would be appreciated.

Thanks
Koia

System:    Kernel: 5.13.1-5-cacule x86_64 bits: 64 compiler: gcc v: 11.1.0  
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-cacule  
root=UUID=c2d88a0b-340d-492d-83f1-86aacde6ac14 rw rootflags=subvol=@ quiet splash
rd.udev.log_priority=3 vt.global_cursor_default=0 systemd.unified_cgroup_hierarchy=1 loglevel=3
amdgpu.ppfeaturemask=0xffffffff
Desktop: KDE Plasma 5.22.3 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1 dm: SDDM  
Distro: Garuda Linux base: Arch Linux  
Machine:   Type: Desktop System: Alienware product: Alienware Aurora Ryzen Edition v: 2.1.2  
serial: <filter> Chassis: type: 3 serial: <filter>  
Mobo: Alienware model: 0TYR0X v: A00 serial: <filter> UEFI: Alienware v: 2.1.2 date: 02/25/2021  
CPU:       Info: 12-Core model: AMD Ryzen 9 5900 bits: 64 type: MT MCP arch: Zen 3 family: 19 (25)  
model-id: 21 (33) stepping: 0 microcode: A201009 cache: L2: 6 MiB  
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 143730  
Speed: 3635 MHz min/max: 2200/3000 MHz boost: enabled Core speeds (MHz): 1: 3635 2: 3579  
3: 3640 4: 3991 5: 3599 6: 4499 7: 3716 8: 3677 9: 3620 10: 3580 11: 3904 12: 4028 13: 3736  
14: 3611 15: 4122 16: 3653 17: 3590 18: 3592 19: 3664 20: 3632 21: 3600 22: 4288 23: 3623  
24: 3945  
Vulnerabilities: Type: itlb_multihit status: Not affected  
Type: l1tf status: Not affected  
Type: mds status: Not affected  
Type: meltdown status: Not affected  
Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp  
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization  
Type: spectre_v2
mitigation: Full AMD retpoline, IBPB: conditional, IBRS_FW, STIBP: always-on, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:  Device-1: AMD Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] vendor: Dell driver: amdgpu v: kernel
bus-ID: 0d:00.0 chip-ID: 1002:73bf class-ID: 0300
Device-2: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo bus-ID: 1-7.1:6
chip-ID: 046d:0825 class-ID: 0102 serial: <filter>
Display: x11 server: X.Org 1.20.12 compositor: kwin_x11 driver: loaded: amdgpu,ati
unloaded: modesetting,radeon alternate: fbdev,vesa display-ID: :0 screens: 1
Screen-1: 0 s-res: 10040x2160 s-dpi: 96 s-size: 2654x571mm (104.5x22.5")
s-diag: 2715mm (106.9")
Monitor-1: DisplayPort-0 res: 5120x1440 hz: 60 dpi: 108 size: 1200x340mm (47.2x13.4")
diag: 1247mm (49.1")
Monitor-2: DisplayPort-1 res: 1080x1920
Monitor-3: DisplayPort-2 res: 3840x2160 hz: 60 dpi: 157 size: 621x341mm (24.4x13.4")
diag: 708mm (27.9")
OpenGL: renderer: AMD Radeon RX 6800 XT (SIENNA_CICHLID DRM 3.41.0 5.13.1-5-cacule LLVM 12.0.0)
v: 4.6 Mesa 21.1.4 direct render: Yes
Audio:     Device-1: AMD Navi 21 HDMI Audio [Radeon RX 6800/6800 XT / 6900 XT] driver: snd_hda_intel
v: kernel bus-ID: 0d:00.1 chip-ID: 1002:ab28 class-ID: 0403
Device-2: AMD Starship/Matisse HD Audio vendor: Dell driver: snd_hda_intel v: kernel
bus-ID: 0f:00.4 chip-ID: 1022:1487 class-ID: 0403
Device-3: Sennheiser GSP 670 type: USB driver: hid-generic,snd-usb-audio,usbhid bus-ID: 1-3:3
chip-ID: 1395:008a class-ID: 0300
Device-4: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo bus-ID: 1-7.1:6
chip-ID: 046d:0825 class-ID: 0102 serial: <filter>
Sound Server-1: ALSA v: k5.13.1-5-cacule running: yes
Sound Server-2: JACK v: 0.125.0 running: no
Sound Server-3: PulseAudio v: 14.2 running: no
Sound Server-4: PipeWire v: 0.3.31 running: yes
Network:   Device-1: Realtek driver: r8169 v: kernel port: f000 bus-ID: 04:00.0 chip-ID: 10ec:2600
class-ID: 0200
IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
Device-2: Intel Wi-Fi 6 AX200 vendor: Rivet Networks Killer™ driver: iwlwifi v: kernel
port: f000 bus-ID: 05:00.0 chip-ID: 8086:2723 class-ID: 0280
IF: wlp5s0 state: up mac: <filter>
IF-ID-1: docker0 state: down mac: <filter>
Bluetooth: Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 1-9:5 chip-ID: 8087:0029
class-ID: e001
Report: bt-adapter ID: hci0 rfk-id: 1 state: up address: <filter>
Drives:    Local Storage: total: 1.82 TiB used: 502.44 GiB (27.0%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital model: WDS100T1X0E-00AFY0
size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s lanes: 4
rotation: SSD serial: <filter> rev: 613000WD scheme: GPT
ID-2: /dev/sda maj-min: 8:0 vendor: Toshiba model: DT01ACA100 size: 931.51 GiB block-size:
physical: 4096 B logical: 512 B speed: 6.0 Gb/s rotation: 7200 rpm serial: <filter> rev: A810
scheme: GPT
Partition: ID-1: / raw-size: 931.48 GiB size: 931.48 GiB (100.00%) used: 482.16 GiB (51.8%) fs: btrfs
dev: /dev/nvme0n1p2 maj-min: 259:2
ID-2: /boot/efi raw-size: 33 MiB size: 32.5 MiB (98.41%) used: 546 KiB (1.6%) fs: vfat
dev: /dev/nvme0n1p1 maj-min: 259:1
ID-3: /home raw-size: 931.48 GiB size: 931.48 GiB (100.00%) used: 482.16 GiB (51.8%) fs: btrfs
dev: /dev/nvme0n1p2 maj-min: 259:2
ID-4: /opt raw-size: 931.51 GiB size: 931.51 GiB (100.00%) used: 20.28 GiB (2.2%) fs: btrfs
dev: /dev/sda1 maj-min: 8:1
ID-5: /var/log raw-size: 931.48 GiB size: 931.48 GiB (100.00%) used: 482.16 GiB (51.8%)
fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-6: /var/tmp raw-size: 931.48 GiB size: 931.48 GiB (100.00%) used: 482.16 GiB (51.8%)
fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:      Kernel: swappiness: 133 (default 60) cache-pressure: 80 (default 100)
ID-1: swap-1 type: zram size: 31.29 GiB used: 0 KiB (0.0%) priority: 100 dev: /dev/zram0
Sensors:   System Temperatures: cpu: 90.1 C mobo: N/A gpu: amdgpu temp: 67.0 C mem: 70.0 C
Fan Speeds (RPM): N/A gpu: amdgpu fan: 1521
Info:      Processes: 518 Uptime: 11m wakeups: 0 Memory: 31.29 GiB used: 7.19 GiB (23.0%) Init: systemd
v: 249 tool: systemctl Compilers: gcc: 11.1.0 alt: 10 clang: 12.0.1 Packages: 1634 apt: 1
pacman: 1633 lib: 486 Shell: Zsh v: 5.8 running-in: konsole inxi: 3.3.05

Does it happen with other kernels?

ye
s

1 Like

Check journal for clues on when and how it goes suspended.

IIRC you can use a udev rule to exclude a specified device from sleeping.
Check Archwiki on Suspend and udev.

2 Likes

In addition to petsam’s suggestions,

Check your /var/log/pacman.log to check exactly what was updated just before the issue began.

3 Likes

Are you using a power saving utility such as tlp. If so go through tlp's configuration file and double check all USB settings.

Edit:

I also just noticed you have a Bluetooth integrated Intel WiFi adapter.

If your keyboard is a bluetooth KB this greatly expands the possibilities of what is causing this.

This could be a power saving timeout from your wifi/bt adapter (10 mins is a common default). You can sometimes disable this at the wifi/bt level or through Network Manager if you are using NM.

This could also be a kernel or firmware issue as Intel's drivers are included in the kernel and linux-firmware packages.

Therefore you should test different kernels such as the LTS, and possibly downgrade the linux-firmware package if it was updated when this breakage occurred.

My advice is never buy Bluetooth peripherals as there are just too many breakages involved when using Bluetooth on Linux (and security concerns as well).

2 Likes

Bluetooth adapter is on mobo.

Keyboard is das keyboard.

I have many lines of:

[ 1204.208948] usb 1-7.1: reset high-speed USB device number 6 using xhci_hcd

in dmesg. Not sure if this means anything but wouldn't think a device constantly resetting would be good. It's hard to do much cause once the keyboard is down I have to reboot to get it to work and then I may not have much time before it quits again.

Thanks for all the suggestions I am trying to figure out what exactly is happening. I have no power saving beyond whatever Garuda has by default. This is a desktop so I think it's only shutting down monitor after 10 minutes. I usually disable anything else as I have never had good luck with suspending/hibernating and so on.

Pretty sure this is the keyboard i don't know how to read this very good but I also am noticing intermittent keystrokes being lost or stuck and assuming thats from the reset.

Jul 15 20:38:26 Aurora kernel: usb 1-7.4: reset full-speed USB device number 8 using xhci_hcd
Jul 15 20:38:26 Aurora upowerd[4243]: treating change event as add on /sys/devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-7/1-7.4
Jul 15 20:38:26 Aurora upowerd[4243]: treating change event as add on /sys/devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-7/1-7.4
Jul 15 20:39:07 Aurora kernel: usb 1-7.4: reset full-speed USB device number 8 using xhci_hcd
Jul 15 20:39:07 Aurora upowerd[4243]: treating change event as add on /sys/devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-7/1-7.4
Jul 15 20:39:07 Aurora upowerd[4243]: treating change event as add on /sys/devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-7/1-7.4
Jul 15 20:40:34 Aurora kernel: usb 1-7.4: reset full-speed USB device number 8 using xhci_hcd
Jul 15 20:40:34 Aurora upowerd[4243]: treating change event as add on /sys/devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-7/1-7.4
Jul 15 20:40:34 Aurora upowerd[4243]: treating change event as add on /sys/devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-7/1-7.4
Jul 15 20:40:41 Aurora kernel: usb 1-7.4: reset full-speed USB device number 8 using xhci_hcd
Jul 15 20:40:41 Aurora upowerd[4243]: treating change event as add on /sys/devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-7/1-7.4
Jul 15 20:40:41 Aurora upowerd[4243]: treating change event as add on /sys/devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-7/1-7.4

A udev rule should hopefully correct this issue. However, finding the cause would be preferable by testing alternate kernels and firmware.

To blacklist devices that are not working with USB autosuspend and enable it for all other devices you can write a udev rule such as/etc/udev/rules.d/50-usb_power_save.rules:

#/etc/udev/rules.d/50-usb_power_save.rules
# blacklist for usb autosuspend
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", ATTR{idProduct}=="9205", GOTO="power_usb_rules_end"

ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="auto"
LABEL="power_usb_rules_end"

You must substitute ATTR{idVendor}=="05c6", ATTR{idProduct}=="9205" with the vendor and product ID for your BT keyboard. You can find your vendor and product ID with the lsusb command.

1 Like

I swapped usb ports and that appears to have resolved so far. I have done a full update with the exception of the new garuda system maintenance. I will test that now to see if that causes any issues but didn't think it did much besides change the way things are updated. So maybe a port going bad on mobo.

I have used both calcule and zen and both have same issue. Can work on alternate firmwares but I am hoping it was just a port issue.

1 Like

Xhci errors are USB 3 related, did you swap to a USB 2 port?

I actually moved from a USB 2.0 to a 3.1 port according to documentation.

But it does seem to have resolved the situation.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.