Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB/input Seriously Irritating bug hunt
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Shanachie
n00b
n00b


Joined: 24 May 2004
Posts: 35

PostPosted: Sun Dec 19, 2004 10:37 pm    Post subject: USB/input Seriously Irritating bug hunt Reply with quote

I've had this annoying bug with my laptop since I bought it, switching to gentoo and the 2.6 kernel solved some problems but this one still remains.

Whenever a usb device is active the keyboard starts to repeat a random key (usually b,q,R-Ctrl) it stops when I press that button.
This bug occurs most of the time when my MP3-player (usb-storage) or bluetooth-adapter is plugged in (seems kernel related).
Very rarely it happens when only the usbmouse is plugged in.
Sometimes the usbmouse stops working to at the same moment the keyboard repeats, but when I switch to a VT and back to X it moves again. That would suggest an xorg bug.

So I don't know if it's a kernel or a X bug. I do know there's something wrong with my usb controller, some hardware-bug that requires a reset in the usb-stack to correct. Via has a special usb-filter driver for winXP to correct this problem but on windows the effects of the reset are even worse than on linux.
The device is a VT82xxxxx UHCI USB 1.1 controller (pci-id 1106:3038) although it's identified by lspci as the VT6202 USB2.0 controller.

Any help finding the source of the problem will be very welcome.
Back to top
View user's profile Send private message
dj_choco
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2002
Posts: 144
Location: North America

PostPosted: Sun Dec 19, 2004 11:44 pm    Post subject: USB/input bug hunt: which USB modules installed? Reply with quote

Shanachie,

What is the output of
Code:
dmesg | grep -i usb



Do you have (compiled in or loaded as modules) the OHCI and EHCI USB drivers?

OHCI = usb 1.0
UHCI = usb 1.1
EHCI = usb 2.0

[The usb mappings above are my understanding and subject to the scrutiny of those more experienced and knowledgable in the workings the USB bus and its associated devices.]

You could also (if available) toggle the Legacy USB support in your BIOS: not sure I am what this actually does.
Back to top
View user's profile Send private message
Shanachie
n00b
n00b


Joined: 24 May 2004
Posts: 35

PostPosted: Mon Dec 20, 2004 4:51 pm    Post subject: Reply with quote

Actually UHCI is for intel and via chipsets, OHCI for the others. The difference is that OHCI does more in hardware. But thats not the point.
UHCI is compiled in the kernel, EHCI and OHCI are not configured.
Code:
CONFIG_USB_UHCI_HCD=y
# CONFIG_USB_OHCI_HCD is not set
# CONFIG_USB_EHCI_HCD is not set

I also have usb debug configured.
Code:
CONFIG_USB_DEBUG=y


Anyway here is a the dmesg output when the mouse and mp3 jukebox are plugged in, qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
as you can see, the q repeated, so did the " at some point.
Code:
drivers/usb/input/hid-core.c: input irq status -84 received
drivers/usb/input/hid-core.c: input irq status -84 received
drivers/usb/input/hid-core.c: input irq status -84 received
drivers/usb/input/hid-core.c: input irq status -84 received
uhci_hcd 0000:00:11.3: port 2 portsc 058a
hub 2-0:1.0: port 2, status 0308, change 0003, 1.5 Mb/s
usb 2-2: USB disconnect, address 2
usb 2-2: usb_disable_device nuking all URBs
uhci_hcd 0000:00:11.3: shutdown urb cdddab60 pipe 40408280 ep1in-intr
usb 2-2: unregistering interface 2-2:1.0
usb 2-2:1.0: hotplug
usb 2-2: unregistering device
usb 2-2: hotplug
hub 2-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x308
uhci_hcd 0000:00:11.3: suspend_hc
uhci_hcd 0000:00:11.3: wakeup_hc
uhci_hcd 0000:00:11.3: port 2 portsc 05a3
hub 2-0:1.0: port 2, status 0309, change 0001, 1.5 Mb/s
hub 2-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x309
usb 2-2: new low speed USB device using address 3
usb 2-2: skipped 1 descriptor after interface
usb 2-2: new device strings: Mfr=0, Product=0, SerialNumber=0
usb 2-2: hotplug
usb 2-2: adding 2-2:1.0 (config #1, interface 0)
usb 2-2:1.0: hotplug
usbhid 2-2:1.0: usb_probe_interface
usbhid 2-2:1.0: usb_probe_interface - got id
input: USB HID v1.10 Mouse [062a:0001] on usb-0000:00:11.3-2
spurious 8259A interrupt: IRQ7.
uhci_hcd 0000:00:11.2: port 2 portsc 0093
hub 1-0:1.0: port 2, status 0101, change 0001, 12 Mb/s
uhci_hcd 0000:00:11.2: wakeup_hc
hub 1-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x101
usb 1-2: new full speed USB device using address 2
uhci_hcd 0000:00:11.2: uhci_result_control: failed with status 440000
[c1310240] link (013101e2) element (01311040)
  0: [c1311040] link (01311080) e0 Stalled CRC/Timeo Length=7 MaxLen=7 DT0 EndPt=0 Dev=0, PID=2d(SETUP) (buf=0179c740)
  1: [c1311080] link (00000001) e3 IOC Active Length=0 MaxLen=7ff DT1 EndPt=0 Dev=0, PID=69(IN) (buf=00000000)

usb 1-2: new device strings: Mfr=73, Product=93, SerialNumber=115
usb 1-2: default language 0x0409
usb 1-2: Product: iRiver iHP-100 Series
usb 1-2: Manufacturer: iRiver             
usb 1-2: SerialNumber: 0123456789AB
usb 1-2: hotplug
usb 1-2: adding 1-2:2.0 (config #2, interface 0)
usb 1-2:2.0: hotplug
ub: sizeof ub_scsi_cmd 60 ub_dev 924
ub 1-2:2.0: usb_probe_interface
ub 1-2:2.0: usb_probe_interface - got id
uba: device 2 capacity nsec 78126048 bsize 512
uba: was not changed
 uba: uba1
usbcore: registered new driver ub
uba: was not changed
atkbd.c: Unknown key pressed (translated set 2, code 0xbf on isa0060/serio0).
atkbd.c: Use 'setkeycodes e03f <keycode>' to make it known.
atkbd.c: Unknown key pressed (translated set 2, code 0x5b on isa0060/serio0).
atkbd.c: Use 'setkeycodes 5b <keycode>' to make it known.
atkbd.c: Unknown key pressed (translated set 2, code 0x69 on isa0060/serio0).
atkbd.c: Use 'setkeycodes 69 <keycode>' to make it known.
atkbd.c: Unknown key released (translated set 2, code 0x69 on isa0060/serio0).
atkbd.c: Use 'setkeycodes 69 <keycode>' to make it known.
atkbd.c: Unknown key pressed (translated set 2, code 0x68 on isa0060/serio0).
atkbd.c: Use 'setkeycodes 68 <keycode>' to make it known.
atkbd.c: Unknown key released (translated set 2, code 0x68 on isa0060/serio0).
atkbd.c: Use 'setkeycodes 68 <keycode>' to make it known.
atkbd.c: Unknown key pressed (translated set 2, code 0x5a on isa0060/serio0).
atkbd.c: Use 'setkeycodes 5a <keycode>' to make it known.
atkbd.c: Unknown key released (translated set 2, code 0x5a on isa0060/serio0).
atkbd.c: Use 'setkeycodes 5a <keycode>' to make it known.
atkbd.c: Unknown key pressed (translated set 2, code 0x68 on isa0060/serio0).
atkbd.c: Use 'setkeycodes 68 <keycode>' to make it known.
atkbd.c: Unknown key released (translated set 2, code 0x68 on isa0060/serio0).
atkbd.c: Use 'setkeycodes 68 <keycode>' to make it known.
atkbd.c: Unknown key pressed (translated set 2, code 0x68 on isa0060/serio0).
atkbd.c: Use 'setkeycodes 68 <keycode>' to make it known.
atkbd.c: Unknown key released (translated set 2, code 0x68 on isa0060/serio0).
atkbd.c: Use 'setkeycodes 68 <keycode>' to make it known.
Back to top
View user's profile Send private message
dj_choco
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2002
Posts: 144
Location: North America

PostPosted: Thu Dec 23, 2004 3:26 am    Post subject: USB Input/Keyboard issues Reply with quote

Shanachie,

From the Gentoo-2.6.9-r6 Kernel:

Quote:
CONFIG_USB_EHCI_HCD:
The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0
"high speed" (480 Mbit/sec, 60 Mbyte/sec) host controller hardware.
If your USB host controller supports USB 2.0, you will likely want to
configure this Host Controller Driver. At this writing, the primary
implementation of EHCI is a chip from NEC, widely available in add-on
PCI cards, but implementations are in the works from other vendors
including Intel and Philips. Motherboard support is appearing.

EHCI controllers are packaged with "companion" host controllers (OHCI
or UHCI) to handle USB 1.1 devices connected to root hub ports. Ports
will connect to EHCI if it the device is high speed, otherwise they
connect to a companion controller. If you configure EHCI, you should
probably configure the OHCI (for NEC and some other vendors) USB Host
Controller Driver or UHCI (for Via motherboards) Host Controller Driver too.


Just guessing that you might need the UHCI drivers, as you originally stated that
Quote:
The device is a VT82xxxxx UHCI USB 1.1 controller.
Also, are you enabling "Enforce USB bandwidth allocation"? Seems that would limit use of the USB bus for one device when several others are connected:
Code:
Device Drivers --->
USB support --->
[ ]     Enforce USB bandwidth allocation (EXPERIMENTAL)
Back to top
View user's profile Send private message
dj_choco
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2002
Posts: 144
Location: North America

PostPosted: Thu Dec 23, 2004 6:05 am    Post subject: USB Input: Fix? Reply with quote

According the an article on kerneltrap.org, you can follow the instructions the kernel is givining you:
Quote:
atkbd.c: Unknown key pressed (translated set 2, code 0xbf on isa0060/serio0).
atkbd.c: Use 'setkeycodes e03f <keycode>' to make it known.
atkbd.c: Unknown key pressed (translated set 2, code 0x5b on isa0060/serio0).
atkbd.c: Use 'setkeycodes 5b <keycode>' to make it known.
atkbd.c: Unknown key pressed (translated set 2, code 0x69 on isa0060/serio0).
atkbd.c: Use 'setkeycodes 69 <keycode>' to make it known.
atkbd.c: Unknown key released (translated set 2, code 0x68 on isa0060/serio0).
atkbd.c: Use 'setkeycodes 68 <keycode>' to make it known.
atkbd.c: Unknown key released (translated set 2, code 0x5a on isa0060/serio0).
atkbd.c: Use 'setkeycodes 5a <keycode>' to make it known.


Quote:
Use the setkeycodes utility with the suggested
scncode value. For the keycode value, look into /usr/include/linux/input.h,
where is a list of all defined Linux keycodes.


Code:
# setkeycodes <Enter>
setkeycode: even number of arguments expected
usage: setkeycode scancode keycode ...
 (where scancode is either xx or e0xx, given in hexadecimal,
  and keycode is given in decimal)


Maybe there's an Xfree patch for this?
Back to top
View user's profile Send private message
Shanachie
n00b
n00b


Joined: 24 May 2004
Posts: 35

PostPosted: Thu Dec 23, 2004 1:58 pm    Post subject: Re: USB Input/Keyboard issues Reply with quote

Thanks for helping me dj_choco but I don't think thats gonna help, let me explain why.

dj_choco wrote:
Just guessing that you might need the UHCI drivers, as you originally stated that
Quote:
The device is a VT82xxxxx UHCI USB 1.1 controller.
Also, are you enabling "Enforce USB bandwidth allocation"? Seems that would limit use of the USB bus for one device when several others are connected:
Code:
Device Drivers --->
USB support --->
[ ]     Enforce USB bandwidth allocation (EXPERIMENTAL)


Accualy I have UHCI compiled in, as mentioned in my second post and CONFIG_USB_BANDWIDTH is not set.

Quote:
Use the setkeycodes utility with the suggested
scancode value. For the keycode value, look into /usr/include/linux/input.h,
where is a list of all defined Linux keycodes.


searched the /usr/include/linux/input.h for keycodes in my dmesg output:

  • 0xbf not found (KEY_F21 ?)
  • #define FF_SAW_UP 0x5b in section "Force feedback periodic effect types"
  • 0x69 not found (could be KEY_LEFT)
  • 0x68 not found (KEY_PAGEUP ??)
  • #define FF_SINE 0x5a aigain in section "Force feedback periodic effect types"


I don't know what forcefeedback has to do with my mp3 player but I think these are just random codes generated because Xorg (same as when I still had XFree) access the keyboard controller register which maybe is used by USB later. If the code for q or " is generated, it starts repeating, I think.

What to do next??
Back to top
View user's profile Send private message
dj_choco
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2002
Posts: 144
Location: North America

PostPosted: Thu Dec 23, 2004 11:15 pm    Post subject: USB Input bug.... the ongoing saga Reply with quote

Shanachie,

Let's start with the least complex scenario. With only the keyboard and mouse connected, you still get the same behaviour, but less frequently.

Do you have another USB keyboard to test this with? (I've assumed that the Keyboard is USB)

I would start there, then move to trying both the UHCI and EHCI compiled in or both as modules.
Back to top
View user's profile Send private message
Shanachie
n00b
n00b


Joined: 24 May 2004
Posts: 35

PostPosted: Thu Dec 23, 2004 11:36 pm    Post subject: Reply with quote

Actually, it's a laptop, sorry should have mentioned that [edit] I have mentioned it :) [/edit]. So no USB keyboard, it's connected through serial io. Also, the touchpad keeps working no mather what.

But your right, when only the mouse is connected the problem still happens but far less frequent.

I'm not gonna compile EHCI because I don't have hardware for it, as I mentioned, its not an USB2.0 controller despite the lspci output.

I am thinking of getting an USB2.O PC-card for the mp3-player, maybe the problem won't happen with that controller because it not so buggy. I'll keep you updated.
Back to top
View user's profile Send private message
dj_choco
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2002
Posts: 144
Location: North America

PostPosted: Fri Dec 24, 2004 2:35 am    Post subject: Reply with quote

Yep... you did mention that... :oops:

good luck
Back to top
View user's profile Send private message
gentsquash
l33t
l33t


Joined: 03 Nov 2004
Posts: 753
Location: Still a Gentoo beginner.

PostPosted: Sun Dec 26, 2004 4:13 pm    Post subject: Re: USB Input/Keyboard issues Reply with quote

dj_choco wrote:
... From the Gentoo-2.6.9-r6 Kernel:
Quote:
CONFIG_USB_EHCI_HCD:
The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0 ...



How does one read/access this information from the kernel, please?
_________________
Your thread resolved? Putting [SOLVED] in its title helps all Gentooers. (Button "edit" , first post)
Prof. Jonathan LF King, Mathematics dept., University of Florida
Back to top
View user's profile Send private message
Taladar
Guru
Guru


Joined: 09 Oct 2004
Posts: 458
Location: Bielefeld, Germany

PostPosted: Sun Dec 26, 2004 5:05 pm    Post subject: Reply with quote

If you use "make config" you have press "?" instead of y/m/n to get this text when you are at the option in question. With "make menuconfig" you just use the help button.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum