1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Mouse troubles in Slackware

Discussion in 'Linux and Unix' started by DaijoubuKun, Nov 12, 2007.

Thread Status:
Not open for further replies.
Advertisement
  1. DaijoubuKun

    DaijoubuKun Thread Starter

    Joined:
    Oct 20, 2005
    Messages:
    75
    I have a M$ Intellimouse optical (ps/2) connected mouse. I've done a lot of research and I've been trying to get the side buttons (also known as back and forth) to function.

    By default I boot into a console not a GUI, so to start I run 'gpm -m /dev/mouse -t exps2' so that I have a basic mouse in the shell. Xorg config below:
    Code:
    Section "InputDevice"
      Identifier     "Mouse1"
      Driver         "mouse"
      Option      "Protocol" "ExplorerPS/2"
      Option      "Device" "/dev/input/mice"
      Option      "Buttons" "7"
      Option      "ZAxisMapping" "4 5"
      Option      "ButtonMapping" "1 2 3 4 5 6 7"
    EndSection
    I also run imwheel, however I know I have my config correct there.

    The main problem I seem to be having is the computer (while in linux, works fine in M$) can't pick up on the side buttons. I do a hexdump on both /dev/mouse and /dev/input/mice, I get feedback unless I'm using the side buttons. Anyone know what could be causing this?

    Thanks in Advance
     
  2. lotuseclat79

    lotuseclat79

    Joined:
    Sep 12, 2003
    Messages:
    20,583
    From Slackware's website at:
    http://www.slackware.com/config/x.php

    xorgconfig

    This is a text-based X configuration program that's designed for the advanced system administrator. Here's a sample walkthrough using xorgconfig. First, start the program:

    # xorgconfig

    This will present a screenful of information about xorgconfig. To continue, press enter. xorgconfig will ask you to verify you have set your PATH correctly. It should be fine, so go ahead and hit enter.

    Next, select your mouse from the menu presented. If you don't see your serial mouse listed, pick the Microsoft protocol -- it's the most common and will probably work. Next xorgconfig will ask you about using ChordMiddle and Emulate3Buttons. You'll see these options described in detail on the screen. Use them if the middle button on your mouse doesn't work under X, or if your mouse only has two buttons (Emulate3Buttons lets you simulate the middle button by pressing both buttons simultaneously). Then, enter the name of your mouse device. The default choice, /dev/mouse, should work since the link was configured during Slackware setup. If you're running GPM (the Linux mouse server) in repeater mode, you can set your mouse type to /dev/gpmdata to have X get information about the mouse through gpm. In some cases (with busmice especially) this can work better, but most users shouldn't do this.

    xorgconfig will ask you about enabling special key bindings. If you need this say "y". Most users can say "n" -- enter this if you're not sure.

    -- Tom
     
  3. RobLinux

    RobLinux

    Joined:
    Nov 7, 2007
    Messages:
    417
    Many years back, Mouse Scroll wheel hacks involved using the 4th & 5th buttons, so the side one's will be 6 & 7. When the X server upgraded to suport 3D we had to stop imwheel for some reason I can't remember now.

    Are you trying to use the buttons, purely in console with gpm; or in the X environment? In X it used to not work, because of a limit in the X server; but that's been reworked and IIRC one of the things developers had noticed was the input device stuff was too inflexible.

    In console mode, your clicks are processed just by kernel, unfortunately http://www.mjmwired.net/kernel/Documentation/input/ which discusses 2.6.23 doesn't cover it, and an Linux Magazine article on "Writing Mouse Drivers" and another by Alan Cox "More about Mouse Drivers" are wanting a login.

    Probably the fundamental cause, is Kernel hackers, aren't bothered about these mice, the advantages of button 6 & 7 tend to be lost on someone unused to it. If X does not support 7 button mice, in a particular way then it's unlikely that the console mouse support would be a priority.

    Distro's seem to be dropping gpm, and mouse support on console anyway, as the user base becomes ever more graphics oriented.

    So I'd read the Kernel source, but if you're happy for an X solution then take a look at the Xorg docs and how to define actions on buttons, X is very very flexible, so if they're going to button 7 in the config, they ought to be usable.
     
  4. lotuseclat79

    lotuseclat79

    Joined:
    Sep 12, 2003
    Messages:
    20,583
    Hi DaijoubuKun,

    Here are the instructions from the Ubuntu:Gutsy - Guide: Hopefully, they also work for Slackware!

    Microsoft Intellimouse

    To get the scroll wheel and side buttons to be recognized, change your /etc/X11/xorg.conf mouse section to look like the following:

    Section "InputDevice"
    Identifier "Configured Mouse"
    Driver "mouse"
    Option "CorePointer"
    Option "Device" "/dev/input/mice"
    Option "Protocol" "ExplorerPS/2"
    Option "Buttons" "9"
    Option "ZAxisMapping" "4 5"
    Option "Emulate3Buttons" "true"
    EndSection

    The ZAxisMapping maps the scroll wheel. Setting Buttons to 9 makes the side buttons recognized. You can test in a terminal with xev.

    -- Tom
     
  5. RobLinux

    RobLinux

    Joined:
    Nov 7, 2007
    Messages:
    417
    Interesting, did you notice what buttons 6 & 7 are used for?

    My memory's returning, on the Xfree updates to modular servers and 3D support, the mice were supported better, and X wanted to see the mouse events directly. Previous to that, a pipe was used and that increased mouse latency. This was very important, as until the modular Xfree X server release, xgalaga was only really playable in keyboard mode. The mouse was just too slow to use.

    Point is, you don't want gpm/imwheel in the way, if you're using the X approach, so make sure they're correctly stopped, in the graphical runlevel. With Debian/Ubuntu you'll have to sort it yourself, as way back some vote decided runlevels were an evil over complication and unecessary.
     
  6. DaijoubuKun

    DaijoubuKun Thread Starter

    Joined:
    Oct 20, 2005
    Messages:
    75
    Thank you all for your help, and sorry for the delay, I was out of town unexpectedly. After reading everything throughly I decided to change the mouse to a USB port. I was trying to avoid this because I have many things that plug into USB. Once I did that I was able to do a hexdump of /dev/mouse and the side buttons responded.

    I'm using imwheel so I get back and forth buttons in everything. That makes me very happy.
    Here is my xorg for the mouse
    Code:
    Section "InputDevice"
        Identifier     "Mouse1"
        Driver         "mouse"
        Option      "Protocol" "ExplorerPS/2"
        Option      "Device" "/dev/input/mice"
        Option      "Buttons" "7"
        Option      "ZAxisMapping" "4 5"
    EndSection
    
    even tho I say there are seven buttons xmodmap -pp generates:
    Code:
    There are 11 pointer buttons defined.
    
         Physical     Button
           Button      code
              1             1
              2             2
              3             3
              4             4
              5             5
              6             8
              7             9
              8             6
              9             7
              10           10
              11           11
    
    Then in my imwheelrc file
    Code:
    ".*"
    #None,Thumb1,Alt_L|Left
    #None,Thumb2,Alt_l|Right
    None, Left, Alt_L|Left
    None, Right, Alt_L|Right
    
    I'm going to experiment with this, see if I can set something like ctrl+left changes to another desktop. Altho for the time being it works great.

    Thanks again!
     
  7. RobLinux

    RobLinux

    Joined:
    Nov 7, 2007
    Messages:
    417
    That might be because all the USB HID stuff got re-written, and the USB mouse driver is new enough to know those extra buttons can be used. X used to be limitted (hence the Zaxis 4 & 5 button hack), therefore the PS/2 mouse drive might ignore buttons 6-9. I just couldn't see updated docs, but older stuff.
     
  8. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - Solved Mouse troubles
  1. Sarabjit
    Replies:
    5
    Views:
    812
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/651202

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice