?
Solved

USB Mouse prob

Posted on 2003-03-22
6
Medium Priority
?
343 Views
Last Modified: 2013-12-06
Firstly, I am a newbie in Linux. I installed PCQLinux 8(totally based on Red Hat Linux 8) on my box. During the installation in Graphical Mode my USB mouse Worked finely. But after the installation when I switched to X-Windows the mouse was not working!! I'm too surprised as I chose Generic 3 button mouse(USB) during the installation and also had run Kudzu but in vein. Plz help me U gurus as I am too frustated as how to get my USB mouse working.......
                                                   Waiting eagerly and anxiously
                                                    Newbie, Albert
0
Comment
Question by:albert_jo_joseph
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 

Accepted Solution

by:
Slydder earned 300 total points
ID: 8195991
ok. it would seem that you will need to do a manual check/update of your X config.

USB mice (i could honestly live without mine as it sucks) are sometimes a pain in the ...cough...

To get mine working I had to do the following (and this should work for MOST mice out there)

As you stated that the mouse worked during the install I will assume (I know. don't say it. ;) ) that the usb device is installed correctly in /dev.

I am also going on the basis that you have a 4.x version of X11 running so if not you will have to let me know.

To run a USB mouse you will need the following modules loaded at boot time.

mousedev
hid
input
usb-uhci
usbcore

Note: The usb-uhci module may or may not be needed by some systems. However, the rest are 100% needed for correct functionality.

You can issue an /sbin/lsmod (on some systems you will need to be root to do this. on most RH based systems this is not the case) to see what modules are actually loaded. If one of the above are not loaded then you have found a portion of your problem.  To actually get the modules loaded you will need to use the modprobe command as root.

example:
/sbin/modprobe mousedev
/sbin/modprobe hid
/sbin/modprobe input
/sbin/modprobe usb-uhci
/sbin/modprobe usbcore

Note: On some systems you will need to un-plug the mouse/device and plug it back in before it is recognized.

You should now make sure there were no errors during the loading of the modules by checking the systems logs. Thus just execute the following:

tail -f /var/log/messages

If you notice any errors here related to the modules you just installed then you now have subject matter for your next posting here at Experts-Exchange.

If there were no errors then you can make your changes permenent by adding them to /etc/modules.conf so that they are automatically loaded the next time you start your box. A line as follows is what I have in mine.

alias usb-controller usb-uhci

However, it is normal that the modules are loaded but that X11 just isn't configured correctly.  So lets take a look at the wonderful world of X11 configuration files.

Due to changes between X11 3.x and X11 4.x is the reason why I am limiting this to the 4.x version of X11.  To cover both is a real pain as I no longer have a 3.x version up and running.  However, if you do need 3.x version info just let me know and I'll do a quick install to get the info again.  To check which version you have simply execute the following:

/usr/X11R6/bin/xdpyinfo | grep release

Note: you may have to issue a "which xdpyinfo" to get the actual path to xdpyinfo.  This "should" return a version number beginning with 4.  If this is the case then all is good and you may continue.  Otherwise we have a problem.  Actually I have a problem ;).  As a number beginning with 3 means I may have to do a reinstall of X11 v. 3.x on one of my boxes.

Now down to the nitty-gritty.

In the file /etc/X11/XF86Config you will find a section titled: Section "Pointer".  This is, normally, where you will need to make some changes.  It is possible that this section has a different title than "Pointer".  If so then simply look for the Protocol "IMPS/2" line to get you where you need to be.

Section "Pointer"
    Protocol    "IMPS/2"
# Device is "psaux" for PS/2 mice and "mice" for USB
    Device      "/dev/input/mice"
# ZAxisMapping is needed if this mouse is a wheel mouse
    ZAxisMapping "4 5"
EndSection

There may be further settings you the above section that are not covered here.  You may comment them out, place a "#" before the setting, and see how X11 reacts without and if needed reenable later.

As we have not changed the name of the section (ie. it is still titled "Pointer") we should not need to change any of the option at the end of the X11 config file.

Now you can start X11 up and see what happens.  Remember that if the mouse doesn't work you can use the key combo "Ctrl-Alt-F1" to get a terminal window so that you can kill X11.

If all is good then you can simply sit back and relax.  If you are runing gpm (as I do) then you may wish to make one more change to make your life a bit easier.

By changing the gpm startup in your /etc/rc.d to the following:

gpm -m /dev/input/mice -t imps2

On RH based systems this can be accomplished in the /etc/sysconfig/mouse configuration file by inserting the following and then issueing a "/etc/init.d/gpm restart" call.

FULLNAME="Generic - 3 Button USB Wheel Mouse"
MOUSETYPE="imps2"
DEVICE="/dev/input/mice"
XEMU3="no"

Note: Make sure that all the old configuration is deleted from the config file before restarting the gpm service.

To get this change immediately you will need to stop gpm and restart it with the above command.

Well, I hope I haven't left anything out and I hope you have no problems getting your system up and running. Let me know if you have any further problems with USB.

chuck
0
 
LVL 1

Expert Comment

by:goki75
ID: 8232808
1. Redhat has inbuilt support for IMPS2
2. Rehat doesnot enable usb on startup by default

Solution

1. following commands from shell

     #> modprobe usb-uhci
     #> modprobe hid
thats enuf....
now startx and configure your mouse for usb wheel mouse

to make this permanent

open a file called  usbmouse in /etc/rc.d/init.d/

and put in the following script

#!/bin/sh
# description: Enable HID Compatible USB Mouse


case "$1" in
'start')
     modprobe usb-uhci
     modprobe hid
     touch /var/lock/subsys/USBMouse
     ;;
'stop')
     rm -f /var/lock/subsys/USBMouse
     ;;
*)
     echo "Usage: $0 { start | stop }"
     ;;
esac
exit 0


and saave it
and now you are finished
works with Redhat 8.0
0
 

Expert Comment

by:Slydder
ID: 8236482
As of RH 8.0 this is true. RH 7.3 and below are not so easily adjusted.

chuck
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

Expert Comment

by:Slydder
ID: 8236491
OOPS. hehe. Hit submit a bit too early there and wanted to add a short P.S.

P.S. ;)

As his install is supposedly RH 8.0 based then I would be interested in hearing if your suggestion works as I have no 8.0 version of RH installed (I never touch x.0 versions of RH).

chuck
0
 

Expert Comment

by:CleanupPing
ID: 9087639
albert_jo_joseph:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 2

Expert Comment

by:TheWeakestLink
ID: 9289574
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept comments from slydder as answer
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheWeakestLink
EE Cleanup Volunteer
0

Featured Post

Cloud Training Guides

FREE GUIDES: In-depth and hand-crafted Linux, AWS, OpenStack, DevOps, Azure, and Cloud training guides created by Linux Academy instructors and the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month13 days, 6 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question