Repository: pwr-Solaar/Solaar

Issue:
After suspend swap fx function does not work properly anymore
**Information**
- Solaar version (`solaar --version` or `git describe --tags` if cloned from this repository): 1.1.8
- Distribution: Fedora 37
- Kernel version (ex. `uname -srmo`): `Linux 6.2.10-200.fc37.x86_64 x86_64 GNU/Linux`
- Output of `solaar show`:

<details>

```
solaar version 1.1.8

Unifying Receiver
  Device path  : /dev/hidraw1
  USB id       : 046d:C52B
  Serial       : 7E549558
    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=44, 2=244

  1: Wireless Touch Keyboard K400 Plus
     Device path  : /dev/hidraw2
     WPID         : 404D
     Codename     : K400 Plus
     Kind         : keyboard
     Protocol     : HID++ 4.1
     Polling rate : 8 ms (125Hz)
     Serial number: 396F750E
     Model ID:      404D00000000
     Unit ID:       F3A4BCF6
        Bootloader: BOT 22.02.B0002
          Firmware: RQK 63.02.B0016
             Other: 
     The power switch is located on the top edge.
     Supports 24 HID++ 2.0 features:
         0: ROOT                   {0000} V0     
         1: FEATURE SET            {0001} V0     
         2: DEVICE FW VERSION      {0003} V1     
            Firmware: Bootloader BOT 22.02.B0002 404D6217AD40
            Firmware: Firmware RQK 63.02.B0016 404D6217AD40
            Firmware: Other   
            Unit ID: F3A4BCF6  Model ID: 404D00000000  Transport IDs: {'wpid': '404D'}
         3: DEVICE NAME            {0005} V0     
            Name: Wireless Touch Keyboard K400 Plus
            Kind: keyboard
         4: WIRELESS DEVICE STATUS {1D4B} V0     
         5: CONFIG CHANGE          {0020} V0     
         6: BATTERY STATUS         {1000} V0     
            Battery: 50%, discharging, next level 20%.
         7: REPROG CONTROLS V4     {1B04} V0     
            Key/Button Diversion (saved): {Volume Up:Regular, Volume Down:Regular, Mute:Regular, Play/Pause:Regular, Next:Regular, Previous:Regular, Application Switcher:Regular, My Home:Regular, Media Player:Regular, Search:Regular, Sleep:Regular, Contextual Menu:Regular, Back:Regular, Show Desktop:Regular, Maximize Window:Regular, Switch Screen:Regular, Fn Left Click:Regular, Second Left Click:Regular}
            Key/Button Diversion        : {Volume Up:Regular, Volume Down:Regular, Mute:Regular, Play/Pause:Regular, Next:Regular, Previous:Regular, Application Switcher:Regular, My Home:Regular, Media Player:Regular, Search:Regular, Sleep:Regular, Contextual Menu:Regular, Back:Regular, Show Desktop:Regular, Maximize Window:Regular, Switch Screen:Regular, Fn Left Click:Regular, Second Left Click:Regular}
         8: SWAP BUTTON CANCEL     {2005} V0     
         9: NEW FN INVERSION       {40A2} V0     
            Fn-swap: disabled
            Fn-swap default: enabled
            Swap Fx function (saved): False
            Swap Fx function        : False
        10: ENCRYPTION             {4100} V0     
        11: KEYBOARD DISABLE KEYS  {4521} V0     
            Disable keys (saved): {Caps Lock:False, Scroll Lock:False, Insert:False, Win:False}
            Disable keys        : {Caps Lock:False, Scroll Lock:False, Insert:False, Win:False}
        12: TOUCHPAD RAW XY        {6100} V0     
        13: GESTURE 2              {6501} V0     
            Gestures (saved): {1: True, 2: True, 10: True, 30: True, 34: False, 42: True, 43: True, 45: False, 64: False, 65: False, 67: False, 84: True}
            Gestures        : {1: True, 2: True, 30: True, 10: True, 45: False, 42: True, 43: True, 64: False, 65: False, 67: False, 84: True, 34: False}
            Gestures Diversion (saved): {1: False, 2: False, 10: False, 44: True, 64: True, 65: False, 67: False, 84: False, 85: False, 100: False}
            Gestures Diversion        : {1: False, 2: False, 10: False, 44: True, 64: True, 65: False, 67: False, 84: False, 85: False, 100: False}
            Gesture params (saved): {4: {'scale': 256}}
            Gesture params        : {4: {'scale': 256}}
        14: DFUCONTROL UNSIGNED    {00C1} V0     
        15: unknown:1811           {1811} V0    internal, hidden 
        16: unknown:1830           {1830} V0    internal, hidden 
        17: unknown:1890           {1890} V0    internal, hidden 
        18: unknown:1DF3           {1DF3} V0    internal, hidden 
        19: unknown:1E00           {1E00} V0    hidden 
        20: unknown:1EB0           {1EB0} V0    internal, hidden 
        21: unknown:1861           {1861} V0    internal, hidden 
        22: unknown:18B0           {18B0} V0    internal, hidden 
        23: unknown:1F11           {1F11} V0    internal, hidden 
     Has 20 reprogrammable keys:
         0: Second Left Click         , default: Left Click                  => Left Click                
             mse, divertable, pos:0, group:0, group mask:empty
             reporting: default
         1: Back                      , default: Mouse Back Button           => Mouse Back Button         
             is FN, FN sensitive, reprogrammable, divertable, pos:1, group:0, group mask:empty
             reporting: default
         2: My Home                   , default: HomePage                    => HomePage                  
             is FN, FN sensitive, reprogrammable, divertable, pos:2, group:0, group mask:empty
             reporting: default
         3: Application Switcher      , default: Application Switcher        => Application Switcher      
             is FN, FN sensitive, reprogrammable, divertable, pos:3, group:0, group mask:empty
             reporting: default
         4: Contextual Menu           , default: Right Click                 => Right Click               
             is FN, FN sensitive, reprogrammable, divertable, pos:4, group:0, group mask:empty
             reporting: default
         5: Search                    , default: Search Files                => Search Files              
             is FN, FN sensitive, reprogrammable, divertable, pos:5, group:0, group mask:empty
             reporting: default
         6: Show Desktop              , default: Show Desktop                => Show Desktop              
             is FN, FN sensitive, reprogrammable, divertable, pos:6, group:0, group mask:empty
             reporting: default
         7: Maximize Window           , default: Maximize Window             => Maximize Window           
             is FN, FN sensitive, reprogrammable, divertable, pos:7, group:0, group mask:empty
             reporting: default
         8: Switch Screen             , default: Switch Presentation/Switch Screen => Switch Presentation/Switch Screen
             is FN, FN sensitive, reprogrammable, divertable, pos:8, group:0, group mask:empty
             reporting: default
         9: Media Player              , default: Music                       => Music                     
             is FN, FN sensitive, reprogrammable, divertable, pos:9, group:0, group mask:empty
             reporting: default
        10: Previous                  , default: Previous                    => Previous                  
             is FN, FN sensitive, divertable, pos:10, group:0, group mask:empty
             reporting: default
        11: Play/Pause                , default: Play/Pause                  => Play/Pause                
             is FN, FN sensitive, divertable, pos:11, group:0, group mask:empty
             reporting: default
        12: Next                      , default: Next                        => Next                      
             is FN, FN sensitive, divertable, pos:12, group:0, group mask:empty
             reporting: default
        13: Fn Left Click             , default: ShowUI                      => ShowUI                    
             divertable, pos:0, group:0, group mask:empty
             reporting: default
        14: Left Button               , default: Left Click                  => Left Click                
             mse, pos:0, group:0, group mask:empty
             reporting: default
        15: Right Button              , default: Right Click                 => Right Click               
             mse, pos:0, group:0, group mask:empty
             reporting: default
        16: Mute                      , default: Mute                        => Mute                      
             nonstandard, divertable, pos:0, group:0, group mask:empty
             reporting: default
        17: Volume Up                 , default: Volume Up                   => Volume Up                 
             nonstandard, divertable, pos:0, group:0, group mask:empty
             reporting: default
        18: Volume Down               , default: Volume Down                 => Volume Down               
             nonstandard, divertable, pos:0, group:0, group mask:empty
             reporting: default
        19: Sleep                     , default: Sleep                       => Sleep                     
             reprogrammable, divertable, pos:0, group:0, group mask:empty
             reporting: default
     Has 17 gesture(s), 1 param(s) and 5 spec(s):
        Track1Finger               Enabled(None): None   Diverted:(None) None
        TapGestures                Enabled(None): None   Diverted:(None) None
        Tap1Finger                 Enabled(   0): True   Diverted:(   0) False
        Tap2Finger                 Enabled(   1): True   Diverted:(   1) False
        TapDrag1Finger             Enabled(   2): True   Diverted:(None) None
        DoubleTap1Finger           Enabled(   3): True   Diverted:(   2) False
        Scroll2FingerStateless     Enabled(None): None   Diverted:(   3) True
        NaturalScrolling           Enabled(   4): False  Diverted:(None) None
        Scroll2FingerHoriz         Enabled(   5): True   Diverted:(None) None
        Scroll2FingerVert          Enabled(   6): True   Diverted:(None) None
        LeftEdgeSwipe1Finger2      Enabled(   7): False  Diverted:(   4) True
        RightEdgeSwipe1Finger2     Enabled(   8): False  Diverted:(   5) False
        TopEdgeSwipe1Finger2       Enabled(   9): False  Diverted:(   6) False
        Zoom2FingerStateless       Enabled(  10): True   Diverted:(   7) False
        FnClickGestureSuppression  Enabled(  11): False  Diverted:(None) None
        TwoFingersPresent          Enabled(None): None   Diverted:(   8) False
        DeviceSpecificRawData      Enabled(None): None   Diverted:(   9) False
        ScaleFactor                Value  (   0): 256 [Default: 256]
        period unit                Spec   (   3): 2048
        DVI field width            Spec   (   1): 8
        field widths               Spec   (   2): 8
        multiplier                 Spec   (   5): None
        resolution                 Spec   (   4): 4
     Battery: 50%, discharging, next level 20%.

  2: Marathon Mouse M705 (M-R0073)
     Device path  : /dev/hidraw3
     WPID         : 406D
     Codename     : M705 (M-R0073)
     Kind         : mouse
     Protocol     : HID++ 4.5
     Polling rate : 8 ms (125Hz)
     Serial number: 8371ECF5
     Model ID:      406D00000000
     Unit ID:       539489E0
        Bootloader: BOT 59.00.B0002
          Firmware: RQM 67.10.B0009
     The power switch is located on the base.
     Supports 28 HID++ 2.0 features:
         0: ROOT                   {0000} V0     
         1: FEATURE SET            {0001} V0     
         2: DEVICE FW VERSION      {0003} V2     
            Firmware: Bootloader BOT 59.00.B0002 406D00443FD5
            Firmware: Firmware RQM 67.10.B0009 406D00443FD5
            Unit ID: 539489E0  Model ID: 406D00000000  Transport IDs: {'wpid': '406D'}
         3: DEVICE NAME            {0005} V0     
            Name: Marathon Mouse/Performance Plus M705
            Kind: mouse
         4: WIRELESS DEVICE STATUS {1D4B} V0     
         5: CONFIG CHANGE          {0020} V0     
         6: BATTERY STATUS         {1000} V0     
            Battery: 20%, discharging, next level 5%.
         7: REPROG CONTROLS V4     {1B04} V3     
            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, Left Tilt:Mouse Scroll Left Button , Right Tilt:Mouse Scroll Right Button}
            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, Left Tilt:Mouse Scroll Left Button , Right Tilt:Mouse Scroll Right Button}
            Key/Button Diversion (saved): {Middle Button:Regular, Back Button:Regular, Forward Button:Regular, Left Tilt:Regular, Right Tilt:Regular}
            Key/Button Diversion        : {Middle Button:Regular, Back Button:Regular, Forward Button:Regular, Left Tilt:Regular, Right Tilt:Regular}
         8: POINTER SPEED          {2205} V0     
            Pointer Speed: 1.0
            Sensitivity (Pointer Speed) (saved): 256
            Sensitivity (Pointer Speed)        : 256
         9: VERTICAL SCROLLING     {2100} V0     
            Roller type: 3G
            Ratchet per turn: 24
            Scroll lines: 0
        10: DFUCONTROL SIGNED      {00C2} V0     
        11: DEVICE RESET           {1802} V0    internal, hidden 
        12: unknown:1803           {1803} V0    internal, hidden 
        13: CONFIG DEVICE PROPS    {1806} V1    internal, hidden 
        14: unknown:1810           {1810} V0    internal, hidden 
        15: unknown:1830           {1830} V0    internal, hidden 
        16: unknown:1890           {1890} V0    internal, hidden 
        17: unknown:18A1           {18A1} V0    internal, hidden 
        18: unknown:1DF3           {1DF3} V0    internal, hidden 
        19: unknown:1E00           {1E00} V0    hidden 
        20: unknown:1EB0           {1EB0} V0    internal, hidden 
        21: unknown:1861           {1861} V0    internal, hidden 
        22: unknown:18B1           {18B1} V0    internal, hidden 
        23: unknown:1850           {1850} V0    internal, hidden 
        24: unknown:1E22           {1E22} V0    internal, hidden 
        25: unknown:1F03           {1F03} V0    internal, hidden 
        26: unknown:18C0           {18C0} V0    internal, hidden 
        27: HIRES WHEEL            {2121} V0     
            Multiplier: 8
            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
     Has 7 reprogrammable keys:
         0: Left Button               , default: Left Click                  => Left Click                
             mse, reprogrammable, pos:0, group:1, group mask:g1
             reporting: default
         1: Right Button              , default: Right Click                 => Right Click               
             mse, reprogrammable, pos:0, group:1, group mask:g1
             reporting: default
         2: Middle Button             , default: Mouse Middle Button         => Mouse Middle Button       
             mse, reprogrammable, divertable, pos:0, group:2, group mask:g1,g2
             reporting: default
         3: Back Button               , default: Mouse Back Button           => Mouse Back Button         
             mse, reprogrammable, divertable, pos:0, group:2, group mask:g1,g2
             reporting: default
         4: Forward Button            , default: Mouse Forward Button        => Mouse Forward Button      
             mse, reprogrammable, divertable, pos:0, group:2, group mask:g1,g2
             reporting: default
         5: Left Tilt                 , default: Mouse Scroll Left Button    => Mouse Scroll Left Button  
             mse, reprogrammable, divertable, pos:0, group:2, group mask:g1,g2
             reporting: default
         6: Right Tilt                , default: Mouse Scroll Right Button   => Mouse Scroll Right Button 
             mse, reprogrammable, divertable, pos:0, group:2, group mask:g1,g2
             reporting: default
     Battery: 20%, discharging, next level 5%.

```
</details>

- Contents of `~/.config/solaar/config.yaml` (or `~/.config/solaar/config.json` if `~/.config/solaar/config.yaml` not present):

<details>

```
- 1.1.8
- _NAME: Wireless Touch Keyboard K400 Plus
  _absent: [hi-res-scroll, lowres-smooth-scroll, hires-smooth-invert, hires-smooth-resolution, smart-shift, thumb-scroll-mode, thumb-scroll-invert, onboard_profiles,
    report_rate, pointer_speed, dpi, dpi-sliding, speed-change, mouse-gestures, backlight, backlight-timed, reprogrammable-keys, persistent-remappable-keys,
    divert-crown, crown-smooth, divert-gkeys, m-key-leds, mr-key-led, multiplatform, change-host, lowres-scroll-mode, hires-scroll-mode, sidetone, equalizer,
    scroll-ratchet]
  _battery: 4096
  _modelId: 404D00000000
  _sensitive: {disable-keyboard-keys: false, fn-swap: true, gesture2-gestures: false, gesture2-params: false}
  _serial: 396F750E
  _unitId: F3A4BCF6
  _wpid: 404D
  disable-keyboard-keys: {1: false, 4: false, 8: false, 16: false}
  divert-keys: {1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 8: 0, 34: 0, 40: 0, 62: 0, 64: 0, 79: 0, 84: 0, 110: 0, 145: 0, 149: 0, 183: 0, 184: 0}
  fn-swap: false
  gesture2-divert: {1: false, 2: false, 10: false, 44: true, 64: true, 65: false, 67: false, 84: false, 85: false, 100: false}
  gesture2-gestures: {1: true, 2: true, 10: true, 30: true, 34: false, 42: true, 43: true, 45: false, 64: false, 65: false, 67: false, 84: true}
  gesture2-params:
    4: {scale: 256}
- _NAME: Marathon Mouse M705 (M-R0073)
  _absent: [hi-res-scroll, lowres-smooth-scroll, smart-shift, thumb-scroll-mode, thumb-scroll-invert, onboard_profiles, report_rate, dpi, dpi-sliding, speed-change,
    mouse-gestures, backlight, backlight-timed, fn-swap, persistent-remappable-keys, disable-keyboard-keys, divert-crown, crown-smooth, divert-gkeys, m-key-leds,
    mr-key-led, multiplatform, change-host, gesture2-gestures, gesture2-divert, gesture2-params, lowres-scroll-mode, sidetone, equalizer, scroll-ratchet]
  _battery: 4096
  _modelId: 406D00000000
  _serial: 8371ECF5
  _unitId: 539489E0
  _wpid: 406D
  divert-keys: {82: 0, 83: 0, 86: 0, 91: 0, 93: 0}
  hires-scroll-mode: false
  hires-smooth-invert: false
  hires-smooth-resolution: true
  pointer_speed: 256
  reprogrammable-keys: {80: 80, 81: 81, 82: 82, 83: 83, 86: 86, 91: 91, 93: 93}
```
</details>


- Errors or warrnings from Solaar:

**Describe the bug**
I mainly use solaar to make use of the swap fx function and I see that when coming back from suspend mode that this functionality does not work anymore.

**To Reproduce**
Steps to reproduce the behavior:
1. Suspend the system
2. Hit the power button to get back to the normal state
3. The swap fx function does not work anymore (maybe other functionalities as well but I did not test this)

My workaround at the moment:
Simply restart solaar (hit quit button start it regularly)

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.



Discussion:
What do you mean by "not work anymore"?   Can you change the behaviour using the Solaar GUI?  Is the behaviour different after resume?   Please provide output of `solaar show` when the problem is occurring and then after you have restarted Solaar.
Edit: I deleted my previous comment as it was terribly wrong. Today I could reproduce the issue and here are the answers to your questions:

> What do you mean by "not work anymore"?

The swap fn functionality does not work anymore. E.g. when hitting F5 key on my Logitech K400+ the search functionality is executed rather the F5 key ;)

> Can you change the behaviour using the Solaar GUI? Is the behaviour different after resume?
No, I cannot access the devices anymore and the list is empty:
![image](https://user-images.githubusercontent.com/90193552/235843010-3bfc359a-a5c7-41d4-959b-5549e9280e60.png)

> Please provide output of solaar show when the problem is occurring and then after you have restarted Solaar

`solaar show` before restart
<details>

```
solaar version 1.1.8

Unifying Receiver
  Device path  : /dev/hidraw1
  USB id       : 046d:C52B
  Serial       : 7E549558
    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=178, 2=2

  1: Wireless Touch Keyboard K400 Plus
     Device path  : /dev/hidraw2
     WPID         : 404D
     Codename     : K400 Plus
     Kind         : keyboard
     Protocol     : HID++ 4.1
     Polling rate : 8 ms (125Hz)
     Serial number: 396F750E
     Model ID:      404D00000000
     Unit ID:       F3A4BCF6
        Bootloader: BOT 22.02.B0002
          Firmware: RQK 63.02.B0016
             Other: 
     The power switch is located on the top edge.
     Supports 24 HID++ 2.0 features:
         0: ROOT                   {0000} V0     
         1: FEATURE SET            {0001} V0     
         2: DEVICE FW VERSION      {0003} V1     
            Firmware: Bootloader BOT 22.02.B0002 404D6217AD40
            Firmware: Firmware RQK 63.02.B0016 404D6217AD40
            Firmware: Other   
            Unit ID: F3A4BCF6  Model ID: 404D00000000  Transport IDs: {'wpid': '404D'}
         3: DEVICE NAME            {0005} V0     
            Name: Wireless Touch Keyboard K400 Plus
            Kind: keyboard
         4: WIRELESS DEVICE STATUS {1D4B} V0     
         5: CONFIG CHANGE          {0020} V0     
         6: BATTERY STATUS         {1000} V0     
            Battery: 50%, discharging, next level 20%.
         7: REPROG CONTROLS V4     {1B04} V0     
            Key/Button Diversion (saved): {Volume Up:Regular, Volume Down:Regular, Mute:Regular, Play/Pause:Regular, Next:Regular, Previous:Regular, Application Switcher:Regular, My Home:Regular, Media Player:Regular, Search:Regular, Sleep:Regular, Contextual Menu:Regular, Back:Regular, Show Desktop:Regular, Maximize Window:Regular, Switch Screen:Regular, Fn Left Click:Regular, Second Left Click:Regular}
            Key/Button Diversion        : {Volume Up:Regular, Volume Down:Regular, Mute:Regular, Play/Pause:Regular, Next:Regular, Previous:Regular, Application Switcher:Regular, My Home:Regular, Media Player:Regular, Search:Regular, Sleep:Regular, Contextual Menu:Regular, Back:Regular, Show Desktop:Regular, Maximize Window:Regular, Switch Screen:Regular, Fn Left Click:Regular, Second Left Click:Regular}
         8: SWAP BUTTON CANCEL     {2005} V0     
         9: NEW FN INVERSION       {40A2} V0     
            Fn-swap: enabled
            Fn-swap default: enabled
            Swap Fx function (saved): False
            Swap Fx function        : True
        10: ENCRYPTION             {4100} V0     
        11: KEYBOARD DISABLE KEYS  {4521} V0     
            Disable keys (saved): {Caps Lock:False, Scroll Lock:False, Insert:False, Win:False}
            Disable keys        : {Caps Lock:False, Scroll Lock:False, Insert:False, Win:False}
        12: TOUCHPAD RAW XY        {6100} V0     
        13: GESTURE 2              {6501} V0     
            Gestures (saved): {1: True, 2: True, 10: True, 30: True, 34: False, 42: True, 43: True, 45: False, 64: False, 65: False, 67: False, 84: True}
            Gestures        : {1: True, 2: True, 30: True, 10: True, 45: False, 42: True, 43: True, 64: False, 65: False, 67: False, 84: True, 34: False}
            Gestures Diversion (saved): {1: False, 2: False, 10: False, 44: True, 64: True, 65: False, 67: False, 84: False, 85: False, 100: False}
            Gestures Diversion        : {1: False, 2: False, 10: False, 44: False, 64: False, 65: False, 67: False, 84: False, 85: False, 100: False}
            Gesture params (saved): {4: {'scale': 256}}
            Gesture params        : {4: {'scale': 256}}
        14: DFUCONTROL UNSIGNED    {00C1} V0     
        15: unknown:1811           {1811} V0    internal, hidden 
        16: unknown:1830           {1830} V0    internal, hidden 
        17: unknown:1890           {1890} V0    internal, hidden 
        18: unknown:1DF3           {1DF3} V0    internal, hidden 
        19: unknown:1E00           {1E00} V0    hidden 
        20: unknown:1EB0           {1EB0} V0    internal, hidden 
        21: unknown:1861           {1861} V0    internal, hidden 
        22: unknown:18B0           {18B0} V0    internal, hidden 
        23: unknown:1F11           {1F11} V0    internal, hidden 
     Has 20 reprogrammable keys:
         0: Second Left Click         , default: Left Click                  => Left Click                
             mse, divertable, pos:0, group:0, group mask:empty
             reporting: default
         1: Back                      , default: Mouse Back Button           => Mouse Back Button         
             is FN, FN sensitive, reprogrammable, divertable, pos:1, group:0, group mask:empty
             reporting: default
         2: My Home                   , default: HomePage                    => HomePage                  
             is FN, FN sensitive, reprogrammable, divertable, pos:2, group:0, group mask:empty
             reporting: default
         3: Application Switcher      , default: Application Switcher        => Application Switcher      
             is FN, FN sensitive, reprogrammable, divertable, pos:3, group:0, group mask:empty
             reporting: default
         4: Contextual Menu           , default: Right Click                 => Right Click               
             is FN, FN sensitive, reprogrammable, divertable, pos:4, group:0, group mask:empty
             reporting: default
         5: Search                    , default: Search Files                => Search Files              
             is FN, FN sensitive, reprogrammable, divertable, pos:5, group:0, group mask:empty
             reporting: default
         6: Show Desktop              , default: Show Desktop                => Show Desktop              
             is FN, FN sensitive, reprogrammable, divertable, pos:6, group:0, group mask:empty
             reporting: default
         7: Maximize Window           , default: Maximize Window             => Maximize Window           
             is FN, FN sensitive, reprogrammable, divertable, pos:7, group:0, group mask:empty
             reporting: default
         8: Switch Screen             , default: Switch Presentation/Switch Screen => Switch Presentation/Switch Screen
             is FN, FN sensitive, reprogrammable, divertable, pos:8, group:0, group mask:empty
             reporting: default
         9: Media Player              , default: Music                       => Music                     
             is FN, FN sensitive, reprogrammable, divertable, pos:9, group:0, group mask:empty
             reporting: default
        10: Previous                  , default: Previous                    => Previous                  
             is FN, FN sensitive, divertable, pos:10, group:0, group mask:empty
             reporting: default
        11: Play/Pause                , default: Play/Pause                  => Play/Pause                
             is FN, FN sensitive, divertable, pos:11, group:0, group mask:empty
             reporting: default
        12: Next                      , default: Next                        => Next                      
             is FN, FN sensitive, divertable, pos:12, group:0, group mask:empty
             reporting: default
        13: Fn Left Click             , default: ShowUI                      => ShowUI                    
             divertable, pos:0, group:0, group mask:empty
             reporting: default
        14: Left Button               , default: Left Click                  => Left Click                
             mse, pos:0, group:0, group mask:empty
             reporting: default
        15: Right Button              , default: Right Click                 => Right Click               
             mse, pos:0, group:0, group mask:empty
             reporting: default
        16: Mute                      , default: Mute                        => Mute                      
             nonstandard, divertable, pos:0, group:0, group mask:empty
             reporting: default
        17: Volume Up                 , default: Volume Up                   => Volume Up                 
             nonstandard, divertable, pos:0, group:0, group mask:empty
             reporting: default
        18: Volume Down               , default: Volume Down                 => Volume Down               
             nonstandard, divertable, pos:0, group:0, group mask:empty
             reporting: default
        19: Sleep                     , default: Sleep                       => Sleep                     
             reprogrammable, divertable, pos:0, group:0, group mask:empty
             reporting: default
     Has 17 gesture(s), 1 param(s) and 5 spec(s):
        Track1Finger               Enabled(None): None   Diverted:(None) None
        TapGestures                Enabled(None): None   Diverted:(None) None
        Tap1Finger                 Enabled(   0): True   Diverted:(   0) False
        Tap2Finger                 Enabled(   1): True   Diverted:(   1) False
        TapDrag1Finger             Enabled(   2): True   Diverted:(None) None
        DoubleTap1Finger           Enabled(   3): True   Diverted:(   2) False
        Scroll2FingerStateless     Enabled(None): None   Diverted:(   3) False
        NaturalScrolling           Enabled(   4): False  Diverted:(None) None
        Scroll2FingerHoriz         Enabled(   5): True   Diverted:(None) None
        Scroll2FingerVert          Enabled(   6): True   Diverted:(None) None
        LeftEdgeSwipe1Finger2      Enabled(   7): False  Diverted:(   4) False
        RightEdgeSwipe1Finger2     Enabled(   8): False  Diverted:(   5) False
        TopEdgeSwipe1Finger2       Enabled(   9): False  Diverted:(   6) False
        Zoom2FingerStateless       Enabled(  10): True   Diverted:(   7) False
        FnClickGestureSuppression  Enabled(  11): False  Diverted:(None) None
        TwoFingersPresent          Enabled(None): None   Diverted:(   8) False
        DeviceSpecificRawData      Enabled(None): None   Diverted:(   9) False
        ScaleFactor                Value  (   0): 256 [Default: 256]
        period unit                Spec   (   3): 2048
        DVI field width            Spec   (   1): 8
        field widths               Spec   (   2): 8
        multiplier                 Spec   (   5): None
        resolution                 Spec   (   4): 4
     Battery: 50%, discharging, next level 20%.

  2: Marathon Mouse M705 (M-R0073)
     Device path  : /dev/hidraw3
     WPID         : 406D
     Codename     : M705 (M-R0073)
     Kind         : mouse
     Protocol     : HID++ 4.5
     Polling rate : 8 ms (125Hz)
     Serial number: 8371ECF5
     Model ID:      406D00000000
     Unit ID:       539489E0
        Bootloader: BOT 59.00.B0002
          Firmware: RQM 67.10.B0009
     The power switch is located on the base.
     Supports 28 HID++ 2.0 features:
         0: ROOT                   {0000} V0     
         1: FEATURE SET            {0001} V0     
         2: DEVICE FW VERSION      {0003} V2     
            Firmware: Bootloader BOT 59.00.B0002 406D00443FD5
            Firmware: Firmware RQM 67.10.B0009 406D00443FD5
            Unit ID: 539489E0  Model ID: 406D00000000  Transport IDs: {'wpid': '406D'}
         3: DEVICE NAME            {0005} V0     
            Name: Marathon Mouse/Performance Plus M705
            Kind: mouse
         4: WIRELESS DEVICE STATUS {1D4B} V0     
         5: CONFIG CHANGE          {0020} V0     
         6: BATTERY STATUS         {1000} V0     
            Battery: 20%, discharging, next level 5%.
         7: REPROG CONTROLS V4     {1B04} V3     
            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, Left Tilt:Mouse Scroll Left Button , Right Tilt:Mouse Scroll Right Button}
            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, Left Tilt:Mouse Scroll Left Button , Right Tilt:Mouse Scroll Right Button}
            Key/Button Diversion (saved): {Middle Button:Regular, Back Button:Regular, Forward Button:Regular, Left Tilt:Regular, Right Tilt:Regular}
            Key/Button Diversion        : {Middle Button:Regular, Back Button:Regular, Forward Button:Regular, Left Tilt:Regular, Right Tilt:Regular}
         8: POINTER SPEED          {2205} V0     
            Pointer Speed: 1.0
            Sensitivity (Pointer Speed) (saved): 256
            Sensitivity (Pointer Speed)        : 256
         9: VERTICAL SCROLLING     {2100} V0     
            Roller type: 3G
            Ratchet per turn: 24
            Scroll lines: 0
        10: DFUCONTROL SIGNED      {00C2} V0     
        11: DEVICE RESET           {1802} V0    internal, hidden 
        12: unknown:1803           {1803} V0    internal, hidden 
        13: CONFIG DEVICE PROPS    {1806} V1    internal, hidden 
        14: unknown:1810           {1810} V0    internal, hidden 
        15: unknown:1830           {1830} V0    internal, hidden 
        16: unknown:1890           {1890} V0    internal, hidden 
        17: unknown:18A1           {18A1} V0    internal, hidden 
        18: unknown:1DF3           {1DF3} V0    internal, hidden 
        19: unknown:1E00           {1E00} V0    hidden 
        20: unknown:1EB0           {1EB0} V0    internal, hidden 
        21: unknown:1861           {1861} V0    internal, hidden 
        22: unknown:18B1           {18B1} V0    internal, hidden 
        23: unknown:1850           {1850} V0    internal, hidden 
        24: unknown:1E22           {1E22} V0    internal, hidden 
        25: unknown:1F03           {1F03} V0    internal, hidden 
        26: unknown:18C0           {18C0} V0    internal, hidden 
        27: HIRES WHEEL            {2121} V0     
            Multiplier: 8
            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
     Has 7 reprogrammable keys:
         0: Left Button               , default: Left Click                  => Left Click                
             mse, reprogrammable, pos:0, group:1, group mask:g1
             reporting: default
         1: Right Button              , default: Right Click                 => Right Click               
             mse, reprogrammable, pos:0, group:1, group mask:g1
             reporting: default
         2: Middle Button             , default: Mouse Middle Button         => Mouse Middle Button       
             mse, reprogrammable, divertable, pos:0, group:2, group mask:g1,g2
             reporting: default
         3: Back Button               , default: Mouse Back Button           => Mouse Back Button         
             mse, reprogrammable, divertable, pos:0, group:2, group mask:g1,g2
             reporting: default
         4: Forward Button            , default: Mouse Forward Button        => Mouse Forward Button      
             mse, reprogrammable, divertable, pos:0, group:2, group mask:g1,g2
             reporting: default
         5: Left Tilt                 , default: Mouse Scroll Left Button    => Mouse Scroll Left Button  
             mse, reprogrammable, divertable, pos:0, group:2, group mask:g1,g2
             reporting: default
         6: Right Tilt                , default: Mouse Scroll Right Button   => Mouse Scroll Right Button 
             mse, reprogrammable, divertable, pos:0, group:2, group mask:g1,g2
             reporting: default
     Battery: 20%, discharging, next level 5%.


```
</details>

`solaar show` after stop/start
<details>

```
solaar version 1.1.8

Unifying Receiver
  Device path  : /dev/hidraw1
  USB id       : 046d:C52B
  Serial       : 7E549558
    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=29, 2=37

  1: Wireless Touch Keyboard K400 Plus
     Device path  : /dev/hidraw2
     WPID         : 404D
     Codename     : K400 Plus
     Kind         : keyboard
     Protocol     : HID++ 4.1
     Polling rate : 8 ms (125Hz)
     Serial number: 396F750E
     Model ID:      404D00000000
     Unit ID:       F3A4BCF6
        Bootloader: BOT 22.02.B0002
          Firmware: RQK 63.02.B0016
             Other: 
     The power switch is located on the top edge.
     Supports 24 HID++ 2.0 features:
         0: ROOT                   {0000} V0     
         1: FEATURE SET            {0001} V0     
         2: DEVICE FW VERSION      {0003} V1     
            Firmware: Bootloader BOT 22.02.B0002 404D6217AD40
            Firmware: Firmware RQK 63.02.B0016 404D6217AD40
            Firmware: Other   
            Unit ID: F3A4BCF6  Model ID: 404D00000000  Transport IDs: {'wpid': '404D'}
         3: DEVICE NAME            {0005} V0     
            Name: Wireless Touch Keyboard K400 Plus
            Kind: keyboard
         4: WIRELESS DEVICE STATUS {1D4B} V0     
         5: CONFIG CHANGE          {0020} V0     
         6: BATTERY STATUS         {1000} V0     
            Battery: 50%, discharging, next level 20%.
         7: REPROG CONTROLS V4     {1B04} V0     
            Key/Button Diversion (saved): {Volume Up:Regular, Volume Down:Regular, Mute:Regular, Play/Pause:Regular, Next:Regular, Previous:Regular, Application Switcher:Regular, My Home:Regular, Media Player:Regular, Search:Regular, Sleep:Regular, Contextual Menu:Regular, Back:Regular, Show Desktop:Regular, Maximize Window:Regular, Switch Screen:Regular, Fn Left Click:Regular, Second Left Click:Regular}
            Key/Button Diversion        : {Volume Up:Regular, Volume Down:Regular, Mute:Regular, Play/Pause:Regular, Next:Regular, Previous:Regular, Application Switcher:Regular, My Home:Regular, Media Player:Regular, Search:Regular, Sleep:Regular, Contextual Menu:Regular, Back:Regular, Show Desktop:Regular, Maximize Window:Regular, Switch Screen:Regular, Fn Left Click:Regular, Second Left Click:Regular}
         8: SWAP BUTTON CANCEL     {2005} V0     
         9: NEW FN INVERSION       {40A2} V0     
            Fn-swap: enabled
            Fn-swap default: enabled
            Swap Fx function (saved): False
            Swap Fx function        : True
        10: ENCRYPTION             {4100} V0     
        11: KEYBOARD DISABLE KEYS  {4521} V0     
            Disable keys (saved): {Caps Lock:False, Scroll Lock:False, Insert:False, Win:False}
            Disable keys        : {Caps Lock:False, Scroll Lock:False, Insert:False, Win:False}
        12: TOUCHPAD RAW XY        {6100} V0     
        13: GESTURE 2              {6501} V0     
            Gestures (saved): {1: True, 2: True, 10: True, 30: True, 34: False, 42: True, 43: True, 45: False, 64: False, 65: False, 67: False, 84: True}
            Gestures        : {1: True, 2: True, 30: True, 10: True, 45: False, 42: True, 43: True, 64: False, 65: False, 67: False, 84: True, 34: False}
            Gestures Diversion (saved): {1: False, 2: False, 10: False, 44: True, 64: True, 65: False, 67: False, 84: False, 85: False, 100: False}
            Gestures Diversion        : {1: False, 2: False, 10: False, 44: False, 64: False, 65: False, 67: False, 84: False, 85: False, 100: False}
            Gesture params (saved): {4: {'scale': 256}}
            Gesture params        : {4: {'scale': 256}}
        14: DFUCONTROL UNSIGNED    {00C1} V0     
        15: unknown:1811           {1811} V0    internal, hidden 
        16: unknown:1830           {1830} V0    internal, hidden 
        17: unknown:1890           {1890} V0    internal, hidden 
        18: unknown:1DF3           {1DF3} V0    internal, hidden 
        19: unknown:1E00           {1E00} V0    hidden 
        20: unknown:1EB0           {1EB0} V0    internal, hidden 
        21: unknown:1861           {1861} V0    internal, hidden 
        22: unknown:18B0           {18B0} V0    internal, hidden 
        23: unknown:1F11           {1F11} V0    internal, hidden 
     Has 20 reprogrammable keys:
         0: Second Left Click         , default: Left Click                  => Left Click                
             mse, divertable, pos:0, group:0, group mask:empty
             reporting: default
         1: Back                      , default: Mouse Back Button           => Mouse Back Button         
             is FN, FN sensitive, reprogrammable, divertable, pos:1, group:0, group mask:empty
             reporting: default
         2: My Home                   , default: HomePage                    => HomePage                  
             is FN, FN sensitive, reprogrammable, divertable, pos:2, group:0, group mask:empty
             reporting: default
         3: Application Switcher      , default: Application Switcher        => Application Switcher      
             is FN, FN sensitive, reprogrammable, divertable, pos:3, group:0, group mask:empty
             reporting: default
         4: Contextual Menu           , default: Right Click                 => Right Click               
             is FN, FN sensitive, reprogrammable, divertable, pos:4, group:0, group mask:empty
             reporting: default
         5: Search                    , default: Search Files                => Search Files              
             is FN, FN sensitive, reprogrammable, divertable, pos:5, group:0, group mask:empty
             reporting: default
         6: Show Desktop              , default: Show Desktop                => Show Desktop              
             is FN, FN sensitive, reprogrammable, divertable, pos:6, group:0, group mask:empty
             reporting: default
         7: Maximize Window           , default: Maximize Window             => Maximize Window           
             is FN, FN sensitive, reprogrammable, divertable, pos:7, group:0, group mask:empty
             reporting: default
         8: Switch Screen             , default: Switch Presentation/Switch Screen => Switch Presentation/Switch Screen
             is FN, FN sensitive, reprogrammable, divertable, pos:8, group:0, group mask:empty
             reporting: default
         9: Media Player              , default: Music                       => Music                     
             is FN, FN sensitive, reprogrammable, divertable, pos:9, group:0, group mask:empty
             reporting: default
        10: Previous                  , default: Previous                    => Previous                  
             is FN, FN sensitive, divertable, pos:10, group:0, group mask:empty
             reporting: default
        11: Play/Pause                , default: Play/Pause                  => Play/Pause                
             is FN, FN sensitive, divertable, pos:11, group:0, group mask:empty
             reporting: default
        12: Next                      , default: Next                        => Next                      
             is FN, FN sensitive, divertable, pos:12, group:0, group mask:empty
             reporting: default
        13: Fn Left Click             , default: ShowUI                      => ShowUI                    
             divertable, pos:0, group:0, group mask:empty
             reporting: default
        14: Left Button               , default: Left Click                  => Left Click                
             mse, pos:0, group:0, group mask:empty
             reporting: default
        15: Right Button              , default: Right Click                 => Right Click               
             mse, pos:0, group:0, group mask:empty
             reporting: default
        16: Mute                      , default: Mute                        => Mute                      
             nonstandard, divertable, pos:0, group:0, group mask:empty
             reporting: default
        17: Volume Up                 , default: Volume Up                   => Volume Up                 
             nonstandard, divertable, pos:0, group:0, group mask:empty
             reporting: default
        18: Volume Down               , default: Volume Down                 => Volume Down               
             nonstandard, divertable, pos:0, group:0, group mask:empty
             reporting: default
        19: Sleep                     , default: Sleep                       => Sleep                     
             reprogrammable, divertable, pos:0, group:0, group mask:empty
             reporting: default
     Has 17 gesture(s), 1 param(s) and 5 spec(s):
        Track1Finger               Enabled(None): None   Diverted:(None) None
        TapGestures                Enabled(None): None   Diverted:(None) None
        Tap1Finger                 Enabled(   0): True   Diverted:(   0) False
        Tap2Finger                 Enabled(   1): True   Diverted:(   1) False
        TapDrag1Finger             Enabled(   2): True   Diverted:(None) None
        DoubleTap1Finger           Enabled(   3): True   Diverted:(   2) False
        Scroll2FingerStateless     Enabled(None): None   Diverted:(   3) False
        NaturalScrolling           Enabled(   4): False  Diverted:(None) None
        Scroll2FingerHoriz         Enabled(   5): True   Diverted:(None) None
        Scroll2FingerVert          Enabled(   6): True   Diverted:(None) None
        LeftEdgeSwipe1Finger2      Enabled(   7): False  Diverted:(   4) False
        RightEdgeSwipe1Finger2     Enabled(   8): False  Diverted:(   5) False
        TopEdgeSwipe1Finger2       Enabled(   9): False  Diverted:(   6) False
        Zoom2FingerStateless       Enabled(  10): True   Diverted:(   7) False
        FnClickGestureSuppression  Enabled(  11): False  Diverted:(None) None
        TwoFingersPresent          Enabled(None): None   Diverted:(   8) False
        DeviceSpecificRawData      Enabled(None): None   Diverted:(   9) False
        ScaleFactor                Value  (   0): 256 [Default: 256]
        period unit                Spec   (   3): 2048
        DVI field width            Spec   (   1): 8
        field widths               Spec   (   2): 8
        multiplier                 Spec   (   5): None
        resolution                 Spec   (   4): 4
     Battery: 50%, discharging, next level 20%.

  2: Marathon Mouse M705 (M-R0073)
     Device path  : /dev/hidraw3
     WPID         : 406D
     Codename     : M705 (M-R0073)
     Kind         : mouse
     Protocol     : HID++ 4.5
     Polling rate : 8 ms (125Hz)
     Serial number: 8371ECF5
     Model ID:      406D00000000
     Unit ID:       539489E0
        Bootloader: BOT 59.00.B0002
          Firmware: RQM 67.10.B0009
     The power switch is located on the base.
     Supports 28 HID++ 2.0 features:
         0: ROOT                   {0000} V0     
         1: FEATURE SET            {0001} V0     
         2: DEVICE FW VERSION      {0003} V2     
            Firmware: Bootloader BOT 59.00.B0002 406D00443FD5
            Firmware: Firmware RQM 67.10.B0009 406D00443FD5
            Unit ID: 539489E0  Model ID: 406D00000000  Transport IDs: {'wpid': '406D'}
         3: DEVICE NAME            {0005} V0     
            Name: Marathon Mouse/Performance Plus M705
            Kind: mouse
         4: WIRELESS DEVICE STATUS {1D4B} V0     
         5: CONFIG CHANGE          {0020} V0     
         6: BATTERY STATUS         {1000} V0     
            Battery: 20%, discharging, next level 5%.
         7: REPROG CONTROLS V4     {1B04} V3     
            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, Left Tilt:Mouse Scroll Left Button , Right Tilt:Mouse Scroll Right Button}
            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, Left Tilt:Mouse Scroll Left Button , Right Tilt:Mouse Scroll Right Button}
            Key/Button Diversion (saved): {Middle Button:Regular, Back Button:Regular, Forward Button:Regular, Left Tilt:Regular, Right Tilt:Regular}
            Key/Button Diversion        : {Middle Button:Regular, Back Button:Regular, Forward Button:Regular, Left Tilt:Regular, Right Tilt:Regular}
         8: POINTER SPEED          {2205} V0     
            Pointer Speed: 1.0
            Sensitivity (Pointer Speed) (saved): 256
            Sensitivity (Pointer Speed)        : 256
         9: VERTICAL SCROLLING     {2100} V0     
            Roller type: 3G
            Ratchet per turn: 24
            Scroll lines: 0
        10: DFUCONTROL SIGNED      {00C2} V0     
        11: DEVICE RESET           {1802} V0    internal, hidden 
        12: unknown:1803           {1803} V0    internal, hidden 
        13: CONFIG DEVICE PROPS    {1806} V1    internal, hidden 
        14: unknown:1810           {1810} V0    internal, hidden 
        15: unknown:1830           {1830} V0    internal, hidden 
        16: unknown:1890           {1890} V0    internal, hidden 
        17: unknown:18A1           {18A1} V0    internal, hidden 
        18: unknown:1DF3           {1DF3} V0    internal, hidden 
        19: unknown:1E00           {1E00} V0    hidden 
        20: unknown:1EB0           {1EB0} V0    internal, hidden 
        21: unknown:1861           {1861} V0    internal, hidden 
        22: unknown:18B1           {18B1} V0    internal, hidden 
        23: unknown:1850           {1850} V0    internal, hidden 
        24: unknown:1E22           {1E22} V0    internal, hidden 
        25: unknown:1F03           {1F03} V0    internal, hidden 
        26: unknown:18C0           {18C0} V0    internal, hidden 
        27: HIRES WHEEL            {2121} V0     
            Multiplier: 8
            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
     Has 7 reprogrammable keys:
         0: Left Button               , default: Left Click                  => Left Click                
             mse, reprogrammable, pos:0, group:1, group mask:g1
             reporting: default
         1: Right Button              , default: Right Click                 => Right Click               
             mse, reprogrammable, pos:0, group:1, group mask:g1
             reporting: default
         2: Middle Button             , default: Mouse Middle Button         => Mouse Middle Button       
             mse, reprogrammable, divertable, pos:0, group:2, group mask:g1,g2
             reporting: default
         3: Back Button               , default: Mouse Back Button           => Mouse Back Button         
             mse, reprogrammable, divertable, pos:0, group:2, group mask:g1,g2
             reporting: default
         4: Forward Button            , default: Mouse Forward Button        => Mouse Forward Button      
             mse, reprogrammable, divertable, pos:0, group:2, group mask:g1,g2
             reporting: default
         5: Left Tilt                 , default: Mouse Scroll Left Button    => Mouse Scroll Left Button  
             mse, reprogrammable, divertable, pos:0, group:2, group mask:g1,g2
             reporting: default
         6: Right Tilt                , default: Mouse Scroll Right Button   => Mouse Scroll Right Button 
             mse, reprogrammable, divertable, pos:0, group:2, group mask:g1,g2
             reporting: default
     Battery: 20%, discharging, next level 5%.

```
</details>
Something appears to be going wrong in Solaar.  Please run  `solaar -ddd` and report the output around the time you experience the problem.
> Something appears to be going wrong in Solaar. Please run `solaar -ddd` and report the output around the time you experience the problem.

Here they are:
<details>

```
2023-05-04 20:36:38,956,956     INFO [MainThread] root: language en_US (UTF-8), translations path None
2023-05-04 20:36:39,104,104     INFO [MainThread] logitech_receiver.diversion: GDK Keymap set up
2023-05-04 20:36:39,116,116    DEBUG [MainThread] solaar.ui.tray: using AppIndicator3
2023-05-04 20:36:39,124,124     INFO [MainThread] solaar.upower: connected to system dbus, watching for suspend/resume events
Another Solaar process is already running so just expose its window
```

</details>
Aah, I meant run Solaar as `solaar -ddd`, keep it running, and report its output around the time you experience the problem.   Also, quit any running Solaar first.
aight, got you. will do :)

@pfps here they are:

[solaar.log](https://github.com/pwr-Solaar/Solaar/files/11417897/solaar.log)


Somehow the permissions on /dev/hidraw1 are not being set correctly.   Solaar needs write permissions on these files to be able to make changes to their settings.

Please provide output of `ls -l /dev/hidraw*` both when Solaar is working correctly and when it is not.   Also what did you do when you ran Solaar to produce the log above?

The permissions are set by a udev rule that is likely `/etc/udev/rules.d/42-logitech-unify-permissions.rules`.   Please determine that this file is present, owned by root, and world-readable.   If the file is not present there please look for it under `/usr/lib/udev`.

Also, I think you ran `solaar -dd` instead of `solaar -ddd`.    The output does show an error and might be sufficient but next time please use `-ddd`.
> Somehow the permissions on /dev/hidraw1 are not being set correctly. Solaar needs write permissions on these files to be able to make changes to their settings.


True, the described files don't have write permissions for non root users:
```
crw-------. 1 root root 241, 0  8. Mai 06:53 /dev/hidraw0
crw-rw----+ 1 root root 241, 1  8. Mai 06:53 /dev/hidraw1
crw-rw----+ 1 root root 241, 2  8. Mai 06:53 /dev/hidraw2
crw-rw----+ 1 root root 241, 3  8. Mai 06:53 /dev/hidraw3
crw-rw----+ 1 root root 241, 4  8. Mai 09:00 /dev/hidraw4
```

> Please provide output of `ls -l /dev/hidraw*` both when Solaar is working correctly and when it is not. Also what did you do when you ran Solaar to produce the log above?

I will try to do that the next time I can reproduce the issue.


> The permissions are set by a udev rule that is likely `/etc/udev/rules.d/42-logitech-unify-permissions.rules`. Please determine that this file is present, owned by root, and world-readable. If the file is not present there please look for it under `/usr/lib/udev`.

Yes, `/usr/lib/udev/rules.d/42-logitech-unify-permissions.rules` exists and is word-readable, however it slightly differs from https://github.com/pwr-Solaar/Solaar/blob/master/rules.d-uinput/42-logitech-unify-permissions.rules 

1. I don't have this in my file `KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", OPTIONS+="static_node=uinput"`
2. I just have `TAG+="uaccess"` instead of `TAG+="uaccess", TAG+="udev-acl"`

Could that be related?

The permissions are done as access control lists, signalled by the +, so things should be OK.   You can see the lists using `getfacl /dev/hidraw*`.   

The difference in the rules file should not be relevant to this issue.   The first difference is to allow input simulation under Wayland.  The second is for very old versions of Ubuntu.

It may be that the udev rule is running too late after restarts so Solaar isn't able to write when it restarts.  I'll put in a PR that retries the open.



Resolving patch:
diff --git a/lib/hidapi/udev.py b/lib/hidapi/udev.py
--- a/lib/hidapi/udev.py
+++ b/lib/hidapi/udev.py
@@ -322,7 +322,19 @@ def open_path(device_path):
     """
     assert device_path
     assert device_path.startswith('/dev/hidraw')
-    return _os.open(device_path, _os.O_RDWR | _os.O_SYNC)
+
+    _log.info('OPEN PATH %s', device_path)
+    retrycount = 0
+    while (retrycount < 3):
+        retrycount += 1
+        try:
+            return _os.open(device_path, _os.O_RDWR | _os.O_SYNC)
+        except OSError as e:
+            _log.info('OPEN PATH FAILED %s ERROR %s %s', device_path, e.errno, e)
+            if e.errno == _errno.EACCES:
+                sleep(0.1)
+            else:
+                raise
 
 
 def close(device_handle):


Test patch: