How to change mouse DPI?

Mouse is SteelSeries Rival 100, which has a DPI of 250 to 4000.

I have absolutely no idea how to change it. Googling it doesn't bring up anything either.

How do I change it? Through the command-line is fine.


Solution 1:

I am unable to test the mouse itself as I do not own the hardware but it looks like there is a nice command line utility called rivalcfg available for Linux to manipulate many of the settings including DPI.

To install rivalcfg run the following:

sudo apt-get install python-pip
sudo pip install rivalcfg

Test your installation of rivalcfg and make sure that your copy covers your mouse (which I have arrowed in!):

andrew@ilium:~$ rivalcfg -l
SteelSeries Rival                             1038:1384   
SteelSeries Rival 100                         1038:1702   <-------
SteelSeries Rival 300                         1038:1710   
SteelSeries Rival 300 CS:GO Fade Edition      1038:1394   
SteelSeries Rival 300 CS:GO Hyperbeast Edition 1038:171a   
andrew@ilium:~$ 

Then you should have access to two preset DPI options from the command line:

-s SENSITIVITY1, --sensitivity1=SENSITIVITY1
                    Set sensitivity preset 1 (values: 250, 500, 1000,
                    1250, 1500, 1750, 2000, 4000, default: 1000)
-S SENSITIVITY2, --sensitivity2=SENSITIVITY2
                    Set sensitivity preset 2 (values: 250, 500, 1000,
                    1250, 1500, 1750, 2000, 4000, default: 2000)

The usage is simply:

Usage: rivalcfg [options]

and the complete command line options can be seen here...

Solution 2:

KISS - Keeping It Simple Solution

My wireless Logitech MX Performance mouse has DPI of 400 to 1600. To set the speed in Ubuntu I go to System Settings -> Mouse & Touchpad which brings up this display:

Mouse speed

Sliding the "Mouse pointer speed" changes the DPI rate for comfortable use. In Windows Logitech also recommends setting the DPI by sliding the Mouse Pointer Speed. Specifically it says:

  1. Under Pointer speed, adjust the slider to your preferred DPI value. The minimum value is 400 DPI. The speed can be increased in increments of 200, up to a maximum of 1600 DPI.

The more complicated solution

Some report that for gaming mice the slowest pointer speed setting (above) is still too "insanely fast". In this situation you need to find the xinput name for your mouse using xinput --list --short:

rick@dell:~$ xinput --list --short
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech Performance MX                   id=11   [slave  pointer  (2)]
⎜   ↳ Logitech K800                             id=12   [slave  pointer  (2)]
⎜   ↳ AlpsPS/2 ALPS GlidePoint                  id=15   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ Power Button                              id=9    [slave  keyboard (3)]
    ↳ Sleep Button                              id=10   [slave  keyboard (3)]
    ↳ Laptop_Integrated_Webcam_HD               id=13   [slave  keyboard (3)]
    ↳ Dell WMI hotkeys                          id=16   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=14   [slave  keyboard (3)]

From the list we see the mouse is named "Logitech Performance MX".

Next we need the details of the mouse using xinput --list-props "Logitech Performance MX":

Device 'Logitech Performance MX':
    Device Enabled (139):   1
    Coordinate Transformation Matrix (141): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (268): 0
    Device Accel Constant Deceleration (269):   1.000000
    Device Accel Adaptive Deceleration (270):   1.000000
    Device Accel Velocity Scaling (271):    10.000000
    Device Product ID (257):    1133, 4122
    Device Node (258):  "/dev/input/event8"
    Evdev Axis Inversion (272): 0, 0
    Evdev Axes Swap (274):  0
    Axis Labels (275):  "Rel X" (149), "Rel Y" (150), "Rel Horiz Wheel" (266), "Rel Vert Wheel" (267)
    Button Labels (276):    "Button Left" (142), "Button Middle" (143), "Button Right" (144), "Button Wheel Up" (145), "Button Wheel Down" (146), "Button Horiz Wheel Left" (147), "Button Horiz Wheel Right" (148), "Button Side" (261), "Button Extra" (262), "Button Forward" (263), "Button Back" (264), "Button Task" (265), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260)
    Evdev Scrolling Distance (277): 1, 1, 1
    Evdev Middle Button Emulation (278):    0
    Evdev Middle Button Timeout (279):  50
    Evdev Third Button Emulation (280): 0
    Evdev Third Button Emulation Timeout (281): 1000
    Evdev Third Button Emulation Button (282):  3
    Evdev Third Button Emulation Threshold (283):   20
    Evdev Wheel Emulation (284):    0
    Evdev Wheel Emulation Axes (285):   0, 0, 4, 5
    Evdev Wheel Emulation Inertia (286):    10
    Evdev Wheel Emulation Timeout (287):    200
    Evdev Wheel Emulation Button (288): 4
    Evdev Drag Lock Buttons (289):  0

We need to multiply the constant deceleration above by 5 (recommended for gaming mice) using:

xinput --set-prop "Logitech Performance MX" "Device Accel Constant Deceleration" 5

Again 5 is recommended. On my platform (1600 DPI mouse) I used 2 (double slow) and had to increase the Ubuntu Mouse Pointer Speed slider bar from 1/3 to about 7/8.

If the above doesn't work, other recommended settings for gaming mice are:

xinput --set-prop "Logitech Performance MX" "Device Accel Velocity Scaling" 1
xinput --set-prop "Logitech Performance MX" "Device Accel Profile" -1

NOTE: Replace "Logitech Performance MX" above with the mouse name your xinput reports.

NOTE: The above changes are for Ubuntu 10.04 - 16.10. For Ubuntu 17.04 see Lowering Mouse Sensitivity in Ubuntu and Fedora where the bulk of this information comes from.

Special thanks to Q&A that popped up this afternoon: Corsair M95 Gaming Mouse too sensitive / speed too fast. How to reduce speed?