old-www/LDP/LG/issue76/tag/4.html

463 lines
18 KiB
HTML

<!--startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<META NAME="generator" CONTENT="lgazmail v1.4F.m">
<TITLE>The Answer Gang 76: USB mouse goes missing</TITLE>
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"
LINK="#3366FF" VLINK="#A000A0">
<!--endcut ========================================================= -->
<P> <hr>
<!--startcut ======================================================= -->
<CENTER>
<!-- *** BEGIN navbar *** -->
<!-- *** END navbar *** -->
</CENTER>
</p>
<!--endcut ========================================================= -->
<!--startcut ======================================================= -->
<P> <hr>
<!-- begin tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::-->
<p align="center">
<table width="100%" border="0"><tr>
<td align="right" valign="center"
><IMG ALT="" SRC="../../gx/navbar/left.jpg"
WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="middle" border="0"
><A HREF="..//"
><IMG SRC="../../gx/navbar/toc.jpg" align="middle"
ALT="[ Table Of Contents ]" border="0"></A
><A HREF="../lg_answer.html"
><IMG SRC="../../gx/dennis/answertoc.jpg" align="middle"
ALT="[ Answer Guy Current Index ]" border="0"></A></td>
<td align="center" valign="center"><A HREF="../lg_answer.html#greeting"><img align="middle"
src="../../gx/dennis/smily.gif" alt="greetings" border="0"></A> &nbsp;
<A HREF="../tag/bios.html">Meet&nbsp;the&nbsp;Gang</A> &nbsp;
<A HREF="1.html">1</A> &nbsp;
<A HREF="2.html">2</A> &nbsp;
<A HREF="3.html">3</A> &nbsp;
<A HREF="4.html">4</A> &nbsp;
<A HREF="5.html">5</A> &nbsp;
<A HREF="6.html">6</A> &nbsp;
<A HREF="7.html">7</A> &nbsp;
<A HREF="8.html">8</A> &nbsp;
<A HREF="9.html">9</A> &nbsp;
<A HREF="10.html">10</A> &nbsp;
<A HREF="11.html">11</A> &nbsp;
<A HREF="12.html">12</A>
</td>
<td align="left" valign="center"><A HREF="../../tag/kb.html"
><IMG SRC="../../gx/dennis/answerpast.jpg" align="middle"
ALT="[ Index of Past Answers ]" border="0"></A
><IMG ALT="" SRC="../../gx/navbar/right.jpg" align="middle"
WIDTH="14" HEIGHT="45" BORDER="0"></td></tr></table>
</p>
<!-- end tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<!--endcut ========================================================= -->
<P> <hr> <P>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<center>
<H1><A NAME="answer">
<img src="../../gx/dennis/qbubble.gif" alt="(?)"
border="0" align="middle">
<font color="#B03060">The Answer Gang</font>
<img src="../../gx/dennis/bbubble.gif" alt="(!)"
border="0" align="middle">
</A></H1>
<BR>
<H4>By Jim Dennis, Ben Okopnik, Dan Wilder, Breen, Chris, and...
(<a href="bios.html">meet the Gang</a>) ...
the Editors of Linux Gazette...
and You!
<br>Send questions (or interesting answers) to
The Answer Gang
for possible publication
(but read the <a href="ask-the-gang.html">guidelines</a> first)
</H4>
</center>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<p><hr><p>
<!-- begin 4 -->
<H3 align="left"><img src="../../gx/dennis/qbubble.gif"
height="50" width="60" alt="(?) " border="0"
>USB mouse goes missing</H3>
<p><strong>From icalla
</strong></p>
<p align="right"><strong>Answered By Jay R. Ashworth, Karl-Heinz Herrmnn, Heather Stern, Ben Okopnik, Robos, Jim Dennis
<p></strong></p>
<P><STRONG>
Hi Gang,
</STRONG></P>
<blockQuote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Jay]
Hey there.
</blockQuote>
<P><STRONG><IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
The mouse in question is a Microsoft IntelliMouse (optical). It is
detected and initialised, and works fine - for a while. After some
seemingly random time, and for no apparent reason, it goes missing. The
pretty red glow from underneath goes out. The pointer disappears from
the screen.
</STRONG></P>
<blockQuote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [K.-H.]
I've got a Logitech optical/cordless, reciever is USB.
</blockQuote>
<blockQuote>
mine never stops the dull flashes, not even if PC is powered off for some
time. if it detects movement it will change to rapid bright flashes to
improve on accuracy I guess.
</blockQuote>
<P><STRONG><IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
I can find no way to get it back, except to re-boot.
</STRONG></P>
<P><STRONG>
It does leave a bit of a trail in the syslog, but unfortunately it
doesn't mean a lot to me. Here is a sample:
</STRONG></P>
<Pre><STRONG>
Jan 29 12:50:20 portia kernel: usb-uhci.c: interrupt, status 3, frame# 452
Jan 29 12:50:20 portia kernel: usb-uhci.c: interrupt, status 3, frame# 476
[6 more instances, at a distance of 24 frames apart]
</STRONG></Pre>
<blockQuote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Jay]
Are those "I'm ok" messages, or the beginning of "I'm dying"?
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
Those are the "I'm not quite getting a handle on this thing" messages. I
saw that just recently when messing around with hooking up my new Palm
Pilot cradle to my laptop (too new to have Linux support yet.
<IMG SRC="../../gx/dennis/unsmily.gif" ALT=":("
height="24" width="20" align="middle"> ). Using
a slightly different module got me past that step.
</blockQuote>
<Pre><STRONG><IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
Jan 29 12:55:55 portia kernel: usb.c: USB disconnect on device 2
Jan 29 12:55:55 portia kernel: hub.c: USB new device connect on bus1/1, assigned device number 3
Jan 29 12:55:59 portia kernel: usb_control/bulk_msg: timeout
Jan 29 12:55:59 portia kernel: usb.c: USB device not accepting new address=3 (error=-110)
Jan 29 12:56:00 portia kernel: hub.c: USB new device connect on bus1/1, assigned device number 4
Jan 29 12:56:04 portia kernel: usb_control/bulk_msg: timeout
Jan 29 12:56:04 portia kernel: usb.c: USB device not accepting new address=4 (error=-110)
</STRONG></Pre>
<blockQuote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [K.-H.]
your device got disconnected and the usb-module tries to reconnect it with
a new number. But your mouse doen't like the number it seems.
</blockQuote>
<blockQuote>
The question is: why does it disconnect?
</blockQuote>
<blockQuote>
How about new batteries if it's cordless? check the plugs if with cord?
Does it beep when it fails the first time? Mine beeps on changes in the usb
devices.
</blockQuote>
<p><strong><IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
I would be grateful if somebody could tell me
</strong></p>
<blockQuote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [K.-H.]
(a pretty much, correctly working setup.)
What happens here if I unplug and replug the receiver is:
</blockQuote>
<blockQuote><pre>
Jan 29 19:24:54 khhlap kernel: hub.c: port 1 connection change
Jan 29 19:24:54 khhlap kernel: hub.c: port 1, portstatus 100, change 3, 12 Mb/s
Jan 29 19:24:54 khhlap kernel: usb.c: USB disconnect on device 2
Jan 29 19:24:54 khhlap kernel: usb.c: kusbd: <TT>/sbin/hotplug</TT> remove 2
Jan 29 19:24:54 khhlap kernel: usb.c: kusbd policy returned 0xfffffffe
</pre></blockQuote>
<blockQuote>
now its gone. reconnect:
</blockQuote>
<blockquote><pre>Jan 29 19:24:54 khhlap kernel: hub.c: port 1 enable change, status 100
Jan 29 19:24:58 khhlap kernel: hub.c: port 2 connection change
Jan 29 19:24:58 khhlap kernel: hub.c: port 2, portstatus 301, change 1, 1.5 Mb/s
Jan 29 19:24:59 khhlap kernel: hub.c: port 2, portstatus 303, change 0, 1.5 Mb/s
Jan 29 19:24:59 khhlap kernel: hub.c: USB new device connect on bus1/2, assigned
Jan 29 19:24:59 khhlap kernel: usb.c: kmalloc IF cefa93a0, numif 1
Jan 29 19:24:59 khhlap kernel: usb.c: skipped 1 class/vendor specific interface
Jan 29 19:24:59 khhlap kernel: usb.c: new device strings: Mfr=1, Product=2, Seri
Jan 29 19:24:59 khhlap kernel: usb.c: USB device number 3 default language ID 0x
</pre></blockquote>
<blockQuote>
got a new number assigned (3 instead of 2)
</blockQuote>
<blockquote><pre>Jan 29 19:24:59 khhlap kernel: Manufacturer: Logitech
Jan 29 19:24:59 khhlap kernel: Product: USB Receiver
Jan 29 19:24:59 khhlap kernel: input0: USB HID v1.10 Mouse [Logitech USB Receive
Jan 29 19:24:59 khhlap kernel: usb.c: hid driver claimed interface cefa93a0
Jan 29 19:24:59 khhlap kernel: usb.c: kusbd: /sbin/hotplug add 3
Jan 29 19:24:59 khhlap kernel: usb.c: kusbd policy returned 0xfffffffe
Jan 29 19:24:59 khhlap usbmgr[582]: vendor:0x46d product:0xc501
Jan 29 19:24:59 khhlap usbmgr[582]: class:0x3 subclass:0x1 protocol:0x2
Jan 29 19:24:59 khhlap usbmgr[582]: USB device is matched the configuration
</pre></blockquote>
<blockQuote>
After that X doesn't know the mouse any more. I guess the <TT>/dev/usb/mouseX</TT>
changes with the usb-device number and X will fail to read mouse0. I use it
on a laptop right now and the coreinputdevice is my touchpad, the mouse is
set to sendcoreevents in <TT>/etc/XF86Config-4.</TT>
This way X will not complain if the usb mouse is not there (but will not
accept it reconnected later).
</blockQuote>
<blockQuote>
Restarting X is usually sufficient to get it working, I'll check if the usb
device is changing the <TT>/dev/usb</TT>(mouseX number as well next time restarting.
</blockQuote>
<p><strong><IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
1) What is wrong, and how to permanently fix it, or
</strong></p>
<blockQuote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Jay]
This sounds a lot like something is intermittent. Is the mouse plugged
directly into your machine, or a subsidiary hub?
</blockQuote>
<blockQuote>
Any possiblity you have a second USB mouse you can borrow to test?
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
Rather than suggesting a specific driver, which is only a small part of the
picture, I'm going to send you to the place that got me as far as it was
possible to get in my chase; I would say that you should be able to resolve
your problem without too much trouble, since there's a whole section
dedicated to USB mice. Go to <A HREF="http://www.linux-usb.org"
>http://www.linux-usb.org</A>, and read the stuff
in order, starting at the top (you can skip the sections that don't apply,
but you do need to start at the very beginning or you'll miss important
things.)
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
Failing that, you actually may find it possible to make the USB subsystem
more stable by compiling the correct USB "hub" driver into your kernel.
</blockQuote>
<blockQuote>
In this case UHCI support.
</blockQuote>
<blockQuote>
I also note that one of the USB hub flavors, UHCI ... yes, that's right,
the one you are using ... has two different possible drivers to use for
basic hub support. <EM>I</EM> have never discovered any difference using either
one, but maybe your system wants "the other one" . You can try it as a
module first and see.
</blockQuote>
<blockQuote>
Anyways my dad-in-law has a usb keyboard that lets the mouse plug into its
back "piggyback" style - and we got better USB behavior by building usb-uhci
into the kernel. Very minor difference, but he lives in X, and mouses
being strange on you don't make a happy GUI.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
That was actually what worked for me, but I wanted him to have the big
picture: understanding the USB process and tweaking the few small variables
seems to be the way to go. I got <EM>this</EM> close with the Palm Pilot, even
though it's not supported yet: got USB to recognize it as a valid device
(!), one that did not get dropped... I wish I knew more about writing
drivers and protocol parsers, but it's about #16,761 on the priority list.
</blockQuote>
<blockQuote>
[update: he seems to have gotten it working these days.]
</blockQuote>
<p><strong><IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
2) How to re-initialise it without re-booting
</strong></p>
<blockQuote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Jay]
Since it doesn't seem to be able to locate the mouse after it dies,
this may not be possible; I'm not a USB mechanic (yet); someone else
will probably have a better answer here.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [K.-H.]
restarting X seems not to suffice in your case since the mouse doesn't like
a new number asigned.
</blockQuote>
<blockQuote><IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
This is my first effort posting to a group of this ilk, so please chide
me gently if I step outside the bounds.
</blockQuote>
<blockQuote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Jay]
Well, you aren't inquring about Motorola SoftModems on Windows 2000, so
I'd say you're pretty much ok for now. Hell, you even included the
syslog segment. You go, boy.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Robos]
Hi!
</blockQuote>
<blockQuote>
I can't contribute much, but maybe you can get it to work again
by removing the module (looks like a module to me) and inserting it
again. I'm not sure if some other module has to be removed and
inserted first. Try <TT>/sbin/lsmod</TT> to see if it is a module (and being
used) and then rmmod usb-uhci and modprobe usb-uhci. Give it a try,
maybe it works.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
Yep. Rebooting is unnecessary; you can just unload/reload the module - but
the problem is that the module that you're using is generating or missing a
ton of spurious interrupts, which eventually brings it to its knees.
</blockQuote>
<HR width="10%" align="left"><P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [K.-H.]
So now I tried this again:
on disconnect the mouse (reciever) is dropped from valid input devices
(Xserver)
reconnecting the mouse will leave it unused.
</STRONG></P>
<P><STRONG>
restarting X will not find the mouse on <TT>/dev/usbmouse0</TT> as usually.
restarting with config entry pointing to <TT>/dev/usbmouse1</TT> does find the mouse
and it's working again.
</STRONG></P>
<P><STRONG>
Changing a link which is in the Config to point to the right device after a
disconnect/reconnect does <EM>not</EM> work.
Restarting X with the same link to ...mouse1 will work.
</STRONG></P>
<P><STRONG>
I guess you should fiure out why your mouse gets disconnected, everything
else is lots of trouble and strange things happening.
</STRONG></P>
<P><STRONG>
But basically restarting X with the right mouse device should suffice,
rebooting the whole system is not necessary here. But my mouse gets
reconnected without error, yours not.
</STRONG></P>
<P><STRONG>
That's as far as I can try help in this I think....
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
X should stay working if you use <TT>/dev/mice</TT> (major 13, minor 63, type character)
but that doesn't make it less annoying that it's losing an entry.
</blockQuote>
<blockQuote>
However, nothing will help if your mousie's little USB plug doesn't like
staying in the socket. If you have a machine with more than one USB socket
try the other one and see if it clears up suddenly. In which case you'll
either need to give up on the flimsy socket, or use it only for devices
that aren't so darn picky.
</blockQuote>
<blockQuote>
Good luck.
</blockQuote>
<!-- end 4 -->
<P> <hr> </p>
<!-- *** BEGIN copyright *** -->
<H5 align="center">This page edited and maintained by the Editors
of <I>Linux Gazette</I>
<a href="http://www.linuxgazette.com/copying.html"
>Copyright &copy;</a> 2002
<BR>Published in issue 76 of <I>Linux Gazette</I> March 2002</H5>
<H6 ALIGN="center">HTML script maintained by
<A HREF="mailto:star@starshine.org">Heather Stern</a> of
Starshine Technical Services,
<A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</H6>
<!-- *** END copyright *** -->
<!--startcut ======================================================= -->
<P> <hr>
<!-- begin tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::-->
<p align="center">
<table width="100%" border="0"><tr>
<td align="right" valign="center"
><IMG ALT="" SRC="../../gx/navbar/left.jpg"
WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="middle" border="0"
><A HREF="..//"
><IMG SRC="../../gx/navbar/toc.jpg" align="middle"
ALT="[ Table Of Contents ]" border="0"></A
><A HREF="../lg_answer.html"
><IMG SRC="../../gx/dennis/answertoc.jpg" align="middle"
ALT="[ Answer Guy Current Index ]" border="0"></A></td>
<td align="center" valign="center"><A HREF="../lg_answer.html#greeting"><img align="middle"
src="../../gx/dennis/smily.gif" alt="greetings" border="0"></A> &nbsp;
<A HREF="../tag/bios.html">Meet&nbsp;the&nbsp;Gang</A> &nbsp;
<A HREF="1.html">1</A> &nbsp;
<A HREF="2.html">2</A> &nbsp;
<A HREF="3.html">3</A> &nbsp;
<A HREF="4.html">4</A> &nbsp;
<A HREF="5.html">5</A> &nbsp;
<A HREF="6.html">6</A> &nbsp;
<A HREF="7.html">7</A> &nbsp;
<A HREF="8.html">8</A> &nbsp;
<A HREF="9.html">9</A> &nbsp;
<A HREF="10.html">10</A> &nbsp;
<A HREF="11.html">11</A> &nbsp;
<A HREF="12.html">12</A>
</td>
<td align="left" valign="center"><A HREF="../../tag/kb.html"
><IMG SRC="../../gx/dennis/answerpast.jpg" align="middle"
ALT="[ Index of Past Answers ]" border="0"></A
><IMG ALT="" SRC="../../gx/navbar/right.jpg" align="middle"
WIDTH="14" HEIGHT="45" BORDER="0"></td></tr></table>
</p>
<!-- end tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<!--endcut ========================================================= -->
<P> <hr>
<!--startcut ======================================================= -->
<CENTER>
<!-- *** BEGIN navbar *** -->
<!-- *** END navbar *** -->
</CENTER>
</p>
<!--endcut ========================================================= -->
<!--startcut ======================================================= -->
</BODY></HTML>
<!--endcut ========================================================= -->