Repository: pwr-Solaar/Solaar

Issue:
Can't create "Process" and "MouseProcess" rules
**Information**
- Solaar version: 1.1.2
- Distribution: Fedora
- Kernel version: Linux 5.16.18-200.fc35.x86_64 x86_64 GNU/Linux
<details>
<summary>Output of solaar show</summary>

```
Solaar version 1.1.2

USB and Bluetooth Devices

  1: Wireless Mobile Mouse MX Anywhere 2S
     Device path  : /dev/hidraw2
     USB id       : 046d:B01A
     Codename     : Wireless
     Kind         : mouse
     Protocol     : HID++ 4.5
     Serial number: 
     Model ID:      B01A406A0000
     Unit ID:       EB9D50CA
        Bootloader: BOT 57.00.B0003
          Firmware: MPM 13.00.B0003
          Firmware: MPM 13.00.B0003
             Other: 
     Supports 24 HID++ 2.0 features:
         0: ROOT                   {0000}   
         1: FEATURE SET            {0001}   
         2: DEVICE FW VERSION      {0003}   
            Firmware: Bootloader BOT 57.00.B0003 406AD22DCF4D01
            Firmware: Firmware MPM 13.00.B0003 B01AD22DCF4D01
            Firmware: Firmware MPM 13.00.B0003 406AD22DCF4D01
            Firmware: Other   
            Unit ID: EB9D50CA  Model ID: B01A406A0000  Transport IDs: {'btleid': 'B01A', 'wpid': '406A'}
         3: DEVICE NAME            {0005}   
            Name: Wireless Mobile Mouse MX Anywhere 2S
            Kind: mouse
         4: WIRELESS DEVICE STATUS {1D4B}   
         5: RESET                  {0020}   
         6: BATTERY STATUS         {1000}   
            Battery: 50%, discharging, next level 20%.
         7: CONFIG DEVICE PROPS    {1806}   internal, hidden
         8: CHANGE HOST            {1814}   
            Change Host        : 1:legiony540
         9: REPROG CONTROLS V4     {1B04}   
            DPI Sliding Adjustment (saved): Off
            DPI Sliding Adjustment        : Off
            Mouse Gestures (saved): Off
            Mouse Gestures        : Off
            Key/Button Actions (saved): {Left Button:Left Click, Right Button:Right Click, Middle Button:Gesture Button Navigation, Back Button:Mouse Back Button, Forward Button:Mouse Forward Button, Left Tilt:Gesture Button Navigation, Right Tilt:Gesture Button Navigation}
            Key/Button Actions        : {Left Button:Left Click, Right Button:Right Click, Middle Button:Gesture Button Navigation, Back Button:Mouse Back Button, Forward Button:Mouse Forward Button, Left Tilt:Gesture Button Navigation, Right Tilt:Gesture Button Navigation}
            Key/Button Diversion (saved): {Middle Button:Regular, Back Button:Regular, Forward Button:Regular, Left Tilt:Diverted, Right Tilt:Diverted}
            Key/Button Diversion        : {Middle Button:Regular, Back Button:Regular, Forward Button:Regular, Left Tilt:Diverted, Right Tilt:Diverted}
        10: ADJUSTABLE DPI         {2201}   
            Sensitivity (DPI) (saved): 1000
            Sensitivity (DPI)        : 1000
        11: VERTICAL SCROLLING     {2100}   
            Roller type: 3G
            Ratchet per turn: 24
            Scroll lines: 0
        12: HIRES WHEEL            {2121}   
            Multiplier: 8
            Has invert: Normal wheel motion
            Has ratchet switch: Free wheel mode
            Low resolution mode
            HID notification
            Scroll Wheel Direction (saved): False
            Scroll Wheel Direction        : False
            Scroll Wheel Resolution (saved): False
            Scroll Wheel Resolution        : False
        13: unknown:1813           {1813}   internal, hidden
        14: unknown:1830           {1830}   internal, hidden
        15: unknown:18A1           {18A1}   internal, hidden
        16: unknown:18C0           {18C0}   internal, hidden
        17: unknown:1DF3           {1DF3}   internal, hidden
        18: unknown:1E00           {1E00}   hidden
        19: unknown:1EB0           {1EB0}   internal, hidden
        20: unknown:1803           {1803}   internal, hidden
        21: unknown:1861           {1861}   internal, hidden
        22: unknown:9001           {9001}   internal, hidden
        23: OOBSTATE               {1805}   internal, hidden
     Has 8 reprogrammable keys:
         0: Left Button               , default: Left Click                  => Left Click                
             mse, pos:0, group:1, group mask:g1
             reporting: default
         1: Right Button              , default: Right Click                 => Right Click               
             mse, pos:0, group:1, group mask:g1
             reporting: default
         2: Middle Button             , default: Gesture Button Navigation   => Gesture Button Navigation 
             mse, reprogrammable, divertable, raw XY, pos:0, group:2, group mask:g1,g2,g4
             reporting: default
         3: Back Button               , default: Mouse Back Button           => Mouse Back Button         
             mse, reprogrammable, divertable, raw XY, pos:0, group:3, group mask:g1,g2,g3,g4
             reporting: default
         4: Forward Button            , default: Mouse Forward Button        => Mouse Forward Button      
             mse, reprogrammable, divertable, raw XY, pos:0, group:3, group mask:g1,g2,g3,g4
             reporting: default
         5: Left Tilt                 , default: Mouse Scroll Left Button    => Gesture Button Navigation 
             mse, reprogrammable, divertable, raw XY, pos:0, group:3, group mask:g1,g2,g3,g4
             reporting: diverted
         6: Right Tilt                , default: Mouse Scroll Right Button   => Gesture Button Navigation 
             mse, reprogrammable, divertable, raw XY, pos:0, group:3, group mask:g1,g2,g3,g4
             reporting: 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: 50%, discharging, next level 20%.
```
</details>

**Describe the bug**
I'm running Fedora under X11, as said in <a href="https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/" target="_blank"> this </a> tutorial, it was working perfectly with Solaar 1.1.1. But after the 1.1.2 update, everything stopped working. Messing around I've discovered that it only happens when I have a "Process" or "MouseProcess" in the rules. Running the Solaar in the debug mode, when one of these rules where added or modified, I would receive the folowing output:
```
09:41:19,251  WARNING [MainThread] logitech_receiver.diversion: X11 not available - rules cannot access current process - Process: 
09:41:27,046  WARNING [MainThread] logitech_receiver.diversion: X11 not available - rules cannot access current mouse process - MouseProcess: 
```

**To Reproduce**
1. Go to Rules;
2. Insert a new "Process" rule;
3. See error.

**Screenshots**
![About page showing X11 as the default windowing system](https://user-images.githubusercontent.com/61383781/161057876-3b968687-0abe-4dfc-889f-e47dc53ce85c.png)

**Additional context**

<details>
<summary>Debug output</summary>

```
09:51:28,947     INFO [MainThread] root: language en_US (UTF-8), translations path /usr/share/locale
09:51:29,094  WARNING [MainThread] logitech_receiver.diversion: X11 not available - rules cannot access current process, modifier keys, or keyboard group. %s
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/logitech_receiver/diversion.py", line 98, in <module>
    X11Lib = ctypes.cdll.LoadLibrary('libX11.so')
  File "/usr/lib64/python3.10/ctypes/__init__.py", line 452, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib64/python3.10/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libX11.so: cannot open shared object file: No such file or directory
09:51:29,299  WARNING [MainThread] logitech_receiver.diversion: X11 not available - rules cannot access current process - Process: firefox
09:51:29,303    DEBUG [MainThread] logitech_receiver.diversion: load rule: Rule(/home/nicolas/.config/solaar/rules.yaml)[Rule[Key: Left Tilt (pressed), KeyPress: XF86_AudioLowerVolume], Rule[Key: Right Tilt (pressed), KeyPress: XF86_AudioRaiseVolume], Rule[MouseGesture: Mouse Left, KeyPress: XF86_AudioPrev], Rule[MouseGesture: Mouse Right, KeyPress: XF86_AudioNext], Rule[MouseGesture: , MouseClick: middle (1)]]
09:51:29,303     INFO [MainThread] logitech_receiver.diversion: loaded 1 rules from /home/nicolas/.config/solaar/rules.yaml
09:51:29,307    DEBUG [MainThread] solaar.ui.tray: using AppIndicator3
09:51:29,314     INFO [MainThread] solaar.upower: connected to system dbus, watching for suspend/resume events
09:51:29,339    DEBUG [MainThread] solaar.ui: startup registered=True, remote=False
09:51:29,340    DEBUG [AsyncUI] solaar.tasks: started
09:51:29,340     INFO [MainThread] solaar.ui.notify: starting desktop notifications
09:51:29,343    DEBUG [MainThread] solaar.ui.icons: sys.path[0] = /usr/bin
09:51:29,343    DEBUG [MainThread] solaar.ui.icons: looking for icons in /usr/icons
09:51:29,343    DEBUG [MainThread] solaar.ui.icons: looking for icons in /usr/share/solaar/icons
09:51:29,343    DEBUG [MainThread] solaar.ui.icons: icon theme paths: ['/usr/share/solaar/icons', '/home/nicolas/.local/share/icons', '/home/nicolas/.icons', '/home/nicolas/.local/share/flatpak/exports/share/icons', '/var/lib/flatpak/exports/share/icons', '/usr/local/share/icons', '/usr/share/icons', '/var/lib/snapd/desktop/icons', '/home/nicolas/.local/share/flatpak/exports/share/pixmaps', '/var/lib/flatpak/exports/share/pixmaps', '/usr/local/share/pixmaps', '/usr/share/pixmaps', '/var/lib/snapd/desktop/pixmaps']
09:51:29,371     INFO [MainThread] solaar.listener: starting receiver listening threads
09:51:29,375    DEBUG [MainThread] hidapi.udev: Found device BID 0005 VID 0000046D PID 0000B01A INTERFACE None FILTER None
09:51:29,375     INFO [MainThread] solaar.listener: receiver event add DeviceInfo(path='/dev/hidraw2', vendor_id='046D', product_id='B01A', serial='d5:71:f2:17:79:f4', release=None, manufacturer=None, product=None, interface=None, driver='hid-generic', bus_id=5, isDevice=True)
09:51:29,376    DEBUG [MainThread] logitech_receiver.base: (21) pinging device 255
09:51:29,376     INFO [MainThread] logitech_receiver.base: New lock 21
09:51:29,376    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 001F 0000EA00000000000000000000000000]
09:51:29,783    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 001F 0405EA00000000000000000000000000]
09:51:29,783    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 000E 00010000000000000000000000000000]
09:51:29,806    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 000E 01000100000000000000000000000000]
09:51:29,806    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 010C 00000000000000000000000000000000]
09:51:29,828    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 010C 17000000000000000000000000000000]
09:51:29,828    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 0009 10000000000000000000000000000000]
09:51:29,851    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 0009 06000000000000000000000000000000]
09:51:29,851    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 0609 00000000000000000000000000000000]
09:51:29,873    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 0609 32140000000000000000000000000000]
09:51:29,873    DEBUG [MainThread] logitech_receiver.hidpp20: device 255 battery 50% charged, next 20%, status discharging
09:51:29,873    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 000E 00050000000000000000000000000000]
09:51:29,896    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 000E 03000000000000000000000000000000]
09:51:29,896    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 030F 00000000000000000000000000000000]
09:51:29,918    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 030F 24000000000000000000000000000000]
09:51:29,918    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 031E 00000000000000000000000000000000]
09:51:29,941    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 031E 576972656C657373204D6F62696C6520]
09:51:29,941    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 031C 10000000000000000000000000000000]
09:51:29,963    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 031C 4D6F757365204D5820416E7977686572]
09:51:29,963    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 031D 20000000000000000000000000000000]
09:51:29,986    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 031D 65203253000000000000000000000000]
09:51:29,873    DEBUG [MainThread] logitech_receiver.status: <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>: battery 50, discharging
09:51:29,986    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 032C 00000000000000000000000000000000]
09:51:30,008    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 032C 03000000000000000000000000000000]
09:51:30,008     INFO [MainThread] solaar.listener: status_changed <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>: paired online, {'BATTERY LEVEL': 50, 'BATTERY STATUS': NamedInt(0, 'discharging'), 'BATTERY NEXT LEVEL': 20, 'BATTERY VOLTAGE': None, 'BATTERY CHARGING': False, 'ERROR': None} (0) 
09:51:30,008    DEBUG [MainThread] solaar.configuration: load => {'B01A406A0000:EB9D50CA': {'_absent': ['hi-res-scroll', 'lowres-smooth-scroll', 'smart-shift', 'thumb-scroll-mode', 'thumb-scroll-invert', 'onboard_profiles', 'report_rate', 'pointer_speed', 'speed-change', 'backlight', 'backlight-timed', 'fn-swap', 'persistent-remappable-keys', 'disable-keyboard-keys', 'divert-crown', 'crown-smooth', 'divert-gkeys', 'm-key-leds', 'mr-key-led', 'multiplatform', 'gesture2-gestures', 'gesture2-divert', 'gesture2-params'], '_modelId': 'B01A406A0000', '_name': 'Wireless Mobile Mouse MX Anywhere 2S', '_sensitive': {'divert-keys': True, 'hires-smooth-resolution': False, 'mouse-gestures': True, 'reprogrammable-keys': True}, '_unitId': 'EB9D50CA', 'divert-keys': {'82': 0, '83': 0, '86': 0, '91': 1, '93': 1}, 'dpi': 1000, 'dpi-sliding': 0, 'hires-smooth-invert': False, 'hires-smooth-resolution': False, 'mouse-gestures': 0, 'reprogrammable-keys': {'80': 80, '81': 81, '82': 82, '83': 83, '86': 86, '91': 82, '93': 82}}, '_version': '1.1.2'}
09:51:30,008    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 000D 00030000000000000000000000000000]
09:51:30,031    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 000D 02000200000000000000000000000000]
09:51:30,031    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 0209 00000000000000000000000000000000]
09:51:30,053    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 0209 04EB9D50CA0006B01A406A0000000000]
09:51:30,053    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 000E 21210000000000000000000000000000]
09:51:30,076    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 000E 0C000000000000000000000000000000]
09:51:30,076    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 000F 00070000000000000000000000000000]
09:51:30,098    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 000F 00000000000000000000000000000000]
09:51:30,076     INFO [MainThread] logitech_receiver.settings_templates: check_feature hires-smooth-invert [HIRES WHEEL] detected <Setting([feature:toggle] Wireless:hires-smooth-invert=None)>
09:51:30,098     INFO [MainThread] logitech_receiver.settings_templates: check_feature hires-smooth-resolution [HIRES WHEEL] detected <Setting([feature:toggle] Wireless:hires-smooth-resolution=None)>
09:51:30,098    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 000F 22010000000000000000000000000000]
09:51:30,121    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 000F 0A000100000000000000000000000000]
09:51:30,122    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 0A1D 00000000000000000000000000000000]
09:51:30,143    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 0A1D 0000C8E0320FA0000000000000000000]
09:51:30,143     INFO [MainThread] logitech_receiver.settings_templates: check_feature dpi [ADJUSTABLE DPI] detected <Setting([feature:choice] Wireless:dpi=None)>
09:51:30,143    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 0009 1B040000000000000000000000000000]
09:51:30,158    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 0009 09000300000000000000000000000000]
09:51:30,159    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 000A 1B010000000000000000000000000000]
09:51:30,173    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 000A 00000000000000000000000000000000]
09:51:30,173    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 090B 00000000000000000000000000000000]
09:51:30,188    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 090B 08000000000000000000000000000000]
09:51:30,188    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 091E 00000000000000000000000000000000]
09:51:30,211    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 091E 00500038010001010000000000000000]
09:51:30,211    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 0919 01000000000000000000000000000000]
09:51:30,226    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 0919 00510039010001010000000000000000]
09:51:30,226    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 0918 02000000000000000000000000000000]
09:51:30,241    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 0918 005200A93100020B0100000000000000]
09:51:30,241    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 091F 03000000000000000000000000000000]
09:51:30,263    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 091F 0053003C3100030F0100000000000000]
09:51:30,263    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 0919 04000000000000000000000000000000]
09:51:30,278    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 0919 0056003E3100030F0100000000000000]
09:51:30,278    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 091B 05000000000000000000000000000000]
09:51:30,293    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 091B 005B003F3100030F0100000000000000]
09:51:30,293    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 091B 06000000000000000000000000000000]
09:51:30,316    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 091B 005D00403100030F0100000000000000]
09:51:30,316    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 091C 07000000000000000000000000000000]
09:51:30,331    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 091C 00D700B4A00004000300000000000000]
09:51:30,331     INFO [MainThread] logitech_receiver.settings_templates: check_feature dpi-sliding [REPROG CONTROLS V4] detected <Setting([feature:choice] Wireless:dpi-sliding=None)>
09:51:30,331     INFO [MainThread] logitech_receiver.settings_templates: check_feature mouse-gestures [REPROG CONTROLS V4] detected <Setting([feature:choice] Wireless:mouse-gestures=None)>
09:51:30,332     INFO [MainThread] logitech_receiver.settings_templates: check_feature reprogrammable-keys [REPROG CONTROLS V4] detected <Setting([feature:map choice] Wireless:reprogrammable-keys=None)>
09:51:30,332     INFO [MainThread] logitech_receiver.settings_templates: check_feature divert-keys [REPROG CONTROLS V4] detected <Setting([feature:map choice] Wireless:divert-keys=None)>
09:51:30,332    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 000B 18140000000000000000000000000000]
09:51:30,346    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 000B 08000100000000000000000000000000]
09:51:30,346    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 080B 00000000000000000000000000000000]
09:51:30,368    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 080B 03000100000000000000000000000000]
09:51:30,369    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 0009 18150000000000000000000000000000]
09:51:30,383    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 0009 00000000000000000000000000000000]
09:51:30,383     INFO [MainThread] logitech_receiver.settings_templates: check_feature change-host [CHANGE HOST] detected <Setting([feature:choice] Wireless:change-host=None)>
09:51:30,383     INFO [MainThread] logitech_receiver.status: <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)> pushing device settings [<Setting([feature:toggle] Wireless:hires-smooth-invert=None)>, <Setting([feature:toggle] Wireless:hires-smooth-resolution=None)>, <Setting([feature:choice] Wireless:dpi=None)>, <Setting([feature:choice] Wireless:dpi-sliding=None)>, <Setting([feature:choice] Wireless:mouse-gestures=None)>, <Setting([feature:map choice] Wireless:reprogrammable-keys=None)>, <Setting([feature:map choice] Wireless:divert-keys=None)>, <Setting([feature:choice] Wireless:change-host=None)>]
09:51:30,383    DEBUG [MainThread] logitech_receiver.settings: hires-smooth-invert: apply None (<Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>)
09:51:30,383    DEBUG [MainThread] logitech_receiver.settings: hires-smooth-invert: settings read None from <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,383    DEBUG [MainThread] logitech_receiver.settings: hires-smooth-invert: settings write False to <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,384    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 0C1B 00000000000000000000000000000000]
09:51:30,398    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 0C1B 00000000000000000000000000000000]
09:51:30,398    DEBUG [MainThread] logitech_receiver.settings: hires-smooth-resolution: apply None (<Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>)
09:51:30,398    DEBUG [MainThread] logitech_receiver.settings: hires-smooth-resolution: settings read None from <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,398    DEBUG [MainThread] logitech_receiver.settings: hires-smooth-resolution: settings write False to <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,399    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 0C18 00000000000000000000000000000000]
09:51:30,421    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 0C18 00000000000000000000000000000000]
09:51:30,421    DEBUG [MainThread] logitech_receiver.settings: dpi: apply None (<Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>)
09:51:30,421    DEBUG [MainThread] logitech_receiver.settings: dpi: settings read None from <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,421    DEBUG [MainThread] logitech_receiver.settings: dpi: settings write 1000 to <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,421    DEBUG [MainThread] logitech_receiver.settings: dpi: settings prepare write(1000) => b'\x00\x03\xe8'
09:51:30,421    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 0A38 0003E800000000000000000000000000]
09:51:30,436    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 0A38 0003E800000000000000000000000000]
09:51:30,436    DEBUG [MainThread] logitech_receiver.settings: dpi-sliding: apply None (<Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>)
09:51:30,436    DEBUG [MainThread] logitech_receiver.settings: dpi-sliding: settings read None from <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,436    DEBUG [MainThread] logitech_receiver.settings: dpi-sliding: settings write 0 to <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,436    DEBUG [MainThread] logitech_receiver.settings: dpi-sliding: settings prepare write(0) => b'\x00\x00'
09:51:30,436    DEBUG [MainThread] logitech_receiver.settings: mouse-gestures: apply None (<Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>)
09:51:30,436    DEBUG [MainThread] logitech_receiver.settings: mouse-gestures: settings read None from <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,437    DEBUG [MainThread] logitech_receiver.settings: mouse-gestures: settings write 0 to <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,437    DEBUG [MainThread] logitech_receiver.settings: mouse-gestures: settings prepare write(0) => b'\x00\x00'
09:51:30,437    DEBUG [MainThread] logitech_receiver.settings: reprogrammable-keys: apply None (<Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>)
09:51:30,437    DEBUG [MainThread] logitech_receiver.settings: reprogrammable-keys: settings read None from <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,437    DEBUG [MainThread] logitech_receiver.settings: reprogrammable-keys: settings write {'80': 80, '81': 81, '82': 82, '83': 83, '86': 86, '91': 82, '93': 82} to <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,437    DEBUG [MainThread] logitech_receiver.settings: reprogrammable-keys: settings prepare map write(80,80) => b'\x00P'
09:51:30,437    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 0939 00500000500000000000000000000000]
09:51:30,451    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 0939 00000000000000000000000000000000]
09:51:30,451    DEBUG [MainThread] logitech_receiver.hidpp20: REPROG_CONTROLS_v4 setCidReporting on device <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)> didn't echo request packet.
09:51:30,451    DEBUG [MainThread] logitech_receiver.settings: reprogrammable-keys: settings prepare map write(81,81) => b'\x00Q'
09:51:30,451    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 093D 00510000510000000000000000000000]
09:51:30,474    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 093D 00000000000000000000000000000000]
09:51:30,474    DEBUG [MainThread] logitech_receiver.hidpp20: REPROG_CONTROLS_v4 setCidReporting on device <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)> didn't echo request packet.
09:51:30,474    DEBUG [MainThread] logitech_receiver.settings: reprogrammable-keys: settings prepare map write(82,82) => b'\x00R'
09:51:30,474    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 093A 00520000520000000000000000000000]
09:51:30,488    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 093A 00000000000000000000000000000000]
09:51:30,488    DEBUG [MainThread] logitech_receiver.hidpp20: REPROG_CONTROLS_v4 setCidReporting on device <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)> didn't echo request packet.
09:51:30,489    DEBUG [MainThread] logitech_receiver.settings: reprogrammable-keys: settings prepare map write(83,83) => b'\x00S'
09:51:30,489    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 093A 00530000530000000000000000000000]
09:51:30,503    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 093A 00000000000000000000000000000000]
09:51:30,503    DEBUG [MainThread] logitech_receiver.hidpp20: REPROG_CONTROLS_v4 setCidReporting on device <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)> didn't echo request packet.
09:51:30,503    DEBUG [MainThread] logitech_receiver.settings: reprogrammable-keys: settings prepare map write(86,86) => b'\x00V'
09:51:30,503    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 0938 00560000560000000000000000000000]
09:51:30,518    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 0938 00000000000000000000000000000000]
09:51:30,518    DEBUG [MainThread] logitech_receiver.hidpp20: REPROG_CONTROLS_v4 setCidReporting on device <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)> didn't echo request packet.
09:51:30,519    DEBUG [MainThread] logitech_receiver.settings: reprogrammable-keys: settings prepare map write(91,82) => b'\x00R'
09:51:30,519    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 093C 005B0000520000000000000000000000]
09:51:30,541    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 093C 00000000000000000000000000000000]
09:51:30,541    DEBUG [MainThread] logitech_receiver.hidpp20: REPROG_CONTROLS_v4 setCidReporting on device <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)> didn't echo request packet.
09:51:30,541    DEBUG [MainThread] logitech_receiver.settings: reprogrammable-keys: settings prepare map write(93,82) => b'\x00R'
09:51:30,541    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 093E 005D0000520000000000000000000000]
09:51:30,556    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 093E 00000000000000000000000000000000]
09:51:30,556    DEBUG [MainThread] logitech_receiver.hidpp20: REPROG_CONTROLS_v4 setCidReporting on device <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)> didn't echo request packet.
09:51:30,556    DEBUG [MainThread] logitech_receiver.settings: divert-keys: apply None (<Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>)
09:51:30,556    DEBUG [MainThread] logitech_receiver.settings: divert-keys: settings read None from <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,556    DEBUG [MainThread] logitech_receiver.settings: divert-keys: settings write {'82': 0, '83': 0, '86': 0, '91': 1, '93': 1} to <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,556    DEBUG [MainThread] logitech_receiver.settings: divert-keys: settings prepare map write(82,0) => b'\x00'
09:51:30,556    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 093E 00520200000000000000000000000000]
09:51:30,571    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 093E 00000000000000000000000000000000]
09:51:30,572    DEBUG [MainThread] logitech_receiver.hidpp20: REPROG_CONTROLS_v4 setCidReporting on device <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)> didn't echo request packet.
09:51:30,572    DEBUG [MainThread] logitech_receiver.settings: divert-keys: settings prepare map write(83,0) => b'\x00'
09:51:30,572    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 093C 00530200000000000000000000000000]
09:51:30,586    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 093C 00000000000000000000000000000000]
09:51:30,586    DEBUG [MainThread] logitech_receiver.hidpp20: REPROG_CONTROLS_v4 setCidReporting on device <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)> didn't echo request packet.
09:51:30,586    DEBUG [MainThread] logitech_receiver.settings: divert-keys: settings prepare map write(86,0) => b'\x00'
09:51:30,586    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 093E 00560200000000000000000000000000]
09:51:30,601    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 093E 00000000000000000000000000000000]
09:51:30,602    DEBUG [MainThread] logitech_receiver.hidpp20: REPROG_CONTROLS_v4 setCidReporting on device <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)> didn't echo request packet.
09:51:30,602    DEBUG [MainThread] logitech_receiver.settings: divert-keys: settings prepare map write(91,1) => b'\x01'
09:51:30,602    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 093D 005B0300000000000000000000000000]
09:51:30,616    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 093D 00000000000000000000000000000000]
09:51:30,616    DEBUG [MainThread] logitech_receiver.hidpp20: REPROG_CONTROLS_v4 setCidReporting on device <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)> didn't echo request packet.
09:51:30,616    DEBUG [MainThread] logitech_receiver.settings: divert-keys: settings prepare map write(93,1) => b'\x01'
09:51:30,616    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 093F 005D0300000000000000000000000000]
09:51:30,638    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 093F 00000000000000000000000000000000]
09:51:30,638    DEBUG [MainThread] logitech_receiver.hidpp20: REPROG_CONTROLS_v4 setCidReporting on device <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)> didn't echo request packet.
09:51:30,638    DEBUG [MainThread] logitech_receiver.settings: change-host: apply None (<Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>)
09:51:30,638    DEBUG [MainThread] logitech_receiver.settings: change-host: settings read None from <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,638    DEBUG [MainThread] logitech_receiver.base: (21) <= w[11 FF 080F 00000000000000000000000000000000]
09:51:30,653    DEBUG [MainThread] logitech_receiver.base: (21) => r[11 FF 080F 03000100000000000000000000000000]
09:51:30,653     INFO [MainThread] solaar.listener: status_changed <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>: paired online, {'BATTERY LEVEL': 50, 'BATTERY STATUS': NamedInt(0, 'discharging'), 'BATTERY NEXT LEVEL': 20, 'BATTERY VOLTAGE': None, 'BATTERY CHARGING': False, 'ERROR': None} (0) initialization
09:51:30,653     INFO [ReceiverListener:hidraw2] logitech_receiver.listener: started with <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)> (21)
09:51:30,654     INFO [ReceiverListener:hidraw2] solaar.listener: <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>: notifications listener has started (21)
09:51:30,654     INFO [ReceiverListener:hidraw2] solaar.listener: status_changed <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>: paired online, {'BATTERY LEVEL': 50, 'BATTERY STATUS': NamedInt(0, 'discharging'), 'BATTERY NEXT LEVEL': 20, 'BATTERY VOLTAGE': None, 'BATTERY CHARGING': False, 'ERROR': None, 'NOTIFICATION FLAGS': False} (0) 
09:51:30,654    DEBUG [MainThread] solaar.ui: activate
09:51:30,655    DEBUG [MainThread] solaar.ui: status changed: <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)> (NONE) None
09:51:30,656    DEBUG [MainThread] solaar.ui.icons: battery icon for 50:False = battery-good
09:51:30,656    DEBUG [MainThread] solaar.ui.tray: picked device with lowest battery: ('/dev/hidraw2', 255, 'Wireless Mobile Mouse MX Anywhere 2S', {'BATTERY LEVEL': 50, 'BATTERY STATUS': NamedInt(0, 'discharging'), 'BATTERY NEXT LEVEL': 20, 'BATTERY VOLTAGE': None, 'BATTERY CHARGING': False, 'ERROR': None, 'NOTIFICATION FLAGS': False})
09:51:30,656    DEBUG [MainThread] solaar.ui.icons: battery icon for 50:False = battery-good
09:51:30,657    DEBUG [MainThread] solaar.ui.window: new device row ('/dev/hidraw2', 255, True, 'Wireless', 'input-mouse', None, None, <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>) at index 0
09:51:30,657    DEBUG [MainThread] solaar.ui.icons: battery icon for 50:False = battery-good
09:51:30,657    DEBUG [MainThread] solaar.ui.icons: battery icon for 50:False = battery-good
09:51:30,659    DEBUG [AsyncUI] logitech_receiver.settings: hires-smooth-invert: settings read False from <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,659    DEBUG [AsyncUI] logitech_receiver.settings: hires-smooth-resolution: settings read False from <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,663    DEBUG [AsyncUI] logitech_receiver.settings: dpi: settings read 1000 from <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,665    DEBUG [AsyncUI] logitech_receiver.settings: dpi-sliding: settings read 0 from <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,666    DEBUG [AsyncUI] logitech_receiver.settings: mouse-gestures: settings read 0 from <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,667    DEBUG [AsyncUI] logitech_receiver.settings: reprogrammable-keys: settings read {'80': 80, '81': 81, '82': 82, '83': 83, '86': 86, '91': 82, '93': 82} from <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,669    DEBUG [AsyncUI] logitech_receiver.settings: divert-keys: settings read {'82': 0, '83': 0, '86': 0, '91': 1, '93': 1} from <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,670    DEBUG [AsyncUI] logitech_receiver.settings: change-host: settings read NamedInt(0, '1:legiony540') from <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)>
09:51:30,673    DEBUG [MainThread] solaar.ui: status changed: <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)> (NONE) initialization
09:51:30,673    DEBUG [MainThread] solaar.ui.icons: battery icon for 50:False = battery-good
09:51:30,674    DEBUG [MainThread] solaar.ui.tray: picked device with lowest battery: ('/dev/hidraw2', 255, 'Wireless Mobile Mouse MX Anywhere 2S', {'BATTERY LEVEL': 50, 'BATTERY STATUS': NamedInt(0, 'discharging'), 'BATTERY NEXT LEVEL': 20, 'BATTERY VOLTAGE': None, 'BATTERY CHARGING': False, 'ERROR': None, 'NOTIFICATION FLAGS': False})
09:51:30,674    DEBUG [MainThread] solaar.ui.icons: battery icon for 50:False = battery-good
09:51:30,674    DEBUG [MainThread] solaar.ui.icons: battery icon for 50:False = battery-good
09:51:30,674    DEBUG [MainThread] solaar.ui.icons: battery icon for 50:False = battery-good
09:51:30,674    DEBUG [MainThread] solaar.ui: status changed: <Device(255,B01A,Wireless Mobile Mouse MX Anywhere 2S,)> (NONE) None
09:51:30,674    DEBUG [MainThread] solaar.ui.icons: battery icon for 50:False = battery-good
09:51:30,674    DEBUG [MainThread] solaar.ui.tray: picked device with lowest battery: ('/dev/hidraw2', 255, 'Wireless Mobile Mouse MX Anywhere 2S', {'BATTERY LEVEL': 50, 'BATTERY STATUS': NamedInt(0, 'discharging'), 'BATTERY NEXT LEVEL': 20, 'BATTERY VOLTAGE': None, 'BATTERY CHARGING': False, 'ERROR': None, 'NOTIFICATION FLAGS': False})
09:51:30,674    DEBUG [MainThread] solaar.ui.icons: battery icon for 50:False = battery-good
09:51:30,675    DEBUG [MainThread] solaar.ui.icons: battery icon for 50:False = battery-good
09:51:30,675    DEBUG [MainThread] solaar.ui.icons: battery icon for 50:False = battery-good
09:51:39,258  WARNING [MainThread] logitech_receiver.diversion: X11 not available - rules cannot access current process - Process: 
09:51:42,070  WARNING [MainThread] logitech_receiver.diversion: X11 not available - rules cannot access current mouse process - MouseProcess: 
09:51:50,282     INFO [MainThread] logitech_receiver.diversion: saving 1 rule(s) to /home/nicolas/.config/solaar/rules.yaml
```
</details>



Discussion:
Solaar was enhanced to do a better job in faking keyboard input.  That requires libX11.so, which comes from libX11-devel.  So you could `sudo dnf install libX11-devel`

The Solaar documentation will be updated to reflect this dependency.  
That worked, thanks for helping

Resolving patch:
diff --git a/lib/logitech_receiver/diversion.py b/lib/logitech_receiver/diversion.py
--- a/lib/logitech_receiver/diversion.py
+++ b/lib/logitech_receiver/diversion.py
@@ -80,25 +80,6 @@
     NET_WM_PID = xdisplay.intern_atom('_NET_WM_PID')
     WM_CLASS = xdisplay.intern_atom('WM_CLASS')
 
-    # set up to get keyboard state using ctypes interface to libx11
-    import ctypes
-
-    class XkbDisplay(ctypes.Structure):
-        """ opaque struct """
-
-    class XkbStateRec(ctypes.Structure):
-        _fields_ = [('group', ctypes.c_ubyte), ('locked_group', ctypes.c_ubyte), ('base_group', ctypes.c_ushort),
-                    ('latched_group', ctypes.c_ushort), ('mods', ctypes.c_ubyte), ('base_mods', ctypes.c_ubyte),
-                    ('latched_mods', ctypes.c_ubyte), ('locked_mods', ctypes.c_ubyte), ('compat_state', ctypes.c_ubyte),
-                    ('grab_mods', ctypes.c_ubyte), ('compat_grab_mods', ctypes.c_ubyte), ('lookup_mods', ctypes.c_ubyte),
-                    ('compat_lookup_mods', ctypes.c_ubyte),
-                    ('ptr_buttons', ctypes.c_ushort)]  # something strange is happening here but it is not being used
-
-    XkbUseCoreKbd = 0x100
-    X11Lib = ctypes.cdll.LoadLibrary('libX11.so')
-    X11Lib.XOpenDisplay.restype = ctypes.POINTER(XkbDisplay)
-    X11Lib.XkbGetState.argtypes = [ctypes.POINTER(XkbDisplay), ctypes.c_uint, ctypes.POINTER(XkbStateRec)]
-    Xkbdisplay = X11Lib.XOpenDisplay(None)
 except Exception:
     _log.warn(
         'X11 not available - rules cannot access current process, modifier keys, or keyboard group. %s',
@@ -107,9 +88,35 @@ class XkbStateRec(ctypes.Structure):
     modifier_keycodes = []
     x11 = False
 
+if x11:
+    try:
+        # set up to get keyboard state using ctypes interface to libx11
+        import ctypes
+
+        class XkbDisplay(ctypes.Structure):
+            """ opaque struct """
+
+        class XkbStateRec(ctypes.Structure):
+            _fields_ = [('group', ctypes.c_ubyte), ('locked_group', ctypes.c_ubyte), ('base_group', ctypes.c_ushort),
+                        ('latched_group', ctypes.c_ushort), ('mods', ctypes.c_ubyte), ('base_mods', ctypes.c_ubyte),
+                        ('latched_mods', ctypes.c_ubyte), ('locked_mods', ctypes.c_ubyte), ('compat_state', ctypes.c_ubyte),
+                        ('grab_mods', ctypes.c_ubyte), ('compat_grab_mods', ctypes.c_ubyte), ('lookup_mods', ctypes.c_ubyte),
+                        ('compat_lookup_mods', ctypes.c_ubyte),
+                        ('ptr_buttons', ctypes.c_ushort)]  # something strange is happening here but it is not being used
+
+        XkbUseCoreKbd = 0x100
+        X11Lib = ctypes.cdll.LoadLibrary('libX11.so')
+        X11Lib.XOpenDisplay.restype = ctypes.POINTER(XkbDisplay)
+        X11Lib.XkbGetState.argtypes = [ctypes.POINTER(XkbDisplay), ctypes.c_uint, ctypes.POINTER(XkbStateRec)]
+        Xkbdisplay = X11Lib.XOpenDisplay(None)
+
+    except Exception:
+        _log.warn('X11 library not available - rules cannot access keyboard group. %s', exc_info=_sys.exc_info())
+        Xkbdisplay = None
+
 
 def kbdgroup():
-    if x11:
+    if Xkbdisplay:
         state = XkbStateRec()
         X11Lib.XkbGetState(Xkbdisplay, XkbUseCoreKbd, ctypes.pointer(state))
         return state.group


Test patch: