Logitech Options on Linux
I am a new ubuntu user and want to use my machine to it’s full extent, so I looked for Logitech Options software for my Logitech MX Master 2s on linux, but found nothing. Will the software run through Wine? If not, is there any other way to install Logitech Options or get to customize the functions of macro buttons and the thumb wheel?
If you’re looking for pairing, and some general options configuration, install Solaar . Don’t bother with WINE IMHO.
11 Answers 11
I was having the same problem as you did/do. The solution that I found to address this issue was installing Solaar.
This application allows you to manage Logitech devices. I have a Logitech 400 plus (A keyboard with a mouse) and with that, I can achieve the things that I needed to change.
sudo apt install solaar solaar
And you’re going to see on the top right corner a battery icon indicating the battery remaining on your device. Hope this helps you!
I needed to install a newer version as my OS (Ubuntu 20.04) only installed version 1.0.1 by default. This is known potential issue as pointed out on the GitHub page. The older version did not find my MX Master 3S, but the new one (1.1.4) did it perfectly!
There is an unofficial driver logiops for Logitech mice and keyboards which works for me with Ubuntu 18.04 and Manjaro and the MX Master 2S and 3S.
Features include but not limited to:
- thumb button with gestures,
- smartshift scrolling with an individual threshold
- individual dpi settings.
See this answer on how to install and configure the driver.
The Flow feature is not yet implemented but there seems to exist an alternative for Windows/Linux/Mac called barrier.
Been trying to use Flow with my k850/m720 kit even with Windows/Mac it was hit & miss. Barrier is awesome and now using it with Deepin and Win10. Thanks!
Barrier is awesome until you need national characters like ó ł ę etc. Because it is unable to properly send the altGr+? combination. There are hacks but it is not perfect.
As it stands Logitech Options is not available for Linux and it does not appear to be running in WINE. You could always check the WINE website for more information, but it looks like there is nothing yet.
You should always checkout the Arch Linux Wiki for help. Here is the article covering the MX Master.
Piper might be what you are looking for.
Piper is a GTK+ application to configure gaming mice. Piper is merely a graphical frontend to the ratbagd DBus daemon, see the libratbag README for instructions on how to run ratbagd
sudo apt install solaar solaar
This was the answer for me. I used it to enable a unifying USB receiver, and share it with an ERGO K860 keyboard and an MX ERGO trackball. Solaar will detect all devices paired with supported Unifying, Lightspeed, or Nano receivers, and at the very least display some basic information about them. A really excellent utility. Props to @vito genovese for the heads-up.
I installed using this guide, but the version was old. Install solaar by using this official solaar guide to get the latest version
After trying many other solutions listed here, logiops has worked great so far: custom button-mapping, gesture support, smart shift, etc. Nearly every LogiOptions feature seems to be supported by it. I’m running Ubuntu 20.04.4 LTS and using an MX Master 3.
Folks may be put off by it because there’s no GUI, and build and installation aren’t trivial (I had a problem where cmake couldn’t find libevdev). That being said, Danish Shakeel’s Configure Logitech MX Master 3 on Linux blog post helped quite a bit, especially for getting started with the configuration file. The documentation for the configuration file is quite good, but it can get a little tricky and there aren’t many examples out there aside from the example in the repository.
For what it’s worth, here’s my configuration (located at /etc/logid.cfg by default):
devices: ( < name: "Wireless Mouse MX Master 3"; smartshift: < on: true; threshold: 30; default_threshold: 30; >; hiresscroll: < hires: true; invert: true; target: false; >; dpi: 1700; buttons: ( < cid: 0x52; // scroll wheel button action = < type: "Keypress"; keys: [ "KEY_RIGHTMETA" ]; // open activities overview >>, < cid: 0x53; // back button action = < type: "Keypress"; keys: [ "KEY_RIGHTMETA", "KEY_PAGEDOWN" ]; // move to previous space >>, < cid: 0x56; // forward button action = < type: "Keypress"; keys: [ "KEY_RIGHTMETA", "KEY_PAGEUP" ]; // move to next space >>, < cid: 0xc4; // mode shift button action = < type: "Keypress"; keys: [ "KEY_RIGHTMETA", "KEY_A" ]; // show applications >> ); > );
For mapping keyboard shortcuts, refer to /usr/include/linux/input.h.
Logitech MX Master
The mouse should work with no special configuration if using the unified receiver USB dongle. Plug in the dongle and make sure that it is set to channel one by pressing the switch button. If you want to connect to an unconnected receiver, see Logitech Unifying Receiver
To use Bluetooth, change the channel on the bottom of the mouse, and click the connect button. Now, search for the mouse with a Bluetooth manager of your choice and pair. In future it should connect as soon as you switch to that channel when your Bluetooth is active. If you have problems with the mouse not showing when scanning, see Bluetooth#Device does not show up in scan.
The mouse exists in 3 major versions, the latest iteration having 5 revisions, but the functionalities are the same:
Mappings for extra buttons
Install logiops AUR or logiops-git AUR to customize mouse settings:
- Easy programmable buttons.
- DPI selection.
- Smartshift (hyperfast and click-to-click wheel mode).
- HiresScroll.
- Gestures.
As of August 2022, logiops does not (yet) support devices connected via the new bolt receiver. Refer to Wikipedia:List of Logitech products for a list of bolt-based devices. All bolt-based devices available in the market also have Bluetooth connectivity. Thus using Bluetooth instead can be a workaround.
It is possible to use just #Xbindkeys and tweak the desktop shortcuts to obtain some customization, but with some caveats (look notes below).
Logiops
It can be executed as application via command line by running
The configuration lives in /etc/logid.cfg . But the package comes with no configuration. One needs to create this specifying the name of the device to be used. To obtain that name launching from cli
The name of the detected device is printed.
Then you can create the configuration file.
Examples
This minimal configuration file simply makes each button work as a normal mouse button, ignoring gestures. It will allow the extra buttons to be used normally, such as in games and by Xbindkeys (see below).
devices: (< name: "Wireless Mouse MX Master 3"; // A lower threshold number makes the wheel switch to free-spin mode // quicker when scrolling fast. smartshift: < on: true; threshold: 20; >; hiresscroll: < hires: true; invert: false; target: false; >; // Higher numbers make the mouse more sensitive (cursor moves faster), // 4000 max for MX Master 3. dpi: 1500; buttons: ( // Make thumb button 10. < cid: 0x53; action = < type: "Keypress"; keys: ["KEY_FORWARD"]; >; >, // Make top button 11. < cid: 0x56; action = < type: "Keypress"; keys: ["KEY_BACK"]; >; > ); >);
For a more fully-featured configuration, see logid.example.cfg or this one:
devices: ( < name: "Wireless Mouse MX Master 3"; smartshift: < on: true; threshold: 30; >; hiresscroll: < hires: true; invert: false; target: false; >; thumbwheel: < divert: true; invert: false; left: < mode: "OnInterval" pixels: 2 action: < type: "Keypress" keys: ["KEY_VOLUMEDOWN"] >> right: < mode: "OnInterval" pixels: 2 action: < type: "Keypress" keys: ["KEY_VOLUMEUP"] >> tap: < type: "Keypress" keys: ["KEY_MUTE"] >>; dpi: 1000; buttons: ( < cid: 0xc3; action = < type: "Gestures"; gestures: ( < direction: "Up"; mode: "OnRelease"; action = < type: "Keypress"; keys: ["KEY_LEFTCTRL", "KEY_F10"]; >; >, < direction: "Down"; mode: "OnRelease"; action = < type: "Keypress"; keys: ["KEY_LEFTCTRL", "KEY_F7"]; >; >, # < # direction: "Left"; # mode: "OnRelease"; # action = # < # type: "CycleDPI"; # dpis: [50, 500, 1000, 1500, 2000, 3000, 4000]; # >; # >, < direction: "Left"; mode: "OnRelease"; action = < type: "Keypress"; keys: ["KEY_LEFTMETA", "KEY_LEFT"]; >; >, # < # direction: "Right"; # mode: "OnRelease"; # action = # < # type = "ToggleHiresScroll"; # ># >, < direction: "Right"; mode: "OnRelease"; action = < type: "Keypress"; keys: ["KEY_LEFTMETA", "KEY_RIGHT"]; >>, < direction: "None" mode: "NoPress" >); >; >, < cid: 0xc4; action = < type = "ToggleSmartshift"; >; >, < # Next tab instead of fwd in history, Comment to default behavior cid: 0x53; action = < type : "Keypress"; keys: ["KEY_LEFTCTRL", "KEY_PAGEUP"]; >; >, < # Previous tab instead of back in history, Comment to default behavior cid: 0x56; action = < type : "Keypress"; keys: ["KEY_LEFTCTRL", "KEY_PAGEDOWN"]; >; > ); >, < # Another device to configure name: "Other Logitech USB Receiver"; >);
Xbindkeys
List of events sent by mouse:
Physical action | Defaults as | With minimal logid configuration above |
---|---|---|
Left button | button 1 | button 1 |
Press to wheel | button 2 | button 2 |
Right button | button 3 | button 3 |
Scroll wheel up | button 4 | button 4 |
Scroll wheel down | button 5 | button 5 |
Scroll hor_wheel right (up) | button 6 | button 6 |
Scroll hor_wheel left (down) | button 7 | button 7 |
Side-bottom button | button 8 | button 8 |
Side-top button | button 9 | button 9 |
Thumb button | Ctrl+Alt+Tab | button 10 |
Press «i» button under wheel | Not detected by xbindkeys | button 11 |
- It is impossible to move mouse cursor while thumb button is pressed, but possible to use any other actions (pressing buttons and scrolling wheels). Ctrl+Alt+Tab event is sent only after releasing thumb button. Using logid to reassign this button removes this limitation.
- If you wish, you can get experience of thumb button like in Windows or Mac. In KDE go to System settings > Shortcuts > Global Shortcuts > KWin > Show all windows from all desktops. It is set to Ctrl+F10 by default. Set Ctrl+Alt+Tab for this action and apply settings.
- «I» button under wheel is undetectable in Linux by default, but works as switching wheel between free and rattle mode. With logid it can be reassigned for use.
- Logitech gestures (moving mouse up/down/left/right while thumb pressed) are not detected in Linux, but are implemented in software by logid.
The vertical wheel and the two buttons near it should work right away, however the thumb button requires some special treatment, and you might want to remap the rest.
To remap the buttons of the mouse you can use the packages xbindkeys and xautomation .
xbindkeys will redirect the buttons and xte (which is included in xautomation) will execute the custom key presses. To do so, create a configuration file named .xbindkeysrc in your home directory.
Here is a sample configuration for the vertical scroll wheel and the two buttons near it:
# thumb wheel up => increase volume and unmute "amixer -D pulse set Master 4000+ unmute" b:6 # thumb wheel down => lower volume "amixer -D pulse set Master 4000-" b:7 # backward button => previous song "xte 'key XF86AudioPrev'" b:8 # forward button => next song "xte 'key XF86AudioNext'" b:9
If using PulseAudio (more info here):
# thumb wheel up => increase volume "pactl set-sink-volume @DEFAULT_SINK@ +2%" b:6 # thumb wheel down => lower volume "pactl set-sink-volume @DEFAULT_SINK@ -2%" b:7
If you prefer to get a visual feedback on how the volume level changes you could use the following lines instead (Tested in GNOME and KDE)
# thumb wheel up => increase volume "xte 'key XF86AudioRaiseVolume'" b:6 # thumb wheel down => lower volume "xte 'key XF86AudioLowerVolume'" b:7
Now start xbindkeys , preferably add that to the autostart list of your desktop environment.
The thumb button is special. With the Logitech software available for Windows and Mac, you would be able to map up to 5 actions to it: by pressing the button or by pressing the button and moving the mouse in one of four directions. As of November 2015, there is no way to enable the direction feature using Arch.
If you look at the keys the button triggers you will notice that it sends a series of keys, confusing xbindkeys. You need to add a short sleep here so xbindkeys will only react on the first keys send so we can at least map one action to it:
# thumb button => play/pause music # Credit to gregmuellegger https://bbs.archlinux.org/viewtopic.php?pid=1551271#p1551271 # We need a sleep here since the button triggers a few more key codes. # It also triggers Control+Mod2+Control_L and Alt+Mod2+Alt_L. The sleep # prevents that X receives those keypresses simultaniously. Therefore they # might interfere and trigger unwanted actions. By the sleep we make sure that # the Alt+Left is receive as distinct event. "sleep 0.1 && xte 'key XF86AudioPlay'" m:0xc + c:23
Remember that all changes to ~/.xbindkeysrc require a restart of the xbindkeys process:
$ pkill xbindkeys && xbindkeys
Power
Battery status can be read as described on Logitech Unifying Receiver. e.g. Solaar ( solaar ) has a system tray utility.
Smart shift
Smart shift is where the scroll wheel switches from click-to-click to smooth scrolling automatically, based on the speed at which it is being spun.
Logiops
Any mouse button can be assigned to switch between modes. The default settings are with the smart-shift threshold around 20 and the top button (just below the wheel) used to toggle between always-smooth and smart-shift (clicky when scrolling slowly only). Increasing the threshold number requires the wheel to be spun faster before it will switch into smooth-scrolling mode.
To reproduce the default settings, use this snippet in the configuration file as shown above:
. smartshift: < on: true; threshold: 20; >; buttons: ( // Make top button (0xc4) switch modes < cid: 0xc4; action = < type = "ToggleSmartshift"; >; >, .
Change the threshold or use a different button (cid) as needed.
Solaar
Instead of logid, Solaar can also be used to change the sensitivity of changing the mouse wheel mode (between hyperfast and click-to-click), install solaar . A slider appears that can be set somewhere between 0 and 50 (inclusive). 0 means always in hyperfast mode, 50 means always in click-to-click mode.
To change the sensitivity, change this value somewhere between 0 and 50.
Troubleshooting
Laggy mouse movements in Bluetooth mode
Thumbwheel horizotal scrolling behavior different (inverted) compared to under Windows
This is a known behavior added in libinput ([1]) to correct the weird behavior (quirks) that the vertical/horizontal scroll wheels of this mouse (and many other Logitech products, too) is configured differently. However if one is to use this mouse on different operating systems frequently and finds this autocorrection behavior inconvenient, it is possible to specifically turn it off:
/etc/libinput/local-overrides.quirks
. [Logitech MX Master 3] MatchVendor=0x46D MatchProduct=0x4082 ModelInvertHorizontalScrolling=0 # MX Master 3 has a different PID on bluetooth [Logitech MX Master 3] MatchVendor=0x46D MatchProduct=0xB023 ModelInvertHorizontalScrolling=0 .
See also [2] for a list of quirks patched for other devices.