Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB Bug? /dev/input/mouse1 --> /dev/input/mouse2
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
sheepdog
Guru
Guru


Joined: 14 Oct 2002
Posts: 369
Location: Edison Enterprises Inc., Lake Oswego, Oregon, USA

PostPosted: Tue Oct 29, 2002 3:47 am    Post subject: USB Bug? /dev/input/mouse1 --> /dev/input/mouse2 Reply with quote

This may be a bug in the USB subsystem. I have just finished getting KDE 3.0.4 installed and working. I have a Logitech USB wireless trackball mouse. The /dev/input directory contains both mouse0 and mouse1. The trackball is not attached to mouse0 but it is attached to mouse1. I also have a Belkin 4 port USB KVM switch to allow me to switch between several computers. The KVM switch switches monitor, keyboard and mouse. Now here is the problem.

If I am in KDE and everything is working and I switch to another computer with the KVM switch and then switch back, the mouse no longer works in KDE. When I look in /dev/input I find that mouse0 is there but not mouse1. Instead it has been replaced by mouse2, which is now getting the mouse input. But since KDE is looking at mouse1 for input the mouse does not work. Apparantly the USB subsystem gets a detachment signal when switching away from the computer and then an attachment signal when switching back, and instead of recreating the original /dev/mouse1 it creates a new /dev/mouse2.

I would prefer to avoid shutting down my X session every time I want to use the KVM switch. Can anyone suggest a workaround? Thank you.

-- Michael

P.S.: I have tried making a link /dev/kde_mouse <-- /dev/input/mouse1 so that I could simply change the link when the mouse1 file had been replaced, but I would need to switch to another virtual console from the X session with Ctl-Alt-F2, make the new link then switch back with Alt-F1 and this maneuver apparently does not work in Gentoo KDE 3, since I do not get my X session back upon switching back.
Back to top
View user's profile Send private message
lanalyst
n00b
n00b


Joined: 22 Oct 2002
Posts: 13

PostPosted: Tue Oct 29, 2002 9:59 am    Post subject: Reply with quote

What's happening is when you use the KVM to switch away, you are disconnecting from the USB bus. When this takes place, you'll see entries in the system log like:

usb.c: USB disconnect on device 3
hub.c: USB new device connect on bus1/2, assigned device number 4
Manufacturer: Microsoft
Product: Microsoft IntelliMouse<AE> Optical
input1: USB HID v1.00 Mouse [Microsoft Microsoft IntelliMouse<AE> Optical] on usb1:4.0
USB disconnect on device 4
USB new device connect on bus1/2, assigned device number 5

The result is /dev/mouse0 will no longer have input. It will appear under /dev/mouse1 - when the usb device number bumps, a a device is created.

I don't think of it as a workaround... but a solution:

Replace the line containing /dev/input/mouse0 in XF86Config InputSevice Section with:

Option "Device" "/dev/input/mice"

Also, see the last few lines of /etc/devfsd.conf (Manage USB mouse) which is creating the symlink to /dev/input/mice when the new device connects.
Back to top
View user's profile Send private message
sheepdog
Guru
Guru


Joined: 14 Oct 2002
Posts: 369
Location: Edison Enterprises Inc., Lake Oswego, Oregon, USA

PostPosted: Tue Oct 29, 2002 3:57 pm    Post subject: Solution Reply with quote

Yes, your suggestion worked and appears to be a solution. Thank you.

It is curious to me that this is only a problem when KDE is running. If not, then switching between computers does not change the contents of /dev/input. Any thoughts?

-- Michael
Back to top
View user's profile Send private message
lanalyst
n00b
n00b


Joined: 22 Oct 2002
Posts: 13

PostPosted: Tue Oct 29, 2002 8:22 pm    Post subject: Reply with quote

I'm pretty sure /dev/input/mouse0 is deleted and created by devfsd with the same device name through the disconnect/reconnect. If a program like X or gpm has a file handle open to it and it disappears, it would be an an I/O error. I think /dev/input/mice is there as an abstraction layer so if this activity happens, the file handle will remain valid.

On my RedHat install, I had about 25 /dev/input/mousex devices... that version didn't clean up after itself on disconnects.
Back to top
View user's profile Send private message
Drelghas
n00b
n00b


Joined: 23 May 2005
Posts: 4

PostPosted: Wed Jun 15, 2005 12:33 am    Post subject: Reply with quote

lanalyst, I would just like to say thank you, because I was having this exact same problem, and posted in another thread about it. Thank you, thank you!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments 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