libratbag / libratbag

A DBus daemon to configure input devices, mainly high-end and gaming mice
MIT License
2.08k stars 253 forks source link

Logitech MX Master 3 - Can't assign Macro #993

Open thor27 opened 4 years ago

thor27 commented 4 years ago

When using Logitech MX Master 3 I can't map to macro, the default map for the "thumb" button is marked as UNKNOWN (it seems to be SUPER+TAB).

I would love to map this button to take screenshot as I do on Mac OS X.

I tried to map to other custom buttons, like (button 6) for example but it doesn't work also.

All times it gave an error on piper the message I receive from ratbagd --verbose is:

ratbag error:     HID++ error from the device (3): ERR_INVALID_ARGUMENT (02)
ratbag error: Error while writing profile: 'Protocol error' (-71)
ratbag error: hidpp20: failed to update button (-71)
ratbagd error: error committing device (-1000)

Anyway, it worked to map the "thumb" button to back, left, right and middle click.

Built from git source: libratbag: 8c295479d887d379865fd0596a9d8fc5745f5ed8 piper: 4fab9ccdccbac296e866f9af1dd46a8979f192d1 Ubuntu 20.04

thor27 commented 4 years ago

Testing using ratbagctl

$ ratbagctl list
chanting-squirrel:   Logitech MX Master 3            

$ ratbagctl chanting-squirrel button count
8

$ ratbagctl chanting-squirrel button 7 get
Button: 7 is mapped to UNKNOWN

$ ratbagctl chanting-squirrel button 6 get
Button: 6 is mapped to 'ratchet-mode-switch'

$ ratbagctl chanting-squirrel button 7 get
Button: 7 is mapped to UNKNOWN

$ ratbagctl chanting-squirrel button 7 action set macro KEY_A
Error: assigning a macro is not supported on this device

$ ratbagctl chanting-squirrel button 7 action set button 7
$

It says Macro is not supported, but at least I can map to different button like button 4, it seems to change the behaviour, as the button does not do the SUPER+TAB anymore, but I get no event on xev

FFY00 commented 4 years ago

Which libratbag version?

thor27 commented 4 years ago

I just updated from git master yesterday, head up on 8c29547.

Just to update this:

ratbagctl chanting-squirrel button 7 action set button 7

or any other button number, doesn't give an error but also does nothing (the button keeps mapped from what I mapped previously on Piper).

FFY00 commented 4 years ago

That is weird, can you start ratbagd with verbosity and paste the logs?

ratbagd --verbose=raw
thor27 commented 4 years ago

With piper

Works:

Left mouse button Right mouse button Middle mouse button Backward Forward Ratchet Mode

Fails:

Button 5 click Log: https://pastebin.com/54P0aDJ2 Button 6 click Button 7 click Double click Wheel left Wheel right Wheel up Wheel down Cycle resolution up Cycle resolution down Resolution up Resolution down Resolution switch Default Resolution Cycle Profile up Cycle Profile down Profile up Profile down Second Mode Battery Level Send keystroke

With ratbagctl

The ones that fails with piper gives no error on ratbagctl screen, but prints similar errors on ratbagd output

The ones that works with piper dgives no error at all, but doesn't works

Mapping to button:

builddir/ratbagctl list
chanting-squirrel:   Logitech MX Master 3            

$ builddir/ratbagctl chanting-squirrel button 7 action get
Button: 7 is mapped to UNKNOWN
$ builddir/ratbagctl chanting-squirrel button 7 action set button 1

$ builddir/ratbagctl chanting-squirrel button 7 action get
Button: 7 is mapped to 'button 1'

but doesn't work - LOG: https://pastebin.com/78Nf0z99

I think it might be two different issues. If you need any other logs, just tell me.

zq1997 commented 4 years ago

same problem for Logitech MX Master 2S with v0.13.

ratbagctl cheering-viscacha button 5 action set macro KEY_A
Error: assigning a macro is not supported on this device
FFY00 commented 4 years ago

It's not the same problem. Mapping the key to A is not supported:

Error: assigning a macro is not supported on this device
thor27 commented 4 years ago

Just as information for anyone that want to achieve this in the meantime: I've been using this other project: https://github.com/PixlOne/logiops to achieve custom mapping on my MX Master 3 thumb button. Is not as nice and user friendly as libratbag + piper, but I could fully configure all my mouse buttons the way I wanted.

bdaase commented 4 years ago

@FFY00 But what are the supported macros then? Mapping it to a simple keystroke seems like one of the easiest macros I could make...

glunardi commented 4 years ago

That is weird, can you start ratbagd with verbosity and paste the logs?

ratbagd --verbose=raw

I did not see an actual log attached with the daemon startup. So here it is from my machine https://pastebin.com/sDeLJXcR

Running Linux 5.7.7 with Ubuntu 20.04 libratbag/ratbagd (git) Piper (git)

Facing the same issue reported here (just received the mouse today): can not map a macro to the "thumb" on the Logitech MX Master 3.

Beyond the "thumb" button, it seems I can not assign a keystroke to any of these buttons: button 3, 4 or 5.

Looked for kernel messages but it does not appear hidraw/others put anything useful there by default.

The only visible errors are outputted by ratbag itself: ratbag error: hidpp20: failed to update report rate (-95) ratbagd error: error committing device (-1000)

@FFY00 what would be required to troubleshoot this further please?

FFY00 commented 4 years ago

@BjoernDaase sorry for the delay. Unfortunately I don't know, and I don't have documentation here. I know how this works in the gaming devices, but the productivity line does it in a different way.

@glunardi that is good. It is not the same issue, in your case the report rate is failing to be set. Can you open a different issue so that we can debug there?

I am pretty sure I fixed this, can go through the recent releases and see if any of them work?

corebots commented 3 years ago

Same problem here, updated libratbag to 0.15 from master but still can't change the thumb button on my MX Master 3 :(

adaigre commented 3 years ago

Seems like I have the same issue but with a MX Anywhere 2. Some macros work, the same that the author of this issue. I use libratbag 0.15-1 from Arch repo, 5.9.8-arch1-1 kernel. Using Unifying receiver.

Do I need to open a different issue ? Here is my logs :

igorsantos07 commented 2 years ago

Same using libratbag 0.16 on a MX Master 3.

Piper reports "Something went wrong. The devices has been reset to the previous state" (but without resetting the setting on the UI, I guess I got to report a bug there too). This happens as soon as I click Apply in the Macro selection screen.

kabouzeid commented 2 years ago

same here with MX Master 3 and ratbag 0.16 on Arch

lk-vila commented 2 years ago

Same here. I'm on Fedora 36, with ratbagd 0.16 and using piper as a flatpak

sepehr commented 1 year ago

Same here with libratbag 0.16 MX ergo trackball. Piper throws Something went wrong. The devices has been reset to the previous state.

electroCutie commented 1 year ago

same here with MX Master 3 and ratbag 0.16 on Arch

same MX Master3 and ratbag 0.16 on Xubuntu

cameronj86 commented 1 year ago

One more for MX Master3. Digging around for solutions as it's the last thing keeping me dual booting right now lol

JFCCoding12 commented 8 months ago

Having the same issue on ratbagd version 0.20 (API version 2)

karpiCz commented 4 months ago

Linux mint, official repo, Logitech MX Master 3S - not working.