Page 1 of 42 12311 ... LastLast
Results 1 to 10 of 415

Thread: Configuring Logitech mice (mx500, etc)

  1. #1
    Join Date
    Apr 2005
    Beans
    162
    Distro
    Dapper Drake Testing/

    Configuring Logitech mice (mx500, etc)

    A complete guide to a Logitech mouse

    This is my guide on how to get all the buttons working properly on a logitech mouse, how to use the "logitech_applet" to enable the higher resolutions and cruise control and how to get the side mouse buttons to make forwards and back work in Nautilus and Epiphany.

    This works for my mx510, I assume it would work for the similar mx500 and mx518 and the wireless versions like the mx700 however, I haven't got all those mice so I'd appreciate it if anyone get them working to post a reply and I'll make a list of what works.


    Section 1: Getting your mouse working on USB with evdev

    I once had my mouse plugged in via the PS/2 connector and used the "ExporerPS/2" protocol in my xorg.conf file, this generally worked but the little scroll up button would also make Firefox go back a page. This is not a bug this is because the "ExporerPS/2" is made for Microsoft mice not Logitech. So what can we do about it? Well first off you need to plug your mouse into a USB port, you can't do anything else in this how to until you do that. I have unplugged my mouse from the PS/2 port and plugged it into a USB port while logged into my desktop and it worked fine so go ahead and do that now.


    1. Getting all the information you need

    Great, so we're all plugged in via USB and ready to go. Before we change anything we need to get some important information about the mouse so run the following command in your favourite terminal:

    Code:
    cat /proc/bus/input/devices
    You should get a list of details, here's what I get and I'll highlight the bit we need to concentrate on:

    Code:
    endy@ananke:~$ cat /proc/bus/input/devices
    I: Bus=0003 Vendor=046a Product=0023 Version=0027
    N: Name="046a:0023"
    P: Phys=usb-0000:00:02.0-7/input0
    H: Handlers=kbd event0
    B: EV=120003
    B: KEY=7 ff800000 7ff e0b2ffdf 1cfffff ffffffff fffffffe
    B: LED=1f
    
    I: Bus=0003 Vendor=046a Product=0023 Version=0027
    N: Name="046a:0023"
    P: Phys=usb-0000:00:02.0-7/input1
    H: Handlers=kbd event1
    B: EV=f
    B: KEY=1 0 38000 39fa d841d7a9 9e0000 0 0 0
    B: REL=40
    B: ABS=ffffff01 0
    
    I: Bus=0003 Vendor=046d Product=c01d Version=2100
    N: Name="Logitech USB-PS/2 Optical Mouse"
    P: Phys=usb-0000:00:02.0-8/input0
    H: Handlers=mouse0 event2 ts0
    B: EV=7
    B: KEY=ff0000 0 0 0 0 0 0 0 0
    B: REL=103
    
    I: Bus=0010 Vendor=001f Product=0001 Version=0100
    N: Name="PC Speaker"
    P: Phys=isa0061/input0
    H: Handlers=kbd event3
    B: EV=40001
    B: SND=6
    We know this is the correct bit because the name "Logitech USB-PS/2 Optical Mouse". Your output will be different but the bit I've highlighted is all we need.

    Note: For mx700 users the mouse name is "Logitech USB Receiver", thanks to everyone for the info!

    2. Editing the xorg.conf file

    Now we have the information we need to start to set up xorg. So open up your xorg.conf file in your favourite editor, mine is leafpad but as gedit is on everyone elses install by default you can type:
    Code:
    sudo gedit /etc/X11/xorg.conf
    Now scroll down to the mouse section and instead of deleting it we're going to comment it out, to do this you put a "#" in front of each line in the section, again here is my commented section as an example:

    Code:
    #Section "InputDevice"
    #    Identifier    "Configured Mouse"
    #    Driver        "mouse"
    #    Option        "CorePointer"
    #    Option        "Device"        "/dev/input/mice"
    #    Option        "Protocol"        "ImPS/2"
    #    Option        "Emulate3Buttons"    "true"
    #    Option        "ZAxisMapping"        "4 5"
    #EndSection
    Again, yours might look different, the important bit is to comment the whole section out, but only this section.

    Next up we want to paste in out new section, make a but of room underneath (or above if you prefer) that section we just commented out and paste in the following template:

    Code:
    Section "InputDevice"
            Identifier    "Configured Mouse"
            Driver        "mouse"
        Option        "Protocol"        "evdev"
        Option        "Dev Name"        "Logitech USB-PS/2 Optical Mouse"
        Option        "Dev Phys"        
            Option        "Device"        
        Option        "Buttons"        "10"
        Option        "ZAxisMapping"        "4 5"
    EndSection
    If, when you read the details of the mouse (above) it printed a different name to "Logitech USB-PS/2 Optical Mouse" then edit that so it's right, but I suspect it will be the same. Next you'll have probably noticed there are two fields missing, "Dev Phys" and "Device". We'll fill this in now.

    "Dev Phys" needs the detail from the "Phys" line from the output before, so if you look back at my example mine said "Phys=usb-0000:00:02.0-7/input1" so I would put "usb-0000:00:02.0-7/input1" in or better yet as we can use wild cards I would use "usb-*/input0" which, if anything else, looks better

    "Device" needs the detail from the "Handlers" line, again my example was "Handlers=mouse0 event2 ts0", this time all we need it the name of what "event" it is. For me it's "event2" but before we add it to the xorg.conf file we need to make sure we use the full path which will be "/dev/input/event2".

    DancingSun wisely pointed out that the button numbers after "ZAxisMapping" should be the values of the scroll wheel up and down. Use the "xev" tool in a terminal to check which button numbers these are. That is, you run "xev" in a terminal, hover the mouse over the pop up window and on the mouse push the scroll wheel up. The last line of the output in the terminal will tell you what button number you just pressed. Here is a sample from running xev, I've highlighted the button number:
    Code:
    ButtonPress event, serial 29, synthetic NO, window 0x3a00001,
        root 0x134, subw 0x0, time 10223576, (111,54), root:(126,151),
        state 0x0, button 4, same_screen YES
    
    ButtonRelease event, serial 29, synthetic NO, window 0x3a00001,
        root 0x134, subw 0x0, time 10223576, (111,54), root:(126,151),
        state 0x800, button 4, same_screen YES
    Note the button number down and do the same for the scroll wheel down then put it in the xorg.conf file, scroll up goes first, then scroll down. For mx510 users the above "4 5" is correct.

    DancingSun also has posted a great way to find out exactly how many mouse buttons you actually have for the "Buttons" setting in your xorg.conf file, it's explained best in DancingSun's post which you can read here. Thanks again DancingSun!

    Note: mx700 users report the name needs to be "Logitech USB Receiver" not "Logitech USB-PS/2 Optical Mouse" like it is for my mx510. Please refer to your output from "cat /proc/bus/input/devices" to be sure. Additionally, iverson0881 found that for the mx700 you can use "/dev/input/ts0" to work. Again check your output from earlier as you may need to change it to "ts1" or "ts2" etc... You can see iverson0881's post here.

    Make sure you save the changes to your xorg file.

    So to conclude, here is my example with everything filled in:

    Code:
    Section "InputDevice"
            Identifier    "Configured Mouse"
            Driver        "mouse"
        Option        "Protocol"        "evdev"
        Option        "Dev Name"        "Logitech USB-PS/2 Optical Mouse"
        Option        "Dev Phys"        "usb-*/input0"
            Option        "Device"        "/dev/input/event2"
        Option        "Buttons"        "10"
        Option        "ZAxisMapping"        "4 5"
    EndSection
    Note: If you have another mouse with more or less buttons then you may will have to correct the "Buttons" and "ZAxisMapping" numbers, but mine are correct for the mx510. It may not seem like it has ten buttons but it does if you count every single button


    3. Restart X

    Warning!
    Don't restart X yet! Just before we do I have to warn you if you made a mistake in the xorg file X will not restart. But don't worry that's why we only commented out the previous settings and didn't delete them. If X fails to restart then you will end up in a text console. Log in and type the following to edit the xorg file:

    Code:
    sudo nano /etc/X11/xorg.conf
    All you need to do is comment out the new section we just added by putting a "#" in front of each line and un-commenting the original section by deleting the "#" which is at the start of each line. Save the xorg file in nano by typing "CTRL + X" press "Y" to confirm the save and type "startx" to get back to your desktop and re-read section two carefully and correct your xorg file.


    Ok, I'm ready
    Now we're prepared, restart X by pressing "CTRL + ALT + BACKSPACE" simultaneously and hopefully after a moment you can log back in.


    4. Editing the Xmodmap file

    ** THIS SECTION IS REDUNDANT, SKIP TO SECTION 2 BELOW ** as DancingSun pointed out, using correct "ZAxisMapping" settings in your xorg.conf file is the correct way to have your scroll wheel work. See above about editing your xorg file, I will leave this section here for reference.

    Note: prelude has found you don't necessarily need this step if you are using an mx1000. Thanks prelude!

    You probably already have an Xmodmap file but now we have more buttons available we need to correct it. Open it up with your text editor:
    Code:
    gedit ~/.Xmodmap
    and paste the following, overwriting any previous "pointer" line:
    Code:
    pointer = 1 2 3 6 7 8 9 10 4 5
    Now run xmodmap to apply these settings:
    Code:
    xmodmap ~/.Xmodmap
    If this is the first time you created a .Xmodmap file then next time you log into gnome it will ask you if you want to automatically load it, add the file and click Ok if this happens.

    Now all the buttons should work properly including the little up button above the scroll wheel. The side buttons should also make Firefox go forward and backward a page just like before but they will not work in Nautilus yet. Keep reading to see how to get that to work!

    Note: Again, if you're mouse has more or less buttons then you'll need to figure out what button numbers are the two side buttons, you can do this with the utility "xev" which you run from the terminal, hover the mouse over the pop up box and hold it still and press the side buttons. You'll see some output part of which is a button number. The two button numbers for you mouse go last in the .Xmodmap file, look at mine as an example.
    Section 2: Side buttons and Nautilus

    We can use "xvkbd" and "xbindkeys" to bind the side mouse buttons to "ALT + LEFT" and "ALT + RIGHT" so they work as forward and backwards in Nautilus.


    1. xvkbd and xbindkeys

    Lets install "xvkbd" and "xbindkeys":

    Code:
    sudo apt-get install xvkbd xbindkeys
    Next we need to create the configuration for them:

    Code:
    gedit ~/.xbindkeysrc
    Now paste the following:

    Code:
    "/usr/X11R6/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
      m:0x0 + b:6
    "/usr/X11R6/bin/xvkbd -xsendevent -text "\[Alt_L]\[Right]""
      m:0x0 + b:7
    Please note, the "L" and "R" from the words "left" and "right" in the square brackets above should be capitalised, this seems like a bug in the forums here that they don't display properly.

    Make sure you keep the quote marks, save the file and run "xbindkeys" in the terminal. It runs as a daemon in the background. You should now be able to test if it works in Nautilus by using the side buttons it also works in Epiphany if you use it.

    Note: Same as before, if you have different mouse buttons use xev to find out what number they are and change the "b:6" and "b:7" in the above to the correct numbers.

    2. Adding it to your session

    Now it's working open up the gnome sessions settings "System > Preferences > Sessions" click on the "Startup Programs" tab, click "Add" and enter "xbindkeys". This makes sure it's run each time you log in, you should probably test it by logging out and back in now.
    Section 3: The logitech_applet


    First of all some people use a program called LMCtl instead, but I've never had it working so I use logitech_applet, which isn't an applet by the way This section is for making sure your mouse is using the best resolution it can, making it more accurate which is pretty handy especially in games where that counts like Quake 3


    1. Getting everything we need

    There is no logitech_applet in Synaptic so I just download the source and use the program "checkinstall" to package it and install it, you'll also need the "build-essential" packages which can be quite large so bear this in mind and the "libusb-dev" library. Once this is done you can uninstall it if you want via Synaptic. Ok so lets download and install logitech_applet:

    Code:
    sudo apt-get install checkinstall build-essential libusb-dev
    wget http://freshmeat.net/redir/logitech_applet/53319/url_tgz/logitech_applet-0.4test1.tar.gz
    tar xvfz logitech_applet-0.4test1.tar.gz
    mv ./logitech_applet-0.4test1 ./logitech-applet-0.4test1
    cd ./logitech-applet-0.4test1
    ./configure --prefix=/usr
    make
    sudo checkinstall
    Just hit enter when checkinstall prompts you. Now it should be installed


    2. Working logitech_applet

    I use the command "logitech_applet -s 800 -e" which you can run now:

    Code:
    sudo logitech_applet -s 800 -e
    This sets the mouse resolution to it's maximum 800cpi and makes sure the "cruise control" is enabled, you'll probably have to adjust the mouse settings in gnome as it should be much more accurate now. Type "logitech_applet --help" for more information.


    3. Load on boot

    We need to add this to a start up script so it's done automatically when the machine boots up, to do this I make a file in /etc/init.d/local where I keep local settings, so lets make that now:

    Code:
    sudo gedit /etc/init.d/local
    Now paste the logitech_applet command, mine like the example above is:

    Code:
    echo "Setting up Logitech mouse..."
    logitech_applet -s 800 -e
    I have the echo line so I can check if it works in the boot messages, it's nice but you don't need it.

    To make it executable run the following command:
    Code:
    sudo chmod 755 /etc/init.d/local
    Now run the following command to make the "local" script run when the system boots:
    Code:
    sudo update-rc.d local defaults
    Now the applet loads automatically on boot, huzzah!
    Conclusion

    I think that's everything, phew, this was longer than I expected. I hope it works for you and I haven't made too many mistakes. Please add any corrections and success stories for logitech mice other then the mx510 so we can find out what works. Oh an I can confirm this still works on breezy right now and should still work when it's released.

    Thanks to linux-gamers.net who have some great guides and give me good ideas and everyone who gave me feedback and corrections
    Last edited by endy; November 29th, 2005 at 08:39 PM. Reason: Updates, corrections, layout etc...

  2. #2
    Join Date
    Aug 2005
    Location
    Finland
    Beans
    91
    Distro
    Edgy Eft Testing

    Re: A comeplete guide to a Logitech mouse

    Thanks, will try this @home.

  3. #3
    Join Date
    Feb 2005
    Location
    Heverlee, Belgium
    Beans
    139
    Distro
    Ubuntu 6.06

    Re: A comeplete guide to a Logitech mouse

    Quote Originally Posted by GoA
    Thanks, will try this @home.
    Does this also work with a Logitech Dual Optical

  4. #4
    Join Date
    Feb 2005
    Location
    the netherlands
    Beans
    160
    Distro
    Ubuntu

    Re: A comeplete guide to a Logitech mouse

    This works with Breezy...I got a logitech mx510 and it works great...
    thanks for the great how to....
    couldn't figure out the small buttons on top with the other how to's about extra buttons...

    but this worked great...
    running: Archlinux / Ubuntu :
    system: gigabyte x48t-dq6 / GFX 560 TI

  5. #5
    Join Date
    Aug 2005
    Location
    Finland
    Beans
    91
    Distro
    Edgy Eft Testing

    Re: A comeplete guide to a Logitech mouse

    *) Option "Protocol" "evdev"
    (**) Configured Mouse: Protocol: evdev
    (**) Option "Buttons" "10"
    (==) Configured Mouse: Emulate3Buttons, Emulate3Timeout: 50
    (**) Option "ZAxisMapping" "9 10"
    (**) Configured Mouse: ZAxisMapping: buttons 9 and 10
    (**) Configured Mouse: Buttons: 10
    (**) Configured Mouse: Protocol: evdev
    (**) Option "CorePointer"
    (**) Configured Mouse: Core Pointer
    (**) Option "Buttons" "10"
    (==) Configured Mouse: Emulate3Buttons, Emulate3Timeout: 50
    (**) Option "ZAxisMapping" "9 10"
    (**) Configured Mouse: ZAxisMapping: buttons 9 and 10
    (**) Configured Mouse: Buttons: 10
    (II) XINPUT: Adding extended input device "Configured Mouse" (type: MOUSE)
    (II) XINPUT: Adding extended input device "evdev brain" (type: evdev brain)
    (II) XINPUT: Adding extended input device "Configured Mouse" (type: MOUSE)
    (II) XINPUT: Adding extended input device "Generic Keyboard" (type: KEYBOARD)
    (**) Option "Dev Name" "Logitech USB-PS/2 Optical Mouse"
    (**) Option "Dev Phys" "usb-*/input0"
    (EE) Configured Mouse: cannot open input device
    (**) Option "Dev Name" "Logitech USB-PS/2 Optical Mouse"
    (**) Option "Dev Phys" "usb-*/input0"
    (EE) Configured Mouse: cannot open input device
    No core pointer

    Fatal server error:
    failed to initialize core devices

    Please consult the The X.Org Foundation support
    at http://wiki.X.Org
    for help.
    Please also check the log file at "/var/log/Xorg.0.log" for additional information.

    Didn't work with MX700.

    Here is the cat:

    I: Bus=0003 Vendor=046d Product=c506 Version=1600
    N: Name="Logitech USB Receiver"
    P: Phys=usb-0000:00:02.1-2/input0
    H: Handlers=mouse0 event1 ts0
    B: EV=7
    B: KEY=ffff0000 0 0 0 0 0 0 0 0
    B: REL=103

    And with xorg I used usb-*/input0 and /dev/input/event1. Don't know anymore what happened.

  6. #6

    Re: A comeplete guide to a Logitech mouse

    I also have the Mx 700 but cannot get it to work.

    Code:
    I: Bus=0011 Vendor=0002 Product=0001 Version=0000
    N: Name="PS/2 Logitech Mouse"
    P: Phys=isa0060/serio1/input0
    H: Handlers=mouse0 ts0 event1
    B: EV=7
    B: KEY=70000 0 0 0 0 0 0 0 0
    B: REL=3
    When I change the xorg.conf and put in:

    Code:
    Section "InputDevice"
            Identifier	"Configured Mouse"
            Driver		"mouse"
    	Option		"Protocol"		"evdev"
    	Option		"Dev Name"		"PS/2 Logitech Mouse"
    	Option		"Dev Phys"		"isa0060/serio1/input0"
            Option		"Device"		"/dev/input/event1"
    	Option		"Buttons"		"10"
    	Option		"ZAxisMapping"		"9 10"
    EndSection
    X starts fine, but I am unable to move my mouse. And yes, I do have my mouse plugged into a USB port.

  7. #7
    Join Date
    Apr 2005
    Location
    Sweden
    Beans
    311
    Distro
    Ubuntu Breezy 5.10

    Re: A comeplete guide to a Logitech mouse

    I run in xorg.conf
    Identifier "Configured Mouse"
    Driver "mouse"
    Option "CorePointer"
    Option "Device" "/dev/input/mice"
    Option "Protocol" "ExplorerPS/2"
    Option "Buttons" "7"
    Option "ZAxisMapping" "6 7"

    then installed imwheel and run following script at startup

    #!/bin/sh
    exec xmodmap -e "pointer = 1 2 3 6 7 4 5" &
    exec imwheel -k -b "67" &
    exec $REALSTARTUP

    and finaly you have to put

    ".*"
    None, Up, Alt_L|Left
    None, Down, Alt_L|Right

    "(null)"
    None, Up, Alt_L|Left
    None, Down, Alt_L|Right

    in /etc/X11/imwheel/imwheelrc ( at the bottom is ok)

    This tip is from someone in this forum, couldn't find who should have the credz though, so give them to me for the moment and I will pass them on (or not)
    __________________

    On my logitech MX 700, backward and forward works with nautilus, xffm, firefox...
    Last edited by rejser; September 15th, 2005 at 09:29 PM.
    Vrooom

  8. #8

    Re: A comeplete guide to a Logitech mouse

    Quote Originally Posted by rejser
    I run in xorg.conf
    Identifier "Configured Mouse"
    Driver "mouse"
    Option "CorePointer"
    Option "Device" "/dev/input/mice"
    Option "Protocol" "ExplorerPS/2"
    Option "Buttons" "7"
    Option "ZAxisMapping" "6 7"

    then installed imwheel and run following script at startup

    #!/bin/sh
    exec xmodmap -e "pointer = 1 2 3 6 7 4 5" &
    exec imwheel -k -b "67" &
    exec $REALSTARTUP

    On my logitech MX 700, backward and forward works with nautilus, xffm, firefox...
    I changed my xorg.conf to look like yours, and I ran that script. Now the scroll up and down buttons work, but the thumb buttons also scroll up and down. The lower thumb button scrolls up and the upper thumb button scrolls down. How can I fix this?

  9. #9
    Join Date
    Sep 2005
    Location
    in a corner
    Beans
    18

    Re: A comeplete guide to a Logitech mouse

    howdies

    Ive used this guide on Breezy with a MX1000 mouse, I cant complete the guide, but its not completly fruitless.

    first off, I edited my xorg.conf like this
    Code:
    	Option		"Protocol"		"evdev"
    	Option		"Dev Name"		"Logitech USB RECEIVER"
    	Option		"Dev Phys"		"usb-0000:00:1d.2-2.2/input0"
            Option		"Device"		"/dev/input/event3"
    	Option		"Buttons"		"12"
    	Option		"ZAxisMapping"		"4 5"
    	Option		"Emulate3Buttons"	"false"
    and restarted X (with sudo killall gdm, logged in on a term and did sudo gdm) back in gnome the mouse worked as before the edit, but with one exception.

    the thumbbuttons worked in firefox withouth any other tinkering under the hood the only strangeness was that the wheel-tilt to the right registrers as scroll up while tilt left goes down and the cruise buttons registers as a single 'click' up or down, where it before the editing gave me continius scroll up/down.

    then I installed xvkbd and xbindkeys and with both config files as explained in this howto applied on a MX1000 mouse gives erratic behaviour.

    HOWEVER, if you leave out the xmodmap step the mouse works as expected.
    simply put, with a MX1000 mouse you dont really need xmodmap if you dont plan to use the sidetilt and crouse buttons. if you do want to use xmodmap with this guide you need to put

    Code:
    pointer = 1 2 3 4 5 6 7 8 9 10 11 12
    into the .Xmodmap file.

    as you can see, the mousebutton-layout in xmodmap doesnt swap around any buttons. (atleast with me, youre milage may vary)
    note. when xmodmap is used the continius scrolling by holding down one of the cruisebuttons works again with me.

    here ends my experience, Ive havent got past the installation of the logitec applet, when I try to install it this happens.

    Code:
    checking for usb.h... no
    
       ERROR!  libusb header not found, get it from
       http://libusb.sourceforge.net
       or use the --with-libusb-includes option, if you have it installed
       in an unusual place
    now Ive checked with synaptic, I have libusb. Ive tried re-installing it, Ive tried removing it completly and then installing it again but to no avail and I have no clue where the include files might be

    ahhwell..

    my thumb buttons works, thats the important stuff.

  10. #10
    Join Date
    Apr 2005
    Beans
    162
    Distro
    Dapper Drake Testing/

    Re: A comeplete guide to a Logitech mouse

    Goa, I notice from the output of "cat /proc/bus/input/devices" you get Name="Logitech USB Receiver", try using that name in the xorg.conf file like this:
    Code:
    "Dev Name"		"Logitech USB Receiver"
    I hope this works

    souled, this is strange. It would look like the "event0" is maybe not the right one. What you can do to make sure is "ls /dev/input" and go through trying to cat each event as root and try moving your mouse. If you get loads of garbage in the terminal when you move the mouse then that "event*" is the right one. Here is an example of what I mean:

    Code:
    cat /dev/input/event0
    If when you move the mouse nothing happens try /dev/input/event1 etc... Hopefully one of them will work and use that in your xorg.conf.

    prelude, thanks for the update on the mx1000 and the Xmodmap file, I've updated the guide I also noticed that I did miss out the need to install the "libusb-dev" library to compile the logitech_applet, again I've updated the guide with "sudo apt-get install libusb-dev"
    Last edited by endy; September 15th, 2005 at 09:36 PM.

Page 1 of 42 12311 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •