Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


USB Mouse prob

Posted on 2003-03-22
Medium Priority
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
Question by:albert_jo_joseph

Accepted Solution

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.


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.

/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"

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"

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.


Expert Comment

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


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

# description: Enable HID Compatible USB Mouse

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

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

Expert Comment

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

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.


Expert Comment

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).


Expert Comment

ID: 9087639
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 
Post your closing recommendations!  No comment means you don't care.

Expert Comment

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.


EE Cleanup Volunteer

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

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

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

580 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