devfs
[Top] [All Lists]

unplugging USB mouse under X does not unlink input/mouse0

To: devfs@xxxxxxxxxxx
Subject: unplugging USB mouse under X does not unlink input/mouse0
From: Georgi Georgiev <chutz@xxxxxxxxxxxxxxxxxx>
Date: Fri, 24 May 2002 07:29:44 +0900
Reply-to: chutz@xxxxxxxxxxxxxxxxxx
Sender: owner-devfs@xxxxxxxxxxx
User-agent: Mutt/1.3.99-current-20020514i
As suggested (or at least according to my understing) I am forwarding this mail
here, just in case someone has similar problem or a solution at hand. Maybe I
should mail the USB guys as well?


----- Forwarded message from Richard Gooch <rgooch@xxxxxxxxxxxxxxx> -----

From: Richard Gooch <rgooch@xxxxxxxxxxxxxxx>
Subject: Re: devfs: unplugging USB mouse under X does not unlink input/mouse0
To: chutz@xxxxxxxxxxxxxxxxxx
Date: Thu, 23 May 2002 11:01:31 -0600

Georgi Georgiev writes:
> I am not sure this is a real bug, and I did find a workaround for
> now, but I decided to anyway let you know (you said to first try to
> mail YOU if we have a bug to report about devfs).

Actually, emailing the devfs@xxxxxxxxxxx mailing list is preferred.
That will get to me, but will also let others interested in devfs
issues to see it.

BTW: please fix your mailer to wrap lines at 70 characters. Your email
is hard to read.

> Here is the problem.
> 
> I have set my mouse device in XFree86 to be /dev/input/mouse0.
> If I unplug my USB mouse while X is running the /dev/input/mouse0 file is not
> unlinked (I believe the reason is in the X server still using the mousedev
> module, because I cannot rmmod it either, but that is just my opinion). What
> happens if I plug the mouse in again is that a /dev/input/mouse1 device is
> created and the mouse is no more usable under X because obviously X is
> reading mouse0.

What are the major and minor numbers of all entries in /dev/input ?

> As a workaround for now I set my mouse device to be /dev/input/mice and that
> does the trick.
> 
> Maybe this workaround could find its place in the FAQ. I like unplugging my
> mouse so that the screensaver is activated without problems when I am away
> from the computer.
> 
> I think the problem could be easily reproduced.
> 
> I did not have this problem without devfs, so I guess I am mailing
> the right person ;)

Well, I didn't write the devfs support for USB, and it sounds like
this is a bug in USB. So probably the best people to talk to first in
this case are the USB developers. I don't use USB myself, so I'm not
in a position that I can test it, either.

                                Regards,

                                        Richard....
Permanent: rgooch@xxxxxxxxxxxxx
Current:   rgooch@xxxxxxxxxxxxxxx

----- End forwarded message -----

I am also including the answer to Richard's question about major and minor
numbers:

[chutz@thunder chutz]$ ll /dev/input/
total 0
crw-r--r--    1 root     root      13,  63 Jan  1  1970 mice
crw-r--r--    1 root     root      13,  32 Jan  1  1970 mouse0

My X right now is set to use /dev/input/mice for input. I tried unplugging and
replugging - it works fine. However, I did a "cat /dev/input/mouse0" in another
console and then tried the unplug - plug trick again. Here is the same command
again:

[chutz@thunder chutz]$ ll /dev/input/
total 0
crw-r--r--    1 root     root      13,  63 Jan  1  1970 mice
crw-r--r--    1 root     root      13,  32 Jan  1  1970 mouse0
crw-r--r--    1 root     root      13,  33 Jan  1  1970 mouse1

I guess we can forget the part with X. Keeping the device busy with a cat does
the trick as well. It is more than obvious that the device file is not removed
if it is still being used, but I guess this really is a USB problem. 

-- 
Georgi Georgiev <chutz@xxxxxxxxxxxxxxxxxx>
------------------------------------------
Gravity is an unforgiving motherfucker.

<Prev in Thread] Current Thread [Next in Thread>
  • unplugging USB mouse under X does not unlink input/mouse0, Georgi Georgiev <=