Repository: pwr-Solaar/Solaar

Issue:
Support for Logitech G500s mice
**Information**
<!-- Please update to Solaar from this repository before asking for a new feature. -->
- Solaar version (`solaar --version` and `git describe --tags`): `solaar 1.1.1`
- Distribution: Vanilla OS (Ubuntu derived)
- Kernel version (ex. `uname -srmo`): Linux 5.19.0-46-generic x86_64 GNU/Linux
- Output of `solaar show` for the target device (if applicable):
<details>

```
solaar: error: Traceback (most recent call last):
  File "/usr/share/solaar/lib/solaar/cli/__init__.py", line 200, in run
    raise Exception('No devices found')
Exception: No devices found
```
</details>


I'd like to see my mouse being supported by Solaar. Now following <https://pwr-solaar.github.io/Solaar/devices.html>

`cat /sys/class/hidraw/hidraw0/device/uevent` 
<details>

```
DRIVER=hid-generic
HID_ID=0003:0000046D:0000C24E
HID_NAME=Logitech G500s Laser Gaming Mouse
HID_PHYS=usb-0000:0c:00.3-2/input0
HID_UNIQ=310442E9A20009
MODALIAS=hid:b0003g0001v0000046Dp0000C24E
```
</details>

`/sys/class/hidraw/hidraw0/device/report_descriptor`
<details>

```
05 01 09 02 A1 01 09 01 A1 00 05 09 19 01 29 10 15 00 25 01 95 10 75 01 81 02 05 01 16 01 80 26 FF 7F 75 10 95 02 09 30 09 31 81 06 15 81 25 7F 75 08 95 01 09 38 81 06 05 0C 0A 38 02 95 01 81 06 C0 C0
```
Also attached as a zip
[report_descriptor.zip](https://github.com/pwr-Solaar/Solaar/files/12064475/report_descriptor.zip)
</details>


`lsusb -vv -d 046d:c24e` with `xxxx:yyyy` being `Bus 003 Device 002: ID 046d:c24e Logitech, Inc. G500s Laser Gaming Mouse`
<details>

```
Bus 003 Device 002: ID 046d:c24e Logitech, Inc. G500s Laser Gaming Mouse
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x046d Logitech, Inc.
  idProduct          0xc24e G500s Laser Gaming Mouse
  bcdDevice           84.01
  iManufacturer           1 Logitech
  iProduct                2 G500s Laser Gaming Mouse
  iSerial                 3 310442E9A20009
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x003b
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          4 U84.01_B0009
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               98mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      67
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     122
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0014  1x 20 bytes
        bInterval               1
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
```
</details>


Discussion:
The report descriptor you provided decodes as 

```
Usage Page (Desktop),               ; Generic desktop controls (01h)
Usage (Mouse),                      ; Mouse (02h, application collection)
Collection (Application),
    Usage (Pointer),                ; Pointer (01h, physical collection)
    Collection (Physical),
        Usage Page (Button),        ; Button (09h)
        Usage Minimum (01h),
        Usage Maximum (10h),
        Logical Minimum (0),
        Logical Maximum (1),
        Report Count (16),
        Report Size (1),
        Input (Variable),
        Usage Page (Desktop),       ; Generic desktop controls (01h)
        Logical Minimum (-32767),
        Logical Maximum (32767),
        Report Size (16),
        Report Count (2),
        Usage (X),                  ; X (30h, dynamic value)
        Usage (Y),                  ; Y (31h, dynamic value)
        Input (Variable, Relative),
        Logical Minimum (-127),
        Logical Maximum (127),
        Report Size (8),
        Report Count (1),
        Usage (Wheel),              ; Wheel (38h, dynamic value)
        Input (Variable, Relative),
        Usage Page (Consumer),      ; Consumer (0Ch)
        Usage (AC Pan),             ; AC pan (0238h, linear control)
        Report Count (1),
        Input (Variable, Relative),
    End Collection,
End Collection
```

This report does not provide HID++ messages so unless there is a different report descriptor Solaar cannot support this device.

There is another report in `/sys/class/hidraw/hidraw1/device/report_descriptor` that reports to the same device.
Hex:
```
05 01 09 06 A1 01 85 01 05 07 19 E0 29 E7 15 00 25 01 75 01 95 08 81 02 95 05 75 08 15 00 26 A4 00 05 07 19 00 2A A4 00 81 00 C0 05 0C 09 01 A1 01 85 03 75 10 95 02 15 01 26 8C 02 19 01 2A 8C 02 81 00 C0 06 00 FF 09 01 A1 01 85 10 75 08 95 06 15 00 26 FF 00 09 01 81 00 09 01 91 00 C0 06 00 FF 09 02 A1 01 85 11 75 08 95 13 15 00 26 FF 00 09 02 81 00 09 02 91 00 C0
```
[report_descriptor.zip](https://github.com/pwr-Solaar/Solaar/files/12064877/report_descriptor.zip)

That decodes to 
```
Usage Page (Desktop),                   ; Generic desktop controls (01h)
Usage (Keyboard),                       ; Keyboard (06h, application collection)
Collection (Application),
    Report ID (1),
    Usage Page (Keyboard),              ; Keyboard/keypad (07h)
    Usage Minimum (KB Leftcontrol),     ; Keyboard left control (E0h, dynamic value)
    Usage Maximum (KB Right GUI),       ; Keyboard right GUI (E7h, dynamic value)
    Logical Minimum (0),
    Logical Maximum (1),
    Report Size (1),
    Report Count (8),
    Input (Variable),
    Report Count (5),
    Report Size (8),
    Logical Minimum (0),
    Logical Maximum (164),
    Usage Page (Keyboard),              ; Keyboard/keypad (07h)
    Usage Minimum (None),               ; No event (00h, selector)
    Usage Maximum (KB ExSel),           ; Keyboard ExSel (A4h, selector)
    Input,
End Collection,
Usage Page (Consumer),                  ; Consumer (0Ch)
Usage (Consumer Control),               ; Consumer control (01h, application collection)
Collection (Application),
    Report ID (3),
    Report Size (16),
    Report Count (2),
    Logical Minimum (1),
    Logical Maximum (652),
    Usage Minimum (Consumer Control),   ; Consumer control (01h, application collection)
    Usage Maximum (AC Send),            ; AC send (028Ch, selector)
    Input,
End Collection,
Usage Page (FF00h),                     ; FF00h, vendor-defined
Usage (01h),
Collection (Application),
    Report ID (16),
    Report Size (8),
    Report Count (6),
    Logical Minimum (0),
    Logical Maximum (255),
    Usage (01h),
    Input,
    Usage (01h),
    Output,
End Collection,
Usage Page (FF00h),                     ; FF00h, vendor-defined
Usage (02h),
Collection (Application),
    Report ID (17),
    Report Size (8),
    Report Count (19),
    Logical Minimum (0),
    Logical Maximum (255),
    Usage (02h),
    Input,
    Usage (02h),
    Output,
End Collection
```
which does have the HID++ reports.
What is the output of `solaar -ddd` and `solaar -ddd show`?

If you install the hid_parser Python package (try `pip install hid_parser`) this device should work with Solaar.  Please try that and then provide the output of `solaar show`
`solaar -ddd`
```
20:31:47,744     INFO [MainThread] root: language en_US (UTF-8), translations path None

(solaar:48703): Gtk-WARNING **: 20:31:47.788: Locale not supported by C library.
	Using the fallback 'C' locale.
20:31:48,207    DEBUG [MainThread] logitech_receiver.diversion: rule Key assuming action "pressed" for "Brightness Down"
20:31:48,208    DEBUG [MainThread] logitech_receiver.diversion: rule Key assuming action "pressed" for "Brightness Up"
20:31:48,211    DEBUG [MainThread] solaar.ui.tray: using Ayatana AppIndicator3
20:31:48,217  WARNING [MainThread] solaar.upower: failed to register suspend/resume callbacks
20:31:48,238    DEBUG [MainThread] solaar.ui: startup registered=True, remote=False
20:31:48,238    DEBUG [AsyncUI] solaar.tasks: started
20:31:48,239     INFO [MainThread] solaar.ui.notify: starting desktop notifications
20:31:48,241    DEBUG [MainThread] solaar.ui.icons: sys.path[0] = /usr/share/solaar/lib
20:31:48,241    DEBUG [MainThread] solaar.ui.icons: looking for icons in /usr/share/solaar/icons
20:31:48,241    DEBUG [MainThread] solaar.ui.icons: icon theme paths: ['/usr/share/solaar/icons', '/home/mrkleeblatt/.local/share/icons', '/home/mrkleeblatt/.icons', '/home/mrkleeblatt/Programs/AppImage/icons', '/home/mrkleeblatt/.local/share/flatpak/exports/share/icons', '/var/lib/flatpak/exports/share/icons', '/usr/local/share/icons', '/usr/share/icons', '/home/mrkleeblatt/Programs/AppImage/pixmaps', '/home/mrkleeblatt/.local/share/flatpak/exports/share/pixmaps', '/var/lib/flatpak/exports/share/pixmaps', '/usr/local/share/pixmaps', '/usr/share/pixmaps']
20:31:48,286     INFO [MainThread] solaar.listener: starting receiver listening threads
20:31:48,290    DEBUG [MainThread] solaar.ui: activate
```
(and Solaar opens showing no devices)

`solaar -ddd show`
```
(solaar:49734): Gtk-WARNING **: 20:33:15.579: Locale not supported by C library.
	Using the fallback 'C' locale.
20:33:15,635    DEBUG [MainThread] logitech_receiver.diversion: rule Key assuming action "pressed" for "Brightness Down"
20:33:15,635    DEBUG [MainThread] logitech_receiver.diversion: rule Key assuming action "pressed" for "Brightness Up"
20:33:15,638    DEBUG [MainThread] solaar.ui.tray: using Ayatana AppIndicator3
solaar: error: Traceback (most recent call last):
  File "/usr/share/solaar/lib/solaar/cli/__init__.py", line 200, in run
    raise Exception('No devices found')
Exception: No devices found
```

Python package is installed with version `hid-parser  0.0.3`.

`solaar show`
```
(solaar:51888): Gtk-WARNING **: 20:35:01.080: Locale not supported by C library.
	Using the fallback 'C' locale.
solaar: error: Traceback (most recent call last):
  File "/usr/share/solaar/lib/solaar/cli/__init__.py", line 200, in run
    raise Exception('No devices found')
Exception: No devices found
```
Aaah.  I didn't  notice the version of Solaar you are running.   You should update to version 1.1.8 or 1.1.9, using one of the Ubuntu PPAs mentioned in https://github.com/pwr-Solaar/Solaar.   Alternatively you could install using pip.   Then retry the actions above.
Installing it through yay seemed to help a little bit, but still the mouse seems to be unknown. (See picture)

![image](https://github.com/pwr-Solaar/Solaar/assets/66536608/6ffdd60a-51eb-49c3-8c39-6c4cb413e15d)

And the console looks like this:
```
2023-07-18 11:18:40,779,779     INFO [MainThread] root: language en_US (UTF-8), translations path /usr/share/locale

(solaar:10134): Gtk-WARNING **: 11:18:40.839: Locale not supported by C library.
	Using the fallback 'C' locale.
2023-07-18 11:18:40,912,912     INFO [MainThread] logitech_receiver.diversion: GDK Keymap set up
2023-07-18 11:18:40,913,913  WARNING [MainThread] logitech_receiver.diversion: rules cannot access active process or modifier keys in Wayland
2023-07-18 11:18:41,014,014     INFO [MainThread] logitech_receiver.diversion: uinput device set up
2023-07-18 11:18:41,027,027    DEBUG [MainThread] solaar.ui.tray: using StatusIcon
2023-07-18 11:18:41,033,033  WARNING [MainThread] solaar.upower: failed to register suspend/resume callbacks
2023-07-18 11:18:41,053,053    DEBUG [MainThread] solaar.ui: startup registered=True, remote=False
2023-07-18 11:18:41,054,054    DEBUG [AsyncUI] solaar.tasks: started
2023-07-18 11:18:41,054,054     INFO [MainThread] solaar.ui.notify: starting desktop notifications

(solaar:10134): Gtk-CRITICAL **: 11:18:41.056: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed

(solaar:10134): Gtk-CRITICAL **: 11:18:41.056: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
2023-07-18 11:18:41,056,056    DEBUG [MainThread] solaar.ui.icons: sys.path[0] = /usr/bin
2023-07-18 11:18:41,056,056    DEBUG [MainThread] solaar.ui.icons: looking for icons in /usr/icons
2023-07-18 11:18:41,056,056    DEBUG [MainThread] solaar.ui.icons: looking for icons in /usr/share/solaar/icons
2023-07-18 11:18:41,056,056    DEBUG [MainThread] solaar.ui.icons: icon theme paths: ['/usr/share/solaar/icons', '/home/mrkleeblatt/.local/share/icons', '/home/mrkleeblatt/.icons', '/home/mrkleeblatt/Programs/AppImage/icons', '/home/mrkleeblatt/.local/share/flatpak/exports/share/icons', '/var/lib/flatpak/exports/share/icons', '/usr/local/share/icons', '/usr/share/icons', '/home/mrkleeblatt/Programs/AppImage/pixmaps', '/home/mrkleeblatt/.local/share/flatpak/exports/share/pixmaps', '/var/lib/flatpak/exports/share/pixmaps', '/usr/local/share/pixmaps', '/usr/share/pixmaps']
2023-07-18 11:18:41,060,060  WARNING [MainThread] solaar.ui.icons: failed to detect icons
2023-07-18 11:18:41,090,090     INFO [MainThread] solaar.listener: starting receiver listening threads
2023-07-18 11:18:41,220,220  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for BID 0003 VID 000019F7 PID 00000003: Expecting 8 usages but got 1
2023-07-18 11:18:41,238,238  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for BID 0003 VID 00001B1C PID 00001B3D: Expecting 63 usages but got 1
2023-07-18 11:18:41,239,239  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for BID 0003 VID 00001B1C PID 00001B3D: Expecting 64 usages but got 1
2023-07-18 11:18:41,245,245     INFO [MainThread] hidapi.udev: Found device BID 0003 VID 0000046D PID 0000C24E HID++ True True USB 1 None
2023-07-18 11:18:41,245,245     INFO [MainThread] solaar.listener: receiver event add DeviceInfo(path='/dev/hidraw1', bus_id=3, vendor_id='046D', product_id='C24E', interface=1, driver='hid-generic', manufacturer=None, product=None, serial='310442E9A20009', release=None, isDevice=True, hidpp_short=True, hidpp_long=True)
2023-07-18 11:18:41,246,246     INFO [ReceiverListener:hidraw1] logitech_receiver.listener: started with <Device(255,C24E,Unknown device C24E,)> (16)
2023-07-18 11:18:41,246,246     INFO [ReceiverListener:hidraw1] solaar.listener: <Device(255,C24E,Unknown device C24E,)>: notifications listener has started (16)
2023-07-18 11:18:41,246,246     INFO [ReceiverListener:hidraw1] solaar.listener: status_changed <Device(255,C24E,Unknown device C24E,)>: paired offline, {'NOTIFICATION FLAGS': False} (0) 
2023-07-18 11:18:41,247,247    DEBUG [MainThread] solaar.ui: activate
2023-07-18 11:18:41,247,247    DEBUG [ReceiverListener:hidraw1] logitech_receiver.base: (16) pinging device 255
2023-07-18 11:18:41,247,247     INFO [ReceiverListener:hidraw1] logitech_receiver.base: New lock <_ThreadedHandle(/dev/hidraw1)>
2023-07-18 11:18:41,247,247    DEBUG [ReceiverListener:hidraw1] logitech_receiver.base: (16) <= w[10 FF 001D 000036]
2023-07-18 11:18:41,249,249    DEBUG [ReceiverListener:hidraw1] logitech_receiver.base: (16) => r[10 FF 8F00 1D0800]
2023-07-18 11:18:41,249,249    DEBUG [MainThread] solaar.ui: status changed: <Device(255,C24E,Unknown device C24E,)> (NONE) None
2023-07-18 11:18:41,249,249    ERROR [ReceiverListener:hidraw1] logitech_receiver.base: (16) device 255 error on ping request: unknown device
Exception in thread ReceiverListener:hidraw1:
Traceback (most recent call last):
2023-07-18 11:18:41,249,249  WARNING [MainThread] solaar.ui.icons: icon battery-missing not found in current theme
  File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
2023-07-18 11:18:41,250,250    DEBUG [MainThread] solaar.ui.tray: picked device with lowest battery: None

(solaar:10134): Gtk-CRITICAL **: 11:18:41.250: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
    self.run()
2023-07-18 11:18:41,250,250    DEBUG [MainThread] solaar.ui.window: new device row ('/dev/hidraw1', 255, False, '?? (C24E)', None, None, None, <Device(255,C24E,Unknown device C24E,)>) at index 0
  File "/usr/lib/python3.11/site-packages/logitech_receiver/listener.py", line 159, in run
    if self.receiver.ping():
       ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/logitech_receiver/device.py", line 452, in ping
    protocol = _base.ping(self.handle or self.receiver.handle, self.number, long_message=long)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/logitech_receiver/base.py", line 542, in ping
2023-07-18 11:18:41,252,252    DEBUG [MainThread] solaar.configuration: load => ['1.1.9']
    raise NoSuchDevice(number=devnumber, request=request_id)
2023-07-18 11:18:41,252,252     INFO [MainThread] solaar.configuration: not setting up persister for offline device Unknown device C24E with missing serial number
logitech_receiver.base.NoSuchDevice: {'number': 255, 'request': 29}
None


```
OK, the device shows up, but doesn't do much.   It may be that the device only minimally supports HID++, hence the error in self.receiver.ping.   Does this show up all the time?

What is the output of `solaar -ddd show`?

Also, is this a G5000s or a G500s?
It's a G500s and yes, that happens always.
`solaar -ddd show`
```
2023-07-18 14:31:21,485,485  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for BID 0003 VID 000019F7 PID 00000003: Expecting 8 usages but got 1
2023-07-18 14:31:21,510,510  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for BID 0003 VID 00001B1C PID 00001B3D: Expecting 63 usages but got 1
2023-07-18 14:31:21,512,512  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for BID 0003 VID 00001B1C PID 00001B3D: Expecting 64 usages but got 1
2023-07-18 14:31:21,522,522     INFO [MainThread] hidapi.udev: Found device BID 0003 VID 0000046D PID 0000C24E HID++ True True USB 1 None
2023-07-18 14:31:21,523,523    DEBUG [MainThread] solaar.cli: [/dev/hidraw1] => <Device(255,C24E,Unknown device C24E,)>
solaar version 1.1.9

USB and Bluetooth Devices

2023-07-18 14:31:21,523,523    DEBUG [MainThread] logitech_receiver.base: (4) pinging device 255
2023-07-18 14:31:21,524,524     INFO [MainThread] logitech_receiver.base: New lock 4
2023-07-18 14:31:21,524,524    DEBUG [MainThread] logitech_receiver.base: (4) <= w[10 FF 0018 0000DA]
2023-07-18 14:31:21,526,526    DEBUG [MainThread] logitech_receiver.base: (4) => r[10 FF 8F00 180800]
2023-07-18 14:31:21,526,526    ERROR [MainThread] logitech_receiver.base: (4) device 255 error on ping request: unknown device
solaar: error: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/solaar/cli/__init__.py", line 209, in run
    m.run(c, args, _find_receiver, _find_device)
  File "/usr/lib/python3.11/site-packages/solaar/cli/show.py", line 305, in run
    _print_device(d, num=dev_num)
  File "/usr/lib/python3.11/site-packages/solaar/cli/show.py", line 85, in _print_device
    dev.ping()
  File "/usr/lib/python3.11/site-packages/logitech_receiver/device.py", line 452, in ping
    protocol = _base.ping(self.handle or self.receiver.handle, self.number, long_message=long)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/logitech_receiver/base.py", line 542, in ping
    raise NoSuchDevice(number=devnumber, request=request_id)
logitech_receiver.base.NoSuchDevice: {'number': 255, 'request': 24}

```
OK, getting the correct ping parameters may require some more testing on your part.   I'll put together a patched version of Solaar for you to run.

Resolving patch:
diff --git a/lib/hidapi/hidconsole.py b/lib/hidapi/hidconsole.py
--- a/lib/hidapi/hidconsole.py
+++ b/lib/hidapi/hidconsole.py
@@ -158,7 +158,7 @@ def matchfn(bid, vid, pid, _a, _b):
         '.. Opened handle %r, vendor %r product %r serial %r.' %
         (handle, _hid.get_manufacturer(handle), _hid.get_product(handle), _hid.get_serial(handle))
     )
-    if args.hidpp:
+    if False and args.hidpp:
         if _hid.get_manufacturer(handle) != b'Logitech':
             sys.exit('!! Only Logitech devices support the HID++ protocol.')
         print('.. HID++ validation enabled.')
diff --git a/lib/logitech_receiver/descriptors.py b/lib/logitech_receiver/descriptors.py
--- a/lib/logitech_receiver/descriptors.py
+++ b/lib/logitech_receiver/descriptors.py
@@ -303,6 +303,7 @@ class _PerformanceMXDpi(_ST.RegisterDpi):
 _D(None, kind=_DK.mouse, usbid=0xc092, interface=1)  # two mice share this ID
 _D('M500S Mouse', codename='M500S', usbid=0xc093, interface=1)
 # _D('G600 Gaming Mouse', codename='G600 Gaming', usbid=0xc24a, interface=1) # not an HID++ device
+_D('G500s Gaming Mouse', codename='G500s Gaming', usbid=0xc24e, interface=1, protocol=1.0)
 _D('G502 Proteus Spectrum Optical Mouse', codename='G502 Proteus Spectrum', usbid=0xc332, interface=1)
 _D('Logitech PRO Gaming Keyboard', codename='PRO Gaming Keyboard', usbid=0xc339, interface=1)
 


Test patch: