pwr-Solaar / Solaar

Linux device manager for Logitech devices
https://pwr-solaar.github.io/Solaar
GNU General Public License v2.0
5.54k stars 410 forks source link

Rules not working on mx anywhere3 #2079

Closed Force1ess closed 1 year ago

Force1ess commented 1 year ago

Information

``` solaar version 1.1.9 Unifying Receiver Device path : /dev/hidraw0 USB id : 046d:C52B Serial : 06269634 Firmware : 24.11.B0036 Bootloader : 02.09 Other : AA.AC Has 1 paired device(s) out of a maximum of 6. Notifications: wireless, software present (0x000900) Device activity counters: 1=106 1: MX Anywhere 3 Device path : /dev/hidraw3 WPID : 4090 Codename : MX Anywhere 3 Kind : mouse Protocol : HID++ 4.5 Polling rate : 8 ms (125Hz) Serial number: 08F4C739 Model ID: B02540900000 Unit ID: 08F4C739 Bootloader: BL1 13.01.B0015 Firmware: MPM 24.01.B0015 Other: The power switch is located on the base. Supports 33 HID++ 2.0 features: 0: ROOT {0000} V0 1: FEATURE SET {0001} V0 2: DEVICE FW VERSION {0003} V4 Firmware: Bootloader BL1 13.01.B0015 0000AACD8D78 Firmware: Firmware MPM 24.01.B0015 4090AACD8D78 Firmware: Other Unit ID: 08F4C739 Model ID: B02540900000 Transport IDs: {'btleid': 'B025', 'wpid': '4090'} 3: DEVICE NAME {0005} V0 Name: MX Anywhere 3 Kind: mouse 4: WIRELESS DEVICE STATUS {1D4B} V0 5: CONFIG CHANGE {0020} V0 6: CRYPTO ID {0021} V1 7: DEVICE FRIENDLY NAME {0007} V0 Friendly Name: MX Anywhere 3 8: UNIFIED BATTERY {1004} V0 Battery: 75%, discharging. 9: REPROG CONTROLS V4 {1B04} V5 Key/Button Actions (saved): {Left Button:Left Click, Right Button:Right Click, Middle Button:Mouse Middle Button, Back Button:Mouse Back Button, Forward Button:Mouse Forward Button, Smart Shift:Smart Shift} Key/Button Actions : {Left Button:Left Click, Right Button:Right Click, Middle Button:Mouse Middle Button, Back Button:Mouse Back Button, Forward Button:Mouse Forward Button, Smart Shift:Smart Shift} Key/Button Diversion (saved): {Middle Button:Regular, Back Button:Regular, Forward Button:Regular, Smart Shift:Regular} Key/Button Diversion : {Middle Button:Regular, Back Button:Regular, Forward Button:Regular, Smart Shift:Regular} 10: CHANGE HOST {1814} V1 Change Host : 1:forceless-82qq 11: XY STATS {2250} V1 12: ADJUSTABLE DPI {2201} V1 Sensitivity (DPI) (saved): 2000 Sensitivity (DPI) : 2000 13: SMART SHIFT ENHANCED {2111} V0 Scroll Wheel Ratchet Speed (saved): 14 Scroll Wheel Ratchet Speed : 14 14: HIRES WHEEL {2121} V1 Multiplier: 15 Has invert: Normal wheel motion Has ratchet switch: Normal wheel mode High resolution mode HID notification Scroll Wheel Direction (saved): False Scroll Wheel Direction : False Scroll Wheel Resolution (saved): True Scroll Wheel Resolution : True Scroll Wheel Diversion (saved): False Scroll Wheel Diversion : False 15: WHEEL STATS {2251} V0 16: DFUCONTROL SIGNED {00C2} V0 17: DEVICE RESET {1802} V0 internal, hidden 18: unknown:1803 {1803} V0 internal, hidden 19: CONFIG DEVICE PROPS {1806} V7 internal, hidden 20: unknown:1812 {1812} V0 internal, hidden 21: OOBSTATE {1805} V0 internal, hidden 22: unknown:1830 {1830} V0 internal, hidden 23: unknown:1890 {1890} V5 internal, hidden 24: unknown:1891 {1891} V5 internal, hidden 25: unknown:18A1 {18A1} V0 internal, hidden 26: unknown:1E00 {1E00} V0 hidden 27: unknown:1EB0 {1EB0} V0 internal, hidden 28: unknown:1861 {1861} V0 internal, hidden 29: unknown:9001 {9001} V0 internal, hidden 30: unknown:1E22 {1E22} V0 internal, hidden 31: unknown:9205 {9205} V0 internal, hidden 32: unknown:9300 {9300} V1 internal, hidden Has 7 reprogrammable keys: 0: Left Button , default: Left Click => Left Click mse, analytics key events, pos:0, group:1, group mask:g1 reporting: default 1: Right Button , default: Right Click => Right Click mse, analytics key events, pos:0, group:1, group mask:g1 reporting: default 2: Middle Button , default: Mouse Middle Button => Mouse Middle Button mse, reprogrammable, divertable, raw XY, analytics key events, pos:0, group:2, group mask:g1,g2 reporting: default 3: Back Button , default: Mouse Back Button => Mouse Back Button mse, reprogrammable, divertable, raw XY, analytics key events, unknown:000800, pos:0, group:2, group mask:g1,g2 reporting: default 4: Forward Button , default: Mouse Forward Button => Mouse Forward Button mse, reprogrammable, divertable, raw XY, analytics key events, unknown:000800, pos:0, group:2, group mask:g1,g2 reporting: default 5: Smart Shift , default: Smart Shift => Smart Shift mse, reprogrammable, divertable, raw XY, analytics key events, pos:0, group:2, group mask:g1,g2 reporting: default 6: Virtual Gesture Button , default: Virtual Gesture Button => Virtual Gesture Button divertable, virtual, raw XY, force raw XY, pos:0, group:3, group mask:empty reporting: default Battery: 75%, discharging. ```
``` - 1.1.9 - _NAME: MX Anywhere 3 _absent: [hi-res-scroll, lowres-scroll-mode, scroll-ratchet, thumb-scroll-invert, thumb-scroll-mode, onboard_profiles, report_rate, pointer_speed, speed-change, backlight, backlight-timed, fn-swap, persistent-remappable-keys, disable-keyboard-keys, crown-smooth, divert-crown, divert-gkeys, m-key-leds, mr-key-led, multiplatform, gesture2-gestures, gesture2-divert, gesture2-params, sidetone, equalizer, adc_power_management] _battery: 4100 _dpi-sliding: 36 _modelId: B02540900000 _sensitive: {divert-keys: false, dpi: false, smart-shift: false} _serial: 08F4C739 _unitId: 08F4C739 _wpid: '4090' change-host: null divert-keys: {82: 0, 83: 0, 86: 0, 196: 0} dpi: 2000 hires-scroll-mode: false hires-smooth-invert: false hires-smooth-resolution: true reprogrammable-keys: {80: 80, 81: 81, 82: 82, 83: 83, 86: 86, 196: 196} smart-shift: 14 - _NAME: MX Keys Keyboard _sensitive: {hires-scroll-mode: ignore, hires-smooth-invert: ignore, hires-smooth-resolution: ignore} _serial: 8AFD4CB4 _wpid: 408A ```

Describe the bug Defined rules not working. As you can see below, I defined several rules. I clicked every button on my MX anywhere3, and nothing happened. Only one button click have effect in solaar -ddd , I marked this button below , and here is its print 2023-06-04 15:34:30,513,513 DEBUG [MainThread] logitech_receiver.diversion: evaluate rule: Rule[Key: Brightness Up (pressed), KeyPress: XF86_MonBrightnessUp click] 2023-06-04 15:34:30,513,513 DEBUG [MainThread] logitech_receiver.diversion: evaluate condition: Key: Brightness Up (pressed)

Screenshots If applicable, add screenshots to help explain your problem. Screenshot from 2023-06-04 15-25-13

image

image

pfps commented 1 year ago

Solaar rules can only trigger on HID+ notifications, not regular input. So your device has to be able to changes the way a key works to produce notifications and you then have to enable the key to do this via the Key/Button Diversion setting. Looking at the output of solaar show your mouse can only do this for Middle, Back, Forward, and Smart Shift and you have not enabled diversion for any of these keys. So no notifications - no triggering of rules.

From https://pwr-solaar.github.io/Solaar/rules

By the way, it is better to capture more output of solaar -ddd and post that output instead of a screenshot of the output. The output that you post and show does not include the notification that started rule processing.

Force1ess commented 1 year ago

That's right, thank u for ur patience. I read this before but I didn't get that.