You are not logged in.

#1 2014-03-26 23:20:23

swalladge
Member
Registered: 2013-10-22
Posts: 32

[SOLVED] keyboard randomly freezes

Hi,
I have a new Arch install and its been working great, but now my usb keyboard seems to freeze randomly. When I unplug it and plug it back in it will work for a few keypresses, then freeze again. If I unplug it and plug back into another usb port it seems to work for a longer time before freezing. Done some googling but haven't found anything related.

Using awesome wm. Have been watching dmesg and Xorg.0.log, but no new messages come up when the keyboard freezes. Have tried two different keyboards, both have worked fine on other computers.

Last edited by swalladge (2014-03-29 02:20:15)

Offline

#2 2014-03-27 03:10:28

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: [SOLVED] keyboard randomly freezes

Is there anything interesting in the journal when this happens?  If you don't have another keyboard to use to check it, perhaps you could ssh into your box to check the journal.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2014-03-27 03:25:18

swalladge
Member
Registered: 2013-10-22
Posts: 32

Re: [SOLVED] keyboard randomly freezes

What command can I do to see that? I am not very familiar with journalctl...
Thanks.

Offline

#4 2014-03-27 03:36:16

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: [SOLVED] keyboard randomly freezes

journalctl  tongue

Try this, journalctl | grep usb
Look at the last few lines.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2014-03-27 03:47:46

swalladge
Member
Registered: 2013-10-22
Posts: 32

Re: [SOLVED] keyboard randomly freezes

ah thanks.

Below is the output of the journatctl | grep usb (edit: well thats the lower half of it - during which the keyboard was freezing)

Mar 27 12:22:06 ArchDesk kernel: usb 3-9.1: new low-speed USB device number 13 using xhci_hcd
Mar 27 12:22:06 ArchDesk kernel: usb 3-9.1: ep 0x81 - rounding interval to 128 microframes, ep desc says 192 microframes
Mar 27 12:22:06 ArchDesk kernel: input: Dell Dell USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-9/3-9.1/3-9.1:1.0/input/input24
Mar 27 12:22:06 ArchDesk kernel: hid-generic 0003:413C:2003.000A: input,hidraw1: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-0000:00:14.0-9.1/input0
Mar 27 12:22:17 ArchDesk kernel: usb 3-9.1: USB disconnect, device number 13
Mar 27 12:22:19 ArchDesk kernel: usb 3-9.1: new low-speed USB device number 14 using xhci_hcd
Mar 27 12:22:19 ArchDesk kernel: usb 3-9.1: ep 0x81 - rounding interval to 128 microframes, ep desc says 192 microframes
Mar 27 12:22:19 ArchDesk kernel: input: Dell Dell USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-9/3-9.1/3-9.1:1.0/input/input25
Mar 27 12:22:19 ArchDesk kernel: hid-generic 0003:413C:2003.000B: input,hidraw1: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-0000:00:14.0-9.1/input0
Mar 27 12:57:24 ArchDesk kernel: usb 3-9.1: USB disconnect, device number 14
Mar 27 12:57:27 ArchDesk kernel: usb 3-9.1: new low-speed USB device number 15 using xhci_hcd
Mar 27 12:57:27 ArchDesk kernel: usb 3-9.1: ep 0x81 - rounding interval to 128 microframes, ep desc says 192 microframes
Mar 27 12:57:27 ArchDesk kernel: input: Dell Dell USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-9/3-9.1/3-9.1:1.0/input/input26
Mar 27 12:57:27 ArchDesk kernel: hid-generic 0003:413C:2003.000C: input,hidraw1: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-0000:00:14.0-9.1/input0
Mar 27 12:57:36 ArchDesk kernel: usb 3-9.1: USB disconnect, device number 15
Mar 27 12:57:51 ArchDesk kernel: usb 3-9.1: new low-speed USB device number 16 using xhci_hcd
Mar 27 12:57:51 ArchDesk kernel: usb 3-9.1: ep 0x81 - rounding interval to 128 microframes, ep desc says 192 microframes
Mar 27 12:57:51 ArchDesk kernel: input: Dell Dell USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-9/3-9.1/3-9.1:1.0/input/input27
Mar 27 12:57:51 ArchDesk kernel: hid-generic 0003:413C:2003.000D: input,hidraw1: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-0000:00:14.0-9.1/input0
Mar 27 12:58:14 ArchDesk kernel: usb 3-9.1: USB disconnect, device number 16
Mar 27 12:58:19 ArchDesk kernel: usb 3-10.2: new low-speed USB device number 17 using xhci_hcd
Mar 27 12:58:19 ArchDesk kernel: usb 3-10.2: ep 0x81 - rounding interval to 128 microframes, ep desc says 192 microframes
Mar 27 12:58:19 ArchDesk kernel: input: Dell Dell USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10.2/3-10.2:1.0/input/input28
Mar 27 12:58:19 ArchDesk kernel: hid-generic 0003:413C:2003.000E: input,hidraw1: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-0000:00:14.0-10.2/input0
Mar 27 12:59:09 ArchDesk kernel: usb 3-10.2: USB disconnect, device number 17
Mar 27 12:59:14 ArchDesk kernel: usb 3-9.1: new low-speed USB device number 18 using xhci_hcd
Mar 27 12:59:14 ArchDesk kernel: usb 3-9.1: ep 0x81 - rounding interval to 128 microframes, ep desc says 192 microframes
Mar 27 12:59:14 ArchDesk kernel: input: Dell Dell USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-9/3-9.1/3-9.1:1.0/input/input29
Mar 27 12:59:14 ArchDesk kernel: hid-generic 0003:413C:2003.000F: input,hidraw1: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-0000:00:14.0-9.1/input0
Mar 27 12:59:25 ArchDesk kernel: usb 3-9.1: USB disconnect, device number 18
Mar 27 12:59:36 ArchDesk kernel: usb 3-9.1: new low-speed USB device number 19 using xhci_hcd
Mar 27 12:59:36 ArchDesk kernel: usb 3-9.1: ep 0x81 - rounding interval to 128 microframes, ep desc says 192 microframes
Mar 27 12:59:36 ArchDesk kernel: input: Dell Dell USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-9/3-9.1/3-9.1:1.0/input/input30
Mar 27 12:59:36 ArchDesk kernel: hid-generic 0003:413C:2003.0010: input,hidraw1: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-0000:00:14.0-9.1/input0
Mar 27 12:59:58 ArchDesk kernel: usb 3-9.1: USB disconnect, device number 19
Mar 27 13:00:06 ArchDesk kernel: usb 3-9.1: new low-speed USB device number 20 using xhci_hcd
Mar 27 13:00:06 ArchDesk kernel: usb 3-9.1: ep 0x81 - rounding interval to 128 microframes, ep desc says 192 microframes
Mar 27 13:00:06 ArchDesk kernel: input: Dell Dell USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-9/3-9.1/3-9.1:1.0/input/input31
Mar 27 13:00:06 ArchDesk kernel: hid-generic 0003:413C:2003.0011: input,hidraw1: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-0000:00:14.0-9.1/input0
Mar 27 13:00:11 ArchDesk kernel: usb 3-9.1: USB disconnect, device number 20
Mar 27 13:00:51 ArchDesk kernel: usb 3-9.1: new low-speed USB device number 21 using xhci_hcd
Mar 27 13:00:51 ArchDesk kernel: usb 3-9.1: ep 0x81 - rounding interval to 128 microframes, ep desc says 192 microframes
Mar 27 13:00:51 ArchDesk kernel: input: Dell Dell USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-9/3-9.1/3-9.1:1.0/input/input32
Mar 27 13:00:51 ArchDesk kernel: hid-generic 0003:413C:2003.0012: input,hidraw1: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-0000:00:14.0-9.1/input0
Mar 27 13:01:04 ArchDesk kernel: usb 3-9.1: USB disconnect, device number 21
Mar 27 13:01:19 ArchDesk kernel: usb 3-9.1: new low-speed USB device number 22 using xhci_hcd
Mar 27 13:01:19 ArchDesk kernel: usb 3-9.1: ep 0x81 - rounding interval to 128 microframes, ep desc says 192 microframes
Mar 27 13:01:19 ArchDesk kernel: input: Dell Dell USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-9/3-9.1/3-9.1:1.0/input/input33
Mar 27 13:01:19 ArchDesk kernel: hid-generic 0003:413C:2003.0013: input,hidraw1: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-0000:00:14.0-9.1/input0
Mar 27 13:01:22 ArchDesk kernel: usb 3-9.1: USB disconnect, device number 22
Mar 27 13:01:26 ArchDesk kernel: usb 3-10.2: new low-speed USB device number 23 using xhci_hcd
Mar 27 13:01:26 ArchDesk kernel: usb 3-10.2: ep 0x81 - rounding interval to 128 microframes, ep desc says 192 microframes
Mar 27 13:01:26 ArchDesk kernel: input: Dell Dell USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10.2/3-10.2:1.0/input/input34
Mar 27 13:01:26 ArchDesk kernel: hid-generic 0003:413C:2003.0014: input,hidraw1: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-0000:00:14.0-10.2/input0
Mar 27 13:17:41 ArchDesk kernel: usb 3-10.2: USB disconnect, device number 23
Mar 27 13:17:45 ArchDesk kernel: usb 3-9.1: new low-speed USB device number 24 using xhci_hcd
Mar 27 13:17:45 ArchDesk kernel: usb 3-9.1: ep 0x81 - rounding interval to 128 microframes, ep desc says 192 microframes
Mar 27 13:17:45 ArchDesk kernel: input: Dell Dell USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-9/3-9.1/3-9.1:1.0/input/input35
Mar 27 13:17:45 ArchDesk kernel: hid-generic 0003:413C:2003.0015: input,hidraw1: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-0000:00:14.0-9.1/input0
Mar 27 13:38:10 ArchDesk kernel: usbcore: registered new interface driver usbfs
Mar 27 13:38:10 ArchDesk kernel: usbcore: registered new interface driver hub
Mar 27 13:38:10 ArchDesk kernel: usbcore: registered new device driver usb
Mar 27 13:38:10 ArchDesk kernel: usb 1-9: new high-speed USB device number 2 using xhci_hcd
Mar 27 13:38:10 ArchDesk kernel: usb 1-10: new high-speed USB device number 3 using xhci_hcd
Mar 27 13:38:10 ArchDesk kernel: usb 2-5: new SuperSpeed USB device number 2 using xhci_hcd
Mar 27 13:38:10 ArchDesk kernel: usb 2-6: new SuperSpeed USB device number 3 using xhci_hcd
Mar 27 13:38:10 ArchDesk kernel: usb 3-1: new high-speed USB device number 2 using ehci-pci
Mar 27 13:38:10 ArchDesk kernel: usb 4-1: new high-speed USB device number 2 using ehci-pci
Mar 27 13:38:11 ArchDesk kernel: usb 1-9.1: new low-speed USB device number 4 using xhci_hcd
Mar 27 13:38:11 ArchDesk kernel: usb 1-9.1: ep 0x81 - rounding interval to 128 microframes, ep desc says 192 microframes
Mar 27 13:38:11 ArchDesk kernel: usbcore: registered new interface driver usbhid
Mar 27 13:38:11 ArchDesk kernel: usbhid: USB HID core driver
Mar 27 13:38:11 ArchDesk kernel: input: Dell Dell USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9.1/1-9.1:1.0/input/input12
Mar 27 13:38:11 ArchDesk kernel: hid-generic 0003:413C:2003.0001: input,hidraw0: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-0000:00:14.0-9.1/input0
Mar 27 13:38:11 ArchDesk kernel: usb 1-9.2: new full-speed USB device number 5 using xhci_hcd
Mar 27 13:38:11 ArchDesk kernel: usb 1-9.2: ep 0x84 - rounding interval to 64 microframes, ep desc says 80 microframes
Mar 27 13:38:11 ArchDesk kernel: input: Logitech Inc. Logitech USB Headset H340 as /devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9.2/1-9.2:1.3/input/input17
Mar 27 13:38:11 ArchDesk kernel: hid-generic 0003:046D:0A38.0002: input,hiddev0,hidraw1: USB HID v1.11 Device [Logitech Inc. Logitech USB Headset H340] on usb-0000:00:14.0-9.2/input3
Mar 27 13:38:11 ArchDesk kernel: usbcore: registered new interface driver snd-usb-audio
Mar 27 13:38:11 ArchDesk kernel: usb 1-10.3: new full-speed USB device number 6 using xhci_hcd
Mar 27 13:38:11 ArchDesk kernel: hid-generic 0003:1038:1366.0003: hiddev0,hidraw2: USB HID v1.11 Device [SteelSeries Kinzu V2 Gaming Mouse] on usb-0000:00:14.0-10.3/input0
Mar 27 13:38:11 ArchDesk kernel: input: SteelSeries Kinzu V2 Gaming Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10.3/1-10.3:1.1/input/input18
Mar 27 13:38:11 ArchDesk kernel: hid-generic 0003:1038:1366.0004: input,hidraw3: USB HID v1.11 Mouse [SteelSeries Kinzu V2 Gaming Mouse] on usb-0000:00:14.0-10.3/input1
Mar 27 13:38:31 ArchDesk kernel: usb 1-9.1: USB disconnect, device number 4
Mar 27 13:38:35 ArchDesk kernel: usb 1-10.1: new low-speed USB device number 7 using xhci_hcd
Mar 27 13:38:35 ArchDesk kernel: usb 1-10.1: ep 0x81 - rounding interval to 128 microframes, ep desc says 192 microframes
Mar 27 13:38:35 ArchDesk kernel: input: Dell Dell USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10.1/1-10.1:1.0/input/input19
Mar 27 13:38:35 ArchDesk kernel: hid-generic 0003:413C:2003.0005: input,hidraw0: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-0000:00:14.0-10.1/input0
Mar 27 13:42:37 ArchDesk kernel: usb 1-10.1: USB disconnect, device number 7
Mar 27 13:43:19 ArchDesk kernel: usb 1-9.1: new low-speed USB device number 8 using xhci_hcd
Mar 27 13:43:19 ArchDesk kernel: usb 1-9.1: ep 0x81 - rounding interval to 128 microframes, ep desc says 192 microframes
Mar 27 13:43:19 ArchDesk kernel: input: Dell Dell USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9.1/1-9.1:1.0/input/input20
Mar 27 13:43:19 ArchDesk kernel: hid-generic 0003:413C:2003.0006: input,hidraw0: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-0000:00:14.0-9.1/input0

the many disconnect/connect messages are from me unplugging/plugging back in the keyboard....
I am monitoring the journal now to see if it outputs anything right when the keyboard freezes.

Last edited by swalladge (2014-03-27 03:49:05)

Offline

#6 2014-03-27 04:38:49

life_enjoyer
Member
Registered: 2013-06-08
Posts: 176

Re: [SOLVED] keyboard randomly freezes

What kind of leopard is it? Did you manage to try a different leopard? Does the leopard work when it is not running in X?

From the log, it looks like it is using xhci_hcd which means you are using usb3.0 right? My computer seems to have issues sometimes with usb3.0 (and there's this). If you have non usb 3.0 ports then try those and see if they work.

Last edited by life_enjoyer (2014-03-27 04:40:23)


A R C H
R
C
H

Offline

#7 2014-03-27 04:49:31

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: [SOLVED] keyboard randomly freezes

Also, I see a bunch of USB disconnects.  Are you causing those by unplugging the device?  Note that a disconnect can occur at the direction of either the host or client.  A disconnect occurs when the client stops (dismount and eject a flash drive), by the host if the client violates any rules (over current, protocol failure, etc).  Unplugging a device unexpectedly causes a breakdown in communications leading the host to initiate a disconnect.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#8 2014-03-27 05:11:57

swalladge
Member
Registered: 2013-10-22
Posts: 32

Re: [SOLVED] keyboard randomly freezes

@life_enjoyer: I have tried two normal usb keyboards - same thing happens with both. haven't noticed the problem when not running X (although I run X most of the time). Yes, I only have usb 3.0 ports. I did see that post about xhci_hcd, but haven't seen any messages in dmesg by xhcd_hcd. (am i able to use a different module to see if that fixes it?)

@ewaller: I believe the usb disconnects are triggered by unplugging the keyboard - nothing new comes up on the log when the keyboard freezes.

EDIT: if its any help, I also have a usb mouse, headphones, and did have a wireless adaptor plugged in as well, with no disconnect/freeze issues. (just the keyboard is the problem)

Last edited by swalladge (2014-03-27 05:14:10)

Offline

#9 2014-03-27 08:28:34

swalladge
Member
Registered: 2013-10-22
Posts: 32

Re: [SOLVED] keyboard randomly freezes

Update:
I have been able to monitor lsusb and journalctl and found that nothing new outputs or changes when the keyboard freezes - the keyboard is still shown in lsusb as usual even though I can't use it!
If I kill X while the keyboard is not working, it still won't work in the console. This is really driving me crazy!!!

Offline

#10 2014-03-28 02:09:52

swalladge
Member
Registered: 2013-10-22
Posts: 32

Re: [SOLVED] keyboard randomly freezes

Another update: found an old ps/2 keyboard and have been using that for 4+ hours with no freezes or problems. Must be a usb-related problem. Could this be another problem related to xhci_hcd? How can I fix this?

Offline

#11 2014-03-28 04:38:18

life_enjoyer
Member
Registered: 2013-06-08
Posts: 176

Re: [SOLVED] keyboard randomly freezes

I have 2 usb 3.0 ports on my desktop that, as I have mentioned, occasionally misbehave but they always log messages like:

kernel: usbhid 2-2:1.0: can't add hid device: -71

And replugging in the devices always solves it.

Are you working on a desktop? If so could you tell us what motherboard you are using? I am just wondering because I have never seen a desktop motherboard with a ps2 connecor and no older usb ports.


A R C H
R
C
H

Offline

#12 2014-03-28 04:46:09

swalladge
Member
Registered: 2013-10-22
Posts: 32

Re: [SOLVED] keyboard randomly freezes

I can't find any messages like that in my logs. Yes, its a desktop with a Gigabyte GA-Z87X-UD3H motherboard. I think it has a couple of usb 2 ports but I can't use them (internal headers).

Offline

#13 2014-03-28 05:29:09

life_enjoyer
Member
Registered: 2013-06-08
Posts: 176

Re: [SOLVED] keyboard randomly freezes

Dang, that's a nice motherboard!

Although I can't seem to reproduce your problem, I have a couple more suggestions:

-Look to see if your BIOS has settings involving "Legacy usb support" (which is what mine says) or something about xhci or usb 3.0 or whatever. If it does, try changing them.
-Try blacklisting xhci_hcd.

EDIT: Nevermind the last thing. I just tried it and my usb 3.0 ports were unusable.

Last edited by life_enjoyer (2014-03-28 06:40:57)


A R C H
R
C
H

Offline

#14 2014-03-28 07:12:03

swalladge
Member
Registered: 2013-10-22
Posts: 32

Re: [SOLVED] keyboard randomly freezes

Yep, blacklisting didn't work (just auto loaded it anyway on boot), and when I rmmod it, no usb port works. smile

The bios has heaps of usb settings in the BIOS:
-XHCI Mode: Smart Auto [other options are: Auto, Enabled, Disabled, and Manual]
-Legacy USB Support: Enabled
-XHCI Hand-off: Enabled
-EHCI Hand-off: Disabled

I have no idea what each setting means - what should I try? Is there any obvious problems in those settings?

Offline

#15 2014-03-28 15:14:56

life_enjoyer
Member
Registered: 2013-06-08
Posts: 176

Re: [SOLVED] keyboard randomly freezes

Your log mentions that the leopard is a low speed (ie USB 2.0 or lower) device so enabling the ehci hand-off setting might help.

Other than that I would say try changing the xhci mode to each of the other settings or setting the xhci to disabled or just switching the other settlings to the opposite. If it still doesn't work then you could file a bug report.

Another thing you could try is a bios update.

EDIT: Also I would recommend googling what each of them means. They are well documented BIOS features. Find out what each of the features do and experiment with them.

Last edited by life_enjoyer (2014-03-28 17:16:20)


A R C H
R
C
H

Offline

#16 2014-03-28 21:44:22

swalladge
Member
Registered: 2013-10-22
Posts: 32

Re: [SOLVED] keyboard randomly freezes

Ok, so I've done some googling and found that the most trouble seems to be caused by the smart auto XHCI Mode. Have set that to Enabled - no frozen leopard so far. smile
I'll try the ehci hand-off and see if it changes anything in the logs. Hopefully I won't have any more troubles with it! Thanks for your help!

Offline

#17 2014-03-29 01:01:56

life_enjoyer
Member
Registered: 2013-06-08
Posts: 176

Re: [SOLVED] keyboard randomly freezes

Don't forget to mark this as solved...



This whole thread was made a lot more exciting for me with this using the firefox addon greasemonkey.
For example:
SF2SI2G.png
(see the second item of my signature)

Last edited by life_enjoyer (2014-03-29 01:27:44)


A R C H
R
C
H

Offline

#18 2014-03-29 02:18:59

swalladge
Member
Registered: 2013-10-22
Posts: 32

Re: [SOLVED] keyboard randomly freezes

I noticed the references to leopards earlier... have to try the chrome extension that does the same thing! smile
Tried toggling the ehci hand-off option but didn't notice any difference in the logs. I could keep changing settings, but it seems that setting "XHCI Mode" to "Enabled" has fixed the problem.
Solved and thanks for your help!

Offline

Board footer

Powered by FluxBB