Xorg Mouse Problems

Posted on 2005-04-12
Last Modified: 2008-02-01
Hi i've recently installed Gentoo and everything is up and running pretty well..

The one problem i'm having is that every now and then my mouse is having a little fit, and when I move it, it just jumps all over the place and clicks in rapid succession, and will continue for a few seconds.  Sometimes it will just go away and other times, I have to press something like ALT-TAB or change to a different screen using CTRL-ALT-Fx.  The latter seems to work the best.

I've got a USB Logitech Dual Optical mouse with a PS/2 converter on the end of it, I have a feeling it may be the converter but I can't seem to get the mouse to work just through USB, the light won't even come on.

Here is a message that seems to come up in dmesg directly after I have the problem:

psmouse.c: Explorer Mouse at isa0060/serio1/input0 lost synchronization, throwing 1 bytes away

Any ideas?
Question by:mortar
    LVL 4

    Author Comment

    Fiddled around a bit and recompiled the kernel with different options and have got the mouse usb support working ok.  I'll run it like this for a bit and see if my mouse does funky things..
    LVL 12

    Accepted Solution

    It's actually most likely a threading problem.  Same problems occur in KDE as well as X, Qt, others.

    Keyboards have similar problems because the mouse and keyboard for modern mice are on dual IRQ's 1 and 12.  Regardless of what Plug and Play says.

    IRQ's are not meant to be shared between critical devices, which must have absolute priority to the Interrupt Mask, that is, there are NMI [Non-Maskable Interrupts] which must process instantly, deferring all other proceses and interrupts.  Otherwise, the human loses control of the machine, when, for example, some routine disallows processing of keyboard or mouse interrupts during execution in the middle of such routine.  This leads to what appears to be momentary freezes in mouse and keyboard behavior, and, threads out of order.

    This shows up in a lot of gui programs as trying to type "313" and it coming out as "331"

    The interrupts were handled "out of order" in a multitasking thread scheme which ought never to have happened.  However, since the programmer, erroneously, put an override on the NMI, it did occur.

    I have no doubt that it is in either the core routines of something like X, or whatever gui you are using.

    One look at this: "isa0060/serio1/input0" shows that you are using the mouse as Plug and Play in a Linux system.  This is not so good.  Some IRQ's should remain hardwired, for the sake of NMI, and to avoid the relentless overhead of Plug and Play.  USB I suppose is okay, but I would avoid it preferring instead to use the PS/2 as it is a better performing interface.

    If you use KDE, under the tools orange wrench on taskbar, Control Center | Peripherals | Mouse you will see various ways to control the mouse behavior.  Under Start | System | Info Center | Interrupts you will see what the mouse and keyboard IRQ's are.

    Lost synchronization is probably a race problem with the mouse owing to the fact that the manufacturers forgot something about "twisted pair" in the mouse cabling.  So, the signals tend to "fall over each other" in a highspeed synch scheme.

    USB is slower, so it will probably get by without problems, unless, of course, you require really fast mouse movement.

    LVL 4

    Author Comment

    I no longer receive the problem anymore so I think it's all fixed up.. Thanks for the post, quite a bit of useful information!
    LVL 12

    Expert Comment

    Thank you mortar.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
    Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
    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.:
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now