Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to install and configure PixlOne's logid to program Logitech MX Master 3 buttons on Linux.

Logitech MX Master 3 Extras for Linux With logiops

The Logitech Options program isn't available for Linux, but a nice hacker on GitHub (PixlOne) created an open source project that lets you obtain some of that functionality. It's called logiops. It works in conjunction with the Solaar project as well, which I find especially handy since that shows your available battery life in the system tray and lets you pair/unpair devices with the Logitech Unifying Receiver.

Here are some additional pages with info that I used to generate this documentation:


Installation instructions for different distributions are available from the developer, but here are the commands for an Ubuntu 20.04 workstation (and I've verified it works with 21.10):

sudo apt install -y cmake libevdev-dev libudev-dev libconfig++-dev
git clone
cd logiops
mkdir build
cd build
cmake ..
sudo make install
sudo touch /etc/logid.cfg
sudo systemctl enable --now logid

My /etc/logid.cfg File

This setup is pretty basic. Although gestures are supported and an example config with that is provided within the GitHub project, the only functionality I wanted to add that I couldn't get from Solaar, was a way to launch the GNOME Activities window (i.e. press the Super/Meta/Logo key) with the mouse. Here's how:

echo 'devices: (
    name: "Wireless Mouse MX Master 3";
        on: true;
        threshold: 10;
        hires: true;
        invert: false;
        target: false;
    dpi: 1000;

    buttons: (
            cid: 0x52;
            action =
                type: "Keypress";
                keys: ["KEY_LEFTMETA"];
);' | sudo tee /etc/logid.cfg 
sudo systemctl restart logid

Programmable Mouse Buttons

Note that I chose to configure the scroll wheel button, but any of the following buttons are available for you to play with:

  • 0x52 - scroll wheel button
  • 0x53 - back button
  • 0x56 - forward button
  • 0xc3 - thumb button (default "Gesture" button with Logitech Options software)
  • 0xc4 - mode shift button (by default toggles between ratchet and free-spin wheel modes)

Extra Notes

Example output running sudo logid -v after creating /etc/logid.cfg:

[ERROR] I/O Error while reading /etc/logid.cfg: FileIOException
[DEBUG] Unsupported device /dev/hidraw1 ignored
[DEBUG] Unsupported device /dev/hidraw2 ignored
[DEBUG] Unsupported device /dev/hidraw0 ignored
[WARN] Error adding device /dev/hidraw4: std::exception
[INFO] Detected receiver at /dev/hidraw3
[INFO] Device Wireless Mouse MX Master 3 not configured, using default config.
[INFO] Device found: Wireless Mouse MX Master 3 on /dev/hidraw3:1
[DEBUG] /dev/hidraw3:1 remappable buttons:
[DEBUG] CID  | reprog? | fn key? | mouse key? | gesture support?
[DEBUG] 0x50 |         |         | YES        | 
[DEBUG] 0x51 |         |         | YES        | 
[DEBUG] 0x52 | YES     |         | YES        | YES
[DEBUG] 0x53 | YES     |         | YES        | YES
[DEBUG] 0x56 | YES     |         | YES        | YES
[DEBUG] 0xc3 | YES     |         | YES        | YES
[DEBUG] 0xc4 | YES     |         | YES        | YES
[DEBUG] 0xd7 | YES     |         |            | YES
[DEBUG] Thumb wheel detected (0x2150), capabilities:
[DEBUG] timestamp | touch | proximity | single tap
[DEBUG] YES       | YES   | YES       | YES       
[DEBUG] Thumb wheel resolution: native (18), diverted (120)
Copy link

Huholoman commented Feb 23, 2022

Why does ot say "Device Wireless Mouse MX Master 3 not configured, using default config."?

Copy link

johnathanmay commented Feb 23, 2022

I'm not sure, but I expect that's just what it says when it initially detects the device. The main reason I added those extra notes was to show the various mouse buttons that can be configured based on their "CID" number.

Copy link

Huholoman commented Feb 23, 2022

Ive bought the mx master 3 today and im trying to change some settings and it writes device not configured... 🙈 ok, ill try to change something and see if mouse behaviour is changed.

Copy link

ipeacocks commented Jul 11, 2022

In 22.04 mouse buttons become default after laptop suspend. But logid service works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment