Logitech G512 keyboard occosially having trouble connecting

Hi.

I use a Logitech G512 SE mechanical keyboard on a windows surface book 2.

Kernal:
Linux 6.10.4-arch2-1 #1 SMP PREEMPT_DYNAMIC Sun, 11 Aug 2024 16:19:06 +0000 x86_64 GNU/Linux

My keyboard will intermittently turn off and I see the following errors in dmesg. All the keys will become not responsive.

+13.798755] usb 1-1.1.3: new full-speed USB device number 17 using xhci_hcd
[  +0.100269] usb 1-1.1.3: device descriptor read/64, error -32
[  +0.203308] usb 1-1.1.3: device descriptor read/64, error -32
[  +0.203520] usb 1-1.1.3: new full-speed USB device number 18 using xhci_hcd
[  +0.096540] usb 1-1.1.3: device descriptor read/64, error -32
[  +0.206562] usb 1-1.1.3: device descriptor read/64, error -32
[  +0.107460] usb 1-1.1-port3: attempt power cycle
[  +0.642555] usb 1-1.1.3: new full-speed USB device number 19 using xhci_hcd
[  +0.000209] usb 1-1.1.3: Device not responding to setup address.
[  +0.206681] usb 1-1.1.3: Device not responding to setup address.
[  +0.206199] usb 1-1.1.3: device not accepting address 19, error -71
[  +0.000170] usb 1-1.1.3: WARN: invalid context state for evaluate context command.
[  +0.096570] usb 1-1.1.3: new full-speed USB device number 20 using xhci_hcd
[  +0.000224] usb 1-1.1.3: Device not responding to setup address.
[  +0.207040] usb 1-1.1.3: Device not responding to setup address.
[  +0.206447] usb 1-1.1.3: device not accepting address 20, error -71
[  +0.000736] usb 1-1.1.3: WARN: invalid context state for evaluate context command.
[  +0.000097] usb 1-1.1-port3: unable to enumerate USB device
[ +16.974818] usb 1-4.1.3: new full-speed USB device number 21 using xhci_hcd
[  +0.099745] usb 1-4.1.3: device descriptor read/64, error -32
[  +0.205046] usb 1-4.1.3: device descriptor read/64, error -32

After unplugging the device over and over again into different USB ports eventually it connects and I see the following


[  +0.202365] usb 1-4.1.3: new full-speed USB device number 22 using xhci_hcd
[  +0.117333] usb 1-4.1.3: New USB device found, idVendor=046d, idProduct=c342, bcdDevice=50.00
[  +0.000005] usb 1-4.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  +0.000002] usb 1-4.1.3: Product: G512 SE
[  +0.000001] usb 1-4.1.3: Manufacturer: Logitech
[  +0.000001] usb 1-4.1.3: SerialNumber: 127F38733638
[  +0.009855] input: Logitech G512 SE as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.1/1-4.1.3/1-4.1.3:1.0/0003:046D:C342.0006/input/input33
[  +0.055005] hid-generic 0003:046D:C342.0006: input,hidraw5: USB HID v1.11 Keyboard [Logitech G512 SE] on usb-0000:00:14.0-4.1.3/input0
[  +0.002072] input: Logitech G512 SE Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.1/1-4.1.3/1-4.1.3:1.1/0003:046D:C342.0007/input/input34
[  +0.054303] hid-generic 0003:046D:C342.0007: input,hiddev99,hidraw6: USB HID v1.11 Keyboard [Logitech G512 SE] on usb-0000:00:14.0-4.1.3/input1

Then when using it it seems to work for an extended period of time until replaying the first error.
I cant seem to reliably reproduce the disconnect error.
It just happens occasionally when trying to connect the keyboard or when I am typing.

Anyone have any ideas for now I could get it to always work and not have that device descriptor read error?

Am I missing some driver for it to work more consistently?
Are there some more places I can look for more detailed debug logs?

If you have any ideas please let me know :slight_smile:

I’ve had a similar issue with my knockoff Switch controllers. Typically what happens is that the cable it comes with works for a while, then borks itself. Then, if I switch cables, it works. Only difference is, on one of them, the included cable never unborked itself.

What I’m saying here is maybe your cable is bad. Try a different one.

Thanks for the reply! I am directly connecting the cable from the wired keyboard to a usb port on my laptop. Unfortunately there is no way to change cables unless I cut it off my keyboard and solder on a new one :sweat_smile:. I did not have problems with this cable on this computer when I was runnin ubuntuuuuuu (i like endeavour alot more but just sayinnnn why i think it might be some kind of driver issue since Arch is pretty minimal.)

I had a lot of USB issues on my Surface Book, and that was under Windows, connecting Microsoft peripherals :persevere:

Plug this into a web search…

microsoft surface book usb disconnecting

You’re not alone.

Not having the issue under Ubuntu would seem to suggest it’s not hardware, except perhaps that the wear on the screen-base connection over time may have introduced the issue. The screen contains the core of the Surface Book, but the base connects all peripherals.

You might try testing an Ubuntu live ISO again to rule that out.

1 Like

I’m running a G512 on a custom-built computer & have had that happen a couple of times in the last couple of years. I would normally unplug/replug & everything worked again… I think the problem is with the ports on the Surface…are all the ports USB3? I plug into USB2 ports with mine. I think it’s a limitation with Logitech…

# System Details Report
---

## Report details
- **Date generated:**                              2024-08-13 16:17:56

## Hardware Information:
- **Hardware Model:**                              ASUS ROG STRIX Z790-H GAMING WIFI
- **Memory:**                                      32.0 GiB
- **Processor:**                                   13th Gen Intel® Core™ i7-13700KF × 16
- **Graphics:**                                    Intel® Arc™ A750 Graphics (DG2)
- **Disk Capacity:**                               3.5 TB

## Software Information:
- **Firmware Version:**                            2402
- **OS Name:**                                     EndeavourOS
- **OS Build:**                                    2021.04.17
- **OS Type:**                                     64-bit
- **GNOME Version:**                               46
- **Windowing System:**                            Wayland
- **Kernel Version:**                              Linux 6.10.4-zen2-1-zen

[dean@ASUS-Z790 Desktop]$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0b05:19af ASUSTek Computer, Inc. AURA LED Controller
Bus 001 Device 003: ID 174c:2074 ASMedia Technology Inc. ASM1074 High-Speed hub
Bus 001 Device 004: ID 058f:6254 Alcor Micro Corp. USB Hub
Bus 001 Device 005: ID 25a7:fa61 Areson Technology Corp Elecom Co., Ltd MR-K013 Multicard Reader
Bus 001 Device 006: ID 8087:0033 Intel Corp. AX211 Bluetooth
Bus 001 Device 007: ID 046d:c33c Logitech, Inc. G512 RGB MECHANICAL GAMING KEYBOARD
Bus 001 Device 008: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 001 Device 009: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 001 Device 010: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 001 Device 015: ID 2717:ff40 Xiaomi Inc. Mi/Redmi series (MTP)
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 174c:3074 ASMedia Technology Inc. ASM1074 SuperSpeed hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 2109:2815 VIA Labs, Inc. USB2.0 Hub    <--- Keyboard      
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 004 Device 002: ID 2109:0815 VIA Labs, Inc. USB3.0 Hub    

Oh, I didn’t read about your keyboard enough to find out that companies are STILL using integrated cables. My bad.

Try plugging it into a USB 2.0 port. If you don’t have one, you can get a USB 2.0 hub. If you can’t, maybe you can remove all the extra pins. (I am not responsible for damages).