Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] USB hub / KVM switch mouse + keyboard lag / stutter
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Ghoraab
n00b
n00b


Joined: 23 May 2014
Posts: 36

PostPosted: Mon May 06, 2024 6:03 pm    Post subject: [solved] USB hub / KVM switch mouse + keyboard lag / stutter Reply with quote

Dear Gentooists,
I ask for help because I am not able to solve a problem with my KVM switch and my mouse and keyboard. When my mouse (Logitech G700s) and my Keyboard (Roccat Ryos MK Pro) are connected via the KVM switch (all other USB devices unplugged) misbehave. The cursor lags, the mouse ignores clicks and mouse wheel turns. The keyboard omits letters, prints multiple letters or even a key gets stuck software-wise printing the same letter over and over again until the next key is pressed. When I unplug one of the devices, the problem seems to get better. Right now I have to unplug the mouse to log into my system, otherwise the password will be incorrect, for obvious reasons.
Sometimes the problem is barely noticeable, sometime I can't type two word without three letters missing.

My setup:
I use a (active USB 3) KVM switch with integrated sound car to connect three devices:

  • Gentoo / Manjaro / Windows 10 triple boot desktop
  • Playstation 4
  • Company Windows 10 laptop

to two monitors.

Thoughts on my hardware:
I did the following to locate the problem hardware-wise:

  • Try all USB ports: problem persists
  • Install PCIe USB 3 card: problem persists
  • Exchanged the KVM-switch with an other active USB 3 hub and a passive USB 2 hub: same problem
  • Unplugged all other USB devices: No help
  • Exchanged the cables: same problem
  • Did a BIOS update: problem remained
  • Tried other mice and keyboards: The lag-rate seems to change a little but the problem persists

The problem is gone as soon as I do not use my KVM switch. My laptop with Windows has no such problem, even with KVM switch. Neither has my triple-boot Windows 10. But my Manjaro has the same problem but I rarely use this system, so I did not test thoroughly.
I suspect the problem to be a linux related software or kernel problem, although I do not understand at all where it might come from.
Software-wise I did the following:

  • Did an update world: no help
  • Did a kernel update (gentoo-sources 6.1.67 -> 6.6.21): Same
  • Tried older kernel versions (for example 5.4.7): Same
  • Checked on processor and memory load when the lags happen: Both are low, no spikes
  • Checked on mainboard and processor temperatures: Both are below 40 °C
  • Checked dmesg -w: Does not throw errors or messages when lags happen, although at some point during the testing there was a constant reset of one (or more, I'm not sure) USB devices: the mouse. Now it's gone.
  • Checked whether the lags occur on terminal (Ctrl Shift F3): Yes they do
  • Checked whether the lags occur in Grub (in the Grub terminal): No they don't
  • Checked whether the lags increase in number when the system is under load (emerge software): No. Maybe even less but this may be either coincidence or imagination.


I have searched the internet a lot but I could not find a solution. Now I lack the knowledge to know where else to look and I would be grateful for some help.
Regards
Marius


Last edited by Ghoraab on Sat May 25, 2024 3:28 pm; edited 2 times in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Mon May 06, 2024 6:18 pm    Post subject: Reply with quote

Ghoraab,

There are two test case.

1. On the KVM switch, select the system to receive the mouse and keyboard outputs before you boot it.
Boot it and try to use it normally.
I half expect this to work, as the mouse and keyboard should appear to be connected as if without the KVM.

2. Switch the KVM to another system and test. The performance here does not matter for this test.

3. Switch back to the first system and confirm the lag that you describe.

Post the following from the laggy system.
Code:
dmesg
lsusb -vvv

They are too big for a post. Use wgetpaste and post the URLs you get back.

Mice and keyboards are USB1 devices. They will share USB2 in a USB3 hub as USB3 includes USB2 too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Ghoraab
n00b
n00b


Joined: 23 May 2014
Posts: 36

PostPosted: Mon May 06, 2024 6:43 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Ghoraab,
1. On the KVM switch, select the system to receive the mouse and keyboard outputs before you boot it.
Boot it and try to use it normally.
I half expect this to work, as the mouse and keyboard should appear to be connected as if without the KVM.

Lag as described before. Even without system switch.
dmesg
lsusb -vvv

I did stop here because you told me to post from the laggy system. Shall I carry out steps 2 and 3 and post again?

By the way: Now I'm running on the PCIe USB3 card. I now tried to use the mainboard USB again. Thing get even worse and I get the USB device reset error in dmesg frequently. A whole system lag seems to occur as well in this case.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5109
Location: Bavaria

PostPosted: Mon May 06, 2024 7:11 pm    Post subject: Reply with quote

Ghoraab,

I dont trust Manjaro, but Ubuntu ... ;-) If you boot with the newest UbuntuLiveCD do you have the same problems ?

If no, then we would need your kernel .config

If yes:

What happens if you remove this USB device ? ->
Code:
Bus 003 Device 003: ID 0c76:161f JMTek, LLC. USB PnP Audio Device

I want to see because of this:
Code:
[    1.747253] usb 3-1.1: Warning! Unlikely big volume range (=1008), cval->res is probably wrong.
[    1.747688] usb 3-1.1: [49] FU [PCM Playback Volume] ch = 2, val = -16129/-1/16
[    1.777243] usb 3-1.1: Warning! Unlikely big volume range (=496), cval->res is probably wrong.
[    1.777684] usb 3-1.1: [50] FU [Mic Capture Volume] ch = 1, val = 0/7936/16

[    1.780152] input: USB PnP Audio Device as /devices/pci0000:00/0000:00:01.3/0000:03:00.2/0000:20:00.0/0000:21:00.0/usb3/3-1/3-1.1/3-1.1:1.3/0003:0C76:161F.0001/input/input12

_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Ghoraab
n00b
n00b


Joined: 23 May 2014
Posts: 36

PostPosted: Mon May 06, 2024 7:19 pm    Post subject: Reply with quote

pietinger,
pietinger wrote:
Ghoraab,
I dont trust Manjaro, but Ubuntu ... ;-) If you boot with the newest UbuntuLiveCD do you have the same problems ?

I will try this tomorrow, if I can manage.

pietinger wrote:

What happens if you remove this USB device ? ->
Code:
Bus 003 Device 003: ID 0c76:161f JMTek, LLC. USB PnP Audio Device

I want to see because of this:
Code:
[    1.747253] usb 3-1.1: Warning! Unlikely big volume range (=1008), cval->res is probably wrong.
[    1.747688] usb 3-1.1: [49] FU [PCM Playback Volume] ch = 2, val = -16129/-1/16
[    1.777243] usb 3-1.1: Warning! Unlikely big volume range (=496), cval->res is probably wrong.
[    1.777684] usb 3-1.1: [50] FU [Mic Capture Volume] ch = 1, val = 0/7936/16

[    1.780152] input: USB PnP Audio Device as /devices/pci0000:00/0000:00:01.3/0000:03:00.2/0000:20:00.0/0000:21:00.0/usb3/3-1/3-1.1/3-1.1:1.3/0003:0C76:161F.0001/input/input12

I have noticed this as well. I considered that this might be the cause. But as this is a one-time error I thought that it would not be the problem.
This device is the KVM's build in sound card, so I can't remove it without opening the KVM switch. I don't think that this is the problem, because I had the same problems with other USB hubs. Let me check this out to confirm...
Yes, reboot with regular active USB 3 hub. It's even worse. I had to unplug my mouse to type in the password. It seems to be getting better if less devices are plugged in? Here's dmesg with the regular hub.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Mon May 06, 2024 7:34 pm    Post subject: Reply with quote

Ghoraab,

Having a quick look at your lsusb.
Code:
$ grep Bus Ghoraab | sort
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 003 Device 003: ID 0c76:161f JMTek, LLC. USB PnP Audio Device
Bus 003 Device 004: ID 04b4:6572 Cypress Semiconductor Corp. Unprogrammed CY7C65642 hub
Bus 003 Device 005: ID 046d:c07c Logitech, Inc. M-R0017 [G700s Rechargeable Gaming Mouse]
Bus 003 Device 006: ID 1e7d:3232 ROCCAT Ryos MK Pro Keyboard
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub


Only Bus 3 is used and its USB2, that's expected. The mouse and keyboard appears as themselves, which is partly expected.

Looking at the MaxPower tree on Bus 003
Code:
$ grep "Bus 003" -A30 Ghoraab | grep -e "Bus 003" -e MaxPower
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    MaxPower                0mA
Bus 003 Device 002: ID 05e3:0610 Genesys Logic, Inc. Hub
      Self Powered
      Remote Wakeup
    MaxPower              100mA
Bus 003 Device 003: ID 0c76:161f JMTek, LLC. USB PnP Audio Device
    MaxPower              100mA
Bus 003 Device 004: ID 04b4:6572 Cypress Semiconductor Corp. Unprogrammed CY7C65642 hub
      Self Powered
      Remote Wakeup
    MaxPower              100mA
Bus 003 Device 005: ID 046d:c07c Logitech, Inc. M-R0017 [G700s Rechargeable Gaming Mouse]
    MaxPower              498mA
Bus 003 Device 006: ID 1e7d:3232 ROCCAT Ryos MK Pro Keyboard
    MaxPower              500mA


At face value, that's a problem. Its USB2 so you are only allowed 500mA for all bus powered devices total and you have 1300mA.
That 100mA and self powered for the hubs is confusing.

Now we have some guesswork.
Faced with an over current condition, USB hubs do one of three things.
1. Nothing at all until the power tracks vanish.
2. Load shedding, which can take several forms, from shutting down power to the bus, to turning selected devices off until the over current condition clears, then turning them back on again to see what happens.
3. Some USB ports measure the current, other use the declared MaxPower,

This means that there are lots of combinations.

From dmesg
Code:
[    1.272084] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    1.272442] usb 3-1: Product: USB2.1 Hub
[    1.272804] usb 3-1: Manufacturer: GenesysLogic
[    1.277007] hub 3-1:1.0: USB hub found
[    1.277975] hub 3-1:1.0: 4 ports detected

Your 4 port GenesysLogic hub. It needs 100mA from the bus which suggests that its bus powered. Self powered devices are usually 2mA or less.

Code:
[    1.692766] usb 3-1.1: New USB device found, idVendor=0c76, idProduct=161f, bcdDevice= 1.00
[    1.693192] usb 3-1.1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    1.693604] usb 3-1.1: Product: USB PnP Audio Device


There is a hub connected to that hub.
Code:
[    1.926925] usb 3-1.2: new high-speed USB device number 4 using xhci_hcd
[    2.038678] usb 3-1.2: New USB device found, idVendor=04b4, idProduct=6572, bcdDevice=32.99
[    2.039151] usb 3-1.2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    2.039606] usb 3-1.2: Product: USB2.0 Hub
[    2.045091] hub 3-1.2:1.0: USB hub found
[    2.046295] hub 3-1.2:1.0: 3 ports detected

Which again looks bus powered.

Your mouse,
Code:
[    2.313937] usb 3-1.3: New USB device found, idVendor=046d, idProduct=c07c, bcdDevice=85.00
[    2.314404] usb 3-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.314941] usb 3-1.3: Product: G700s Rechargeable Gaming Mouse


and keyboard
Code:
[    2.436077] usb 3-1.2.3: New USB device found, idVendor=1e7d, idProduct=3232, bcdDevice= 1.00
[    2.436593] usb 3-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    2.437099] usb 3-1.2.3: Product: ROCCAT Ryos MK Pro
[    2.315329] usb 3-1.3: Manufacturer: Logitech


There is nothing in dmesg to suggest that USB devices are being power cycled. That does not mean that they are not.
If they are, it will explain the symptoms that you report.

Please confirm that these two hubs are bus powered. That is, they do not have their own PSUs.
If so, rearrange the USB tree to keep to the 500mA power requirement. That may mean adding a powered USB hub that can deliver 500mA (or more) per port.

Passing the power requirement up the bus stops at a powered hub.
Hubs connected to other hubs is often an issue too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Ghoraab
n00b
n00b


Joined: 23 May 2014
Posts: 36

PostPosted: Mon May 06, 2024 8:28 pm    Post subject: Reply with quote

Thanks a lot for your answer, that's a lot to swallow. For today let me just comment on this:
NeddySeagoon wrote:
Ghoraab,
Please confirm that these two hubs are bus powered. That is, they do not have their own PSUs.
If so, rearrange the USB tree to keep to the 500mA power requirement. That may mean adding a powered USB hub that can deliver 500mA (or more) per port.

Passing the power requirement up the bus stops at a powered hub.
Hubs connected to other hubs is often an issue too.


I don't have bus powered hubs. Both, the KVM switch which I tested first, as well as the standard USB hub are PSU powered. That's what I wanted to express by "active". Sorry, wrong word.
The second hub is build in in my Roccat keyboard. This is most probably a bus powered hub. It is connected directly to the PSU powered hub via the keyboard cable. The keyboard cable has two connectors, male USB A. One for the keyboard and one for the hub. At least that's what I read. Maybe this is wrong? It does not matter whether I connect one of them of both. The problem stays the same.
The bus powered hub in the keyboard is not used, by the way.

I want to clarify how everything is set up:

PCIe USB3 card in my PC is connected to PSU powered hub. Mouse and Keyboard are connected to USB 3 hub. The Keyboard has a build-in bus powered usb-hub. No further USB devices are connected.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Tue May 07, 2024 2:50 pm    Post subject: Reply with quote

Ghoraab,

Thank you. Its unlikely to be power related then.

As the mouse is rechargeable, I guess you use it in its wireless mode. Some mice can do both wired and wireless.
If its wireless, it will use the 2.4GHz Unlicensed Mobile Band, that's the same as bluetooth and 2.4GHz Wifi.
Older wireless mice and keyboards used other bands but lets not consider that for now.

USB3 operates at 5GHz, which is very close to the second harmonic of 2.4GHz.
Interference between USB3 equipment and Wifi has been observed.
The diagnostic is to move the mouse receiver away from USB3 equipment (mostly USB3 hubs).
A 30cm (1 foot) USB extension cable is often enough.

This cannot explain the wired keyboard problem though.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Ghoraab
n00b
n00b


Joined: 23 May 2014
Posts: 36

PostPosted: Tue May 07, 2024 3:19 pm    Post subject: Reply with quote

NeddySeagoon,
NeddySeagoon wrote:
Ghoraab,
Thank you. Its unlikely to be power related then.

I don't agree. The current for the mouse was so high (500 mA) because it was recharging (I assume) through the attached cable. The mouse does not use the wireless when the cable is attached. I'm quite sure of this because the wifi dongle was unplugged. The wifi dongle only uses roughly 100 mA.
Let's not discard the power explanation. But I'm sure that there are no interferences.
I will try to answer some of the other open ends today.
Back to top
View user's profile Send private message
Ghoraab
n00b
n00b


Joined: 23 May 2014
Posts: 36

PostPosted: Tue May 07, 2024 7:01 pm    Post subject: Reply with quote

I did a lot of testing today and felt the need to simplify. So I removed the PCIe USB Card. I tore my whole setup apart, removed all USB extension cords. Removed the KVM switch from the usb-chain (only the HDMI cables are connected to the KVM switch). The only USB devices plugged into my PC are the USB 3 hub, PSU powered, my keyboard and mouse being plugged in via cable. I removed the accumulator from the mouse to remove the possibility of charging processes. The device
Code:
Bus 003 Device 003: ID 0c76:161f JMTek, LLC. USB PnP Audio Device
is removed as well, as it is build in into the KVM switch. So, it's a pretty basic setup now.

I did some measurements:
Power consumption of the USB 3 hub: 0,2 W idle, 1,8 W with keyboard, 0,7 W with mouse and 2,1 W with both. The PSU's voltage is 5,3 V DV (unloaded) as it should be. So everything looks plausible. The hub seems to be powering the devices.

What happened: The problems got worse. When mouse and keyboard are connected via the hub I can hardly type. Furthermore I had issues in the BIOS (laggy keyboard, mouse won't work) and in Windows. However, in Windows the problem was less pronounced and Windows kept throwing updates at me because I did not boot it for well over a year. So the lag was maybe due to the updates. I could not test without updates, it would not stop. How I hate that system. :x

Now I needed to prepare something for work. I checked dmesg because I imagined to have a laggy cursor even without the USB hub and encountered something that I have not seen before. There's a gpu issue? Please see the dmesg.
I definitely have a laggy cursor without the hub now. The keyboard is laggy as well. Rarely, but it is. Is my hardware dying? I will get a set of other HID from my dad tomorrow.
I've had enough for today. Thanks for your help so far.
Back to top
View user's profile Send private message
Ghoraab
n00b
n00b


Joined: 23 May 2014
Posts: 36

PostPosted: Thu May 09, 2024 7:54 am    Post subject: Reply with quote

A little update:
I handed my keyboard, mouse and USB3 hub to my dad. He's running a Gentoo system as well. No problems there. I tried all of them with my wife's system (which is basically the same hardware as mine). No problems there. So the hardware should be fine.

When comparing between my wife's box and mine, I discovered that I have a different USB-setting in the BIOS. I played around with this during testing and I might have forgotten to change it back. Shame on me. Now I have set
Code:
xhci handoff = disabled
usb legacy support = enabled

like on my wife's pc. The problems without hub are gone! However, I still get lags of mouse and keyboard (although they are less than before) using the hub but now I get the same error messages in dmesg every few seconds:
Code:
reset full-speed USB device number 16 using xhci_hcd

I don't know if this is a progress, or not. Shall I post the dmesg?

I finally have tried with Ubuntu. Same symptoms there, both, regarding the mouse and keyboard lag, as well as the USB-device reset. Shall I post dmesg from Ubuntu with or without hub?

Edit:
pietinger requested my .config.



Regards
Marius
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5109
Location: Bavaria

PostPosted: Thu May 09, 2024 11:23 am    Post subject: Reply with quote

Ghoraab wrote:
pietinger requested my .config.

What happens if you enable # CONFIG_TYPEC is not set ?
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Ghoraab
n00b
n00b


Joined: 23 May 2014
Posts: 36

PostPosted: Thu May 09, 2024 1:00 pm    Post subject: Reply with quote

Pieinger,
pietinger wrote:
Ghoraab wrote:
pietinger requested my .config.

What happens if you enable # CONFIG_TYPEC is not set ?

Not better. Maybe worse.I'sorry.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5109
Location: Bavaria

PostPosted: Thu May 09, 2024 4:57 pm    Post subject: Reply with quote

Okay ... I took a deper look into your .config. Please do:
Code:
disable:
CONFIG_USB_XHCI_PLATFORM=y
enable both:
# CONFIG_USB_UAS is not set
# CONFIG_AMD_IOMMU_V2 is not set

BTW: Please change also:
Code:
1.
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
2.
# CONFIG_X86_AMD_PSTATE is not set
# CONFIG_X86_AMD_PSTATE_UT is not set
3.
CONFIG_I2C_I801=y
# CONFIG_I2C_PIIX4 is not set
4.
# CONFIG_SPI is not set
# CONFIG_PINCTRL_AMD is not set
# CONFIG_AMD_PTDMA is not set

1. See: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_Configuring_Kernel_Version_6.6#Part_3_-_Must_Haves
2. Enable it
3. Usually an AMD machine needs the other one
4. Enable it
After these changes I would like to see your "dmesg" (if it has not helped).
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Ghoraab
n00b
n00b


Joined: 23 May 2014
Posts: 36

PostPosted: Fri May 10, 2024 8:12 am    Post subject: Reply with quote

Pietinger,
there's no improvement, unfortunately.
Without the hub there's no or hardy any problem. I'm not entirely sure. (I figure you're German as well: Man hört die Flöhe husten). I don't see any error messages in dmesg. But there's an amdgpu-error again. It's not there every boot process.

With the hub (or the kvm switch, it does not matter) I have a laggy mouse and keyboard. The intensity varies from sometimes to massive. I get regular
Code:
reset full-speed USB device number 8 using xhci_hcd
in dmesg. One every few seconds.
I notices something that confuses me even more: During the compilation process of the kernel the usb device resets stopped. This is reproducible. While compiling a package these messages stop and they reappear when the compiler ist finished. I still have some lags though, but they seem to be system lags, not mouse-only-lags. When my cursor stops, the kernel compiler stopped as well (at least the display in the terminal did), resuming at the same time when my mouse started moving again. The same effect seems to happen when using the of the compositor effects in KDE.

BTW:
Thanks for the link to your guide. I wanted to deactivate Intel P state control but I could not. Maybe my kernel supports Intel, this does not make sense and I tried to deactivate the Intel vendor support following your guide, but I could not find
Code:
Processor type and features  --->
    [*] Supported processor vendors  --->

I will have a deeper look in your guide later. It looks really good and it's bookmarked.

Regards
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5109
Location: Bavaria

PostPosted: Fri May 10, 2024 12:45 pm    Post subject: Reply with quote

Ghoraab wrote:
BTW:
Thanks for the link to your guide. I wanted to deactivate Intel P state control but I could not. Maybe my kernel supports Intel, this does not make sense and I tried to deactivate the Intel vendor support following your guide, but I could not find

No, an AMD system does not use Intel P state. But it is enabled automatically as long as you have support for an Intel CPU. You can reach this menu ONLY if you enable EXPERT before. Then you get this menu:
Code:
Processor type and features  --->
    [*] Supported processor vendors  --->

(but there is also no problem if Intel P state is enabled; the kernel detects that you have no Intel CPU and does not use this module; more exactly: this module will be removed after kernel has started - it is part of the message: "Freeing unused kernel image (initmem) memory:" ... many modules do not hurt if they are enabled and not used ... but why should I compile them if I dont need them ;-) )

Back to your main problem: I am sorry - I am out of ideas ... :oops:
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Ghoraab
n00b
n00b


Joined: 23 May 2014
Posts: 36

PostPosted: Fri May 10, 2024 7:03 pm    Post subject: Reply with quote

Pietinger,
well, I did not find this
pietinger wrote:

You can reach this menu ONLY if you enable EXPERT before.

either... :oops:

pietinger wrote:

Back to your main problem: I am sorry - I am out of ideas ... :oops:

Same here. My gut tells me that this a mainboard problem. I have ordered a new one, I really need this KVM-switch functionality. I will report.

Thanks to you and NeddySeagoon your help. It's really appreciated. Unfortunately we could not find the problem, but I learned a lot and maybe it will help somebody else later.

Regards
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Fri May 10, 2024 7:07 pm    Post subject: Reply with quote

Ghoraab,

See Power Management for USB

If you set the right power/autosuspend_delay_ms to zero, the device will not "suffer" from power management.
The default is set in the kernel but can be overridden per device in /sys

Code:
reset full-speed USB device number 8 using xhci_hcd
is a slow operation and will cause missed mouse and keyboard inputs.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Ghoraab
n00b
n00b


Joined: 23 May 2014
Posts: 36

PostPosted: Fri May 10, 2024 8:51 pm    Post subject: Reply with quote

NeddySeagoon,
thanks for not giving up on me. :)

First I tried to set the default autosuspend idle-delay time in order to prevent devices from autosuspending. For this I used
Code:
echo -1 >/sys/module/usbcore/parameters/autosuspend
. There was no change, however. So I tried to set the autosuspend for the relevant device.

I was getting
Code:
usb 1-6.3: reset full-speed USB device number 8 using xhci_hcd
and so I tried to set the autosuspend time of usb device 1-6.3 to zero. For this I checked
Code:
/sys/bus/usb/devices/1-6.3/power/autosuspend_delay_ms
and saw that it was set to -1000. If I understood the documentation correctly, this would mean that autosuspend is already turned off. A negative time does not make any sense otherwise. I tried setting it to -1 and 0 as well. The error messages kept coming.

From the dmesg I have
Code:
[14908.491091] input: Logitech G700s Rechargeable Gaming Mouse as /devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb1/1-6/1-6.3/1-6.3:1.0/0003:046D:C07C.0009/input/input18
[14908.491310] hid-generic 0003:046D:C07C.0009: input,hidraw0: USB HID v1.11 Mouse [Logitech G700s Rechargeable Gaming Mouse] on usb-0000:03:00.0-6.3/input0
[14908.522353] input: Logitech G700s Rechargeable Gaming Mouse Keyboard as /devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb1/1-6/1-6.3/1-6.3:1.1/0003:046D:C07C.000A/input/input19
[14908.574793] hid-generic 0003:046D:C07C.000A: input,hiddev96,hidraw1: USB HID v1.11 Keyboard [Logitech G700s Rechargeable Gaming Mouse] on usb-0000:03:00.0-6.3/input1

Honestly, I don't really understand which usb device number is correct 1-6, 1-6.3, 1-6.3:1, I wanted to set the autosuspend_delay_ms of all of them to -1. Because only 1-6 had a file autosuspend_delay_ms, I changed the value from 0 to -1.
No change, unfortunately. Did I do something wrong?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Sat May 11, 2024 12:00 pm    Post subject: Reply with quote

Ghoraab,

I don't know how to give up :)

Decoding
[
Code:
14908.491091] input: Logitech G700s Rechargeable Gaming Mouse as /devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb1/1-6/1-6.3/1-6.3:1.0/0003:046D:C07C.0009/input/input18

The usb1/1-6/1-6.3/1-6.3:1.0 is the USB device tree leading to your mouse.

The tree view provided by lsusb.py makes it clear. I'm not sure if lsusb.py is still a thing.
Code:
$ lsusb.py
usb1              1d6b:0002 09 1IF  [USB 2.00,   480 Mbps,   0mA] (xhci-hcd 0000:05:00.0) hub
usb2              1d6b:0003 09 1IF  [USB 3.00,  5000 Mbps,   0mA] (xhci-hcd 0000:05:00.0) hub
  2-4               0bda:0321 00 1IF  [USB 3.00,  5000 Mbps, 800mA] (Realtek USB3.0 Card Reader 201412031053)
usb3              1d6b:0002 09 1IF  [USB 2.00,   480 Mbps,   0mA] (xhci-hcd 0000:07:00.1) hub
  3-5               05e3:0610 09 1IF  [USB 2.00,   480 Mbps, 100mA] (Genesys Logic, Inc. Hub) hub
    3-5.3             0b05:18f3 00 2IFs [USB 2.00,    12 Mbps,  16mA] (AsusTek Computer Inc. AURA LED Controller 9876543210)
usb4              1d6b:0003 09 1IF  [USB 3.10, 10000 Mbps,   0mA] (xhci-hcd 0000:07:00.1) hub
usb5              1d6b:0002 09 1IF  [USB 2.00,   480 Mbps,   0mA] (xhci-hcd 0000:07:00.3) hub
  5-2               174c:2074 09 1IF  [USB 2.10,   480 Mbps, 100mA] (ASUS TEK. ASM107x) hub
    5-2.1             046d:c534 00 2IFs [USB 2.00,    12 Mbps,  98mA] (Logitech USB Receiver)
    5-2.2             0424:2734 09 1IF  [USB 2.10,   480 Mbps,   0mA] (Microchip Tech USB2734) hub
      5-2.2.5           0424:274c 00 1IF  [USB 2.01,   480 Mbps,   0mA] (Microchip Tech Hub Controller)
    5-2.3             2109:2812 09 1IF  [USB 2.10,   480 Mbps,   0mA] (VIA Labs, Inc. USB2.0 Hub) hub
      5-2.3.1           0bc2:ab44 09 1IF  [USB 2.10,   480 Mbps, 100mA] (Seagate Backup+ Hub 01CB8066B0N4) hub
      5-2.3.4           2109:2812 09 1IF  [USB 2.10,   480 Mbps,   0mA] (VIA Labs, Inc. USB2.0 Hub) hub
usb6              1d6b:0003 09 1IF  [USB 3.10, 10000 Mbps,   0mA] (xhci-hcd 0000:07:00.3) hub
  6-2               174c:3074 09 1IF  [USB 3.00,  5000 Mbps,   8mA] (ASUS TEK. ASM107x) hub
    6-2.2             0424:5734 09 1IF  [USB 3.10,  5000 Mbps,   0mA] (Microchip Tech USB5734) hub
    6-2.4             2109:0812 09 1IF  [USB 3.00,  5000 Mbps,   0mA] (VIA Labs, Inc. USB3.0 Hub) hub
      6-2.4.1           0bc2:ab45 09 1IF  [USB 3.00,  5000 Mbps,   0mA] (Seagate Backup+ Hub 01CB8066B0N4) hub
        6-2.4.1.1         0bc2:ab38 00 1IF  [USB 3.10,  5000 Mbps,   0mA] (Seagate Backup+ Hub BK NA8TXS4B)
      6-2.4.4           2109:0812 09 1IF  [USB 3.00,  5000 Mbps,   0mA] (VIA Labs, Inc. USB3.0 Hub) hub
usb7              1d6b:0002 09 1IF  [USB 2.00,   480 Mbps,   0mA] (xhci-hcd 0000:0e:00.3) hub
usb8              1d6b:0003 09 1IF  [USB 3.10, 10000 Mbps,   0mA] (xhci-hcd 0000:0e:00.3)


I don't have lsusb as it needs udev and I can't have udev as I have a static /dev

Maybe lsusb han an option to display the tree view?

As you say, negative or zero autosuspend idle-delay disables the feature, so it was already disabled for you.

Can you pastebin the full dmesg, containing the
Code:
usb 1-6.3: reset full-speed USB device number 8 using xhci_hcd
errors please?
The entries need to be timestamped.

The resets are the cause of the problem.
I don't know what to expect in dmesg, but I might when I see it.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Ghoraab
n00b
n00b


Joined: 23 May 2014
Posts: 36

PostPosted: Sat May 11, 2024 1:43 pm    Post subject: Reply with quote

NeddySeagoon,
NeddySeagoon wrote:
Ghoraab,
I don't know how to give up :)

this is much appreciated. :)

Thanks for the clarification regarding the usb-tree. Just a question out of curiosity: Would it have been sufficient to set the autosuspend for device 1-6, or only 1.6-3 or would I have needed to set both to -1?

NeddySeagoon wrote:
Maybe lsusb han an option to display the tree view?

Yes it has. lsusb -tvv gives
Code:

/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    /sys/bus/usb/devices/usb1  /dev/bus/usb/001/001
    |__ Port 006: Dev 002, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 045b:0209 Hitachi, Ltd
        /sys/bus/usb/devices/1-6  /dev/bus/usb/001/002
        |__ Port 002: Dev 003, If 0, Class=Hub, Driver=hub/3p, 480M
            ID 04b4:6572 Cypress Semiconductor Corp. Unprogrammed CY7C65642 hub
            /sys/bus/usb/devices/1-6.2  /dev/bus/usb/001/003
            |__ Port 003: Dev 005, If 0, Class=Human Interface Device, Driver=usbhid, 12M
                ID 1e7d:3232 ROCCAT Ryos MK Pro Keyboard
                /sys/bus/usb/devices/1-6.2.3  /dev/bus/usb/001/005
            |__ Port 003: Dev 005, If 1, Class=Human Interface Device, Driver=usbhid, 12M
                ID 1e7d:3232 ROCCAT Ryos MK Pro Keyboard
                /sys/bus/usb/devices/1-6.2.3  /dev/bus/usb/001/005
        |__ Port 003: Dev 006, If 0, Class=Human Interface Device, Driver=usbhid, 12M
            ID 046d:c07c Logitech, Inc. M-R0017 [G700s Rechargeable Gaming Mouse]
            /sys/bus/usb/devices/1-6.3  /dev/bus/usb/001/006
        |__ Port 003: Dev 006, If 1, Class=Human Interface Device, Driver=usbhid, 12M
            ID 046d:c07c Logitech, Inc. M-R0017 [G700s Rechargeable Gaming Mouse]
            /sys/bus/usb/devices/1-6.3  /dev/bus/usb/001/006
/:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    /sys/bus/usb/devices/usb2  /dev/bus/usb/002/001
/:  Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    /sys/bus/usb/devices/usb3  /dev/bus/usb/003/001
/:  Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    /sys/bus/usb/devices/usb4  /dev/bus/usb/004/001

in my case. So it's the mouse that's being reset all the time. This explains the mouse lag, but where does the keyboard lag come from? Maybe the keyboard lags when the "system lags" occur, like described above.

NeddySeagoon wrote:
Can you pastebin the full dmesg, containing the
Code:
usb 1-6.3: reset full-speed USB device number 8 using xhci_hcd
errors please?
The entries need to be timestamped.

Sure thing, here you go: dmesg
There's my system's response to a sleep-mode included for free! :D
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Sat May 11, 2024 2:26 pm    Post subject: Reply with quote

Ghoraab,

Code:
[   62.056366] usb 1-6.3: reset full-speed USB device number 6 using xhci_hcd
[   67.769624] usb 1-6.3: reset full-speed USB device number 6 using xhci_hcd
[   70.002878] usb 1-6.3: reset full-speed USB device number 6 using xhci_hcd
[   71.735323] usb 1-6.3: reset full-speed USB device number 6 using xhci_hcd
[   73.808454] usb 1-6.3: reset full-speed USB device number 6 using xhci_hcd

The timing being irregular is interesting.

That the resets are always triggered by the mouse does not imply that only the mouse is being reset.
The system will reset whatever it has to to force the mouse to reset .. all the way up to the root hub.

Can you test with a different mouse, preferably a wired mouse and see if that fixes both the mouse and keyboard problems?

The key thing here is to get the resets to go away.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Ghoraab
n00b
n00b


Joined: 23 May 2014
Posts: 36

PostPosted: Sat May 11, 2024 3:34 pm    Post subject: Reply with quote

NeddySeagoon
NeddySeagoon wrote:
Ghoraab,
Can you test with a different mouse, preferably a wired mouse and see if that fixes both the mouse and keyboard problems?

The mouse I've been using is capable of wireless usage. I've been using it in cable-mode. The wireless transmitter was unplugged all the time, especially during the time of the dmesg I've uploaded. I changed to a different mouse model. Here's the dmesg since unplugging the first and plugging the second mouse (I have not rebooted since):
Code:

[10109.593856] usb 1-6.3: reset full-speed USB device number 6 using xhci_hcd
[10111.134855] usb 1-6.3: reset full-speed USB device number 6 using xhci_hcd
[10118.012302] usb 1-6.3: USB disconnect, device number 6
[10131.020956] usb 1-6.3: new full-speed USB device number 7 using xhci_hcd
[10131.369220] usb 1-6.3: New USB device found, idVendor=046d, idProduct=c246, bcdDevice=70.02
[10131.369230] usb 1-6.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[10131.369234] usb 1-6.3: Product: Gaming Mouse G300
[10131.369238] usb 1-6.3: Manufacturer: Logitech
[10131.422752] input: Logitech Gaming Mouse G300 as /devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb1/1-6/1-6.3/1-6.3:1.0/0003:046D:C246.0007/input/input14
[10131.422978] hid-generic 0003:046D:C246.0007: input,hidraw0: USB HID v1.10 Mouse [Logitech Gaming Mouse G300] on usb-0000:03:00.0-6.3/input0
[10131.459731] input: Logitech Gaming Mouse G300 Keyboard as /devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb1/1-6/1-6.3/1-6.3:1.1/0003:046D:C246.0008/input/input15
[10131.511719] input: Logitech Gaming Mouse G300 as /devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb1/1-6/1-6.3/1-6.3:1.1/0003:046D:C246.0008/input/input16
[10131.512079] hid-generic 0003:046D:C246.0008: input,hiddev96,hidraw1: USB HID v1.10 Keyboard [Logitech Gaming Mouse G300] on usb-0000:03:00.0-6.3/input1
[10131.582757] elogind-daemon[1386]: Watching system buttons on /dev/input/event5 (Logitech Gaming Mouse G300 Keyboard)
[10141.163214] usb 1-6.3: reset full-speed USB device number 7 using xhci_hcd
[10147.314764] usb 1-6.3: reset full-speed USB device number 7 using xhci_hcd
[10149.692115] usb 1-6.3: reset full-speed USB device number 7 using xhci_hcd
[10151.383198] usb 1-6.3: reset full-speed USB device number 7 using xhci_hcd


and lsusb -tvv
Code:

/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    /sys/bus/usb/devices/usb1  /dev/bus/usb/001/001
    |__ Port 006: Dev 002, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 045b:0209 Hitachi, Ltd
        /sys/bus/usb/devices/1-6  /dev/bus/usb/001/002
        |__ Port 002: Dev 003, If 0, Class=Hub, Driver=hub/3p, 480M
            ID 04b4:6572 Cypress Semiconductor Corp. Unprogrammed CY7C65642 hub
            /sys/bus/usb/devices/1-6.2  /dev/bus/usb/001/003
            |__ Port 003: Dev 005, If 0, Class=Human Interface Device, Driver=usbhid, 12M
                ID 1e7d:3232 ROCCAT Ryos MK Pro Keyboard
                /sys/bus/usb/devices/1-6.2.3  /dev/bus/usb/001/005
            |__ Port 003: Dev 005, If 1, Class=Human Interface Device, Driver=usbhid, 12M
                ID 1e7d:3232 ROCCAT Ryos MK Pro Keyboard
                /sys/bus/usb/devices/1-6.2.3  /dev/bus/usb/001/005
        |__ Port 003: Dev 007, If 0, Class=Human Interface Device, Driver=usbhid, 12M
            ID 046d:c246 Logitech, Inc. Gaming Mouse G300
            /sys/bus/usb/devices/1-6.3  /dev/bus/usb/001/007
        |__ Port 003: Dev 007, If 1, Class=Human Interface Device, Driver=usbhid, 12M
            ID 046d:c246 Logitech, Inc. Gaming Mouse G300
            /sys/bus/usb/devices/1-6.3  /dev/bus/usb/001/007
/:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    /sys/bus/usb/devices/usb2  /dev/bus/usb/002/001
/:  Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    /sys/bus/usb/devices/usb3  /dev/bus/usb/003/001
/:  Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    /sys/bus/usb/devices/usb4  /dev/bus/usb/004/001


By the way: The resets do not occur more or less often when I'm using the PC. They just keep coming in this irregular but frequent way.

Now I tried to replace the keyboard with an other one (I just have a wireless second keyboard readily available, if I should test with a wired keyboard, let me know, I have to get one somewhere). This keyboard worked for 5 seconds before it stopped responding. The dmesg is
Code:
[10566.419739] usb 1-6.3: reset full-speed USB device number 7 using xhci_hcd
[10568.075832] usb 1-6.3: reset full-speed USB device number 7 using xhci_hcd
[10572.011174] usb 1-6.3: reset full-speed USB device number 7 using xhci_hcd
[10572.974552] usb 1-6.2: USB disconnect, device number 3
[10572.974561] usb 1-6.2.3: USB disconnect, device number 5
[10576.255474] usb 1-6.1: new full-speed USB device number 8 using xhci_hcd
[10576.603949] usb 1-6.1: New USB device found, idVendor=046d, idProduct=c52b, bcdDevice=12.01
[10576.603959] usb 1-6.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[10576.603964] usb 1-6.1: Product: USB Receiver
[10576.603967] usb 1-6.1: Manufacturer: Logitech
[10576.744075] logitech-djreceiver 0003:046D:C52B.000B: hiddev97,hidraw2: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:03:00.0-6.1/input2
[10576.878353] input: Logitech K360 as /devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb1/1-6/1-6.1/1-6.1:1.2/0003:046D:C52B.000B/0003:046D:4004.000C/input/input17
[10576.878628] logitech-hidpp-device 0003:046D:4004.000C: input,hidraw3: USB HID v1.11 Keyboard [Logitech K360] on usb-0000:03:00.0-6.1/input2:1
[10576.932829] elogind-daemon[1386]: Watching system buttons on /dev/input/event6 (Logitech K360)
[10585.251825] usb 1-6.1: reset full-speed USB device number 8 using xhci_hcd
[10586.930611] usb 1-6.1: reset full-speed USB device number 8 using xhci_hcd
[10588.247578] logitech-hidpp-device 0003:046D:4004.000C: Can not get the protocol version.
[10592.703692] usb 1-6.1: reset full-speed USB device number 8 using xhci_hcd
[10596.730227] usb 1-6.1: reset full-speed USB device number 8 using xhci_hcd
[10602.929863] usb 1-6.1: USB disconnect, device number 8
[10608.771452] usb 1-6.1: new high-speed USB device number 9 using xhci_hcd
[10608.896538] usb 1-6.1: New USB device found, idVendor=04b4, idProduct=6572, bcdDevice=32.99
[10608.896548] usb 1-6.1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[10608.896552] usb 1-6.1: Product: USB2.0 Hub
[10608.904601] hub 1-6.1:1.0: USB hub found
[10608.908521] hub 1-6.1:1.0: 3 ports detected
[10609.237454] usb 1-6.1.3: new full-speed USB device number 10 using xhci_hcd
[10609.540613] usb 1-6.1.3: New USB device found, idVendor=1e7d, idProduct=3232, bcdDevice= 1.00
[10609.540624] usb 1-6.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[10609.540628] usb 1-6.1.3: Product: ROCCAT Ryos MK Pro
[10609.540632] usb 1-6.1.3: Manufacturer: ROCCAT
[10609.567010] input: ROCCAT ROCCAT Ryos MK Pro as /devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb1/1-6/1-6.1/1-6.1.3/1-6.1.3:1.0/0003:1E7D:3232.000D/input/input18
[10609.619398] ryos 0003:1E7D:3232.000D: input,hidraw2: USB HID v1.11 Keyboard [ROCCAT ROCCAT Ryos MK Pro] on usb-0000:03:00.0-6.1.3/input0
[10609.640641] input: ROCCAT ROCCAT Ryos MK Pro as /devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb1/1-6/1-6.1/1-6.1.3/1-6.1.3:1.1/0003:1E7D:3232.000E/input/input19
[10609.692872] ryos 0003:1E7D:3232.000E: input,hiddev97,hidraw3: USB HID v1.11 Pointer [ROCCAT ROCCAT Ryos MK Pro] on usb-0000:03:00.0-6.1.3/input1
[10609.754869] elogind-daemon[1386]: Watching system buttons on /dev/input/event7 (ROCCAT ROCCAT Ryos MK Pro)
[10609.755664] elogind-daemon[1386]: Watching system buttons on /dev/input/event6 (ROCCAT ROCCAT Ryos MK Pro)
[10611.518608] usb 1-6.1.3: reset full-speed USB device number 10 using xhci_hcd
[10614.582271] usb 1-6.1.3: reset full-speed USB device number 10 using xhci_hcd
[10616.441187] usb 1-6.1.3: reset full-speed USB device number 10 using xhci_hcd

I replugged the first keyboard again to finish this post.
Any help?
Back to top
View user's profile Send private message
Ghoraab
n00b
n00b


Joined: 23 May 2014
Posts: 36

PostPosted: Sun May 12, 2024 7:15 am    Post subject: Reply with quote

NeddySeagoon,
I got my hands on a cheap USB-keyboard without any fancy stuff like illumination. The error messages and the lags remain, although they get rarer. Here's the corresponding dmesg.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Sun May 12, 2024 11:45 am    Post subject: Reply with quote

Ghoraab,

I'm almost out of ideas ... but not quite. :)

USB devices are supposed to conform to specifications. However, specifications are open to interpretation and a silicon fix is expensive.
So we have different interpretations of the same specification and non-conformining silicon is circulation,
Hence we have usbquirks.

It gets even worse ... the quirks that actually matter depend on exactly whot is in the UBS device tree.

See https://elixir.bootlin.com/linux/latest/source/include/linux/usb/quirks.h https://github.com/torvalds/linux/blob/master/drivers/usb/core/quirks.c or look in your kernel source tree for those files.

Essentially, its a huge lookup table by device and vendor IDs. That's 046D:C246 for your mouse.
However, even if the mouse is connected directly to the PC, the root hub can be involved.
They have quirks too https://patchwork.kernel.org/project/linux-usb/patch/20180705133142.18844-1-laurentiu.tudor@nxp.com/.

How to proceed ...
USB quirks are being added to the kernel all the time. Step 1, try the newest testing kernel.
On kernel.org the latest release is mainline: 6.9-rc7. Don't try a Release Candidate kernel but later today in will go to 6.9-rc8 or 6.9.0 as -rc8 is rare.
Today, gentoo testing will be 6.8.9, It may have the quirk(s) you need.

If a later kernel doesn't help, its time to use your internet search foo to see if there is a quirks patch for you.

Thinking back, you tried a USB3 plug in card.
Does it have USB root hubs form a different vendor to your motherboard?
If so, the root hubs are probably in the clear. The working assumption is that there is only a single problem at a time.

Your wired keyboard is
Code:
[    1.950743] hid-generic 0003:0461:0010.0001: input,hidraw0: USB HID v1.10 Keyboard [NOVATEK USB Keyboard] on usb-0000:03:00.0-6.1/input0
That's USB device 6.1
The resets are caused by
Code:
[  515.019441] usb 1-6.3: reset full-speed USB device number 4 using xhci_hcd


Its interesting that the frequency of resets has reduced. that may point to power after all.
This would have me reaching for a USB2 extender cable, my soldering iron and a 5v PSU, so the mouse was no longer USB powered.
That's not within everyones skill or equipment set though.

A USB3 device is actually has two interfaces.
The standard 4 pins of USB1 and USB2, still used for USB1 and USB2 data rates and and extra 5 pins for the USB3 data.
Keyboards and mice are USB1 devices, so USB1 and USB2 wiring and hardware is plenty good enough.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum