pwr-Solaar / Solaar

Linux device manager for Logitech devices
https://pwr-solaar.github.io/Solaar
GNU General Public License v2.0
5.54k stars 410 forks source link

G733 Headset G Key Is No Longer Diverted #2122

Closed a-priestley closed 1 year ago

a-priestley commented 1 year ago

Information

``` solaar version 1.1.9 USB and Bluetooth Devices 1: G502 Gaming Mouse Device path : /dev/hidraw4 USB id : 046d:C07D Codename : G502 Kind : mouse Protocol : HID++ 4.2 Polling rate : 1 ms (1000Hz) Serial number: Model ID: 000000000000 Unit ID: 00000000 Firmware: U 88.02.B0017 Bootloader: BOT 14.00.B0007 Hardware: 72 Other: Supports 20 HID++ 2.0 features: 0: ROOT {0000} V0 1: FEATURE SET {0001} V0 2: FEATURE INFO {0002} V0 3: DEVICE FW VERSION {0003} V0 Firmware: Firmware U 88.02.B0017 Firmware: Bootloader BOT 14.00.B0007 Firmware: Hardware 72 Firmware: Other Unit ID: 00000000 Model ID: 000000000000 Transport IDs: {} 4: DEVICE NAME {0005} V0 Name: Tunable FPS Gaming Mouse G502 Kind: mouse 5: LED CONTROL {1300} V0 6: unknown:18A1 {18A1} V0 internal, hidden 7: unknown:1E00 {1E00} V0 hidden 8: unknown:1E20 {1E20} V0 9: unknown:1EB0 {1EB0} V0 internal, hidden 10: ADJUSTABLE DPI {2201} V0 Sensitivity (DPI) (saved): 800 Sensitivity (DPI) : 800 11: ANGLE SNAPPING {2230} V0 12: SURFACE TUNING {2240} V0 13: REPORT RATE {8060} V0 Polling Rate (ms): 1 Polling Rate (ms) (saved): 1 Polling Rate (ms) : 1 14: ONBOARD PROFILES {8100} V0 Device Mode: Host Onboard Profiles (saved): Disable Onboard Profiles : Disable 15: MOUSE BUTTON SPY {8110} V0 16: unknown:1850 {1850} V0 internal, hidden 17: DFUCONTROL UNSIGNED {00C1} V0 18: unknown:1801 {1801} V0 internal, hidden 19: DEVICE RESET {1802} V0 internal, hidden Battery status unavailable. 2: G733 Gaming Headset Device path : /dev/hidraw2 USB id : 046d:0AB5 Codename : G733 Headset Kind : headset Protocol : HID++ 4.2 Serial number: Model ID: 0AB500000000 Unit ID: FFFFFFFF Firmware: U1 37.00.B0131 Supports 9 HID++ 2.0 features: 0: ROOT {0000} V0 1: FEATURE SET {0001} V0 2: DEVICE FW VERSION {0003} V2 Firmware: Firmware U1 37.00.B0131 0AB5 Unit ID: FFFFFFFF Model ID: 0AB500000000 Transport IDs: {'usbid': '0AB5'} 3: DEVICE NAME {0005} V0 Name: G733 Gaming Headset Kind: None 4: COLOR LED EFFECTS {8070} V0 5: GKEY {8010} V0 Divert G Keys (saved): True Divert G Keys : False 6: EQUALIZER {8310} V1 Equalizer (saved): {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0} Equalizer : {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0} 7: SIDETONE {8300} V0 Sidetone (saved): 70 Sidetone : 70 8: ADC MEASUREMENT {1F20} V4 Battery: 80% 4057mV , discharging. Power Management (saved): 30 Power Management : 30 Battery: 80% 4057mV , discharging. ```
``` - 1.1.9 - _NAME: G733 Gaming Headset _absent: [hi-res-scroll, lowres-scroll-mode, hires-smooth-invert, hires-smooth-resolution, hires-scroll-mode, scroll-ratchet, smart-shift, thumb-scroll-invert, thumb-scroll-mode, onboard_profiles, report_rate, pointer_speed, dpi, speed-change, backlight, backlight-timed, fn-swap, reprogrammable-keys, persistent-remappable-keys, divert-keys, disable-keyboard-keys, crown-smooth, divert-crown, m-key-leds, mr-key-led, multiplatform, change-host, gesture2-gestures, gesture2-divert, gesture2-params] _battery: 7968 _modelId: 0AB500000000 _sensitive: {adc_power_management: true, divert-gkeys: true, equalizer: true, sidetone: true} _unitId: FFFFFFFF adc_power_management: 30 divert-gkeys: true equalizer: {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0} sidetone: 70 - _NAME: G502 Gaming Mouse _absent: [hi-res-scroll, lowres-scroll-mode, hires-smooth-invert, hires-smooth-resolution, hires-scroll-mode, scroll-ratchet, smart-shift, thumb-scroll-invert, thumb-scroll-mode, pointer_speed, speed-change, backlight, backlight-timed, fn-swap, reprogrammable-keys, persistent-remappable-keys, divert-keys, disable-keyboard-keys, crown-smooth, divert-crown, divert-gkeys, m-key-leds, mr-key-led, multiplatform, change-host, gesture2-gestures, gesture2-divert, gesture2-params, sidetone, equalizer, adc_power_management] _battery: 0 _modelId: G502 Gaming Mouse _sensitive: {dpi: false, onboard_profiles: false} _unitId: '00000000' dpi: 800 onboard_profiles: 2 report_rate: 1 ```
2023-08-24 09:14:11,507,507    DEBUG [ReceiverListener:hidraw2] logitech_receiver.base: (19) => r[11 FF 0500 01000000000000000000000000000000]
2023-08-24 09:14:11,508,508    DEBUG [ReceiverListener:hidraw2] logitech_receiver.notifications: <Device(255,0AB5,G733 Gaming Headset,)>: notification for feature GKEY, report 0, data 01000000000000000000000000000000
2023-08-24 09:14:11,508,508    ERROR [ReceiverListener:hidraw2] logitech_receiver.listener: processing Notification(11,255,05,00,01000000000000000000000000000000)
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/logitech_receiver/listener.py", line 176, in run
    self._notifications_callback(n)
  File "/usr/lib/python3.11/site-packages/solaar/listener.py", line 196, in _notifications_handler
    _notifications.process(self.receiver, n)
  File "/usr/lib/python3.11/site-packages/logitech_receiver/notifications.py", line 61, in process
    return _process_device_notification(device, status, notification)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/logitech_receiver/notifications.py", line 201, in _process_device_notification
    return _process_feature_notification(device, status, n, feature)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/logitech_receiver/notifications.py", line 448, in _process_feature_notification
    _diversion.process_notification(device, status, n, feature)
  File "/usr/lib/python3.11/site-packages/logitech_receiver/diversion.py", line 1374, in process_notification
    new_g_keys_down = _unpack('!4I', notification.data[:4])[0]
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
struct.error: unpack requires a buffer of 16 bytes
2023-08-24 09:14:11,526,526    DEBUG [ReceiverListener:hidraw2] logitech_receiver.base: (19) => r[11 FF 0500 00000000000000000000000000000000]
2023-08-24 09:14:11,527,527    DEBUG [ReceiverListener:hidraw2] logitech_receiver.notifications: <Device(255,0AB5,G733 Gaming Headset,)>: notification for feature GKEY, report 0, data 00000000000000000000000000000000
2023-08-24 09:14:11,527,527    ERROR [ReceiverListener:hidraw2] logitech_receiver.listener: processing Notification(11,255,05,00,00000000000000000000000000000000)
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/logitech_receiver/listener.py", line 176, in run
    self._notifications_callback(n)
  File "/usr/lib/python3.11/site-packages/solaar/listener.py", line 196, in _notifications_handler
    _notifications.process(self.receiver, n)
  File "/usr/lib/python3.11/site-packages/logitech_receiver/notifications.py", line 61, in process
    return _process_device_notification(device, status, notification)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/logitech_receiver/notifications.py", line 201, in _process_device_notification
    return _process_feature_notification(device, status, n, feature)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/logitech_receiver/notifications.py", line 448, in _process_feature_notification
    _diversion.process_notification(device, status, n, feature)
  File "/usr/lib/python3.11/site-packages/logitech_receiver/diversion.py", line 1374, in process_notification
    new_g_keys_down = _unpack('!4I', notification.data[:4])[0]
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
struct.error: unpack requires a buffer of 16 bytes

Describe the bug G733 has one G Key in the form of its mute button. Diversion previously worked on it as G1, but it's now throwing the exception above.

To Reproduce Steps to reproduce the behavior:

  1. Open solaar gui with solaar -ddd
  2. Click on 'Rule Editor'
  3. Create a rule with a key condition for 'G1' and any action
  4. Click 'Save changes'
  5. Ensure 'Divert G Keys' is toggled in the main device menu
  6. Press the mute button
  7. See error
pfps commented 1 year ago

That bug was introduced in version 1.1.9 and fixed a few days later but there has not been a new release of Solaar since then. For now you could clone Solaar from this repository and use the current version. Version 1.1.10 should be out soon.

a-priestley commented 1 year ago

Can confirm that the latest master build works -- thanks!