Lowering DPI of a logitech mouse

From this closed topic https://forums.opensuse.org/showthread.php/533209-Logitech-G3-gaming-mouse-how-to-lower-the-speed-(-lower-then-kde-allows-), I try:

( Logitech M100 on Tumbleweed )

guus@linux-2ls4:~> sudo libinput list-devices
[sudo] wachtwoord voor root: 
sudo: libinput: opdracht niet gevonden
guus@linux-2ls4:~> sudo libinput10 list-devices
[sudo] wachtwoord voor root: 
sudo: libinput10: opdracht niet gevonden
guus@linux-2ls4:~> sudo libinput-udev list-devices
sudo: libinput-udev: opdracht niet gevonden
guus@linux-2ls4:~> sudo libinput list-devices
sudo: libinput: opdracht niet gevonden
guus@linux-2ls4:~> libinput --help
Als 'libinput' geen typefout is dan kunt u command-not-found gebruiken om het pakket op te sporen dat het bevat, zoals deze:
    cnf libinput

I looked in yast and libinput is installed.:confused:

Install libinput-tools first.

I installed ibinput-tools

guus@linux-2ls4:~> xinput list-props 8
Device 'Logitech USB Optical Mouse':
        Device Enabled (148):   1
        Coordinate Transformation Matrix (150): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Natural Scrolling Enabled (308):       0
        libinput Natural Scrolling Enabled Default (309):       0
        libinput Scroll Methods Available (310):        0, 0, 1
        libinput Scroll Method Enabled (311):   0, 0, 0
        libinput Scroll Method Enabled Default (312):   0, 0, 0
        libinput Button Scrolling Button (313): 2
        libinput Button Scrolling Button Default (314): 2
        libinput Middle Emulation Enabled (315):        0
        libinput Middle Emulation Enabled Default (316):        0
        libinput Accel Speed (317):     -0.800000
        libinput Accel Speed Default (318):     0.000000
        libinput Accel Profiles Available (319):        1, 1
        libinput Accel Profile Enabled (320):   1, 0
        libinput Accel Profile Enabled Default (321):   1, 0
        libinput Left Handed Enabled (322):     0
        libinput Left Handed Enabled Default (323):     0
        libinput Send Events Modes Available (293):     1, 0
        libinput Send Events Mode Enabled (294):        0, 0
        libinput Send Events Mode Enabled Default (295):        0, 0
        Device Node (296):      "/dev/input/event1"
        Device Product ID (297):        1133, 49271
        libinput Drag Lock Buttons (324):       <no items>
        libinput Horizontal Scroll Enabled (325):       1
guus@linux-2ls4:~> udevadm info /dev/input/event1 | grep MOUSE_DPI
guus@linux-2ls4:~> sudo mouse-dpi-tool /dev/input/event1
sudo: mouse-dpi-tool: opdracht niet gevonden


udevadm info /dev/input/event1 | grep MOUSE_DPI

seems to do nothing ?

guus@linux-2ls4:~> sudo mouse-dpi-tool /dev/input/event1
sudo: mouse-dpi-tool: opdracht niet gevonden

It can’t find mouse dpi tool

Does anybody know were this gets explained?

Coordinate Transformation Matrix (150): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000

guus@linux-2ls4:~> sudo libinput list-devices
Device:           Logitech USB Optical Mouse
Kernel:           /dev/input/event1
Group:            3
Seat:             seat0, default
Capabilities:     pointer 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   button
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   flat *adaptive
Rotation:         n/a

I am totally lost.

I also installed piper, but when it starts it tells me the gui and backend have not matching versions.

I contacted somebody, who’s name I found in YAST about piper.

When I start piper I get:
In compatible ratbagd API version ( required 1 , provided -1 )
Please update both piper and libratbag to the latest version

Some days, I really hate computers.
They always do what I tell them, but never what I mend :wink:

You need to install ‘libdevdev-tools’ first…

sudo zypper in libdevdev-tools

That means there is no such udev environment variable for this device. What does the following report?

udevadm info /dev/input/event1

Yes, there is information about this here, but I suspect it might still be more complex than you would like…
https://wayland.freedesktop.org/libinput/doc/1.11.3/absolute_axes.html
https://wiki.ubuntu.com/X/InputCoordinateTransformation
and

man 4 libinput

FWIW, a similar thread here

https://forums.opensuse.org/showthread.php/520893-Mouse-DPI-settings/page2

Thakk you, but :

guus@linux-2ls4:~> sudo zypper in libdevdev-tools
[sudo] wachtwoord voor root: 
Gegevens van opslagruimte laden...
Lezen van geïnstalleerde pakketten...
'libdevdev-tools' is niet gevonden in de pakketnamen. Proberen in eigenschappen.
Geen provider van 'libdevdev-tools' gevonden.
Pakketafhankelijkheden oplossen...

Geen activiteit.


I already had looked in yast before this, if I could find libdevdev-tools, but could not.

Do I need to add another repository ?

Thank you, but I had already found it, and have it bookmarked. Shame the topic started did not answer you’re last question. :wink:

guus@linux-2ls4:~> udevadm info /dev/input/event1
P: /devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-6/1-6:1.0/0003:046D:C077.0001/input/input1/event1
N: input/event1
L: 0
S: input/by-path/pci-0000:01:00.0-usb-0:6:1.0-event-mouse
S: input/by-id/usb-Logitech_USB_Optical_Mouse-event-mouse
E: DEVPATH=/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-6/1-6:1.0/0003:046D:C077.0001/input/input1/event1
E: DEVNAME=/dev/input/event1
E: MAJOR=13
E: MINOR=65
E: SUBSYSTEM=input
E: USEC_INITIALIZED=9541997
E: ID_INPUT=1
E: ID_INPUT_MOUSE=1
E: ID_VENDOR=Logitech
E: ID_VENDOR_ENC=Logitech
E: ID_VENDOR_ID=046d
E: ID_MODEL=USB_Optical_Mouse
E: ID_MODEL_ENC=USB\x20Optical\x20Mouse
E: ID_MODEL_ID=c077
E: ID_REVISION=7200
E: ID_SERIAL=Logitech_USB_Optical_Mouse
E: ID_TYPE=hid
E: ID_BUS=usb
E: ID_USB_INTERFACES=:030102:
E: ID_USB_INTERFACE_NUM=00
E: ID_USB_DRIVER=usbhid
E: ID_PATH=pci-0000:01:00.0-usb-0:6:1.0
E: ID_PATH_TAG=pci-0000_01_00_0-usb-0_6_1_0
E: LIBINPUT_DEVICE_GROUP=3/46d/c077:usb-0000:01:00.0-6
E: DEVLINKS=/dev/input/by-path/pci-0000:01:00.0-usb-0:6:1.0-event-mouse /dev/input/by-id/usb-Logitech_USB_Optical_Mouse-event-mouse


Thank you, now I at least understand a bit what all those numbers are. :slight_smile:

I remember using a matrix from another gamer but with a different brand of mouse, and even another distro.
Still it worked a bit, but because I had no clue on what I was doing, I had put that aside for now.

Found it:

https://software.opensuse.org/package/libevdev-tools

guus@linux-2ls4:~> sudo mouse-dpi-tool /dev/input/event1
[sudo] wachtwoord voor root: 
Mouse Logitech USB Optical Mouse on /dev/input/event1
Move the device 250mm/10in or more along the x-axis.
Pause 3 seconds before movement to reset, Ctrl+C to exit.
Covered distance in device units:      307 at frequency 129.9Hz \       ^C        
Estimated sampling frequency: 129Hz
To calculate resolution, measure physical distance covered
and look up the matching resolution in the table below
      19mm          0.77in           400dpi
      12mm          0.51in           600dpi
       9mm          0.38in           800dpi
       7mm          0.31in          1000dpi
       6mm          0.26in          1200dpi
       5mm          0.22in          1400dpi
       4mm          0.19in          1600dpi
       4mm          0.17in          1800dpi
       3mm          0.15in          2000dpi
       3mm          0.14in          2200dpi
       3mm          0.13in          2400dpi
If your resolution is not in the list, calculate it with:
        resolution=307/inches, or
        resolution=307 * 25.4/mm

Entry for hwdb match (replace XXX with the resolution in DPI):
mouse:usb:v046dpc077:name:Logitech USB Optical Mouse:
 MOUSE_DPI=XXX@129


Interesting

According to opensuse software search it is available from the main OSS repo. Check your configured repos perhaps? Or just download it directly from the link.

Sorry, missed your last post. Ok, that means you need to add a custom entry for it as I’ve already in this and other threads.

From the comments at the beginning of 70-mouse.hwdb (which you can read for yourself with an editor)…

To add local entries, create a new file

/etc/udev/hwdb.d/71-mouse-local.hwdb

and add your rules there. To load the new rules execute (as root):

systemd-hwdb update

udevadm trigger /dev/input/eventXX

where /dev/input/eventXX is the mouse in question. If in

doubt, simply use /dev/input/event* to reload all input rules.

If your changes are generally applicable, preferably send them as a pull

request to

GitHub - systemd/systemd: The systemd System and Service Manager

or create a bug report on Issues · systemd/systemd · GitHub and

include your new rules, a description of the device, and the output of

udevadm info /dev/input/eventXX.

Allowed properties are:

ID_INPUT_TRACKBALL

MOUSE_DPI

MOUSE_WHEEL_CLICK_ANGLE

MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL

MOUSE_WHEEL_CLICK_COUNT

MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL

MOUSE_WHEEL_TILT_HORIZONTAL

MOUSE_WHEEL_TILT_VERTICAL

So, create a custom file /etc/udev/hwdb.d/71-mouse-local.hwdb and add

# Logitech USB Optical Mouse
mouse:usb:v046dpc077:name:Logitech USB Optical Mouse:
MOUSE_DPI=800@129

or whatever DPI value ou require here.

When done you need to load the new rules (as root) with

systemd-hwdb update
udevadm trigger /dev/input/event1

Thank you. :slight_smile:

And yes you had told me before, I had to add a custom entry.
I had to catch up with you though, because I had no idea what you mend. Now I understand at least most of what is happening / needed.

I will report back, after I have added my mouse with custom settings.

On a site note.

Had some inner fun when reading this:

Move the device 250mm/10in or more along the x-axis

First thing that came to my mind, was should that not be 254 mm
Has to do with my old job, because of it, I know from the top of my head, how much mm go into an inch.
It expects inch and they explain how to put in mm.

DPI = Dots per inch.

At least something I understand.

And I also now understand what to do with a mouse that support switching between DPI setting. (I might get one)
You then need to add all possible DPI settings, in the hwdb.

(If you’re not happy with the default settings)

Yes, let us know how you get on.

On a site note.

Had some inner fun when reading this:

Move the device 250mm/10in or more along the x-axis

First thing that came to my mind, was should that not be 254 mm
Has to do with my old job, because of it, I know from the top of my head, how much mm go into an inch.
It expects inch and they explain how to put in mm.

DPI = Dots per inch.

At least something I understand.

Yes, it’s also ingrained in my head, although in the context of mouse resolution it’s probably not that crucial.

And I also now understand what to do with a mouse that support switching between DPI setting. (I might get one)
You then need to add all possible DPI settings, in the hwdb.

(If you’re not happy with the default settings)

That’s good.

Update about piper.

To keep it short. https://bugzilla.novell.com/show_bug.cgi?id=1150413

Back to my mouse.

I made a folder called hwdb.d. In there made a txt file, called 71-mouse-local.hwdb. :slight_smile:

In the txt file:

# Logitech USB Optical Mouse
mouse:usb:v046dpc077:name:Logitech USB Optical Mouse:
MOUSE_DPI=800@129 

But when I do as root
systemd-hwdb update
udevadm trigger /dev/input/event1

I get:

/etc/udev/hwdb.d/71-mouse-local.hwdb:3: Property expected, ignoring record with no properties


I don’t get it. Been googling about what and how to put text in the file, and it looks perfect to me.

Hmmm…I got the same initially. Make sure to include a space on the property entry line like this

# Logitech USB Optical Mouse
mouse:usb:v046dpc077:name:Logitech USB Optical Mouse:
 MOUSE_DPI=800@129 


then it should parse correctly. Unnecessarily pedantic IMHO. :slight_smile: