Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 20 Aug 2014, 18:24
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
USB mouse not working in 2.12? Here's a solution
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [39 Posts]   Goto page: 1, 2, 3 Next
Author Message
pakt


Joined: 04 Jun 2005
Posts: 1089
Location: Sweden

PostPosted: Sat 09 Dec 2006, 05:53    Post subject:  USB mouse not working in 2.12? Here's a solution  

There are occasional reports of USB 'mice' not working in Puppy 2.12. Most of the time this is due to the unreliable USB mouse detection code in /etc/rc.d/rc.local0.

Here is line 191 in rc.local0 that looks for a USB mouse:
Quote:
[ ! "`cat /proc/bus/usb/devices 2>/dev/null | grep -i --extended-regexp "mouse|trackball|netscroll|bt mini\-receiver"`" = "" ] && USBMOUSEDEV="input/mice"

This search relies on the various vendor and product strings that start with the 'S: line'.

From http://www.linux-usb.org/USB-guide/c607.html,
Quote:
The lines that start with S:, if any, are the vendor and product strings that the device returned.

Note the "if any" in the above quote.

Also the 'S:' lines don't neccessarily contain the search words in the script. Here is one example that was posted on the forum
Quote:
T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=046d ProdID=c502 Rev=11.40
S: Manufacturer=Logitech
S: Product=USB Receiver
C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr= 50mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=01 Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms
I: If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid
E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=10ms

This mouse is not detected because the string is "USB Receiver".

A more reliable method of detecting USB mice is to search for 'Cls=03(HID ) Sub=01 Prot=02' as in the example above.

I've done quite a bit of checking on the net and this 'InterfaceClass, InterfaceSubClass and InterfaceProtocol' appears to be reserved for USB mice.

(Note that, in the same way, 'Cls=03(HID ) Sub=01 Prot=01' appears to be reserved for USB keyboards.)


If you are experiencing USB mouse problems with Puppy 2.12, please try the modified rc.local0.

EDIT3: There was a request that USB keyboard detection also be modified in the same way - to look for string 'Cls=03(HID ) Sub=01 Prot=01'.
This has been added as an attachment below.

EDIT2: I have updated the attached file - it also had the single space instead of the required two spaces Rolling Eyes
Apologies to Kal and others who downloaded the file Embarassed

EDIT: The forum has changed the spacing in the line, so I've provided the modified rc.local0 below.
Just backup your old /etc/rc.d/rc.local0 to /etc/rc.d/rc.local0_org, unpack the attached file and copy it to /etc/rc.d/
Save the changed file to pup_save.3fs by rebooting. When rebooting is done, check if your USB mouse works.

Please report your successes/failures in this thread.

Paul
rc.local0.gz
Description  Modified /etc/rc.d/rc.local0 [MOUSE & KEYBOARD] - unpack with gunzip
gz

 Download 
Filename  rc.local0.gz 
Filesize  5.75 KB 
Downloaded  1263 Time(s) 
rc.local0.gz
Description  Modified /etc/rc.d/rc.local0 [MOUSE ONLY] - unpack with gunzip
gz

 Download 
Filename  rc.local0.gz 
Filesize  5.69 KB 
Downloaded  1337 Time(s) 

_________________
Testing Puppy since v0.9.2 - my desktop OS since v1.0.7
Running SlaxerPup-4.12 - Puppy with a Slackware 12.2 heart Cool

Last edited by pakt on Mon 11 Dec 2006, 15:35; edited 7 times in total
Back to top
View user's profile Send private message 
Kal

Joined: 05 May 2005
Posts: 624
Location: California, High Desert

PostPosted: Sat 09 Dec 2006, 09:14    Post subject: Mod rc.local0  

Tried modifying rc.local0 on a working usb logitech optical mouse and it was inoperational on two reboots. Went to prompt and ran "modprobe usbhid", which brought it back. I put the original rc.local0 back the way it was.
Good Luck, Kal
Back to top
View user's profile Send private message 
pakt


Joined: 04 Jun 2005
Posts: 1089
Location: Sweden

PostPosted: Sat 09 Dec 2006, 10:35    Post subject:  

Kal, could you run the following command with your USB mouse plugged in and post the results?

# cat /proc/bus/usb/devices

_________________
Testing Puppy since v0.9.2 - my desktop OS since v1.0.7
Running SlaxerPup-4.12 - Puppy with a Slackware 12.2 heart Cool
Back to top
View user's profile Send private message 
Kal

Joined: 05 May 2005
Posts: 624
Location: California, High Desert

PostPosted: Sat 09 Dec 2006, 10:57    Post subject:  

There is results:

T: Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 6
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 2.06
S: Manufacturer=Linux 2.6.18.1 ehci_hcd
S: Product=EHCI Host Controller
S: SerialNumber=0000:00:02.2
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=256ms

T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 3
B: Alloc= 11/900 us ( 1%), #Int= 1, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 2.06
S: Manufacturer=Linux 2.6.18.1 ohci_hcd
S: Product=OHCI Host Controller
S: SerialNumber=0000:00:02.1
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms

T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=046d ProdID=c03d Rev=20.00
S: Manufacturer=Logitech
S: Product=USB-PS/2 Optical Mouse
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 98mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=10ms

T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 3
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 2.06
S: Manufacturer=Linux 2.6.18.1 ohci_hcd
S: Product=OHCI Host Controller
S: SerialNumber=0000:00:02.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=03f0 ProdID=7404 Rev= 1.00
S: Manufacturer=HP
S: Product=Deskjet 3740
S: SerialNumber=TH53P1621Q045Y
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
#

Kal
Back to top
View user's profile Send private message 
pakt


Joined: 04 Jun 2005
Posts: 1089
Location: Sweden

PostPosted: Sat 09 Dec 2006, 12:03    Post subject:  

Well the detection string is there:
Quote:
T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=046d ProdID=c03d Rev=20.00
S: Manufacturer=Logitech
S: Product=USB-PS/2 Optical Mouse
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 98mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=10ms

So I don't know why it didn't work in your case.

You did copy the new line exactly as shown in the first post? Make sure you don't leave "--extended-regexp" in the line or the search will not work.

_________________
Testing Puppy since v0.9.2 - my desktop OS since v1.0.7
Running SlaxerPup-4.12 - Puppy with a Slackware 12.2 heart Cool
Back to top
View user's profile Send private message 
pakt


Joined: 04 Jun 2005
Posts: 1089
Location: Sweden

PostPosted: Sat 09 Dec 2006, 13:00    Post subject:  

Here is my own setup. I'm using an external USB mouse and keyboard with my laptop.

It turns out I have an identical mouse to Kal's and my mod to rc.local0 has no problem detecting the Logitech mouse as a USB mouse:
Quote:
T: Bus=04 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=046d ProdID=c03d Rev=20.00
S: Manufacturer=Logitech
S: Product=USB-PS/2 Optical Mouse
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 98mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=10ms

_________________
Testing Puppy since v0.9.2 - my desktop OS since v1.0.7
Running SlaxerPup-4.12 - Puppy with a Slackware 12.2 heart Cool
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5674
Location: Valåmoen, Norway

PostPosted: Sat 09 Dec 2006, 13:53    Post subject:  

After trying your upgrade I still have to "modprobe usbhid" to get usb mouse to work. The ps2 touchpad works ok. (Puppy 2.12)
Back to top
View user's profile Send private message Visit poster's website 
rerwin


Joined: 24 Aug 2005
Posts: 1512
Location: Maine, USA

PostPosted: Sat 09 Dec 2006, 14:18    Post subject:  

I have a Microsoft wireless optical mouse that was only partially detected in 2.12 -- the pointer would not respond, but the wizard indicated a USB mouse (which I discovered by plugging in my ps/2 mouse).

I copied the new line 191, but it did not work until I added a second space character to it, between "HID" and ")". I suspect the forum text formatter squeezed out the second space character.

Now that the mouse works, I see that it behaves erratically. If I click on an item (button, URL link), nothing happens; but if I move the mouse slightly while clicking, the corresponding action occurs. In addition the response is sluggish and the cpu meter shows significant utilization. I have not checked to see if anyone else has reported this behavior.

I am testing this on a 400MHz, 160MB Aptiva

Richard
Back to top
View user's profile Send private message 
Kal

Joined: 05 May 2005
Posts: 624
Location: California, High Desert

PostPosted: Sat 09 Dec 2006, 16:08    Post subject: usb  

The first times did a cut, copy and paste off the site. Tried it again with your rc.local0 and on reboot the same dead mouse again. Noticed that my network was inop even after modprobing the mouse to life. Put original rc.local0 back and all is well.
Kal
Back to top
View user's profile Send private message 
pakt


Joined: 04 Jun 2005
Posts: 1089
Location: Sweden

PostPosted: Sat 09 Dec 2006, 16:12    Post subject:  

rerwin wrote:
I copied the new line 191, but it did not work until I added a second space character to it, between "HID" and ")". I suspect the forum text formatter squeezed out the second space character.

Thanks, rerwin, that's it - there should be two spaces between "HID" and ")".

I have attached a modified rc.local0 for testing to the first post so that problem should be gone now Smile
rerwin wrote:
Now that the mouse works, I see that it behaves erratically. If I click on an item (button, URL link), nothing happens; but if I move the mouse slightly while clicking, the corresponding action occurs. In addition the response is sluggish and the cpu meter shows significant utilization. I have not checked to see if anyone else has reported this behavior.

Did you have this problem before using the modified rc.local0?

_________________
Testing Puppy since v0.9.2 - my desktop OS since v1.0.7
Running SlaxerPup-4.12 - Puppy with a Slackware 12.2 heart Cool
Back to top
View user's profile Send private message 
pakt


Joined: 04 Jun 2005
Posts: 1089
Location: Sweden

PostPosted: Sat 09 Dec 2006, 16:56    Post subject: Re: usb  

Kal wrote:
Tried it again with your rc.local0 and on reboot the same dead mouse again.

Yes, I was a little too fast there - the attached rc.local0 file had the 'missing space character' problem. That happened because I didn't have my correct test file handy and instead made a new modified file using the incorrect line from the forum Embarassed

I've updated the file and tested it to make sure it works.

If you are up to it, please give it one more try Wink

Paul

_________________
Testing Puppy since v0.9.2 - my desktop OS since v1.0.7
Running SlaxerPup-4.12 - Puppy with a Slackware 12.2 heart Cool

Last edited by pakt on Sat 09 Dec 2006, 17:25; edited 1 time in total
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5674
Location: Valåmoen, Norway

PostPosted: Sat 09 Dec 2006, 17:25    Post subject:  

Yepp... This is great....just works

Takk!
Back to top
View user's profile Send private message Visit poster's website 
Kal

Joined: 05 May 2005
Posts: 624
Location: California, High Desert

PostPosted: Sat 09 Dec 2006, 18:05    Post subject: usb mouse  

Note, tried it again on other machine here with VIA chip set, using my mouse and no problem. Frugal install and all the same except for it's a Nvidia nforce2 chip set, on my computer it's a NO GO .
Good Luck, Kal
Back to top
View user's profile Send private message 
lesliek

Joined: 09 Nov 2006
Posts: 18

PostPosted: Sat 09 Dec 2006, 23:28    Post subject:  

Paul, you were trying to help me with a USB mouse problem in Puppy v 2.12 some time ago and my last post in that thread left me saying that I'd be buying another USB mouse to use with my MicroClient Jr.

I did that, but I'm afraid the problem's not been resolved by that new USB mouse. When I got back to the problem today, I fortuitously discovered this new thread begun by you.

I understand why you've changed the rc.local0 script to search for "Cls=03(HID ) Sub=01 Prot=02" and, indeed, the new mouse I bought shows that very information when I run "cat /proc/bus/usb/devices". The only problem is that it doesn't show that information when I run that command on my MC Jr with Puppy. The device doesn't even appear in the list of USB devices, nor does it work generally.

On the other hand, that information does appear when I run the command on my MC Jr with Damn Small Linux. (I've put the latter on a bootable USB flash drive, my Puppy being on the CF drive.) Also, the mouse works normally in DSL.

I really have no skill or knowledge in these matters, so I can only approach this very simplistically, but it seems obvious that, at the moment at which the rc.local0 script is run, the OS is not yet aware that it has a mouse hanging off the computer. It must know (or be capable of knowing) that it's got some kind of USB device there, because the mouse is getting power through the USB port (the mouse is lit up from the moment I turn on the computer), but it isn't able to get the necessary information to identify it as a USB mouse.

Can it be that editing some script that runs earlier than rc.local0 could solve my problem?

Thanks again,

Leslie
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5674
Location: Valåmoen, Norway

PostPosted: Sun 10 Dec 2006, 05:32    Post subject:  

Crying or Very sad This morning the upgraded script didn't load the usbhid module during bootup. Crying or Very sad
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 3 [39 Posts]   Goto page: 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0977s ][ Queries: 13 (0.0054s) ][ GZIP on ]