Repository: pwr-Solaar/Solaar

Issue:
MX Master 3 Scroll wheel starts shaking
**Information**
<!-- Make sure that your issue is not one of the known issues in the Solaar documentation at https://pwr-solaar.github.io/Solaar/ -->
<!-- Do not bother opening an issue for a version older than 1.1.0.  Upgrade to the latest version and see if your issue persists. -->
<!-- If you not running the current version of Solaar, strongly consider upgrading to the newest version. -->
- Solaar version (`solaar --version` or `git describe --tags` if cloned from this repository): 1.1.7
- Distribution: Ubuntu 22.10
- Kernel version (ex. `uname -srmo`): `Linux 5.19.0-23-generic x86_64 GNU/Linux`
- Output of `solaar show`:

<details>

```
Unifying Receiver
  Device path  : /dev/hidraw6
  USB id       : 046d:C52B
  Serial       : D28395B9
    Firmware   : 24.11.B0036
    Bootloader : 02.09
    Other      : AA.AC
  Has 2 paired device(s) out of a maximum of 6.
  Notifications: wireless, software present (0x000900)
  Device activity counters: 1=113, 2=19

  1: MX Master 3 Wireless Mouse
     Device path  : /dev/hidraw7
     WPID         : 4082
     Codename     : MX Master 3
     Kind         : mouse
     Protocol     : HID++ 4.5
     Polling rate : 8 ms (125Hz)
     Serial number: 85500D8A
     Model ID:      B02340820000
     Unit ID:       85500D8A
        Bootloader: BOT 95.01.B0015
          Firmware: MPM 19.01.B0015
             Other: 
     The power switch is located on the base.
     Supports 35 HID++ 2.0 features:
         0: ROOT                   {0000} V0     
         1: FEATURE SET            {0001} V0     
         2: DEVICE FW VERSION      {0003} V3     
            Firmware: Bootloader BOT 95.01.B0015 00006A9CA89D
            Firmware: Firmware MPM 19.01.B0015 40826A9CA89D
            Firmware: Other   
            Unit ID: 85500D8A  Model ID: B02340820000  Transport IDs: {'btleid': 'B023', 'wpid': '4082'}
         3: DEVICE NAME            {0005} V0     
            Name: Wireless Mouse MX Master 3
            Kind: mouse
         4: WIRELESS DEVICE STATUS {1D4B} V0     
         5: RESET                  {0020} V0     
         6: CRYPTO ID              {0021} V1     
         7: DEVICE FRIENDLY NAME   {0007} V0     
            Friendly Name: MX Master 3
         8: BATTERY STATUS         {1000} V1     
            Battery: 100%, discharging, next level 50%.
         9: REPROG CONTROLS V4     {1B04} V4     
            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, Mouse Gesture Button:Gesture Button Navigation, 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, Mouse Gesture Button:Gesture Button Navigation, Smart Shift:Smart Shift}
            Key/Button Diversion (saved): {Middle Button:Regular, Back Button:Diverted, Forward Button:Diverted, Mouse Gesture Button:Diverted, Smart Shift:Diverted}
            Key/Button Diversion        : {Middle Button:Regular, Back Button:Diverted, Forward Button:Diverted, Mouse Gesture Button:Diverted, Smart Shift:Diverted}
        10: CHANGE HOST            {1814} V1     
            Change Host        : 1:Hydra
        11: XY STATS               {2250} V1     
        12: ADJUSTABLE DPI         {2201} V1     
            Sensitivity (DPI) (saved): 1500
            Sensitivity (DPI)        : 1500
        13: SMART SHIFT            {2110} V0     
            Scroll Wheel Ratcheted (saved): Freespinning
            Scroll Wheel Ratcheted        : Freespinning
            Scroll Wheel Ratchet Speed (saved): 15
            Scroll Wheel Ratchet Speed        : 1
        14: HIRES WHEEL            {2121} V1     
            Multiplier: 15
            Has invert: Normal wheel motion
            Has ratchet switch: Free 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: THUMB WHEEL            {2150} V0     
            Thumb Wheel Direction (saved): False
            Thumb Wheel Direction        : False
            Thumb Wheel Diversion (saved): False
            Thumb Wheel Diversion        : False
        16: WHEEL STATS            {2251} V0     
        17: DFUCONTROL SIGNED      {00C2} V0     
        18: DEVICE RESET           {1802} V0    internal, hidden 
        19: unknown:1803           {1803} V0    internal, hidden 
        20: CONFIG DEVICE PROPS    {1806} V6    internal, hidden 
        21: unknown:1813           {1813} V0    internal, hidden 
        22: OOBSTATE               {1805} V0    internal, hidden 
        23: unknown:1830           {1830} V0    internal, hidden 
        24: unknown:1890           {1890} V5    internal, hidden 
        25: unknown:1891           {1891} V5    internal, hidden 
        26: unknown:18A1           {18A1} V0    internal, hidden 
        27: unknown:1DF3           {1DF3} V0    internal, hidden 
        28: unknown:1E00           {1E00} V0    hidden 
        29: unknown:1EB0           {1EB0} V0    internal, hidden 
        30: unknown:1861           {1861} V0    internal, hidden 
        31: unknown:9001           {9001} V0    internal, hidden 
        32: unknown:9203           {9203} V0    internal, hidden 
        33: unknown:9205           {9205} V0    internal, hidden 
        34: unknown:9300           {9300} V0    internal, hidden 
     Has 8 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:3, group mask:g1,g2,g3
             reporting: default
         3: Back Button               , default: Mouse Back Button           => Mouse Back Button         
             mse, reprogrammable, divertable, raw XY, analytics key events, pos:0, group:2, group mask:g1,g2
             reporting: diverted, raw XY diverted
         4: Forward Button            , default: Mouse Forward Button        => Mouse Forward Button      
             mse, reprogrammable, divertable, raw XY, analytics key events, pos:0, group:2, group mask:g1,g2
             reporting: diverted, raw XY diverted
         5: Mouse Gesture Button      , default: Gesture Button Navigation   => Gesture Button Navigation 
             mse, reprogrammable, divertable, raw XY, analytics key events, pos:0, group:3, group mask:g1,g2,g3
             reporting: diverted, raw XY diverted
         6: Smart Shift               , default: Smart Shift                 => Smart Shift               
             mse, reprogrammable, divertable, raw XY, analytics key events, pos:0, group:3, group mask:g1,g2,g3
             reporting: diverted, raw XY diverted
         7: Virtual Gesture Button    , default: Virtual Gesture Button      => Virtual Gesture Button    
             divertable, virtual, raw XY, force raw XY, pos:0, group:4, group mask:empty
             reporting: default
     Battery: 100%, discharging, next level 50%.

  2: MX Keys Keyboard
     Device path  : /dev/hidraw8
     WPID         : 408A
     Codename     : MX Keys
     Kind         : keyboard
     Protocol     : HID++ 4.5
     Polling rate : 20 ms (50Hz)
     Serial number: 6EFD7E50
     Model ID:      B35B408A0000
     Unit ID:       6EFD7E50
        Bootloader: BL1 08.00.B0011
          Firmware: MPK 12.01.B0013
             Other: 
     The power switch is located on the edge of top right corner.
     Supports 33 HID++ 2.0 features:
         0: ROOT                   {0000} V0     
         1: FEATURE SET            {0001} V0     
         2: DEVICE FW VERSION      {0003} V2     
            Firmware: Bootloader BL1 08.00.B0011 00008169E8BB
            Firmware: Firmware MPK 12.01.B0013 408AFE037737
            Firmware: Other   
            Unit ID: 6EFD7E50  Model ID: B35B408A0000  Transport IDs: {'btleid': 'B35B', 'wpid': '408A'}
         3: DEVICE NAME            {0005} V0     
            Name: MX Keys Wireless Keyboard
            Kind: keyboard
         4: WIRELESS DEVICE STATUS {1D4B} V0     
         5: RESET                  {0020} V0     
         6: DEVICE FRIENDLY NAME   {0007} V0     
            Friendly Name: MX Keys
         7: BATTERY STATUS         {1000} V1     
            Battery: 50%, discharging, next level 20%.
         8: REPROG CONTROLS V4     {1B04} V4     
            Key/Button Diversion (saved): {Calculator:Regular, Show Desktop:Regular, Lock PC:Regular, Screen Capture/Print Screen:Regular, Brightness Down:Regular, Brightness Up:Regular, Host Switch Channel 1:Regular, Host Switch Channel 2:Regular, Host Switch Channel 3:Regular, Mission Control/Task View:Regular, Dashboard Launchpad/Action Center:Regular, Backlight Down:Regular, Backlight Up:Regular, Previous Fn:Regular, Play/Pause Fn:Regular, Next Fn:Regular, Mute Fn:Regular, Volume Down Fn:Regular, Volume Up Fn:Regular, App Contextual Menu/Right Click:Regular, Right Arrow:Regular, Left Arrow:Regular}
            Key/Button Diversion        : {Calculator:Regular, Show Desktop:Regular, Lock PC:Regular, Screen Capture/Print Screen:Regular, Brightness Down:Regular, Brightness Up:Regular, Host Switch Channel 1:Regular, Host Switch Channel 2:Regular, Host Switch Channel 3:Regular, Mission Control/Task View:Regular, Dashboard Launchpad/Action Center:Regular, Backlight Down:Regular, Backlight Up:Regular, Previous Fn:Regular, Play/Pause Fn:Regular, Next Fn:Regular, Mute Fn:Regular, Volume Down Fn:Regular, Volume Up Fn:Regular, App Contextual Menu/Right Click:Regular, Right Arrow:Regular, Left Arrow:Regular}
         9: CHANGE HOST            {1814} V1     
            Change Host        : 1:Hydra
        10: HOSTS INFO             {1815} V1     
            Host 0 (paired): Hydra
            Host 1 (paired): LT243138
            Host 2 (paired): 
        11: BACKLIGHT2             {1982} V1     
            Backlight (saved): True
            Backlight        : True
        12: K375S FN INVERSION     {40A3} V0     
            Swap Fx function (saved): False
            Swap Fx function        : False
        13: ENCRYPTION             {4100} V0     
        14: LOCK KEY STATE         {4220} V0     
        15: KEYBOARD DISABLE KEYS  {4521} V0     
            Disable keys (saved): {Caps Lock:False, Num Lock:False, Scroll Lock:False, Insert:False, Win:False}
            Disable keys        : {Caps Lock:False, Num Lock:False, Scroll Lock:False, Insert:False, Win:False}
        16: MULTIPLATFORM          {4531} V1     
            Set OS (saved): Windows
            Set OS        : Windows
        17: DFUCONTROL SIGNED      {00C2} V0     
        18: DEVICE RESET           {1802} V0    internal, hidden 
        19: unknown:1803           {1803} V0    internal, hidden 
        20: CONFIG DEVICE PROPS    {1806} V5    internal, hidden 
        21: unknown:1813           {1813} V0    internal, hidden 
        22: OOBSTATE               {1805} V0    internal, hidden 
        23: unknown:1830           {1830} V0    internal, hidden 
        24: unknown:1890           {1890} V5    internal, hidden 
        25: unknown:1891           {1891} V5    internal, hidden 
        26: unknown:18A1           {18A1} V0    internal, hidden 
        27: unknown:1DF3           {1DF3} V0    internal, hidden 
        28: unknown:1E00           {1E00} V0    hidden 
        29: unknown:1EB0           {1EB0} V0    internal, hidden 
        30: unknown:1861           {1861} V0    internal, hidden 
        31: unknown:1A20           {1A20} V0    internal, hidden 
        32: unknown:18B0           {18B0} V0    internal, hidden 
     Has 24 reprogrammable keys:
         0: Host Switch Channel 1     , default: HostSwitch Channel 1        => HostSwitch Channel 1      
             nonstandard, divertable, persistently divertable, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
         1: Host Switch Channel 2     , default: HostSwitch Channel 2        => HostSwitch Channel 2      
             nonstandard, divertable, persistently divertable, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
         2: Host Switch Channel 3     , default: HostSwitch Channel 3        => HostSwitch Channel 3      
             nonstandard, divertable, persistently divertable, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
         3: Brightness Down           , default: Brightness Down             => Brightness Down           
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:1, group:0, group mask:empty
             reporting: default
         4: Brightness Up             , default: Brightness Up               => Brightness Up             
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:2, group:0, group mask:empty
             reporting: default
         5: Mission Control/Task View , default: Mission Control/Task View   => Mission Control/Task View 
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:3, group:0, group mask:empty
             reporting: default
         6: Dashboard Launchpad/Action Center, default: Dashboard Launchpad/Action Center => Dashboard Launchpad/Action Center
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:4, group:0, group mask:empty
             reporting: default
         7: Show Desktop              , default: Show Desktop                => Show Desktop              
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:5, group:0, group mask:empty
             reporting: default
         8: Backlight Down            , default: Backlight Down              => Backlight Down            
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:6, group:0, group mask:empty
             reporting: default
         9: Backlight Up              , default: Backlight Up                => Backlight Up              
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:7, group:0, group mask:empty
             reporting: default
        10: Previous Fn               , default: Previous                    => Previous                  
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:8, group:0, group mask:empty
             reporting: default
        11: Play/Pause Fn             , default: Play/Pause                  => Play/Pause                
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:9, group:0, group mask:empty
             reporting: default
        12: Next Fn                   , default: Next                        => Next                      
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:10, group:0, group mask:empty
             reporting: default
        13: Mute Fn                   , default: Mute                        => Mute                      
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:11, group:0, group mask:empty
             reporting: default
        14: Volume Down Fn            , default: Volume Down                 => Volume Down               
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:12, group:0, group mask:empty
             reporting: default
        15: Volume Up Fn              , default: Volume Up                   => Volume Up                 
             nonstandard, reprogrammable, divertable, persistently divertable, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
        16: Calculator                , default: Calculator                  => Calculator                
             nonstandard, reprogrammable, divertable, persistently divertable, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
        17: Screen Capture/Print Screen, default: Screen Capture              => Screen Capture            
             nonstandard, reprogrammable, divertable, persistently divertable, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
        18: App Contextual Menu/Right Click, default: Right Click/App Contextual Menu => Right Click/App Contextual Menu
             nonstandard, reprogrammable, divertable, persistently divertable, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
        19: Lock PC                   , default: WindowsLock                 => WindowsLock               
             nonstandard, reprogrammable, divertable, persistently divertable, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
        20: Left Arrow                , default: Keyboard Left Arrow         => Keyboard Left Arrow       
             nonstandard, divertable, persistently divertable, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
        21: Right Arrow               , default: Keyboard Right Arrow        => Keyboard Right Arrow      
             nonstandard, divertable, persistently divertable, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
        22: F Lock                    , default: Do Nothing One              => Do Nothing One            
             is FN, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
        23: FN Key                    , default: Do Nothing One              => Do Nothing One            
             nonstandard, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
     Battery: 50%, discharging, next level 20%.

```
</details>

- Contents of `~/.config/solaar/config.yaml` (or `~/.config/solaar/config.json` if `~/.config/solaar/config.yaml` not present):

<details>

```
- 1.1.7
- _NAME: MX Master 3 Wireless Mouse
  _absent: [hi-res-scroll, lowres-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: B02340820000
  _serial: 85500D8A
  _unitId: 85500D8A
  _wpid: '4082'
  change-host: null
  divert-keys: {82: 0, 83: 1, 86: 1, 195: 1, 196: 1}
  dpi: 1500
  hires-scroll-mode: false
  hires-smooth-invert: false
  hires-smooth-resolution: true
  reprogrammable-keys: {80: 80, 81: 81, 82: 82, 83: 83, 86: 86, 195: 195, 196: 196}
  scroll-ratchet: 1
  smart-shift: 15
  thumb-scroll-invert: false
  thumb-scroll-mode: false
- _NAME: MX Keys Keyboard
  _absent: [hi-res-scroll, lowres-scroll-mode, hires-smooth-invert, hires-smooth-resolution, hires-scroll-mode, smart-shift, thumb-scroll-invert, thumb-scroll-mode,
    onboard_profiles, report_rate, pointer_speed, dpi, speed-change, backlight-timed, reprogrammable-keys, persistent-remappable-keys, crown-smooth, divert-crown,
    divert-gkeys, m-key-leds, mr-key-led, gesture2-gestures, gesture2-divert, gesture2-params, sidetone, equalizer, scroll-ratchet]
  _battery: 4096
  _modelId: B35B408A0000
  _sensitive: {multiplatform: false}
  _serial: 6EFD7E50
  _unitId: 6EFD7E50
  _wpid: 408A
  backlight: true
  change-host: null
  disable-keyboard-keys: {1: false, 2: false, 4: false, 8: false, 16: false}
  divert-keys: {10: 0, 110: 0, 111: 0, 191: 0, 199: 0, 200: 0, 209: 0, 210: 0, 211: 0, 224: 0, 225: 0, 226: 0, 227: 0, 228: 0, 229: 0, 230: 0, 231: 0, 232: 0,
    233: 0, 234: 0, 235: 0, 236: 0}
  fn-swap: false
  multiplatform: 0
```
</details>


- Errors or warrnings from Solaar:
<!-- Under normal operation Solaar keeps a log of warning and error messages in ~/.tmp
while it is running as a file starting with 'Solaar'.
If this file is not available or does not have useful information you can
run Solaar as `solaar -dd`, after killing any running Solaar processes to
have Solaar log informational, warning, and error messages to stdout. -->


**Describe the bug**
After a while my MX Master 3 wheel starts shaking without any reason. 
Experienced this behavior now 3 times in the last 2 weeks. 
Pressing the button above the wheel stopped shaking for some minutes. 
Restarting Solaar fixes that behavior for a longer time. 
 

**To Reproduce**
Currently I have no way to reproduce it. It happens randomly.
Twice it started when I switched from windows with options+ to Linux.
The third time the windows machine was not even turned on and it just started during work.

Anybody else experience this issue and can add more information to reproduce it?





Discussion:
This appears to be a hardware issue with the MX Master 3.  When I set my MX Master 3 to ratcheted mode and the ratchet speed to 1 then the mouse appears to sometimes think the scroll wheel is moving slowly when it is in fact stopped.  This can turn the ratchet on and off several times, which shakes the mouse a bit and makes a bit of noise.

The question is why your mouse is in this mode.  You appear to be using freespinning mode and ratchet speed of 15, which should not trigger the problem.   The next time you experience the problem run `solaar show` while the Solaar GUI is still running.
It happend again today. 
Attached the output from solaar show:

```
Solaar version 1.1.7

Unifying Receiver
  Device path  : /dev/hidraw6
  USB id       : 046d:C52B
  Serial       : D28395B9
    Firmware   : 24.11.B0036
    Bootloader : 02.09
    Other      : AA.AC
  Has 2 paired device(s) out of a maximum of 6.
  Notifications: wireless (0x000100)
  Device activity counters: 1=130, 2=186

  1: MX Master 3 Wireless Mouse
     Device path  : /dev/hidraw7
     WPID         : 4082
     Codename     : MX Master 3
     Kind         : mouse
     Protocol     : HID++ 4.5
     Polling rate : 8 ms (125Hz)
     Serial number: 85500D8A
     Model ID:      B02340820000
     Unit ID:       85500D8A
        Bootloader: BOT 95.01.B0015
          Firmware: MPM 19.01.B0015
             Other: 
     The power switch is located on the base.
     Supports 35 HID++ 2.0 features:
         0: ROOT                   {0000} V0     
         1: FEATURE SET            {0001} V0     
         2: DEVICE FW VERSION      {0003} V3     
            Firmware: Bootloader BOT 95.01.B0015 00006A9CA89D
            Firmware: Firmware MPM 19.01.B0015 40826A9CA89D
            Firmware: Other   
            Unit ID: 85500D8A  Model ID: B02340820000  Transport IDs: {'btleid': 'B023', 'wpid': '4082'}
         3: DEVICE NAME            {0005} V0     
            Name: Wireless Mouse MX Master 3
            Kind: mouse
         4: WIRELESS DEVICE STATUS {1D4B} V0     
         5: RESET                  {0020} V0     
         6: CRYPTO ID              {0021} V1     
         7: DEVICE FRIENDLY NAME   {0007} V0     
            Friendly Name: MX Master 3
         8: BATTERY STATUS         {1000} V1     
            Battery: 100%, discharging, next level 50%.
         9: REPROG CONTROLS V4     {1B04} V4     
            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, Mouse Gesture Button:Gesture Button Navigation, 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, Mouse Gesture Button:Gesture Button Navigation, Smart Shift:Smart Shift}
            Key/Button Diversion (saved): {Middle Button:Regular, Back Button:Diverted, Forward Button:Diverted, Mouse Gesture Button:Diverted, Smart Shift:Diverted}
            Key/Button Diversion        : {Middle Button:Regular, Back Button:Diverted, Forward Button:Diverted, Mouse Gesture Button:Diverted, Smart Shift:Diverted}
        10: CHANGE HOST            {1814} V1     
            Change Host        : 1:Hydra
        11: XY STATS               {2250} V1     
        12: ADJUSTABLE DPI         {2201} V1     
            Sensitivity (DPI) (saved): 1500
            Sensitivity (DPI)        : 1500
        13: SMART SHIFT            {2110} V0     
            Scroll Wheel Ratcheted (saved): Freespinning
            Scroll Wheel Ratcheted        : Freespinning
            Scroll Wheel Ratchet Speed (saved): 15
            Scroll Wheel Ratchet Speed        : 15
        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: THUMB WHEEL            {2150} V0     
            Thumb Wheel Direction (saved): False
            Thumb Wheel Direction        : False
            Thumb Wheel Diversion (saved): False
            Thumb Wheel Diversion        : False
        16: WHEEL STATS            {2251} V0     
        17: DFUCONTROL SIGNED      {00C2} V0     
        18: DEVICE RESET           {1802} V0    internal, hidden 
        19: unknown:1803           {1803} V0    internal, hidden 
        20: CONFIG DEVICE PROPS    {1806} V6    internal, hidden 
        21: unknown:1813           {1813} V0    internal, hidden 
        22: OOBSTATE               {1805} V0    internal, hidden 
        23: unknown:1830           {1830} V0    internal, hidden 
        24: unknown:1890           {1890} V5    internal, hidden 
        25: unknown:1891           {1891} V5    internal, hidden 
        26: unknown:18A1           {18A1} V0    internal, hidden 
        27: unknown:1DF3           {1DF3} V0    internal, hidden 
        28: unknown:1E00           {1E00} V0    hidden 
        29: unknown:1EB0           {1EB0} V0    internal, hidden 
        30: unknown:1861           {1861} V0    internal, hidden 
        31: unknown:9001           {9001} V0    internal, hidden 
        32: unknown:9203           {9203} V0    internal, hidden 
        33: unknown:9205           {9205} V0    internal, hidden 
        34: unknown:9300           {9300} V0    internal, hidden 
     Has 8 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:3, group mask:g1,g2,g3
             reporting: default
         3: Back Button               , default: Mouse Back Button           => Mouse Back Button         
             mse, reprogrammable, divertable, raw XY, analytics key events, pos:0, group:2, group mask:g1,g2
             reporting: diverted, raw XY diverted
         4: Forward Button            , default: Mouse Forward Button        => Mouse Forward Button      
             mse, reprogrammable, divertable, raw XY, analytics key events, pos:0, group:2, group mask:g1,g2
             reporting: diverted, raw XY diverted
         5: Mouse Gesture Button      , default: Gesture Button Navigation   => Gesture Button Navigation 
             mse, reprogrammable, divertable, raw XY, analytics key events, pos:0, group:3, group mask:g1,g2,g3
             reporting: diverted, raw XY diverted
         6: Smart Shift               , default: Smart Shift                 => Smart Shift               
             mse, reprogrammable, divertable, raw XY, analytics key events, pos:0, group:3, group mask:g1,g2,g3
             reporting: diverted, raw XY diverted
         7: Virtual Gesture Button    , default: Virtual Gesture Button      => Virtual Gesture Button    
             divertable, virtual, raw XY, force raw XY, pos:0, group:4, group mask:empty
             reporting: default
     Battery: 100%, discharging, next level 50%.

  2: MX Keys Keyboard
     Device path  : /dev/hidraw8
     WPID         : 408A
     Codename     : MX Keys
     Kind         : keyboard
     Protocol     : HID++ 4.5
     Polling rate : 20 ms (50Hz)
     Serial number: 6EFD7E50
     Model ID:      B35B408A0000
     Unit ID:       6EFD7E50
        Bootloader: BL1 08.00.B0011
          Firmware: MPK 12.01.B0013
             Other: 
     The power switch is located on the edge of top right corner.
     Supports 33 HID++ 2.0 features:
         0: ROOT                   {0000} V0     
         1: FEATURE SET            {0001} V0     
         2: DEVICE FW VERSION      {0003} V2     
            Firmware: Bootloader BL1 08.00.B0011 00008169E8BB
            Firmware: Firmware MPK 12.01.B0013 408AFE037737
            Firmware: Other   
            Unit ID: 6EFD7E50  Model ID: B35B408A0000  Transport IDs: {'btleid': 'B35B', 'wpid': '408A'}
         3: DEVICE NAME            {0005} V0     
            Name: MX Keys Wireless Keyboard
            Kind: keyboard
         4: WIRELESS DEVICE STATUS {1D4B} V0     
         5: RESET                  {0020} V0     
         6: DEVICE FRIENDLY NAME   {0007} V0     
            Friendly Name: MX Keys
         7: BATTERY STATUS         {1000} V1     
            Battery: 50%, discharging, next level 20%.
         8: REPROG CONTROLS V4     {1B04} V4     
            Key/Button Diversion (saved): {Calculator:Regular, Show Desktop:Regular, Lock PC:Regular, Screen Capture/Print Screen:Regular, Brightness Down:Regular, Brightness Up:Regular, Host Switch Channel 1:Regular, Host Switch Channel 2:Regular, Host Switch Channel 3:Regular, Mission Control/Task View:Regular, Dashboard Launchpad/Action Center:Regular, Backlight Down:Regular, Backlight Up:Regular, Previous Fn:Regular, Play/Pause Fn:Regular, Next Fn:Regular, Mute Fn:Regular, Volume Down Fn:Regular, Volume Up Fn:Regular, App Contextual Menu/Right Click:Regular, Right Arrow:Regular, Left Arrow:Regular}
            Key/Button Diversion        : {Calculator:Regular, Show Desktop:Regular, Lock PC:Regular, Screen Capture/Print Screen:Regular, Brightness Down:Regular, Brightness Up:Regular, Host Switch Channel 1:Regular, Host Switch Channel 2:Regular, Host Switch Channel 3:Regular, Mission Control/Task View:Regular, Dashboard Launchpad/Action Center:Regular, Backlight Down:Regular, Backlight Up:Regular, Previous Fn:Regular, Play/Pause Fn:Regular, Next Fn:Regular, Mute Fn:Regular, Volume Down Fn:Regular, Volume Up Fn:Regular, App Contextual Menu/Right Click:Regular, Right Arrow:Regular, Left Arrow:Regular}
         9: CHANGE HOST            {1814} V1     
            Change Host        : 1:Hydra
        10: HOSTS INFO             {1815} V1     
            Host 0 (paired): Hydra
            Host 1 (paired): LT243138
            Host 2 (paired): 
        11: BACKLIGHT2             {1982} V1     
            Backlight (saved): True
            Backlight        : True
        12: K375S FN INVERSION     {40A3} V0     
            Swap Fx function (saved): False
            Swap Fx function        : False
        13: ENCRYPTION             {4100} V0     
        14: LOCK KEY STATE         {4220} V0     
        15: KEYBOARD DISABLE KEYS  {4521} V0     
            Disable keys (saved): {Caps Lock:False, Num Lock:False, Scroll Lock:False, Insert:False, Win:False}
            Disable keys        : {Caps Lock:False, Num Lock:False, Scroll Lock:False, Insert:False, Win:False}
        16: MULTIPLATFORM          {4531} V1     
            Set OS (saved): Windows
            Set OS        : Windows
        17: DFUCONTROL SIGNED      {00C2} V0     
        18: DEVICE RESET           {1802} V0    internal, hidden 
        19: unknown:1803           {1803} V0    internal, hidden 
        20: CONFIG DEVICE PROPS    {1806} V5    internal, hidden 
        21: unknown:1813           {1813} V0    internal, hidden 
        22: OOBSTATE               {1805} V0    internal, hidden 
        23: unknown:1830           {1830} V0    internal, hidden 
        24: unknown:1890           {1890} V5    internal, hidden 
        25: unknown:1891           {1891} V5    internal, hidden 
        26: unknown:18A1           {18A1} V0    internal, hidden 
        27: unknown:1DF3           {1DF3} V0    internal, hidden 
        28: unknown:1E00           {1E00} V0    hidden 
        29: unknown:1EB0           {1EB0} V0    internal, hidden 
        30: unknown:1861           {1861} V0    internal, hidden 
        31: unknown:1A20           {1A20} V0    internal, hidden 
        32: unknown:18B0           {18B0} V0    internal, hidden 
     Has 24 reprogrammable keys:
         0: Host Switch Channel 1     , default: HostSwitch Channel 1        => HostSwitch Channel 1      
             nonstandard, divertable, persistently divertable, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
         1: Host Switch Channel 2     , default: HostSwitch Channel 2        => HostSwitch Channel 2      
             nonstandard, divertable, persistently divertable, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
         2: Host Switch Channel 3     , default: HostSwitch Channel 3        => HostSwitch Channel 3      
             nonstandard, divertable, persistently divertable, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
         3: Brightness Down           , default: Brightness Down             => Brightness Down           
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:1, group:0, group mask:empty
             reporting: default
         4: Brightness Up             , default: Brightness Up               => Brightness Up             
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:2, group:0, group mask:empty
             reporting: default
         5: Mission Control/Task View , default: Mission Control/Task View   => Mission Control/Task View 
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:3, group:0, group mask:empty
             reporting: default
         6: Dashboard Launchpad/Action Center, default: Dashboard Launchpad/Action Center => Dashboard Launchpad/Action Center
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:4, group:0, group mask:empty
             reporting: default
         7: Show Desktop              , default: Show Desktop                => Show Desktop              
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:5, group:0, group mask:empty
             reporting: default
         8: Backlight Down            , default: Backlight Down              => Backlight Down            
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:6, group:0, group mask:empty
             reporting: default
         9: Backlight Up              , default: Backlight Up                => Backlight Up              
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:7, group:0, group mask:empty
             reporting: default
        10: Previous Fn               , default: Previous                    => Previous                  
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:8, group:0, group mask:empty
             reporting: default
        11: Play/Pause Fn             , default: Play/Pause                  => Play/Pause                
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:9, group:0, group mask:empty
             reporting: default
        12: Next Fn                   , default: Next                        => Next                      
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:10, group:0, group mask:empty
             reporting: default
        13: Mute Fn                   , default: Mute                        => Mute                      
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:11, group:0, group mask:empty
             reporting: default
        14: Volume Down Fn            , default: Volume Down                 => Volume Down               
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, analytics key events, pos:12, group:0, group mask:empty
             reporting: default
        15: Volume Up Fn              , default: Volume Up                   => Volume Up                 
             nonstandard, reprogrammable, divertable, persistently divertable, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
        16: Calculator                , default: Calculator                  => Calculator                
             nonstandard, reprogrammable, divertable, persistently divertable, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
        17: Screen Capture/Print Screen, default: Screen Capture              => Screen Capture            
             nonstandard, reprogrammable, divertable, persistently divertable, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
        18: App Contextual Menu/Right Click, default: Right Click/App Contextual Menu => Right Click/App Contextual Menu
             nonstandard, reprogrammable, divertable, persistently divertable, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
        19: Lock PC                   , default: WindowsLock                 => WindowsLock               
             nonstandard, reprogrammable, divertable, persistently divertable, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
        20: Left Arrow                , default: Keyboard Left Arrow         => Keyboard Left Arrow       
             nonstandard, divertable, persistently divertable, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
        21: Right Arrow               , default: Keyboard Right Arrow        => Keyboard Right Arrow      
             nonstandard, divertable, persistently divertable, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
        22: F Lock                    , default: Do Nothing One              => Do Nothing One            
             is FN, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
        23: FN Key                    , default: Do Nothing One              => Do Nothing One            
             nonstandard, analytics key events, pos:0, group:0, group mask:empty
             reporting: default
     Battery: 50%, discharging, next level 20%.

```
If the mouse was in freespinning mode with speed set to 15 then I don't know what is going wrong.   

What were you doing just before the mouse shook?
Just was using button on the bottom of the mouse to switch and experienced it again.
When I opened Solaar GUI then I saw following:
![ezgif com-gif-maker](https://user-images.githubusercontent.com/19502312/204468330-e5890b63-62d7-4455-9745-6bfcf79aad19.gif)

I assume you mean the button on the mouse next to the scroll wheel.   You appear to have diverted this button so that it does not perform its normal action.  Do you have any Solaar rules that trigger on this button?  If so, please provide the contents of ~/.config/soaar/rules.yaml.  If not, run Solaar as `solaar -ddd` and capture the output the next time you see the problem.
No I mean the host switch button.
Below is the output `solaar -ddd` while experiencing the issue.
[Log output](https://gist.github.com/geeks-r-us/9438261017ec7d38c37094f82e8694f6)


Please provide the rules you have in place by posting the contents of ~/.config/solaar/rules.yaml
I have no additional rules beside of the built-in at the moment:
![2022-12-02_11-38](https://user-images.githubusercontent.com/19502312/205274610-9ba5789e-c1b1-4ba0-9f8e-911c8e006691.png)


So this is occurring when you use the host-switch button to switch the mouse back to the machine where the problem occurs?
In most of the cases I experienced the problem when using host switch button. Only 1 or 2 cases it happened during normal usage without doing a host switch before.
It looks as if Solaar is going something wrong in processing a message that is coming from your mouse.  But my MX Master 3 doesn't exhibit the same behaviour.
I can try to connect another MX3 to see if this issue is also appearing with these one.
It looks like the problem is that Solaar has received two messages about the rachet in very quick succession, one that the ratchet is off and one that it is on.  In processing the messages Solaar sets the ratchet to off and then to on.  But Solaar is too late, setting the ratchet to off after it has already been turned on, etc.   This generates more messages about the ratchet.    Eventually Solaar catches up and the flipping stops.

The real solution is to get Solaar to not bother changing the ratchet because that is not necessary here.

Resolving patch:
diff --git a/lib/logitech_receiver/notifications.py b/lib/logitech_receiver/notifications.py
--- a/lib/logitech_receiver/notifications.py
+++ b/lib/logitech_receiver/notifications.py
@@ -312,7 +312,7 @@ def _process_hidpp10_notification(device, status, n):
 
 def _process_feature_notification(device, status, n, feature):
     if _log.isEnabledFor(_DEBUG):
-        _log.debug('%s: notification for feature %s, report %s, data %s', device, feature, n.sub_id >> 4, _strhex(n.data))
+        _log.debug('%s: notification for feature %s, report %s, data %s', device, feature, n.address >> 4, _strhex(n.data))
 
     if feature == _F.BATTERY_STATUS:
         if n.address == 0x00:
@@ -433,13 +433,14 @@ def _process_feature_notification(device, status, n, feature):
                 periods = flags & 0x0f
                 _log.info('%s: WHEEL: res: %d periods: %d delta V:%-3d', device, high_res, periods, delta_v)
         elif (n.address == 0x10):
-            ratchet = ord(n.data[:1]) & 0x01
+            ratchet = n.data[0]
             if _log.isEnabledFor(_INFO):
                 _log.info('%s: WHEEL: ratchet: %d', device, ratchet)
-            from solaar.ui.config_panel import change_setting  # prevent circular import
-            setting = next((s for s in device.settings if s.name == _st.ScrollRatchet.name), None)
-            if setting:
-                change_setting(device, setting, [2 if ratchet else 1])
+            if ratchet < 2:  # don't process messages with unusual ratchet values
+                from solaar.ui.config_panel import record_setting  # prevent circular import
+                setting = next((s for s in device.settings if s.name == _st.ScrollRatchet.name), None)
+                if setting:
+                    record_setting(device, setting, [2 if ratchet else 1])
         else:
             if _log.isEnabledFor(_INFO):
                 _log.info('%s: unknown WHEEL %s', device, n)
diff --git a/lib/logitech_receiver/settings.py b/lib/logitech_receiver/settings.py
--- a/lib/logitech_receiver/settings.py
+++ b/lib/logitech_receiver/settings.py
@@ -292,6 +292,10 @@ def _pre_write(self, save=True):
         if self._device.persister and save:
             self._device.persister[self.name] = self._value if self.persist else None
 
+    def update(self, value, save=True):
+        self._value = value
+        self._pre_write(save)
+
     def write(self, value, save=True):
         assert hasattr(self, '_value')
         assert hasattr(self, '_device')
@@ -302,8 +306,7 @@ def write(self, value, save=True):
 
         if self._device.online:
             if self._value != value:
-                self._value = value
-                self._pre_write(save)
+                self.update(value, save)
 
             current_value = None
             if self._validator.needs_current_value:
@@ -410,8 +413,7 @@ def write(self, map, save=True):
             _log.debug('%s: settings write %r to %s', self.name, map, self._device)
 
         if self._device.online:
-            self._value = map
-            self._pre_write(save)
+            self.update(map, save)
             for key, value in map.items():
                 data_bytes = self._validator.prepare_write(int(key), value)
                 if data_bytes is not None:
@@ -422,6 +424,10 @@ def write(self, map, save=True):
                         return None
             return map
 
+    def update_key_value(self, key, value, save=True):
+        self._value[int(key)] = value
+        self._pre_write(save)
+
     def write_key_value(self, key, value, save=True):
         assert hasattr(self, '_value')
         assert hasattr(self, '_device')
@@ -437,8 +443,7 @@ def write_key_value(self, key, value, save=True):
             try:
                 data_bytes = self._validator.prepare_write(int(key), value)
                 # always need to write to configuration because dictionary is shared and could have changed
-                self._value[int(key)] = value
-                self._pre_write(save)
+                self.update_key_value(key, value, save)
             except ValueError:
                 data_bytes = value = None
             if data_bytes is not None:
@@ -510,8 +515,7 @@ def write(self, map, save=True):
         if _log.isEnabledFor(_DEBUG):
             _log.debug('%s: long settings write %r to %s', self.name, map, self._device)
         if self._device.online:
-            self._value = map
-            self._pre_write(save)
+            self.update(map, save)
             for item, value in map.items():
                 data_bytes_list = self._validator.prepare_write(self._value)
                 if data_bytes_list is not None:
@@ -524,6 +528,10 @@ def write(self, map, save=True):
                                 return None
             return map
 
+    def update_key_value(self, key, value, save=True):
+        self._value[int(key)] = value
+        self._pre_write(save)
+
     def write_key_value(self, item, value, save=True):
         assert hasattr(self, '_value')
         assert hasattr(self, '_device')
@@ -537,8 +545,7 @@ def write_key_value(self, item, value, save=True):
             if not self._value:
                 self.read()
             data_bytes = self._validator.prepare_write_item(item, value)
-            self._value[int(item)] = value
-            self._pre_write(save)
+            self.update_key_value(item, value, save)
             if data_bytes is not None:
                 if _log.isEnabledFor(_DEBUG):
                     _log.debug('%s: settings prepare item value write(%s,%s) => %r', self.name, item, value, data_bytes)
@@ -609,8 +616,7 @@ def write(self, map, save=True):
         if _log.isEnabledFor(_DEBUG):
             _log.debug('%s: bit field settings write %r to %s', self.name, map, self._device)
         if self._device.online:
-            self._value = map
-            self._pre_write(save)
+            self.update(map, save)
             data_bytes = self._validator.prepare_write(self._value)
             if data_bytes is not None:
                 if _log.isEnabledFor(_DEBUG):
@@ -623,6 +629,10 @@ def write(self, map, save=True):
                         return None
             return map
 
+    def update_key_value(self, key, value, save=True):
+        self._value[int(key)] = value
+        self._pre_write(save)
+
     def write_key_value(self, key, value, save=True):
         assert hasattr(self, '_value')
         assert hasattr(self, '_device')
@@ -636,8 +646,7 @@ def write_key_value(self, key, value, save=True):
             if not self._value:
                 self.read()
             value = bool(value)
-            self._value[int(key)] = value
-            self._pre_write(save)
+            self.update_key_value(key, value, save)
 
             data_bytes = self._validator.prepare_write(self._value)
             if data_bytes is not None:
@@ -703,8 +712,7 @@ def write(self, map, save=True):
         if _log.isEnabledFor(_DEBUG):
             _log.debug('%s: range field setting write %r to %s', self.name, map, self._device)
         if self._device.online:
-            self._value = map
-            self._pre_write(save)
+            self.update(map, save)
             data_bytes = self._validator.prepare_write(self._value)
             if data_bytes is not None:
                 if _log.isEnabledFor(_DEBUG):
diff --git a/lib/solaar/ui/config_panel.py b/lib/solaar/ui/config_panel.py
--- a/lib/solaar/ui/config_panel.py
+++ b/lib/solaar/ui/config_panel.py
@@ -715,3 +715,23 @@ def _change_setting(device, setting, values):
     else:
         sbox = None
     _write_async(setting, values[-1], sbox, None, key=values[0] if len(values) > 1 else None)
+
+
+def record_setting(device, setting, values):
+    """External interface to record a setting that has changed on the device and have the GUI show the change"""
+    assert device == setting._device
+    GLib.idle_add(_record_setting, device, setting, values, priority=99)
+
+
+def _record_setting(device, setting, values):
+    if len(values) > 1:
+        setting.update_key_value(values[0], values[-1])
+        value = {values[0]: values[-1]}
+    else:
+        setting.update(values[-1])
+        value = values[-1]
+    device_path = device.receiver.path if device.receiver else device.path
+    if (device_path, device.number, setting.name) in _items:
+        sbox = _items[(device_path, device.number, setting.name)]
+        if sbox:
+            _update_setting_item(sbox, value)


Test patch: