# Logitech MX-510 howto?

## DesyphIX

Is there anyway to get my MX-510 fully functional on gentoo? I don't want a tutorial on how to get all 7 buttons to work. I need a tutoral on how to make it work at it's full potential (All buttons + Precision)

----------

## magnesium

sure it is possible to get it to work. use the tutorials found on the forums for either the MX500, MX700, or MX900.

stop being lazy

----------

## DesyphIX

Did you read my question? I want it to perform at it's potential, MX510 has different performance specs to my mouse. And so might the others. But i'll use them anyway and see what i can do.

----------

## Valheru

You need to 

```
emerge logitech_applet
```

You can also use an init script I made found in this thread to add it to your startup scripts:

https://forums.gentoo.org/viewtopic-t-257734-highlight-.htmlLast edited by Valheru on Sun Apr 24, 2005 2:35 pm; edited 1 time in total

----------

## Birtz

Any reason why logitech_applet is still masked on amd64? I've been using this tool for months now with no drawbacks.

Cheers

----------

## Headrush

 *Birtz wrote:*   

> Any reason why logitech_applet is still masked on amd64? I've been using this tool for months now with no drawbacks.
> 
> Cheers

 

Doesn't find libusb on my amd64 setup. I have submitted a bug.

----------

## Birtz

You are right. The stable branch of libusb doesn't get recognized by logitech-applet package.

Cheers

----------

## Headrush

 *Birtz wrote:*   

> You are right. The stable branch of libusb doesn't get recognized by logitech-applet package.
> 
> Cheers

 

Are you suggesting that the unstable package of libusb is recognized?

----------

## Valheru

 *Headrush wrote:*   

>  *Birtz wrote:*   You are right. The stable branch of libusb doesn't get recognized by logitech-applet package.
> 
> Cheers 
> 
> Are you suggesting that the unstable package of libusb is recognized?

 

Try it and find out :p  It's only a compile away.

----------

## DesyphIX

 *Quote:*   

> 
> 
> PostPosted: Sun Apr 24, 2005 9:45 pm    Post subject:
> 
> You need to
> ...

 

I emerged logitech_applet and got the following output:

```
emerge: there are no ebuilds to satisfy "logitech_applet".

gentoo root # Mutex destroy failure: Device or resource busy

ICE default IO error handler doing an exit(), pid = 9311, errno = 2

```

[/quote]

----------

## DaSmurf

I got my 510 working very well with this howto with a few modifications:

http://pstudios.ath.cx/linhowtos/mx510.php

Where he mentions the xmodmap command, the line should be 

```
xmodmap -e "pointer = 1 2 3 6 7 8 9 10 4 5"
```

and the logitech applet is listed under 'logitech-applet' in portage.

----------

## DesyphIX

ok thanks, I have followed the instructions but did not add the evdev part to my xorg. I don't think i have evdev. Anyway it's all working nicely except for the two auto-scroll buttons (The one ontop of the scroll, and under it) those two wont work. When i completed the instructions it was all working perfectly (the auto-scroll buttons were working) then i rebooted and done something and now I don't know how to get all the buttons working properly

----------

## r3pek

 *DesyphIX wrote:*   

>  *Quote:*   
> 
> PostPosted: Sun Apr 24, 2005 9:45 pm    Post subject:
> 
> You need to
> ...

 [/quote]

it's 

```
emerge logitech-applet
```

----------

## DesyphIX

 *Quote:*   

> 
> 
> I emerged logitech_applet and got the following output:
> 
> Code:
> ...

 

 *Quote:*   

> 
> 
> it's
> 
> Code:
> ...

 

daSmurf allready told me  :Razz: , but thanks anyway.

 *Quote:*   

> and the logitech applet is listed under 'logitech-applet' in portage.

 

And don't worry about my last post guys. I'm not sure what happend but it's perfect now, Thanks  :Smile: 

----------

## Jahoviah

 *DaSmurf wrote:*   

> I got my 510 working very well with this howto with a few modifications:
> 
> http://pstudios.ath.cx/linhowtos/mx510.php
> 
> Where he mentions the xmodmap command, the line should be 
> ...

 

Hmm... I've tried both your pointer = ... and the one mentioned in the thread you link to but my wheel is still acting up..

I have the scrolling capability on the buttons situated on the right hand side of the mouse instead of on the wheel.

----------

## Headrush

Seems people continually have problems with setting up multi-button mice. 

There are some good tutorials on this forum, but the problem is that if you screw something up or make a mistake, you have several programs modifying mouse inputs and this makes finding the culprit harder and can be frustrating for a noob.

So a few tips.

Make sure you have evdev input working properly and that all your mouse buttons are recognized.

You must insure you have no other programs modifying your mouse inputs.

You can use the program xev to find the original button codes that your mouse buttons are producing and reporting to X.

Your scroll buttons may produce two codes. (The first is the same as scroll wheel and then the scroll lock button)This is OK, record the unique code, not the one that is the same as your scroll wheel.

Many X apps expect button codes 4 and 5 to be the scroll wheel codes. So we use xmodmap to remap/rearranged the button codes produced by our mouse to fit with this X requirement.

This is all xmodmap does, remaps the button codes.

For example

```
xmodmap -e "pointer = 1 2 3 9 10 4 5 6 7 8"
```

. 

```
Button code      Our mouse button

reported to X    code (from xev)

=============    ===============

     1         <-      1

     2         <-      2

     3         <-      3

     4         <-      9

     5         <-      10

     6         <-      4

     7         <-      5

     8         <-      6

     9         <-      7

    10         <-      8

```

This will change for your mouse, but in this example, xev showed that my scroll wheel produced buttons codes 9 and 10.

So using the xmodmap line above, I have said that when button 9 on my mouse is pressed (my scroll wheel up), send button code 4 to X, and when button 10 on my mouse is pressed (my scroll wheel down), send button button code 5 to X.

X only expects 4 and 5 to be the scroll wheel, so buttons 6 - 10 can be any order you please and might not match the example above.

The thing to remember is no matter how many buttons you have, you need to map the appropriate "raw" code produced by your mouse for the scroll wheel to button codes 4 and 5 for X.

You can remap any of the buttons to best fit your situation. For example, my thumb buttons produce buttons codes 6 and 7, but they are the reverse of what I like, so I can 6 -> 7 and 7 -> 6 in xmodmap and they are reversed.

Once you have this working properly, you can use the  logitech-applet to remove the scroll lock feature on the mouse so that the scroll buttons don't produce the scroll wheel code, just the scroll button code.

Depending on your DE, there are various places to put this so it runs automatically. 

Now you can use one of the several key modifier techniques to map mouse buttons to functions in your favorite apps.

(Just make sure you have the above done right first before moving to this)

----------

## Waffle_Fry

when i execute teh xmodmap command i get this error?

xmodmap -e "pointer = 1 2 3 7 6 8 9 10 4 5"

xmodmap:  unable to open display ':0.0'

any ideas? thanks

----------

## Headrush

 *Waffle_Fry wrote:*   

> when i execute teh xmodmap command i get this error?
> 
> xmodmap -e "pointer = 1 2 3 7 6 8 9 10 4 5"
> 
> xmodmap:  unable to open display ':0.0'
> ...

 

Don't run it has root. You probably want to do this as your normal user account.

If you need to do this as root, just give the root user X display permissions.

eg as a user

```
 xhost +local:
```

Now, su into root account and try.

----------

## Sannin

Hello everyone!   :Very Happy: 

Sorry, i have to dig out some old threads but i have faced some problems with my MX 510. With the following section in xorg.conf, it seems tha it does not recognise the two side buttons:

```
Section "InputDevice"

   Identifier   "mouse0"

   Driver      "mouse"

   Option      "CorePointer"

   Option      "Protocol"      "evdev"

   Option      "Dev Name"      "Logitech USB-PS/2 Optical Mouse"

   Option      "Dev Phys"      "usb-0000:00:02.1-3/input0"

   Option      "Device"      "/dev/input/event1"

   Option      "Buttons"      "10"

   Option      "ZAxisMapping"      "4 5"

   Option      "Resolution"      "800"

EndSection
```

In xev output i see no response when i press the side buttons. Any idea?   :Wink: 

----------

