pwr-Solaar / Solaar

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

Logitech G535 support #1947

Closed Tibladar closed 1 year ago

Tibladar commented 1 year ago

Information

The Logitech G535, a wireless Lightspeed 2,4Ghz headset, and it's usb receiver don't seem to be supported yet.

$ lsusb
Bus 001 Device 005: ID 046d:0ac4 Logitech, Inc. G535 Wireless Gaming Headset
$ sudo solaar -ddd
2022-12-31 13:55:52,798,798     INFO [MainThread] root: language de_DE (UTF-8), translations path None
2022-12-31 13:55:52,889,889     INFO [MainThread] logitech_receiver.diversion: GDK Keymap set up
2022-12-31 13:55:52,896,896    DEBUG [MainThread] solaar.ui.tray: using Ayatana AppIndicator3
2022-12-31 13:55:52,900,900     INFO [MainThread] solaar.upower: connected to system dbus, watching for suspend/resume events
2022-12-31 13:55:52,924,924    DEBUG [MainThread] solaar.ui: startup registered=True, remote=False
2022-12-31 13:55:52,924,924    DEBUG [AsyncUI] solaar.tasks: started
2022-12-31 13:55:52,925,925     INFO [MainThread] solaar.ui.notify: starting desktop notifications
2022-12-31 13:55:52,926,926    DEBUG [MainThread] solaar.ui.icons: sys.path[0] = /usr/share/solaar/lib
2022-12-31 13:55:52,926,926    DEBUG [MainThread] solaar.ui.icons: looking for icons in /usr/share/solaar/icons
2022-12-31 13:55:52,926,926    DEBUG [MainThread] solaar.ui.icons: icon theme paths: ['/usr/share/solaar/icons', '/root/.local/share/icons', '/root/.icons', '/usr/local/share/icons', '/usr/share/icons', '/usr/local/share/pixmaps', '/usr/share/pixmaps']
2022-12-31 13:55:52,953,953     INFO [MainThread] solaar.listener: starting receiver listening threads
2022-12-31 13:55:53,055,055  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for BID 0003 VID 00000D8C PID 0000013C: Expecting 3 usages but got 1
2022-12-31 13:55:53,056,056     INFO [MainThread] hidapi.udev: Found device BID 0003 VID 0000046D PID 00000AC4 HID++ False True USB 3 None
2022-12-31 13:55:53,056,056     INFO [MainThread] solaar.listener: receiver event add DeviceInfo(path='/dev/hidraw0', bus_id=3, vendor_id='046D', product_id='0AC4', interface=3, driver='hid-generic', manufacturer=None, product=None, serial='', release=None, isDevice=True, hidpp_short=False, hidpp_long=True)
2022-12-31 13:55:53,056,056    DEBUG [MainThread] logitech_receiver.base: (13) pinging device 255
2022-12-31 13:55:53,057,057     INFO [MainThread] logitech_receiver.base: New lock 13
2022-12-31 13:55:53,057,057    DEBUG [MainThread] logitech_receiver.base: (13) <= w[10 FF 001F 00005D]
2022-12-31 13:55:53,360,360    ERROR [MainThread] logitech_receiver.base: write failed, assuming handle 13 no longer available
2022-12-31 13:55:53,360,360    DEBUG [MainThread] solaar.ui: activate
2022-12-31 13:55:53,367,367    ERROR [MainThread] solaar.ui: error: nodevice /dev/hidraw0
$ cat /sys/class/hidraw/hidraw0/device/uevent
DRIVER=hid-generic
HID_ID=0003:0000046D:00000AC4
HID_NAME=Logitech G535 Wireless Gaming Headset
HID_PHYS=usb-0000:03:00.0-3/input3
HID_UNIQ=
MODALIAS=hid:b0003g0001v0000046Dp00000AC4
$ cat /sys/class/hidraw/hidraw0/device/report_descriptor | base64
BQwJAaEBhQEJ6QnqdQGVAhUAJQGBAnUGlQGBA3UYgQPABkP/CgICoQGFEZUTdQgm/wAJAoEACQKR
AMA=
$ sudo lsusb -vv -d 046d:0ac4 ``` Bus 001 Device 007: ID 046d:0ac4 Logitech, Inc. G535 Wireless Gaming Headset Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x046d Logitech, Inc. idProduct 0x0ac4 bcdDevice 9.00 iManufacturer 1 Logitech iProduct 2 G535 Wireless Gaming Headset iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x012e bNumInterfaces 6 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 100mA Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 0 bInterfaceCount 3 bFunctionClass 1 Audio bFunctionSubClass 1 Control Device bFunctionProtocol 0 iFunction 2 G535 Wireless Gaming Headset Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 1 Audio bInterfaceSubClass 1 Control Device bInterfaceProtocol 0 iInterface 0 AudioControl Interface Descriptor: bLength 10 bDescriptorType 36 bDescriptorSubtype 1 (HEADER) bcdADC 1.00 wTotalLength 0x0048 bInCollection 2 baInterfaceNr(0) 1 baInterfaceNr(1) 2 AudioControl Interface Descriptor: bLength 12 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 1 wTerminalType 0x0402 Headset bAssocTerminal 6 bNrChannels 2 wChannelConfig 0x0003 Left Front (L) Right Front (R) iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength 10 bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 2 bSourceID 1 bControlSize 1 bmaControls(0) 0x02 Volume Control bmaControls(1) 0x00 bmaControls(2) 0x00 iFeature 0 AudioControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 3 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 2 iTerminal 0 AudioControl Interface Descriptor: bLength 12 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 4 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bNrChannels 2 wChannelConfig 0x0003 Left Front (L) Right Front (R) iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength 10 bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 5 bSourceID 4 bControlSize 1 bmaControls(0) 0x03 Mute Control Volume Control bmaControls(1) 0x00 bmaControls(2) 0x00 iFeature 0 AudioControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 6 wTerminalType 0x0402 Headset bAssocTerminal 1 bSourceID 5 iTerminal 0 Endpoint Descriptor: bLength 9 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 8 bRefresh 0 bSynchAddress 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 AudioStreaming Interface Descriptor: bLength 7 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 3 bDelay 0 frames wFormatTag 0x0001 PCM AudioStreaming Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bNrChannels 1 bSubframeSize 2 bBitResolution 16 bSamFreqType 1 Discrete tSamFreq[ 0] 48000 Endpoint Descriptor: bLength 9 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 13 Transfer Type Isochronous Synch Type Synchronous Usage Type Data wMaxPacketSize 0x0062 1x 98 bytes bInterval 1 bRefresh 0 bSynchAddress 0 AudioStreaming Endpoint Descriptor: bLength 7 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x00 bLockDelayUnits 0 Undefined wLockDelay 0x0000 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 AudioStreaming Interface Descriptor: bLength 7 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 4 bDelay 1 frames wFormatTag 0x0001 PCM AudioStreaming Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bNrChannels 2 bSubframeSize 3 bBitResolution 24 bSamFreqType 1 Discrete tSamFreq[ 0] 48000 Endpoint Descriptor: bLength 9 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 13 Transfer Type Isochronous Synch Type Synchronous Usage Type Data wMaxPacketSize 0x0120 1x 288 bytes bInterval 1 bRefresh 0 bSynchAddress 0 AudioStreaming Endpoint Descriptor: bLength 7 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x00 bLockDelayUnits 0 Undefined wLockDelay 0x0000 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 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 59 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 16 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 4 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 0 iFunction 3 USB VCOM Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 4 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 0 iInterface 0 CDC Header: bcdCDC 1.10 CDC Call Management: bmCapabilities 0x01 call management bDataInterface 1 CDC ACM: bmCapabilities 0x06 sends break line coding and serial state CDC Union: bMasterInterface 4 bSlaveInterface 5 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x85 EP 5 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0010 1x 16 bytes bInterval 8 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 5 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x86 EP 6 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x06 EP 6 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 can't get device qualifier: Resource temporarily unavailable can't get debug descriptor: Resource temporarily unavailable Device Status: 0x0000 (Bus Powered) ```
pfps commented 1 year ago

Somehow the write to /dev/hidraw0 failed. Please provide output of ls -l /dev/hidraw*

Tibladar commented 1 year ago
crw-rw----+ 1 root root 237, 2 Dez 31 13:59 /dev/hidraw2
crw-------  1 root root 237, 3 Dez 31 13:59 /dev/hidraw3
crw-rw----+ 1 root root 237, 4 Dez 31 13:59 /dev/hidraw4
crw-rw----+ 1 root root 237, 5 Dez 31 13:59 /dev/hidraw5

(After a restart it's now /dev/hidraw2)

pfps commented 1 year ago

That looks OK. It might be that the device needs a slightly different message to ping it.

pfps commented 1 year ago

It appears that Solaar is sending the wrong kind of HID++ message to ping the device. PR #1948 updates this determination and should fix your problem. Please download and then run Solaar as bin/solaar -ddd and post the output.

To clone and use Solar from its GitHub repository

git clone https://github.com/pwr-Solaar/Solaar.git
cd Solaar

Run Solaar as bin/solaar from this directory.

To run PR #1948, first clone Solaar if you have not already done so and cd to the clone directory. The first time you download the pull request, fetch it into a new branch and checkout that branch, as in:

git fetch origin pull/1948/head:pull_1948
git checkout pull_1948

To download a new version of the pull request, fetch it and then set your pull branch to the new fetch, as in:

git checkout pull_1948
git fetch origin pull/1948/head
git reset --hard FETCH_HEAD
Tibladar commented 1 year ago

With the PR the device is shown now, thanks!

pfps commented 1 year ago

Can you provide output of bin/solaar show? We try to keep information on supported devices that have caused problems.

Tibladar commented 1 year ago
$ solaar show
solaar version 1.1.8

USB and Bluetooth Devices

  1: G535 Wireless Gaming Headset
     Device path  : /dev/hidraw2
     USB id       : 046d:0AC4
     Codename     : G535
     Kind         : ?
     Protocol     : HID++ 4.2
     Serial number: 
     Model ID:      000000000AC4
     Unit ID:       FFFFFFFF
          Firmware: U1  90.00.B0200
     Supports 6 HID++ 2.0 features:
         0: ROOT                   {0000} V0     
         1: FEATURE SET            {0001} V0     
         2: DEVICE FW VERSION      {0003} V2     
            Firmware: Firmware U1  90.00.B0200 0AC4
            Unit ID: FFFFFFFF  Model ID: 000000000AC4  Transport IDs: {'btid': '0000', 'btleid': '0000'}
         3: DEVICE NAME            {0005} V0     
            Name: G535 Wireless Gaming Headset
            Kind: None
         4: SIDETONE               {8300} V0     
            Sidetone (saved): 0
            Sidetone        : 0
         5: ADC MEASUREMENT        {1F20} V0     
            Battery: 60% 3920mV , discharging.
     Battery: 60% 3920mV , discharging.
pfps commented 1 year ago

Thanks.