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

MX Anywhere 3 scrolling very slowly while Solaar is running #1977

Closed JonathanHolvey closed 1 year ago

JonathanHolvey commented 1 year ago

Information

``` solaar version 1.1.8+dfsg-2 Unifying Receiver Device path : /dev/hidraw1 USB id : 046d:C52B Serial : 8583984A 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=1 1: MX Anywhere 3 Device path : /dev/hidraw7 WPID : 4090 Codename : MX Anywhere 3 Kind : mouse Protocol : HID++ 4.5 Polling rate : 8 ms (125Hz) Serial number: 13858634 Model ID: B02540900000 Unit ID: 13858634 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: 13858634 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: 100%, 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 Forward Button, Forward Button:Mouse Back Button, Smart Shift:Smart Shift} Key/Button Actions : {Left Button:Left Click, Right Button:Right Click, Middle Button:Mouse Middle Button, Back Button:Mouse Forward Button, Forward Button:Mouse Back 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:jons-computer 11: XY STATS {2250} V1 12: ADJUSTABLE DPI {2201} V1 Sensitivity (DPI) (saved): 1000 Sensitivity (DPI) : 1000 13: SMART SHIFT ENHANCED {2111} V0 Scroll Wheel Ratchet Speed (saved): 12 Scroll Wheel Ratchet Speed : 12 14: HIRES WHEEL {2121} V1 Multiplier: 15 Has invert: Normal wheel motion Has ratchet switch: Normal wheel mode Low resolution mode HID notification Scroll Wheel Direction (saved): False Scroll Wheel Direction : False Scroll Wheel Resolution (saved): False Scroll Wheel Resolution : False 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 Forward 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 Back 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: 100%, discharging. ```
``` - 1.1.8+dfsg-2 - _NAME: Anywhere Mouse MX 2 _absent: [hi-res-scroll, lowres-scroll-mode, scroll-ratchet, smart-shift, 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] _battery: 4096 _modelId: B013404A0000 _serial: 653EDF50 _unitId: 4014B9C2 _wpid: 404A change-host: null divert-keys: {82: 0, 83: 0, 86: 0, 91: 0, 93: 0} dpi: 1000 hires-scroll-mode: false hires-smooth-invert: false hires-smooth-resolution: true reprogrammable-keys: {80: 80, 81: 81, 82: 82, 83: 83, 86: 86, 91: 91, 93: 93} - _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] _battery: 4100 _modelId: B02540900000 _sensitive: {divert-keys: false, reprogrammable-keys: false, smart-shift: true} _serial: '13858634' _unitId: '13858634' _wpid: '4090' change-host: null divert-keys: {82: 0, 83: 0, 86: 0, 196: 0} dpi: 1000 hires-scroll-mode: false hires-smooth-invert: false hires-smooth-resolution: false reprogrammable-keys: {80: 80, 81: 81, 82: 82, 83: 86, 86: 83, 196: 196} ```

Output from solar -dd:

2023-01-30 21:22:59,555,555     INFO [MainThread] root: language en_GB (UTF-8), translations path None
2023-01-30 21:22:59,701,701     INFO [MainThread] logitech_receiver.diversion: GDK Keymap set up
2023-01-30 21:22:59,701,701  WARNING [MainThread] logitech_receiver.diversion: rules cannot access active process or modifier keys in Wayland
2023-01-30 21:22:59,701,701  WARNING [MainThread] logitech_receiver.diversion: cannot create uinput device: "/dev/uinput" cannot be opened for writing
2023-01-30 21:22:59,712,712     INFO [MainThread] solaar.upower: connected to system dbus, watching for suspend/resume events
2023-01-30 21:22:59,744,744     INFO [MainThread] solaar.ui.notify: starting desktop notifications
2023-01-30 21:22:59,789,789     INFO [MainThread] solaar.listener: starting receiver listening threads
2023-01-30 21:22:59,790,790  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for BID 0003 VID 000005AC PID 0000024F: No module named 'hid_parser'
2023-01-30 21:22:59,791,791  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for BID 0003 VID 000005AC PID 0000024F: No module named 'hid_parser'
2023-01-30 21:22:59,791,791  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for BID 0003 VID 0000046D PID 0000C52B: No module named 'hid_parser'
2023-01-30 21:22:59,792,792     INFO [MainThread] hidapi.udev: Found device BID 0003 VID 0000046D PID 0000C52B HID++ None None USB 2 2
2023-01-30 21:22:59,792,792     INFO [MainThread] solaar.listener: receiver event add DeviceInfo(path='/dev/hidraw1', bus_id=3, vendor_id='046D', product_id='C52B', interface=2, driver='logitech-djreceiver', manufacturer=None, product=None, serial='', release=None, isDevice=None, hidpp_short=None, hidpp_long=None)
2023-01-30 21:22:59,792,792     INFO [MainThread] logitech_receiver.base: New lock 17
2023-01-30 21:22:59,795,795     INFO [ReceiverListener:hidraw1] logitech_receiver.listener: started with <UnifyingReceiver(/dev/hidraw1,17)> (17)
2023-01-30 21:22:59,795,795     INFO [ReceiverListener:hidraw1] solaar.listener: <UnifyingReceiver(/dev/hidraw1,17)>: notifications listener has started (17)
2023-01-30 21:22:59,795,795     INFO [ReceiverListener:hidraw1] logitech_receiver.base: New lock <_ThreadedHandle(/dev/hidraw1)>
2023-01-30 21:22:59,795,795  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for BID 0003 VID 00000451 PID 000082FF: No module named 'hid_parser'
2023-01-30 21:22:59,796,796  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for BID 0003 VID 000026CE PID 000001A2: No module named 'hid_parser'
2023-01-30 21:22:59,803,803     INFO [ReceiverListener:hidraw1] logitech_receiver.receiver: <UnifyingReceiver(/dev/hidraw1,17)>: receiver notifications enabled => ('wireless', 'software present')
2023-01-30 21:22:59,807,807     INFO [ReceiverListener:hidraw1] solaar.listener: status_changed <UnifyingReceiver(/dev/hidraw1,17)>: present, No paired devices. (0) 
2023-01-30 21:22:59,807,807     INFO [ReceiverListener:hidraw1] solaar.listener: ignoring DJ pairing notification Notification(20,1,41,01,9040040000000400000000)
2023-01-30 21:22:59,807,807     INFO [ReceiverListener:hidraw1] solaar.listener: ignoring DJ pairing notification Notification(20,0,41,02,0000000000000000000000)
2023-01-30 21:22:59,811,811     INFO [ReceiverListener:hidraw1] logitech_receiver.receiver: <UnifyingReceiver(/dev/hidraw1,17)>: found new device 1 (4090)
2023-01-30 21:22:59,811,811     INFO [ReceiverListener:hidraw1] logitech_receiver.base: New lock 16
2023-01-30 21:22:59,811,811     INFO [ReceiverListener:hidraw1] solaar.listener: connection Notification(10,1,41,04,129040) for <Device(1,4090,MX Anywhere 3,13858634)> (mouse)
2023-01-30 21:22:59,971,971     INFO [ReceiverListener:hidraw1] solaar.listener: status_changed <UnifyingReceiver(/dev/hidraw1,17)>: present, 1 paired device. (0) 
2023-01-30 21:23:00,071,071     INFO [ReceiverListener:hidraw1] solaar.listener: status_changed <Device(1,4090,MX Anywhere 3,13858634)>: paired online, {'LINK ENCRYPTED': False, 'BATTERY LEVEL': 100, 'BATTERY STATUS': NamedInt(0, 'discharging'), 'BATTERY NEXT LEVEL': None, 'BATTERY VOLTAGE': None, 'BATTERY CHARGING': False, 'ERROR': None} (0) 
2023-01-30 21:23:00,511,511     INFO [ReceiverListener:hidraw1] logitech_receiver.status: <Device(1,4090,MX Anywhere 3,13858634)> pushing device settings [<Setting([feature:toggle] MX Anywhere 3:hires-smooth-invert=None)>, <Setting([feature:toggle] MX Anywhere 3:hires-smooth-resolution=None)>, <Setting([feature:toggle] MX Anywhere 3:hires-scroll-mode=None)>, <Setting([feature:range] MX Anywhere 3:smart-shift=None)>, <Setting([feature:choice] MX Anywhere 3:dpi=None)>, <Setting([feature:map choice] MX Anywhere 3:reprogrammable-keys=None)>, <Setting([feature:map choice] MX Anywhere 3:divert-keys=None)>, <Setting([feature:choice] MX Anywhere 3:change-host=None)>]
2023-01-30 21:23:01,127,127     INFO [ReceiverListener:hidraw1] solaar.listener: status_changed <Device(1,4090,MX Anywhere 3,13858634)>: paired online, {'LINK ENCRYPTED': False, 'BATTERY LEVEL': 100, 'BATTERY STATUS': NamedInt(0, 'discharging'), 'BATTERY NEXT LEVEL': None, 'BATTERY VOLTAGE': None, 'BATTERY CHARGING': False, 'ERROR': None} (0) 

Describe the bug

After upgrading Solaar from v1.1.7 to v1.1.8, I've found that the vertical scrolling using the scroll wheel on my MX Anywhere 3 is very slow when connected using a unifying receiver and Solaar is running. If I connect the to the same machine via bluetooth, or if I quit Solaar, the scrolling behaviour returns to normal.

I have not made any changes to the mouse config in Solaar or otherwise. Rebooting, repairing and using a different receiver don't help with the issue.

Please let me know what else I can do to help debug this problem.

To Reproduce Steps to reproduce the behavior:

  1. Pair the device
  2. Try vertical scrolling on any document, web page etc. The scrolling is very slow
  3. Open the Solaar GUI and click Quit solaar
  4. Retry scrolling. The scrolling speed is normal
pfps commented 1 year ago

This is very likely an interaction with the Linux HID++ driver. Both the driver and Solaar try to modify the same feature on some mice, resulting in a race condition. Look at the known issues in https://github.com/pwr-Solaar/Solaar for a fix.

PR #1982 changes these settings so that they are ignored by default for new devices (and devices that have not had any changes to setting locking). This does not affect most devices that Solaar has already seen but should help new users.

JonathanHolvey commented 1 year ago

Yes, you're right. Thanks for pointing out the known issues. Disabling the scroll sensitivity option in Solaar fixed the problem.