Opened 12 years ago

Closed 10 years ago

#8939 closed bug (fixed)

USB Mouse pauses erratically

Reported by: jessicah Owned by: ithamar
Priority: normal Milestone: R1
Component: Drivers/Mouse/USB Version: R1/Development
Keywords: Cc:
Blocked By: #11942 Blocking: #8685
Platform: All

Description

On my ASUS EeeBox (low power PC), when moving the mouse it will occasionally pause for about 1-2 seconds, and then continue moving. Often the pointer will jump to some unexpected location afterwards.

Also, whilst playing a video (with almost 100% CPU usage), it will play smoothly until I move the mouse. Mouse will do the pausing thing, and video will start dropping frames until I stop moving the mouse (the mouse can be anywhere on the desktop).

Attachments (2)

syslog copy (451.2 KB ) - added by jessicah 12 years ago.
syslog copy 2 (241.9 KB ) - added by jessicah 12 years ago.
Updated syslog, with interrupt setup information

Download all attachments as: .zip

Change History (22)

comment:1 by lukove, 12 years ago

I have this some problem on my PC. I have Gigabyte H61MA-D3V board. Installed microsoft optical mouse 100. Haiku works fine but sometimes in repeat intervals freezeing mouse, video hangs and after continue works ok.

comment:2 by jessicah, 12 years ago

I should clarify that this happens no matter the CPU load (e.g. idling). The note about the video is to demonstrate that the resources to handle the mouse are so great that otherwise smooth video causes frames to start dropping (and severely too). I'll try capture a video later to demonstrate :)

Last edited 12 years ago by jessicah (previous) (diff)

comment:3 by anevilyak, 12 years ago

Sounds like an interrupt storm...can you attach a syslog, containing at least the portions that show the PCI devices and the interrupt routing setup?

by jessicah, 12 years ago

Attachment: syslog copy added

comment:4 by axeld, 12 years ago

Out of curiosity, does the EeeBox have an SSD or does it have a real harddrive?

comment:5 by jessicah, 12 years ago

It used to have a spinning drive. I replaced it with an Intel 330 series SSD.

Also noticed my keyboard get affected at least once: was typing, and then a key got 'stuck down' and text box filled with the repeated character, then stopped when keyboard/mouse unfroze.

comment:6 by axeld, 12 years ago

Can you attach a photo (or syslog output) of the "ints" command from KDL? You can deliberately enter KDL using the "kernel_debugger" command from the Terminal. You can leave the debugger with the "co" (for continue) command.

by jessicah, 12 years ago

Attachment: syslog copy 2 added

Updated syslog, with interrupt setup information

comment:7 by jessicah, 12 years ago

I can't use KDL. My keyboard doesn't work. It's a wireless USB keyboard. Have added an updated syslog that will hopefully help -- has PCI information & interrupt map in it.

comment:8 by X512, 12 years ago

Are you use Java applications?

in reply to:  8 comment:9 by jessicah, 12 years ago

Replying to X512:

Are you use Java applications?

No. Don't have OpenJDK or anything like that installed.

comment:10 by maloman, 12 years ago

I´m having the same problem here. Intel H61 chipset. Using the mouse causes a very high cpu load. So i tried using that mouse on my notebook (intel 965 mobile) and the cpu usage also was way higher compared to using the integrated PS/2 touchpad. The system also freezes/pauses the same way when i access a mounted usb hdd. (causes high cpu load too...)

comment:11 by jessicah, 10 years ago

I'm still experiencing this problem, on different hardware. However, I'm not experiencing the high CPU load as in previous reports. I've also blacklisted drivers for intel_extreme & iprowifi4695 (intel_extreme display turns off and doesn't come back on, wireless just spams the heck out of syslog due to media changes).

The notable parts of syslog that show up (using tail -f /var/log/syslog):

KERN: usb error ehci -1: qtd (0xa545480) error: 0x00038d46
KERN: usb error control pipe 20: timeout waiting for queued request to complete
KERN: usb error ehci -1: qtd (0xa336c00) error: 0x00038d46
KERN: usb error control pipe 20: timeout waiting for queued request to complete
KERN: usb error ehci -1: qtd (0xa350180) error: 0x00088d46
KERN: usb error control pipe 14: timeout waiting for queued request to complete
KERN: usb error hub 13: KERN: error updating port status
KERN: usb error control pipe 20: timeout waiting for queued request to complete
KERN: usb_hid: error waiting for report: Device stalled

The mouse then resumes normal behaviour after that until it occurs again. Which is very, very often :( It can also happen to the keyboard too, but less often (I guess less data from a keyboard?).

listusb:

03f0:034a /dev/bus/usb/0/0/0 "Hewlett-Packard" "Elite Keyboard" ver. 0121
045e:00cb /dev/bus/usb/0/0/1 "Microsoft Corp." "Basic Optical Mouse v2.0" ver. 0104
08ec:0020 /dev/bus/usb/0/0/4 "M-Systems Flash Disk Pioneers" "TravelDrive Intuix U3 2GB" ver. 0200
8087:0024 /dev/bus/usb/0/0/hub "Intel Corp." "Integrated Rate Matching Hub" ver. 0000
0000:0000 /dev/bus/usb/0/hub "HAIKU Inc." "EHCI RootHub" ver. 0200
8087:07da /dev/bus/usb/1/0/7 "Intel Corp." "" ver. 7869
8087:0024 /dev/bus/usb/1/0/hub "Intel Corp." "Integrated Rate Matching Hub" ver. 0000
0000:0000 /dev/bus/usb/1/hub "HAIKU Inc." "EHCI RootHub" ver. 0200

This is on hrev47811 x86_gcc2 hybrid.

comment:12 by jessicah, 10 years ago

Output of ints in KDL:

KERN: int   1, enabled 1, handled        2, unhandled        0
KERN:    ps2:ps2_interrupt__FPv                     (0x81e74130), data 0x00000000, handled        2
KERN: 
KERN: int   2, enabled 0, handled        0, unhandled        0
KERN:    kernel_x86:ioapic_source_override_handler__FPv (0x80144b30), data 0x00000000, handled        0
KERN: 
KERN: int   9, enabled 1, handled        0, unhandled        0
KERN:    acpi:AcpiEvSciXruptHandler                 (0x819ba180), data 0x82813410, handled        0
KERN: 
KERN: int  12, enabled 1, handled        1, unhandled        0
KERN:    ps2:ps2_interrupt__FPv                     (0x81e74130), data 0x00000000, handled        1
KERN: 
KERN: int  14, enabled 1, handled        0, unhandled        0
KERN:    ide_isa:inthand                            (0x81cb1bb8), data 0x82d13f48, handled        0
KERN: 
KERN: int  15, enabled 1, handled        0, unhandled        0
KERN:    ide_isa:inthand                            (0x81cb1bb8), data 0x82d13cc0, handled        0
KERN: 
KERN: int  16, enabled 1, handled    47512, unhandled        0
KERN:    ehci:InterruptHandler__4EHCIPv             (0x819e0c98), data 0x82bfed80, handled    47512
KERN: 
KERN: int  19, enabled 1, handled        3, unhandled        0
KERN:    firewire:fwohci_intr__FPv                  (0x82099a60), data 0xd340c000, handled        3
KERN: 
KERN: int  23, enabled 1, handled    12601, unhandled        0
KERN:    ehci:InterruptHandler__4EHCIPv             (0x819e0c98), data 0x82bfec00, handled    12601
KERN: 
KERN: int  24, enabled 1, handled     3805, unhandled        0
KERN:    ahci:Interrupt__14AHCIControllerPv         (0x81a05870), data 0x8280ab40, handled     3805
KERN: 
KERN: int  25, enabled 1, handled     2008, unhandled        0
KERN:    ipro1000:em_irq_fast                       (0x81de8da4), data 0xd2e17000, handled     2008
KERN: 
KERN: int  26, enabled 1, handled    53908, unhandled        0
KERN:    hda:hda_interrupt_handler__FP14hda_controller (0x81f863b8), data 0x81f8e3e0, handled    53908
KERN: 
KERN: int 219, enabled 1, handled  2273401, unhandled  1425109
KERN:    kernel_x86:apic_timer_interrupt__FPv       (0x80147388), data 0x00000000, handled  2273379
KERN: 
KERN: int 221, enabled 1, handled   427498, unhandled        0
KERN:    kernel_x86:x86_ici_interrupt__FPv          (0x80140674), data 0x00000000, handled   427495
KERN: 
KERN: int 222, enabled 1, handled        0, unhandled        0
KERN:    kernel_x86:x86_smp_error_interrupt__FPv    (0x80140698), data 0x00000000, handled        0
KERN: 
KERN: int 223, enabled 1, handled        0, unhandled        0
KERN:    kernel_x86:x86_spurious_interrupt__FPv     (0x8014068c), data 0x00000000, handled        0

After exiting KDL, my mouse promptly died, FWIW. End of syslog for USB stuff:

KERN: usb error ehci -1: KERN: qtd (0xa204b00) error: 0x00038d46
KERN: usb error control pipe 14: timeout waiting for queued request to complete
KERN: usb error hub 13: error updating port status
KERN: usb error control pipe 20: timeout waiting for queued request to complete
KERN: usb error ehci -1: qtd (0xa357480) error: 0x00048d46
KERN: usb error control pipe 14: timeout waiting for queued request to complete
KERN: usb error hub 13: error updating port status
KERN: usb error control pipe 27: timeout waiting for queued request to complete
KERN: usb error ehci -1: usb_hid: error waiting for report: Device stalled
KERN: qtd (0xa37f300) error: 0x00080e42
KERN: usb error ehci -1: qtd (0xa37fa80) error: 0x00048141
KERN: usb error control pipe 27: timeout waiting for queued request to complete
KERN: usb error ehci -1: KERN: usb_hid: error waiting for report: Device stalled
KERN: qtd (0xa381900) error: 0x00080e42
KERN: usb hub 13: port 1: new device connected
KERN: usb error ehci -1: qtd (0xa382080) error: 0x00048141
KERN: usb error control pipe 27: timeout waiting for queued request to complete
KERN: usb error ehci -1: KERN: usb_hid: error waiting for report: Device stalled
KERN: qtd (0xa382980) error: 0x00080e42
KERN: usb error ehci -1: qtd (0xa383100) error: 0x00048141
KERN: usb error control pipe 27: timeout waiting for queued request to complete
KERN: usb error ehci -1: KERN: usb_hid: error waiting for report: Device stalled
KERN: qtd (0xa383580) error: 0x00080e42
KERN: usb error ehci -1: qtd (0xa383d00) error: 0x00048141
KERN: usb error control pipe 27: timeout waiting for queued request to complete
KERN: usb error ehci -1: KERN: usb_hid: error waiting for report: Device stalled
KERN: qtd (0xa384180) error: 0x00080e42
KERN: usb error ehci -1: qtd (0xa384900) error: 0x00048141
KERN: usb error control pipe 27: timeout waiting for queued request to complete
KERN: usb error ehci -1: KERN: usb_hid: error waiting for report: Device stalled
KERN: qtd (0xa384d80) error: 0x00080e42
KERN: usb error ehci -1: qtd (0xa385500) error: 0x00048141
KERN: usb error control pipe 27: timeout waiting for queued request to complete
KERN: usb error ehci -1: KERN: usb_hid: error waiting for report: Device stalled
KERN: qtd (0xa385b80) error: 0x00080e42
KERN: usb error ehci -1: qtd (0xa386300) error: 0x00048141
KERN: usb error control pipe 27: timeout waiting for queued request to complete
KERN: usb error ehci -1: KERN: usb_hid: error waiting for report: Device stalled
KERN: qtd (0xa386980) error: 0x00080e42
KERN: usb error hub 13: new device on a port that is already in use
KERN: usb error ehci -1: qtd (0xa387100) error: 0x00048141
KERN: usb error control pipe 27: timeout waiting for queued request to complete
KERN: usb error ehci -1: KERN: usb_hid: error waiting for report: Device stalled
KERN: qtd (0xa387780) error: 0x00080e42
KERN: usb error ehci -1: qtd (0xa387f00) error: 0x00048141
KERN: usb error control pipe 60: timeout waiting for queued request to complete
KERN: usb error device 59: error fetching full configuration descriptor 0 got 0 expected 34
KERN: usb error ehci -1: device failed init check
KERN: usb error control pipe 27: timeout waiting for queued request to complete
KERN: usb error ehci -1: KERN: usb_hid: error waiting for report: Device stalled
KERN: qtd (0xa388b00) error: 0x00080e42
KERN: usb error ehci -1: qtd (0xa389200) error: 0x00048141
KERN: usb error control pipe 27: timeout waiting for queued request to complete
KERN: usb error ehci -1: KERN: usb_hid: error waiting for report: Device stalled
KERN: qtd (0xa389680) error: 0x00080e42
KERN: usb error ehci -1: qtd (0xa389e00) error: 0x00048141
KERN: usb error control pipe 27: timeout waiting for queued request to complete
KERN: usb error ehci -1: KERN: usb_hid: error waiting for report: Device stalled
KERN: qtd (0xa38a280) error: 0x00080e42
KERN: usb error ehci -1: qtd (0xa38aa00) error: 0x00048141
KERN: usb error control pipe 27: timeout waiting for queued request to complete
KERN: usb error ehci -1: KERN: usb_hid: error waiting for report: Device stalled
KERN: qtd (0xa38ae80) error: 0x00080e42
KERN: usb error ehci -1: qtd (0xa38b600) error: 0x00048141
KERN: usb error control pipe 27: timeout waiting for queued request to complete
KERN: usb error ehci -1: KERN: usb_hid: error waiting for report: Device stalled
KERN: qtd (0xa38ba80) error: 0x00080e42
KERN: usb error ehci -1: qtd (0xa38c200) error: 0x00048141
KERN: usb error control pipe 27: timeout waiting for queued request to complete
KERN: usb error ehci -1: KERN: usb_hid: error waiting for report: Device stalled
KERN: qtd (0xa38c880) error: 0x00080e42
KERN: usb error ehci -1: qtd (0xa38d000) error: 0x00048141
KERN: usb error control pipe 27: timeout waiting for queued request to complete
KERN: usb error ehci -1: KERN: usb_hid: error waiting for report: Device stalled
KERN: qtd (0xa38d680) error: 0x00080e42
KERN: usb error ehci -1: qtd (0xa38de00) error: 0x00048141
KERN: usb error control pipe 27: timeout waiting for queued request to complete
KERN: usb error ehci -1: KERN: usb_hid: error waiting for report: Device stalled
KERN: qtd (0xa38e480) error: 0x00080e42
KERN: usb error ehci -1: qtd (0xa38ec00) error: 0x00048141
KERN: usb error control pipe 63: timeout waiting for queued request to complete
KERN: usb error device 62: error fetching full configuration descriptor 0 got 0 expected 34
KERN: usb error ehci -1: device failed init check
KERN: usb error control pipe 27: timeout waiting for queued request to complete
KERN: usb error ehci -1: KERN: usb_hid: error waiting for report: Device stalled
KERN: qtd (0xa38f800) error: 0x00080e42
KERN: Mouse device exiting, Device not ready

comment:13 by pulkomandy, 10 years ago

Blocking: 8685 added

comment:14 by michel, 10 years ago

I am experiencing the same problem on my MSI motherboard. The wired USB mouse (tried several) will stop working for a few seconds then the cursor reappears elsewhere on the screen and the next 10-20 seconds everything works again. After this happens a dozen or so times, the light on the mouse literally goes out. The wired USB keyboard also dies during the process.

Sorry to say, there's no trace of the problem with the Linux partition on the same machine. I have tried juggling the settings in the kernel configuration files and in the BIOS, but nothing seems to help.

This PC still has PS/2 ports. My new PS/2 keyboard and mouse are on order at Amazon ...

comment:15 by pulkomandy, 10 years ago

In my case I get problems only when *both* the mouse and keyboard are wired to USB. When either is on the PS/2 ports, everything is fine. Wondering if it's the same for others... can you unplug your keyboard and see if that helps? (now we really need that virtual keyboard :))

in reply to:  15 comment:16 by michel, 10 years ago

Replying to pulkomandy:

can you unplug your keyboard and see if that helps?

Sorry, I can't get my hands on a PS/2 keyboard on short notice (these things are getting to be hard to come by).

I did get my hands on a second-hand PS/2 mouse. It behaves as jerkily and imprecisely as you expect and old, worn PS/2 mouse to behave, but it keeps on working. Unfortunately, the USB keyboard took that as its cue to start behaving badly. after about five to ten minutes of use, it dies. In fact, it looks like something is cutting the power to the relevant USB pin because even the LED lights die. USB Mass Storage devices don't seem to have this problem.

When my new keyboard & mouse arrive from Amazon I will try other combinations.

One might think that this is a problem only for the dwindling number of desktop users. But a fundamental flaw in the USB stack or the input_server could come back to haunt us later.

comment:17 by ithamar, 10 years ago

Owner: changed from mmlr to ithamar
Status: newassigned

I have a patch in testing here that I suspect will solve this problem. When the interrupt pipe stalls, it does a clear_feature() from the callback, which causes a synchronous transfer, which is not allowed from the callback (since the callback executes in the finish thread). Once that happens, the usb stack gets seriously confused, causing the "usb error hub XXX: error updating port status" messaging from the Explore thread.

Sometimes the stack recovers, sometimes it doesn't, very much dependent on "undefined" controller behavior, and other bus activity at the time.

comment:18 by X512, 10 years ago

I have similar problem with Gigabyte Z97N motherboard. This motherboard has USB 3 ports that may be an issue. Mouse stop moving for 1-2 seconds sometimes, but system continue working.

comment:19 by waddlesplash, 10 years ago

Blocked By: 11942 added

comment:20 by ithamar, 10 years ago

Resolution: fixed
Status: assignedclosed

Fixed in hrev49000.

Note: See TracTickets for help on using tickets.