Bug 146781

Summary: USB Mouse will not move
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Daniel Daugherty <dtd33inc>
Component: KernelAssignee: Jiri Kosina <jkosina>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: dmueller, don.smith, edmunc, eich, suse-beta
Version: Final   
Target Milestone: ---   
Hardware: i386   
OS: SuSE Linux 10.0   
Whiteboard:
Found By: Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: /var/log/messages
my xorg.conf file
dump of dmesg
Adding some debug info to HID irq routine
A patch that both adds debugging and tries to fix the problem.
A cleaned patch

Description Daniel Daugherty 2006-01-30 20:31:56 UTC
On a Compaq Presario 5000 I have a Logitech USB mouse pluged into the front usb port along with the keyboard (2 ports on the front). When I get to the KDE login screen the mouse moves. After I log the cursor is still displayed but will not move. The only fix I know of is to disconnect the usb mouse and plug it back in. The keyboard is fine.
Comment 1 Christian Boltz 2006-01-30 23:22:54 UTC
a wild guess: does uninstalling ksynaptics (and re-logging in) help? (I would really wonder if this helps, but you never know. The symptoms look matching.)

Besides that: It would be helpful to provide a sniplet of /var/log/messages (at least from plugging out/in the mouse, maybe better from some time before KDE startup.
Comment 2 Daniel Daugherty 2006-01-31 01:00:20 UTC
Created attachment 65797 [details]
/var/log/messages

Most of the stuff starts around Jan 30 18:31:31. This is a copy of the /var/log/messages just had to rename it to to cpmessages so i did not have to log out and log in as root.
Comment 3 Dirk Mueller 2006-01-31 08:47:33 UTC
do you have ksynaptics installed?

Comment 4 Daniel Daugherty 2006-01-31 17:41:49 UTC
I have no idea, I did not install ksynaptics. I did go into yast and then went to the package install and ran a search on ksynaptics and nothing showed up. So I will assume no, but if there is a better way to check let me know. Does it come with the default install of suse if you just click the radio button to use kde?
Comment 5 Dirk Mueller 2006-01-31 19:52:27 UTC
no, it shouldn't be installed by default. to double check, look at the output of the command: 

rpm -q ksynaptics

I guess this is a xorg.conf generation problem lacking better explanations. Markus, any idea?
Comment 6 Daniel Daugherty 2006-02-01 02:27:36 UTC
linux:/home/daniel # rpm -q ksynaptics
package ksynaptics is not installed
Comment 7 Marcus Schaefer 2006-02-01 09:38:38 UTC
Hmm, sounds weird. Could you send me your xorg.conf file

  /etc/X11/xorg.conf

Thanks
Comment 8 Daniel Daugherty 2006-02-01 15:00:48 UTC
Created attachment 66036 [details]
my xorg.conf file

My xorg.conf file as requested
Comment 9 Daniel Daugherty 2006-02-01 15:03:16 UTC
That xorg.conf file was from after I unplugged the mouse and repluged it in. Will it be different after I do that? I mean should I try and get a copy of it while the mouse does not work?
Comment 10 Marcus Schaefer 2006-02-01 15:03:29 UTC
you are using a standard mouse configuration:

Section "InputDevice"
  Driver       "mouse"
  Identifier   "Mouse[1]"
  Option       "Buttons" "5"
  Option       "Device" "/dev/input/mice"
  Option       "Name" "Logitech Optical Wheel Mouse"
  Option       "Protocol" "explorerps/2"
  Option       "Vendor" "Sysp"
  Option       "ZAxisMapping" "4 5"
EndSection

This section is correct I cannot see a X bug
Comment 11 Dirk Mueller 2006-02-01 15:12:36 UTC
thanks, reassigning to kernel-maintainers then. 
Comment 12 Daniel Daugherty 2006-02-01 15:17:20 UTC
If I left something open and shut off the computer and then restart it and log back in. I get to use the mouse just log enough to close that tip window then it just stops.
Comment 13 Daniel Daugherty 2006-02-01 15:23:03 UTC
Also if I restart the computer the mouse will not work not even at the log in screen. When I just shut it down and reboot it will work at the log in screen.
Comment 14 Vojtech Pavlik 2006-02-01 16:44:43 UTC
Can you try passing acpi=off on the kernel command line?
Comment 15 Daniel Daugherty 2006-02-01 20:04:41 UTC
Ok I went into yast and went to system and then boot loader and i clicked edit on SUSE LINUX 10.0 and under other kernel parameters I put in acpi=off so it looks something like this:

selinux=0    resume=/dev/hda1  splash=silent showopts acpi=off

When I turn the computer back on I get the same problem. Is there a sure way to verify I did this correctly?
Comment 16 Vojtech Pavlik 2006-02-01 20:35:27 UTC
Well, a look at the output of 'dmesg' on the running system will show whether
ACPI was active or not.
Comment 17 Daniel Daugherty 2006-02-01 20:41:34 UTC
Created attachment 66091 [details]
dump of dmesg

Dump of dmesg it says in there that stuff is disabled but there are also some errors in there.
Comment 18 Vojtech Pavlik 2006-02-02 16:41:15 UTC
Ok, ACPI is not interfering, which is good.

I see from the log you unplugged and replugged the mouse. Does it work
fine after you do that, or does it stop again after some time? Does it
work OK with another OS or machine? 
Comment 19 Daniel Daugherty 2006-02-02 20:46:35 UTC
Tried with a different logitech mouse and it works fine. And tried mouse that on the Linux machine on a windows machine and it works fine.

Comment 20 Vojtech Pavlik 2006-02-07 13:11:26 UTC
OK. This looks like the clear_halt problem.

Can you try this patch:?

http://marc.theaimsgroup.com/?l=linux-usb-devel&m=113822473507514&q=raw
Comment 21 Daniel Daugherty 2006-02-11 03:25:25 UTC
This may sound dumb, but how do I install that?
Comment 22 Vojtech Pavlik 2006-02-11 05:30:41 UTC
You'd install the kernel source rpm, then apply the patch using 'patch -p1 < patch', etc, but it'll be easier if you just install the KOTD (Kernel
Of The Day) from ftp.suse.com:

ftp://ftp.suse.com/pub/projects/kernel/kotd/i386/HEAD/kernel-default-2.6.16_rc2_git8-20060210184420.i586.rpm
Comment 23 Daniel Daugherty 2006-02-13 02:31:20 UTC
I installed the KOTD now how do I patch it?
Comment 24 Vojtech Pavlik 2006-02-13 09:55:58 UTC
The KOTD should already contain the patch.
Comment 25 Daniel Daugherty 2006-02-13 18:39:56 UTC
from yast /proc/version This is what it says

Linux version 2.6.16-rc2-git11-20060212162949-default (geeko@buildhost) (gcc version 4.1.0 20060210 (prerelease) (SUSE Linux)) #1 Sun Feb 12 16:29:49 UTC 2006

I installed kernel-default-2.6.16_rc2_git11-20060212162949.i586.rpm

And I am still having the same problem
Comment 26 Dirk Mueller 2006-02-27 10:13:23 UTC
I can reproduce the problem with 2.6.16-rc4-4-smp
Comment 27 Vojtech Pavlik 2006-02-27 10:53:10 UTC
Great, Dirk. Can you try to find what's being run at the time the mouse stops
working? Could be eg. powersaved, or a similar program. Much of what we used
to do early in the boot is now delayed, because it's not needed for the login
screen. And running that *after* the mouse is detected can confuse the mouse.
Comment 28 Dirk Mueller 2006-02-27 13:01:47 UTC
nothing is run, the system already finished booting. I can "fix" the mouse by switching to console and then going back to X server, but after a few seconds it stops again. No dmesg output. 

if I replugin the mouse it permanently works until the next reboot. the lsusb -v diff of broken vs working is: 

--- /tmp/broken 2006-02-27 13:55:31.000000000 +0100
+++ /tmp/works  2006-02-27 13:55:44.000000000 +0100
@@ -1,5 +1,5 @@
 
-Bus 004 Device 003: ID 046d:c00c Logitech, Inc. Optical Wheel Mouse
+Bus 004 Device 004: ID 046d:c00c Logitech, Inc. Optical Wheel Mouse
 Device Descriptor:
   bLength                18
   bDescriptorType         1
Comment 29 Vojtech Pavlik 2006-02-27 14:01:36 UTC
Can you check with 'evtest' whether the mouse also stops working there, or
it's just X that stops talking to it?
Comment 30 Dirk Mueller 2006-02-27 14:05:54 UTC
how am I supposed to do that?

# evtest /dev/input/mice
evtest: can't get version: Inappropriate ioctl for device

open("/dev/input/mice", O_RDONLY)       = 3
ioctl(3, EVIOCGVERSION, 0xbfa69154)     = -1 ENOTTY (Inappropriate ioctl for device)
Comment 31 Dirk Mueller 2006-02-27 14:09:21 UTC
(same happens for /dev/input/mouse1 (which is the one we're talking about))
Comment 32 Vojtech Pavlik 2006-02-27 14:10:01 UTC
vojtech@shadow:~> cat /proc/bus/input/devices 
I: Bus=0003 Vendor=046d Product=c004 Version=0120
N: Name="Logitech USB-PS/2 Mouse"
P: Phys=usb-0000:00:10.1-1/input0
S: Sysfs=/class/input/input0
H: Handlers=mouse0 event0 ts0 
B: EV=7
B: KEY=70000 0 0 0 0
B: REL=3

I: Bus=0003 Vendor=0430 Product=0005 Version=0101
N: Name="HID 0430:0005"
P: Phys=usb-0000:00:10.1-2/input0
S: Sysfs=/class/input/input1
H: Handlers=kbd event1 
B: EV=120003
B: KEY=1000000000007 ff800000000007ff f2beffdf73cfffff fffffffffffffffe
B: LED=1f

I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/class/input/input2
H: Handlers=kbd event2 
B: EV=40001
B: SND=6

[use the event device corresponding to your mouse]

vojtech@shadow:~> evtest /dev/input/event0 
Input driver version is 1.0.0
Input device ID: bus 0x3 vendor 0x46d product 0xc004 version 0x120
Input device name: "Logitech USB-PS/2 Mouse"
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 272 (LeftBtn)
    Event code 273 (RightBtn)
    Event code 274 (MiddleBtn)
  Event type 2 (Relative)
    Event code 0 (X)
    Event code 1 (Y)
Testing ... (interrupt to exit)
Comment 33 Dirk Mueller 2006-02-27 14:10:19 UTC
ah, d'oh. ok, I read the --help now. rebooting..
Comment 34 Dirk Mueller 2006-02-27 14:17:32 UTC
evtest stops as well when the mouse hangs. last lines of output are: 

vent: time 1141049675.053197, type 2 (Relative), code 0 (X), value -1
Event: time 1141049675.053208, -------------- Report Sync ------------
Event: time 1141049675.061194, type 2 (Relative), code 1 (Y), value 1
Event: time 1141049675.061205, -------------- Report Sync ------------

interestingly, I cannot "reanimate" the mouse by switching console/X while evtest is running. I have to stop evtest, then do console/X switch, and then it works again (but only for a few seconds). 

Comment 35 Vojtech Pavlik 2006-02-27 14:20:30 UTC
Good, that's a clue. It means all users of the mouse need to close all its interfaces to revive the mouse. I'll look at what chain of functions that triggers.
Comment 36 Dirk Mueller 2006-02-27 14:21:14 UTC
diff of /proc/bus/input/devices before/after USB replugging:

--- /tmp/brokendev      2006-02-27 15:18:30.000000000 +0100
+++ /tmp/worksdev       2006-02-27 15:18:39.000000000 +0100
@@ -27,8 +27,8 @@

 I: Bus=0003 Vendor=046d Product=c00c Version=0610
 N: Name="Logitech USB Mouse"
-P: Phys=usb-0000:00:1d.3-1/input0
-S: Sysfs=/class/input/input3
+P: Phys=usb-0000:00:1d.3-2/input0
+S: Sysfs=/class/input/input4
 H: Handlers=mouse1 event3
 B: EV=7
 B: KEY=70000 0 0 0 0 0 0 0 0


/sys/class/input/input3 does not exist afterwards anymore, only input1, input2 and input4. 
Comment 42 Dirk Mueller 2006-02-27 14:59:46 UTC
I see this on a 10.1 beta 5.5 :)
Comment 43 Vojtech Pavlik 2006-02-27 15:40:53 UTC
Created attachment 70422 [details]
Adding some debug info to HID irq routine

Can you try this patch? It won't help, but may spew
some useful info into 'dmesg'.
Comment 44 Vojtech Pavlik 2006-02-27 15:41:20 UTC
*** Bug 151719 has been marked as a duplicate of this bug. ***
Comment 45 Dirk Mueller 2006-02-27 17:15:09 UTC
drivers/usb/input/hid-core.c: fatal irq status -2 received
Comment 46 Vojtech Pavlik 2006-02-27 17:18:39 UTC
When did that happen? It's supposed to happen upon removing the module or
removing the device, but not during normal operation.
Comment 47 Vojtech Pavlik 2006-02-27 17:19:02 UTC
Can you supply the surrounding lines of 'dmesg'?
Comment 48 Vojtech Pavlik 2006-02-27 17:20:56 UTC
*** Bug 94064 has been marked as a duplicate of this bug. ***
Comment 49 Dirk Mueller 2006-02-28 10:50:56 UTC
hmm, I was wrong. the -2 only happens once during boot, and afterwards I usually get status 0, only sometimes -84. the -84 resembles the point when the mouse stops working. 

Feb 28 11:33:30 oldboy kernel: drivers/usb/input/hid-core.c: OK irq status 0 received
Feb 28 11:33:30 oldboy kernel: drivers/usb/input/hid-core.c: OK irq status 0 received
Feb 28 11:33:30 oldboy kernel: drivers/usb/input/hid-core.c: OK irq status 0 received
Feb 28 11:33:36 oldboy kernel: drivers/usb/input/hid-core.c: fatal irq status -84 received
Feb 28 11:36:30 oldboy kernel: drivers/usb/input/hid-core.c: OK irq status 0 received
Feb 28 11:36:31 oldboy kernel: drivers/usb/input/hid-core.c: OK irq status 0 received
Feb 28 11:36:31 oldboy kernel: drivers/usb/input/hid-core.c: OK irq status 0 received
Feb 28 11:36:31 oldboy kernel: drivers/usb/input/hid-core.c: OK irq status 0 received
Feb 28 11:36:31 oldboy kernel: drivers/usb/input/hid-core.c: OK irq status 0 received
Feb 28 11:36:31 oldboy kernel: drivers/usb/input/hid-core.c: OK irq status 0 received
Comment 50 Vojtech Pavlik 2006-02-28 12:02:26 UTC
Thanks. The -84 is a CRC error (or timeout). It's a hardware problem talking
to the device. Please check that your mouse works elsewhere and whether using
a different mouse fixes your problem. This can be caused by a broken mouse cable,
for example.

Anyway, we'll need to implement a workaround for this, as a number of people are
affected, and all of them having bad mouse cables or connectors is unlikely.

I'll post a patch that keeps the input irq urb running even if there was an error,
it may fix this. Alternately we might need a usb_clear_halt() on that endpoint, but that'd be far from easy to implement, since it can't be used from the urb callback routine.
Comment 51 Vojtech Pavlik 2006-02-28 12:03:57 UTC
Created attachment 70614 [details]
A patch that both adds debugging and tries to fix the problem.

Please try this one.
Comment 52 Dirk Mueller 2006-02-28 12:07:50 UTC
Well, I doubt that it is a hardware problem, because the mouse worked fine (== weeks/months) before that, and it also works perfectly for long time (several hours at least) after the first re-plugin of the hardware. 

Therefore I don't think that this is a hardware problem, because for the mouse it shouldn't matter if it is initialized while the kernel just has booted or at an arbitrary time later. 


Comment 53 Dirk Mueller 2006-02-28 16:42:37 UTC
patch works for me: 

drivers/usb/input/hid-core.c: OK irq status 0 received
drivers/usb/input/hid-core.c: error irq status -84 received
drivers/usb/input/hid-core.c: error irq status -84 received
drivers/usb/input/hid-core.c: error irq status -84 received
drivers/usb/input/hid-core.c: error irq status -84 received
drivers/usb/input/hid-core.c: error irq status -84 received
drivers/usb/input/hid-core.c: error irq status -84 received
drivers/usb/input/hid-core.c: error irq status -84 received
drivers/usb/input/hid-core.c: error irq status -84 received
drivers/usb/input/hid-core.c: error irq status -84 received
drivers/usb/input/hid-core.c: error irq status -84 received
drivers/usb/input/hid-core.c: error irq status -84 received
drivers/usb/input/hid-core.c: error irq status -84 received
drivers/usb/input/hid-core.c: error irq status -84 received
drivers/usb/input/hid-core.c: error irq status -84 received
drivers/usb/input/hid-core.c: error irq status -84 received
drivers/usb/input/hid-core.c: OK irq status 0 received
drivers/usb/input/hid-core.c: OK irq status 0 received
drivers/usb/input/hid-core.c: OK irq status 0 received
drivers/usb/input/hid-core.c: OK irq status 0 received


Ok, now fix the same issue for my usb modem :)
Comment 54 Vojtech Pavlik 2006-03-02 09:13:28 UTC
Created attachment 70930 [details]
A cleaned patch

Ok, this patch should fix the issue without spewing
a lot of messages into the log. Can you please test
that your mouse still works with this one? Thanks.
Comment 55 Vojtech Pavlik 2006-03-02 09:16:06 UTC
I think you'll need to submit a new bug for your modem. ;)
I've looked at the sources and it doesn't have the same problem
that HID did have, so it's probably something else. 
Comment 56 Dirk Mueller 2006-03-02 09:28:06 UTC
I already filed one for the usb modem ;) Thanks, I'll test the patch without the printk's, but I don't expect any surprises..
Comment 57 Vojtech Pavlik 2006-03-02 09:42:28 UTC
Thanks. Please also attach the output of 'lspci', so that I know
what USB controller exactly this is (for submitting the fix to mainline).
Comment 58 Dirk Mueller 2006-03-02 09:45:51 UTC
00:00.0 Host bridge: Intel Corporation 915G/P/GV/GL/PL/910GL Express Memory Controller Hub (rev 04)
00:02.0 VGA compatible controller: Intel Corporation 82915G/GV/910GL Express Chipset Family Graphics Controller (rev 04)
00:02.1 Display controller: Intel Corporation 82915G Express Chipset Family Graphics Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 2 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 03)
00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d3)
00:1e.2 Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 03)
00:1f.0 ISA bridge: Intel Corporation 82801FB/FR (ICH6/ICH6R) LPC Interface Bridge (rev 03)
00:1f.1 IDE interface: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) IDE Controller (rev 03)
00:1f.2 IDE interface: Intel Corporation 82801FB/FW (ICH6/ICH6W) SATA Controller (rev 03)
40:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5751 Gigabit Ethernet PCI Express (rev 01)
Comment 59 Daniel Daugherty 2006-03-03 03:03:41 UTC
I did not install any patches (from this site), all I did was install the KOTD on 2-12-06 (there was the first patch in there). Now my problem is gone. I have the same mouse, the same usb port. I do not think anything else got changed. It was fixed about 2 days ago. The only recent stuff I installed off the cd was G++ (and all its dependencies) and I was going to install the KOTD for 2-28-06 but it required perl-bootloader, so I messed around with trying to install that. The version of perl-bootloader I have installed is 0.2-37.2. However, when I tried to install the kernel it kept saying I needed a higher version so I said forget it. If I can be of any assistance please let me know. 

... disregard the above, while in the middle of typing this message the mouse stopped working. But it now works at start up but then dies in the middle. So I guess that is an improvement. So I guess my question is, how do I install that patch, and/or how do I get a later version of the perl-bootloader so I can install the latest kernel?
Comment 60 Vojtech Pavlik 2006-03-03 13:12:27 UTC
The patch will be added to our kernel CVS, then again installing the KOTD should
be enough.
Comment 61 Vojtech Pavlik 2006-03-03 13:34:10 UTC
Dirk, can do you have any results with the cleaned up patch?
Comment 62 Dirk Mueller 2006-03-03 13:47:26 UTC
it works fine, as expected :)

Comment 63 Dirk Mueller 2006-03-03 13:48:03 UTC
with the plain kotd I still have mouse not working after boot (though working for infinite amount of time after re-plugging in). 
Comment 64 Vojtech Pavlik 2006-03-03 17:17:50 UTC
I didn't push the patch to CVS yet. I'll do so over the weekend, hopefully.
Comment 65 Daniel Daugherty 2006-03-04 02:16:05 UTC
How do I install the KOTD, because it ask about the perl-bootloader think So I guess my question is where can I go to update that so I can now install the KOTD?
Comment 66 Vojtech Pavlik 2006-03-04 09:52:15 UTC
The you update tool contains updates for perl-bootloader, so hopefully using
it will update it enough for KOTD. Alternately, a (hopefully enough) recent
version of the perl-bootloader RPM is here: 

ftp://ftp.suse.com/pub/suse/i386/update/10.0/rpm/i586/perl-Bootloader-0.2-37.2.i586.rpm

Another possibility is to install the kernel source RPM, apply the patch, recompile, install.
Comment 67 Vojtech Pavlik 2006-04-19 12:45:38 UTC
Does it work?
Comment 68 Edmunds Kalnins 2006-04-24 15:45:41 UTC
The problem still remains for me in RC1 both in installer and after installation. Mouse dies in about 1 min.
Comment 69 Edmunds Kalnins 2006-05-24 06:41:28 UTC
I tried the final version for suse 10.1 - same problem. 
Then installed KOTD - problem not solved, mouse still stops working after a few minutes.
Comment 70 Edmunds Kalnins 2006-07-06 07:12:32 UTC
Any chance of this being resolved? Since originally reporting this problem for 10.1 Beta 4 I got the same problem in 10.1 final and also the currently available SLED RC3. Also I changed the mouse model, currently Logitech LX5 cordless mouse (cennected through USB), with no success. Which probably means its more of an USB problem than mouse problem. The MB is Nvidia nForce but the Linux drivers they provide are unfortunately only for audio and ethernet.

I do apologize for repeatedly posting this here, but I really want to use SUSE and/or SLED, but without a working mouse it is impossible.
Comment 71 Jiri Kosina 2007-02-05 17:30:43 UTC
Is this bug still reproducible in current products? Error handling in HID was refactored in 2.6.17-rc1 (aef4e2), so I guess that openSuSE 10.2 with 2.6.18 kernel makes this problem go away, right?
Comment 72 Jiri Kosina 2007-03-28 13:16:40 UTC
There has been no activity/response for more than a month, I will close this bug as resolved. Please feel free to reopen it if you still experience the problem even on products based on the >= 2.6.18 kernels.