For a long time now, I've had audio drops and sometimes even keyboard input drops through my KVM switches.
When a drop occurs, all audio across all applications drop at once. If there's a video playing then it'll pause briefly. In a game, I just miss a second of audio with no video stuttering.
When I connect my USB speakers directly to my motherboard then the issue does not occur; only through the KVM switch. I was using this decent switch I got off Amazon but just replaced it with one from Level 1 Techs and the issue remained. I've tried different ports on the switches and my board as well.
The issue also only occurs on my Linux computer. When I switch over to my work laptop running Windows I don't have the issue.
I'm not seeing anything in journalctl that seems related after swapping KVM switches. With the old switch I was seeing logs like below but no longer see that with the new switch.
I don't get any audio drops on my work laptop running Windows
Tried different KVM switches
and different ports
with all of the same devices connected but my speakers connected directly to my computer then I get no drops
Are either KVM powered by an AC adapter or are they riding off the 5v rail of your PC?
I had a very similar problem and found that the 5v on my PSU was going bad, and as devices powered down/up the KVM would vanish for a second and reconnect.
Sometimes the different USB ports are backed by different manufacturers. Pretty much all of my USB outputs are a bit unreliable. Apparently a hardware issue. There are two that use a different chipset. Those are the only reliable ones.
So maybe check the various USB ports to see if there's a difference.
I've tried various ports on the motherboard and when directly connected to the same ports that the KVM switch was then there was no issue. I've been wanting to replace my kinda crappy board anyways so maybe the new one will fix it whenever I get around to it. I think I'm going to try to just use 3.5mm cables instead of USB and hope it works fine over the KVM switch. Just ordered a few.