Changes

USB Mouse Configuration in Linux

7,258 bytes added, 22:51, 13 July 2019
The following lines were added (+) and removed (-):
<big>----<big></big>----</big> <nowiki>Section "ServerLayout"</nowiki> <nowiki>        Identifier    "XFree86 Configured"</nowiki> <nowiki>        Screen      0  "Screen0" 0 0</nowiki> <nowiki>        InputDevice    "Keyboard0" "CoreKeyboard"</nowiki> <nowiki>        InputDevice    "PS/2 Mouse" "CorePointer"</nowiki> <nowiki>        InputDevice    "USB Mouse" </nowiki> <nowiki>EndSection</nowiki> <nowiki></nowiki> <nowiki>Section "ServerFlags"</nowiki> <nowiki>        Option "AllowMouseOpenFail"  "true"</nowiki> <nowiki>EndSection</nowiki> <nowiki></nowiki> <nowiki>Section "InputDevice"</nowiki> <nowiki>        Identifier  "PS/2 Mouse"</nowiki> <nowiki>        Driver      "mouse"</nowiki> <nowiki>        Option      "Protocol" "auto"</nowiki> <nowiki>        Option      "ZAxisMapping"          "4 5"</nowiki> <nowiki>        Option      "Device" "/dev/psaux"</nowiki> <nowiki>        Option      "Emulate3Buttons" "true"</nowiki> <nowiki>        Option      "Emulate3Timeout" "70"</nowiki> <nowiki>        Option      "SendCoreEvents"  "true"</nowiki> <nowiki>EndSection</nowiki> <nowiki></nowiki> <nowiki>Section "InputDevice"</nowiki> <nowiki>        Identifier      "USB Mouse"</nowiki> <nowiki>        Driver          "mouse"</nowiki> <nowiki>        Option          "Device"                "/dev/input/mice"</nowiki> <nowiki>        Option          "SendCoreEvents"        "true"</nowiki> <nowiki>        Option          "Protocol"              "IMPS/2"</nowiki> <nowiki>        Option          "ZAxisMapping"          "4 5"</nowiki> <nowiki>        Option          "Buttons"              "5"</nowiki> <nowiki>EndSection</nowiki>&nbsp;== USB Mouse Notes for Redhat, Fedora (and many distributions) ==*KDE Control Center*Peripherals Tree:*Mouse::*Advanced Tab:::1. Pointer acceleration  1x:::2. Pointer threshold  20 pixelsManually edit: vi /home/nicolep/.kde/share/config/kcminputrcManually edit:  vi /etc/X11/XF86Config  Resolution 800 <- but this doesn't work on USB mouse <nowiki>Section "InputDevice"</nowiki> <nowiki>        Identifier  "Mouse0"</nowiki> <nowiki>        Driver      "mouse"</nowiki> <nowiki>        Option      "Protocol" "IMPS/2"</nowiki> <nowiki>        Option      "Device" "/dev/input/mice"</nowiki> <nowiki>        Option      "ZAxisMapping" "4 5"</nowiki> <nowiki>        Option      "Emulate3Buttons" "no"</nowiki> <nowiki>        Option      "Resolution" "800"</nowiki> <nowiki>EndSection</nowiki> <nowiki></nowiki> <nowiki>Section "InputDevice"</nowiki> <nowiki></nowiki> <nowiki># If the normal CorePointer mouse is not a USB mouse then</nowiki> <nowiki># this input device can be used in AlwaysCore mode to let you</nowiki> <nowiki># also use USB mice at the same time.</nowiki> <nowiki>        Identifier  "DevInputMice"</nowiki> <nowiki>        Driver      "mouse"</nowiki> <nowiki>        Option      "Protocol" "IMPS/2"</nowiki> <nowiki>        Option      "Device" "/dev/input/mice"</nowiki> <nowiki>        Option      "ZAxisMapping" "4 5"</nowiki> <nowiki>        Option      "Emulate3Buttons" "no"</nowiki> <nowiki>        Option      "Resolution" "800"</nowiki> <nowiki>EndSection</nowiki>Make a usbmouse device node  mknod /dev/usbmouse c 10 32  rm mouse  ln -s usbmouse mouseIf you cat /dev/input/mice you should see some bizarre looking characters as you move the mouse or click any of the buttons./proc/bus/usb lsmod dmesgPreferably, use the 2.4.x kernel. You first need to configure your kernel for the USB mouse support. Turn on the 'USB Human Interface Device (HID)" in the USB support and 'Mouse Support" in the Input Core support. Make sure you do NOT turn on the HIDBP mouse support. The HIDBP (boot protocol) way is intended for embedded systems with resource constraints and is inferior for normal desktop systems. Do  "insmod input; insmod usbcore; insmod usb-uhci; insmod hid" === How do I have mouse running in both console mode and X? ===You can have your X and gpm cooperate on the single mouse. This is a little difficult, but you can try this. Have these lines also in your /etc/gpm.conf should contain at least these lines (alongwith other stuff): device=/dev/psaux repeat_type=raw type=ps2The repeat_type line tells gpm to repeat the data exactly as it gets it. Other programs (i.e., X), can read that data from /dev/gpmdata. Then edit the XF86Config (or XF86Config-4) file to change /dev/psaux to /dev/gpmdata. Restart both gpm and X, and you are done.=== extra information: === mknod /dev/usbmouse c 13 63 USB mice should be grouped at /dev/input/micetest or troubleshoot: cat /dev/input/mice /dev/input/mice or /dev/input/mouse0check with "lsmod" if there is an usbmouse module presentEntry in XF86Config-4 <nowiki>Section "InputDevice"</nowiki> <nowiki>        Identifier      "USB Mouse"</nowiki> <nowiki>        Driver          "mouse"</nowiki> <nowiki>        Option          "Device"                "/dev/input/mice"</nowiki> <nowiki>        Option          "SendCoreEvents"        "true"</nowiki> <nowiki>        Option          "Protocol"              "IMPS/2"</nowiki> <nowiki>        Option          "ZAxisMapping"          "4 5"</nowiki> <nowiki>        Option          "Buttons"              "5"</nowiki> <nowiki>EndSection</nowiki> <nowiki></nowiki>If 'lsmod|grep mouse' shows no usbmouse then the module is not present.  The module must be present for the usbmouse to work in X11.  insmod usbcore  insmod usb-uhci  insmod input  insmod usbmouseI then created /dev/usbmouse with:                mknod /dev/usbmouse c 13 32It uses major device 13 based on the result of doing a cat of /proc/devices, which listed                13 inputAnyway, after doing that on my non-X console screen, I then did        gpm -k        gpm -t ps2 -m /dev/usbmouse&nbsp;== USB Mouse additional X11 data  ==1. Recompile the Kernel. You need to turn on:**"USB Human Interface Device (HID) support"**"USB support"**"Mouse Support (in input core support)"Do _not_ turn on "USB HIDBP Mouse support"If you build modules, you need to load "input.o", "hid.o" and "mousedev.o".2. Plug in the Mouse and check if it was detected (kernel message)3. Create the mouse nodes by running the following commands: mkdir /dev/input \ mknod /dev/input/mice c 13 634. You probably want to use the mouse under X, you need to edit your XF86Config (/etc/X11/XF86Config). Change your InputDevice and ServerLayout sections to something like that: <nowiki>Section "InputDevice"</nowiki> <nowiki>    Identifier  "USB Mice"</nowiki> <nowiki>    Driver  "mouse"</nowiki> <nowiki>    Option "Protocol"    "IMPS/2"</nowiki> <nowiki>    Option "Device"      "/dev/input/mice"</nowiki> <nowiki>    Option "ZAxisMapping"  "4 5"</nowiki> <nowiki>    Option "Buttons"    "5"</nowiki> <nowiki>EndSection</nowiki> <nowiki></nowiki> <nowiki>Section "ServerLayout"</nowiki> <nowiki>...</nowiki> <nowiki>    InputDevice  "USB Mice"    "CorePointer"</nowiki> <nowiki>...</nowiki> <nowiki>EndSection</nowiki> <nowiki></nowiki>== related ==* [[USB Device Diagnostics in Linux]]&nbsp;&nbsp;&nbsp;[[Category:Computer_Technology]][[Category:Linux]]
Bureaucrat, administrator
16,192
edits