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 Sat 29 Aug 2015, 05:18
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
MOUSE AUTODETECTION: NEED FEEDBACK FROM EVERYBODY
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
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7450
Location: Perth, Western Australia

PostPosted: Wed 05 Apr 2006, 05:01    Post subject:  MOUSE AUTODETECTION: NEED FEEDBACK FROM EVERYBODY  

Everybody who is running Puppy that is!

I'm working on mouse autodetection.
Detection of the USB mouse is fine.

I was doing some research on how to detect a PS/2 mouse, came across a little
bit of information that the PS/2 mouse always uses interrupt 12.
The interrupt assignments are shown /proc/interrupts, that you can open with
a text editor.

True enough, when using my PS/2 mouse, I see this line in /proc/interrupts:
Code:
 12:       2833          XT-PIC  PS/2 Mouse

On the other hand, using my USB mouse (with PS/2 mouse unplugged):
Code:
 12:          0          XT-PIC  SiS 7012

...something else has grabbed that interrupt.

Question 1
But, I need to know that this behaviour is consistent on other PCs.
If you are using a PS/2 mouse, do you get that text string "PS/2 Mouse"
alongside the interrupt 12 line?
If you are using a USB or serial mouse, do you not get that string?

Question 2
What order should mouses be detected?
Should I check for a USB mouse first, as many people will have an external
USB mouse on their laptop and they will want it to override the internal
one?
If there is no USB mouse, then I'll check for PS/2 mouse, failing that, could
just assume it's serial ...as I don't yet have a surefire serial detection method.
Back to top
View user's profile Send private message Visit poster's website 
raffy

Joined: 25 May 2005
Posts: 4827
Location: Manila

PostPosted: Wed 05 Apr 2006, 06:33    Post subject: Report of /proc/interrrupts  

People reporting on what they have in /proc/interrupts can help a lot here.

Yes, in my Celeron 400, it is
Code:
12:      29451          XT-PIC  PS/2 Mouse


Will check on one Puppy PC with serial mouse in the office tomorrow.

As to the order, the surest detection should be first (ps/2 as of now), then if it fails, the user may be asked to key in additional information. Question But I guess am mostly a desktop user - laptop users may want USB to be detected first. So perhaps if it's a laptop, it should be USB first.

Last edited by raffy on Wed 05 Apr 2006, 08:25; edited 1 time in total
Back to top
View user's profile Send private message 
Ted Dog


Joined: 13 Sep 2005
Posts: 3475
Location: Heart of Texas

PostPosted: Wed 05 Apr 2006, 06:50    Post subject:  

Code:
 12:     200078          XT-PIC  PS/2 Mouse
Back to top
View user's profile Send private message 
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Wed 05 Apr 2006, 06:53    Post subject:  

I have a usb mouse and mine looks like this
Code:
 12:          0          XT-PIC  usb-ohci, au8820

I agree with your order of autodection USB, PS/2, Serial.
Back to top
View user's profile Send private message 
keenerd

Joined: 20 Aug 2005
Posts: 175

PostPosted: Wed 05 Apr 2006, 06:54    Post subject:  

My thinkpad's trackpoint:

12: 33749 XT-PIC PS/2 Mouse

The laptop also has an external PS/2 port, using the gives the identical:

12: 39431 XT-PIC PS/2 Mouse

(Minor aside, when using an external scroll wheel mouse, the wheel causes the cursor to leap up or down the screen. Since my laptop doesn't have a scroll wheel, it could have been always doing this and I could never tell. Odd, huh?)

Just out of curiosity, what does that "CPU0" column do? It seems to only increase over time.
Back to top
View user's profile Send private message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15153
Location: Paradox Realm

PostPosted: Wed 05 Apr 2006, 07:02    Post subject:  

CPU0
0: 2606853 XT-PIC timer
1: 21838 XT-PIC keyboard
2: 0 XT-PIC cascade
8: 0 XT-PIC rtc
10: 0 XT-PIC via82cxxx
11: 32557 XT-PIC acpi, usb-uhci, usb-uhci, eth0
12: 594962 XT-PIC PS/2 Mouse
14: 12823 XT-PIC ide0
15: 690 XT-PIC ide1
NMI: 0
ERR: 0

I am using SimplePup with generic PS2 scroll mouse

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
pakt


Joined: 04 Jun 2005
Posts: 1094
Location: Sweden

PostPosted: Wed 05 Apr 2006, 09:09    Post subject:  

EDIT: I think I need to have my eyes examined Embarassed I read Barry's post wrong. My results are consistent with his thinking: I'm using a USB mouse and therefore interrupt 12 is not being used for a PS/2 mouse - in fact it's not used at all. Very Happy

As Barry said, USB detection already works.
----------------------------------------------------
Barry, sorry to rain on your parade, but using Puppy 107 and a usb mouse & keyboard on my laptop I get:
Code:
  0:    2071497          XT-PIC  timer
  1:          6          XT-PIC  keyboard
  2:          0          XT-PIC  cascade
  7:          0          XT-PIC  Intel ICH4
  8:          0          XT-PIC  rtc
  9:          2          XT-PIC  acpi
 11:     229084          XT-PIC  ehci_hcd, usb-uhci, usb-uhci, usb-uhci, Texas Instruments PCI4510 PC card Cardbus Controller, ehci_hcd, eth0
 14:      10662          XT-PIC  ide0
 15:         82          XT-PIC  ide1

Just to be clear, the mouse and keyboard are connected to the laptop through a 2-port bus-powered USB hub.

lsmod shows:
Code:

Module                  Size  Used by    Not tainted
keybdev                 1860   0  (unused)
mousedev                4020   1
hid                    20804   0  (unused)
usbmouse                1880   0  (unused)
usbkbd                  2904   0  (unused)
input                   3360   0  [keybdev mousedev hid usbmouse usbkbd]


EDIT: I found this that may help:
Code:

# cat /proc/bus/usb/devices | grep -i usb
S:  Product=USB UHCI Root Hub
S:  Product=USB UHCI Root Hub
S:  Product=USB UHCI Root Hub
S:  Product=Intel Corp. 82801DB USB2
S:  Product=USB-PS/2 Optical Mouse
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbmouse
S:  Product=USB Keyboard
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbkbd
#


or:
Code:

# cat /proc/bus/usb/drivers
         usbdevfs
         hub
         usbkbd
         usbmouse
 96-111: hiddev
         hid
  0- 15: usblp
         serial
#


Both of these detect the usb mouse and keyboard.
NB: the "serial" in the list above is a USB-to-serial adapter I use with the laptop to talk to a controller board.

Search order (if possible): USB, PS/2 then serial
Paul

Last edited by pakt on Wed 05 Apr 2006, 14:07; edited 2 times in total
Back to top
View user's profile Send private message 
krumpli

Joined: 06 Dec 2005
Posts: 32
Location: Florida USA

PostPosted: Wed 05 Apr 2006, 10:13    Post subject:  

here is my /proc/interrupts:
Quote:
CPU0
0: 77833 XT-PIC timer
1: 179 XT-PIC keyboard
2: 0 XT-PIC cascade
3: 24803 XT-PIC usb-uhci
5: 0 XT-PIC usb-uhci, Intel ICH5
8: 0 XT-PIC rtc
10: 0 XT-PIC usb-uhci, usb-uhci
11: 3635 XT-PIC ehci_hcd, eth0
14: 9604 XT-PIC ide0
15: 56 XT-PIC ide1
NMI: 0
ERR: 0


when I ran cat /proc/bus/usb/devices | grep -i usb (as per pakt) my results:
# cat /proc/bus/usb/devices | grep i -usb
242:S: SerialNumber=ec00
303:I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
657:S: SerialNumber=e800
718:I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
1072:S: SerialNumber=e400
1133:I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
1311:D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
1504:I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbmouse
1862:S: SerialNumber=e000
1923:I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
2247:S: Manufacturer=Linux 2.4.29 ehci_hcd
2323:S: SerialNumber=00:1d.7
2387:I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
2565:D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
2693:S: Product=Winter Ver1.3
2722:S: SerialNumber=404946475856
2791:I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
#


I am using pup1.08 with a USB 2 button & scroll wheel mouse. Keyboard is attached to ps/2 input. Hope this helps.[/list]
Back to top
View user's profile Send private message 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Wed 05 Apr 2006, 11:36    Post subject:  

Code:
  1:         53          XT-PIC  keyboard
Code:
12:      20760          XT-PIC  PS/2 Mouse

with my wireless optical mouse and keyboard combo, which has one normal ps/2 plug and a usb plug going through an adapter into a normal ps/2 plug.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send private message Visit poster's website 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11522
Location: Arizona USA

PostPosted: Wed 05 Apr 2006, 12:58    Post subject:  

Quote:
CPU0
0: 1430124 XT-PIC timer
1: 2255 XT-PIC keyboard
2: 0 XT-PIC cascade
8: 0 XT-PIC rtc
9: 0 XT-PIC acpi
10: 93210 XT-PIC usb-uhci, usb-uhci
11: 76592 XT-PIC ehci_hcd, usb-uhci, usb-uhci, eth1, VIA8237
14: 6544 XT-PIC ide0
NMI: 0
ERR: 0

PS/2 keyboard, USB trackball mouse
Back to top
View user's profile Send private message 
slapshot


Joined: 02 Apr 2006
Posts: 270
Location: Italy

PostPosted: Wed 05 Apr 2006, 13:45    Post subject:  

This is mine. I'm using scroll ps/2 mouse and Puppy 1.08r1 on hd.

Code:

          CPU0       
  0:     365818          XT-PIC  timer
  1:          8          XT-PIC  keyboard
  2:          0          XT-PIC  cascade
  3:     257183          XT-PIC  eth0
  8:          0          XT-PIC  rtc
 10:          0          XT-PIC  usb-uhci, Intel 82801BA-ICH2
 11:          0          XT-PIC  usb-uhci
 12:        596          XT-PIC  PS/2 Mouse
 14:      15278          XT-PIC  ide0
 15:         61          XT-PIC  ide1
NMI:          0
ERR:          0


Bye.
Slapshot
Back to top
View user's profile Send private message MSN Messenger 
bugman


Joined: 20 Dec 2005
Posts: 2131
Location: buffalo commons

PostPosted: Wed 05 Apr 2006, 14:05    Post subject:  

12: 97512 XT-PIC PS/2 Mouse



No opinion on q2...
Back to top
View user's profile Send private message Visit poster's website 
Fossil

Joined: 13 Dec 2005
Posts: 873
Location: Gloucestershire, UK.

PostPosted: Wed 05 Apr 2006, 17:30    Post subject:  

Puppy 108
Pentium 333 mhz
Standard PS/2 Keyboard
Two usb ports, one with attached 2-button scroll-wheel USB Mouse, the other a USB hub.

CPU0
0: 274916 XT-PIC timer
1: 522 XT-PIC keyboard
2: 0 XT-PIC cascade
8: 0 XT-PIC rtc
10: 54058 XT-PIC usb-uhci
11: 1631 XT-PIC eth0
12: 80530 XT-PIC YMFPCI
14: 9252 XT-PIC ide0
15: 93 XT-PIC ide1
NMI: 0
ERR: 0

# cat /proc/bus/usb/devices | grep i -usb
242:S: SerialNumber=e000
303:I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
481:D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
619:I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbmouse
968:I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
1146:D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
1271:S: Product=Flash Disk
1300:S: SerialNumber=1F3F1542522A887D
1373:I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
#


**********

Athlon 1700
Standard PS/2 Keyboard
2-button scroll-wheel USB mouse

CPU0
0: 41648 XT-PIC timer
1: 138 XT-PIC keyboard
2: 0 XT-PIC cascade
5: 5597 XT-PIC usb-uhci, usb-uhci
8: 0 XT-PIC rtc
10: 21 XT-PIC eth0
14: 1386 XT-PIC ide0
15: 678 XT-PIC ide1
NMI: 0
ERR: 0


# cat /proc/bus/usb/devices | grep i -usb
242:S: SerialNumber=dc00
303:I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
481:D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
606:S: Product=Flash Disk
635:S: SerialNumber=1F3F1542522A887D
708:I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
1156:S: SerialNumber=d800
1217:I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
1395:D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
1533:I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbmouse


**********

Old Pentium 233 (6x86MX-PR233)
163 Mb RAM
Old large rounded connector (Not PS/2) Keyboard.
2-button scroll-wheel USB mouse.

CPU0
0: 23179 XT-PIC timer
1: 14 XT-PIC keyboard
2: 0 XT-PIC cascade
8: 0 XT-PIC rtc
10: 4246 XT-PIC usb-uhci
14: 975 XT-PIC ide0
15: 1071 XT-PIC ide1
NMI: 0
ERR: 0

# cat /proc/bus/usb/devices | grep i -usb
242:S: SerialNumber=e400
303:I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
481:D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
606:S: Product=Flash Disk
635:S: SerialNumber=1F3F1542522A887D
708:I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
980:D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
1118:I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbmouse
#

**********

Compaq Evo N600c laptop.
USB 2-button scroll-wheel mouse (which deactivates the touchpad).

CPU0
0: 97447 XT-PIC timer
1: 97 XT-PIC keyboard
2: 0 XT-PIC cascade
8: 0 XT-PIC rtc
11: 4374 XT-PIC usb-uhci, usb-uhci, usb-uhci, Texas Instruments PCI1420, Texas Instruments PCI1420 (#2), Allegro
14: 681 XT-PIC ide0
15: 611 XT-PIC ide1
NMI: 0
ERR: 0


# cat /proc/bus/usb/devices | grep i -usb
242:S: SerialNumber=4040
303:I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
657:S: SerialNumber=4020
718:I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
896:D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
1021:S: Product=Flash Disk
1050:S: SerialNumber=1F3F1542522A887D
1123:I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
1571:S: SerialNumber=4000
1632:I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
1810:D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
1948:I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbmouse
#
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7450
Location: Perth, Western Australia

PostPosted: Wed 05 Apr 2006, 19:45    Post subject:  

Excellent, we have consistency!

Full mouse autodetection coming soon!
Back to top
View user's profile Send private message Visit poster's website 
Brian C

Joined: 09 Feb 2006
Posts: 168

PostPosted: Wed 05 Apr 2006, 22:47    Post subject:  

Question 2: I would like to see both supported simultaneously. When I'm working on my laptop, I'll often use my USB mouse, but will temporarily change to the trackpad (ID-ed as PS/2) when I hunch over the screen. Or when my (wireless) USB mouse's batteries die.
Back to top
View user's profile Send private message 
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 » Advanced Topics » Cutting edge
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.2240s ][ Queries: 12 (0.0223s) ][ GZIP on ]