USB errors causing random mouse or audio failures

Hello,

First of all, I love Manjaro Linux! However, I have recently been running into issues where my pulseaudio or mouse will stop working correctly, and journalctl -xe shows many kernel usb errors, such as the following:

kernel: usb 1-9: uac_clock_source_is_valid(): cannot get clock validity for id 18
kernel: usb 1-9: clock source 18 is not valid, cannot use
kernel: usb 1-9: 1:1: cannot get freq (v2/v3): err -110
pulseaudio[1858]: Failed to set hardware parameters: Connection timed out
kernel: usb 1-9: 1:1: cannot set freq 48000 (v2/v3): err -110

This leads to my audio completely cutting out (I use an external DAC), and the pulseaudio daemon hangs. Additionally, my mouse will randomly stop scrolling correctly (a known issue with the logid mouse driver). However if I then plug out my Logitech unifying receiver and plug it back in again (one suggested workaround), Manjaro will not recognise it until I reboot. The receiver will not show up when running lsusb, and additionally lsusb will take an obscenely long time to run (Usually it is instant).

I have tried disabling USB autosuspend, however this has not fixed the issue. I confirmed that autosuspend is definitely disabled by adding the parameter autosuspend=-1 in my grub file. Additionally, cat /sys/module/usbcore/parameters/autosuspend prints -1.

I have also tried other weird suggested fixes such as turning off my computer completely, and physically disconnecting it from the power socket…

I really need to fix these errors, as having to restart my computer every few hours completely kills my productivity.

Here’s the output of inxi -Fxz for my system information:

System:    Kernel: 5.10.15-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.1 Desktop: Xfce 4.16.0 Distro: Manjaro Linux
Machine:   Type: Desktop System: Micro-Star product: MS-7C02 v: 1.0 serial: <filter>
           Mobo: Micro-Star model: B450 TOMAHAWK MAX (MS-7C02) v: 1.0 serial: <filter> UEFI: American Megatrends v: 3.50
           date: 11/07/2019
Battery:   Device-1: hidpp_battery_0 model: Logitech M720 Triathlon Multi-Device Mouse charge: 10% (should be ignored)
           status: Discharging
CPU:       Info: 12-Core model: AMD Ryzen 9 3900X bits: 64 type: MT MCP arch: Zen 2 rev: 0 L2 cache: 6 MiB
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 182493
           Speed: 2204 MHz min/max: 2200/3800 MHz boost: enabled Core speeds (MHz): 1: 2204 2: 2197 3: 2200 4: 2201
           5: 2199 6: 2200 7: 2199 8: 2200 9: 2198 10: 2196 11: 2200 12: 2198 13: 2198 14: 2197 15: 2197 16: 2199
           17: 2199 18: 2200 19: 2199 20: 2198 21: 2196 22: 2199 23: 2199 24: 2200
Graphics:  Device-1: NVIDIA TU104 [GeForce RTX 2070 SUPER] vendor: eVga.com. driver: nvidia v: 460.39 bus ID: 26:00.0
           Display: x11 server: X.Org 1.20.10 driver: loaded: nvidia resolution: 3440x1440
           OpenGL: renderer: GeForce RTX 2070 SUPER/PCIe/SSE2 v: 4.6.0 NVIDIA 460.39 direct render: Yes
Audio:     Device-1: NVIDIA TU104 HD Audio vendor: eVga.com. driver: snd_hda_intel v: kernel bus ID: 26:00.1
           Device-2: Advanced Micro Devices [AMD] Starship/Matisse HD Audio vendor: Micro-Star MSI driver: snd_hda_intel
           v: kernel bus ID: 28:00.4
           Device-3: Logitech Logitech StreamCam type: USB driver: hid-generic,snd-usb-audio,usbhid,uvcvideo
           bus ID: 2-1:2
           Device-4: C-Media Schiit Modi 3 type: USB driver: hid-generic,snd-usb-audio,usbhid bus ID: 1-9:4
           Sound Server: ALSA v: k5.10.15-1-MANJARO
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Micro-Star MSI driver: r8169
           v: kernel port: f000 bus ID: 22:00.0
           IF: enp34s0 state: up speed: 100 Mbps duplex: full mac: <filter>
Drives:    Local Storage: total: 931.51 GiB used: 56.98 GiB (6.1%)
           ID-1: /dev/sda vendor: Samsung model: SSD 860 EVO 1TB size: 931.51 GiB
Partition: ID-1: / size: 881.63 GiB used: 56.98 GiB (6.5%) fs: ext4 dev: /dev/sda2
           ID-2: /boot/efi size: 299.4 MiB used: 312 KiB (0.1%) fs: vfat dev: /dev/sda1
Swap:      ID-1: swap-1 type: partition size: 34.51 GiB used: 0 KiB (0.0%) dev: /dev/sda3
Sensors:   System Temperatures: cpu: 56.9 C mobo: N/A gpu: nvidia temp: 47 C
           Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Info:      Processes: 452 Uptime: 17h 17m Memory: 31.37 GiB used: 6.85 GiB (21.8%) Init: systemd Compilers: gcc: 10.2.0
           Packages: 1245 Shell: fish v: 3.1.2 inxi: 3.3.01

Thanks,
~Paddy L.

:+1: Welcome to Manjaro! :+1:

Please read this:

and post some more information so we can see what’s really going on. Now we know the symptom of the disease, but we need some more probing to know where the origin lies…

  1. An inxi --admin --verbosity=7 --filter --no-host --width would be the minimum required information… (Personally Identifiable Information like serial numbers and MAC addresses will be filtered out by the above command)

  2. What happens if you use one (1) of the two on the internal ports only?

:+1:

Hello, thanks for taking a look at this!

Here is the output of inxi --admin --verbosity=7 --filter --no-host --width:

System:
  Kernel: 5.10.15-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.1
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64
  root=UUID=5b3c9338-8340-4ca4-bb0b-62edaa909034 rw usbcore.autosuspend=-1
  quiet apparmor=1 lsm=lockdown,yama,apparmor security=apparmor
  resume=UUID=49f11ad7-9f55-4610-9f7e-79a5a3ff498c udev.log_priority=3
  Desktop: Xfce 4.16.0 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm4
  dm: LightDM 1.30.0 Distro: Manjaro Linux
Machine:
  Type: Desktop System: Micro-Star product: MS-7C02 v: 1.0 serial: <filter>
  Mobo: Micro-Star model: B450 TOMAHAWK MAX (MS-7C02) v: 1.0 serial: <filter>
  UEFI: American Megatrends v: 3.50 date: 11/07/2019
Battery:
  Device-1: hidpp_battery_1 model: Logitech M720 Triathlon Multi-Device Mouse
  serial: <filter> charge: 10% (should be ignored) rechargeable: yes
  status: Discharging
Memory:
  RAM: total: 31.37 GiB used: 5.99 GiB (19.1%)
  RAM Report: permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: 12-Core model: AMD Ryzen 9 3900X bits: 64 type: MT MCP arch: Zen 2
  family: 17 (23) model-id: 71 (113) stepping: N/A microcode: 8701013
  L2 cache: 6 MiB bogomips: 182491
  Speed: 2199 MHz min/max: 2200/3800 MHz boost: enabled Core speeds (MHz):
  1: 2199 2: 2200 3: 2200 4: 2197 5: 2194 6: 2194 7: 2193 8: 2196 9: 2188
  10: 2192 11: 2192 12: 2193 13: 2198 14: 2197 15: 2194 16: 2194 17: 2199
  18: 2199 19: 2200 20: 2198 21: 2199 22: 2200 23: 2198 24: 2200
  Flags: 3dnowprefetch abm adx aes aperfmperf apic arat avic avx avx2 bmi1
  bmi2 bpext cat_l3 cdp_l3 clflush clflushopt clwb clzero cmov cmp_legacy
  constant_tsc cpb cpuid cqm cqm_llc cqm_mbm_local cqm_mbm_total cqm_occup_llc
  cr8_legacy cx16 cx8 de decodeassists extapic extd_apicid f16c flushbyasid
  fma fpu fsgsbase fxsr fxsr_opt ht hw_pstate ibpb ibs irperf lahf_lm lbrv lm
  mba mca mce misalignsse mmx mmxext monitor movbe msr mtrr mwaitx nonstop_tsc
  nopl npt nrip_save nx osvw overflow_recov pae pat pausefilter pclmulqdq
  pdpe1gb perfctr_core perfctr_llc perfctr_nb pfthreshold pge pni popcnt pse
  pse36 rdpid rdpru rdrand rdseed rdt_a rdtscp rep_good sep sev sev_es sha_ni
  skinit smap smca sme smep ssbd sse sse2 sse4_1 sse4_2 sse4a ssse3 stibp
  succor svm svm_lock syscall tce topoext tsc tsc_scale umip v_vmsave_vmload
  vgif vmcb_clean vme vmmcall wbnoinvd wdt xgetbv1 xsave xsavec xsaveerptr
  xsaveopt xsaves
  Vulnerabilities: Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass
  mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
  mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, STIBP:
  conditional, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA TU104 [GeForce RTX 2070 SUPER] vendor: eVga.com.
  driver: nvidia v: 460.39 alternate: nouveau,nvidia_drm bus ID: 26:00.0
  chip ID: 10de:1e84 class ID: 0300
  Display: x11 server: X.Org 1.20.10 driver: loaded: nvidia display ID: :0.0
  screens: 1
  Screen-1: 0 s-res: 3440x1440 s-dpi: 96 s-size: 910x381mm (35.8x15.0")
  s-diag: 987mm (38.8")
  Monitor-1: DP-4 res: 3440x1440 dpi: 109 size: 800x330mm (31.5x13.0")
  diag: 865mm (34.1")
  OpenGL: renderer: GeForce RTX 2070 SUPER/PCIe/SSE2 v: 4.6.0 NVIDIA 460.39
  direct render: Yes
Audio:
  Device-1: NVIDIA TU104 HD Audio vendor: eVga.com. driver: snd_hda_intel
  v: kernel bus ID: 26:00.1 chip ID: 10de:10f8 class ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: Micro-Star MSI
  driver: snd_hda_intel v: kernel bus ID: 28:00.4 chip ID: 1022:1487
  class ID: 0403
  Device-3: Logitech Logitech StreamCam type: USB
  driver: hid-generic,snd-usb-audio,usbhid,uvcvideo bus ID: 2-1:2
  chip ID: 046d:0893 class ID: 0300 serial: <filter>
  Device-4: C-Media Schiit Modi 3 type: USB
  driver: hid-generic,snd-usb-audio,usbhid bus ID: 1-9:4 chip ID: 0d8c:0066
  class ID: 0300
  Sound Server: ALSA v: k5.10.15-1-MANJARO
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
  vendor: Micro-Star MSI driver: r8169 v: kernel port: f000 bus ID: 22:00.0
  chip ID: 10ec:8168 class ID: 0200
  IF: enp34s0 state: up speed: 100 Mbps duplex: full mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
  broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Message: No Bluetooth data was found.
RAID:
  Message: No RAID data was found.
Drives:
  Local Storage: total: 931.51 GiB used: 57.26 GiB (6.1%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 1TB
  size: 931.51 GiB block size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
  rotation: SSD serial: <filter> rev: 4B6Q scheme: GPT
  Message: No Optical or Floppy data was found.
Partition:
  ID-1: / raw size: 896.71 GiB size: 881.63 GiB (98.32%)
  used: 57.26 GiB (6.5%) fs: ext4 dev: /dev/sda2 maj-min: 8:2 label: N/A
  uuid: 5b3c9338-8340-4ca4-bb0b-62edaa909034
  ID-2: /boot/efi raw size: 300 MiB size: 299.4 MiB (99.80%)
  used: 312 KiB (0.1%) fs: vfat dev: /dev/sda1 maj-min: 8:1 label: N/A
  uuid: 0D2E-D8DF
Swap:
  Kernel: swappiness: 60 (default) cache pressure: 100 (default)
  ID-1: swap-1 type: partition size: 34.51 GiB used: 0 KiB (0.0%) priority: -2
  dev: /dev/sda3 maj-min: 8:3 label: N/A
  uuid: 49f11ad7-9f55-4610-9f7e-79a5a3ff498c
Unmounted:
  Message: No Unmounted partitions found.
USB:
  Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 10 rev: 2.0
  speed: 480 Mb/s chip ID: 1d6b:0002 class ID: 0900
  Hub-2: 1-2:2 info: VIA Labs VL813 Hub ports: 4 rev: 2.1 speed: 480 Mb/s
  chip ID: 2109:2813 class ID: 0900
  Device-1: 1-3:5 info: Logitech Unifying Receiver type: Keyboard,Mouse,HID
  driver: logitech-djreceiver,usbhid interfaces: 3 rev: 2.0 speed: 12 Mb/s
  chip ID: 046d:c52b class ID: 0300
  Device-2: 1-9:4 info: C-Media Schiit Modi 3 type: Audio,HID
  driver: hid-generic,snd-usb-audio,usbhid interfaces: 3 rev: 2.0
  speed: 480 Mb/s chip ID: 0d8c:0066 class ID: 0300
  Hub-3: 2-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.1 speed: 10 Gb/s
  chip ID: 1d6b:0003 class ID: 0900
  Device-1: 2-1:2 info: Logitech Logitech StreamCam type: Video,Audio,HID
  driver: hid-generic,snd-usb-audio,usbhid,uvcvideo interfaces: 6 rev: 3.2
  speed: 5 Gb/s chip ID: 046d:0893 class ID: 0300 serial: <filter>
  Hub-4: 2-2:3 info: VIA Labs VL813 Hub ports: 4 rev: 3.0 speed: 5 Gb/s
  chip ID: 2109:0813 class ID: 0900
  Device-1: 2-2.4:4 info: Prolific USB SD Card Reader type: Mass Storage
  driver: usb-storage interfaces: 1 rev: 3.1 speed: 5 Gb/s chip ID: 067b:2731
  class ID: 0806 serial: <filter>
  Hub-5: 3-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0
  speed: 480 Mb/s chip ID: 1d6b:0002 class ID: 0900
  Hub-6: 4-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.1 speed: 10 Gb/s
  chip ID: 1d6b:0003 class ID: 0900
  Hub-7: 5-0:1 info: Full speed (or root) Hub ports: 4 rev: 2.0
  speed: 480 Mb/s chip ID: 1d6b:0002 class ID: 0900
  Device-1: 5-2:2 info: Logitech USB Receiver type: Mouse,Keyboard,HID
  driver: hid-generic,usbhid interfaces: 3 rev: 2.0 speed: 12 Mb/s
  chip ID: 046d:c545 class ID: 0300
  Hub-8: 6-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.1 speed: 10 Gb/s
  chip ID: 1d6b:0003 class ID: 0900
Sensors:
  System Temperatures: cpu: 51.9 C mobo: N/A gpu: nvidia temp: 35 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Info:
  Processes: 588 Uptime: 1d 20h 02m wakeups: 22 Init: systemd v: 247
  Compilers: gcc: 10.2.0 Packages: 1245 pacman: 1229 lib: 375 flatpak: 0
  snap: 16 Shell: fish v: 3.1.2 default: Bash v: 5.1.0 running in: alacritty
  inxi: 3.3.01
  1. What happens if you use one (1) of the two on the internal ports only?

I’m sorry, I don’t know what you mean by this

Have you tried changing the USB cable to confirm there is no problem with the physical connection?

An Arch user had a similar problem with a Schitt Modi DAC
USB Audio Interface error: clock source 18 is not valid, cannot use | Arch Linux Forums
The suggested workaround is to suspend and resume system to reset the DAC
It might also be possible to reset the DAC by restarting PulseAudio

systemctl --user restart pulseaudio

Is the DAC and logitech receiver connected to the same pair of USB 2.0 ports on front or rear of system?

I suggest you move the the wireless mouse receiver to another USB socket away from the DAC
or replace it with a wired mouse, to see if the DAC works OK without interference from other USB devices
and also remove the webcam whilst troubleshooting audio

Can you try connecting the DAC OR the mouse (not both) and see if it happens too?

This is weird…

Have you tried changing the USB cable to confirm there is no problem with the physical connection?

I used first Mac for over a year with this DAC with no problems, and then Windows for a few months without problems. It is only with Manjaro that I experience problems with the DAC so I assume that it is not an issue with the cable. Also the fact that the same issue is affecting multiple devices makes me think its not a physical issue with the DAC. Although I’m not sure how I would test if it was anyway.

An Arch user had a similar problem with a Schitt Modi DAC
The suggested workaround is to suspend and resume system to reset the DAC
It might also be possible to reset the DAC by restarting PulseAudio

Restarting pulseaudio does not solve the issue for me. It just stalls again as soon as it starts back up. I will try suspending and resuming the system next time I run into this to see if that fixes it, although it would be nice to find a better solution.

Is the DAC and logitech receiver connected to the same pair of USB 2.0 ports on front or rear of system?

I’ve tried swapping the USB plugs that the DAC is plugged into, but unfortunately that did not help fix the issue :frowning: I can only really connect my Logitech receiver to the top USB plug of my case, as if I plug it into the back I think its too far away because then my mouse will occasionally stutter.

I suggest you move the the wireless mouse receiver to another USB socket away from the DAC
or replace it with a wired mouse, to see if the DAC works OK without interference from other USB devices
and also remove the webcam whilst troubleshooting audio

Can you try connecting the DAC OR the mouse (not both) and see if it happens too?
This is weird…

I’ll try unplugging stuff to see if it helps. The problem is its really hard to tell what affects the bug since it happens so unexpectedly. Sometimes it seems it happens after 5 minutes, and recently I’ve been using my computer all of this morning with no issues… One thing I’m wondering about is that I haven’t had Discord open today and the bug hasn’t occurred, so its possible that Discord is related to it.

Thanks @nikgnomic and @Fabby for your help :slight_smile:

Funnily enough, I just launched Discord and not 5 minutes later the issue has come up again! I think it has to be related now, although I have no clue as to why Discord would break the USB code in the kernel?? Does anyone have any more ideas of how I could try to debug this?

Here is the core dump of Discord from journalctl:

kernel: usb 1-9: 1:1: cannot set freq 44100 (v2/v3): err -110
systemd-coredump[38491]: Process 37583 (Discord) of user 1000 dumped core.

                                                      Stack trace of thread 37607:
                                                      #0  0x00007fcd428662ed n/a (n/a + 0x0)
                                                      #1  0x00007fcd410dce46 n/a (n/a + 0x0)
░░ Subject: Process 37583 (Discord) dumped core
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ Documentation: man:core(5)
░░
░░ Process 37583 (Discord) crashed and dumped core.
░░
░░ This usually indicates a programming error in the crashing program and
░░ should be reported to its vendor as a bug.
Feb 16 19:51:27 paddy-ms7c02 systemd[1]: systemd-coredump@0-38490-0.service: Succeeded.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░
░░ The unit systemd-coredump@0-38490-0.service has successfully entered the 'dead' state.

the DAC USB port USB 1-9 does not like the requested samplerate cannot set freq 44100
in the OP it was cannot set freq 48000

If another audio stream was using the DAC, the device may be using a different sample rate to discord. But there is no information about any other active audio streams

Have you followed online suggestions for alleged ‘audiophile’ settings and changed PulseAudio to avoid-resampling?

Or do you have Discord configured to try to connect to the DAC instead of ‘default’ playback (via PulseAudio)?

Audio interfaces and DACs can be temperamental devices that do not work well with external USB hubs, or sharing an internal USB hub

The Logitech Unifying Receiver appears to be using USB 1.1 (UHCI or OHCI) - 12 Mb/s
wheras the C-Media Schiit Modi 3 is using USB 2.0 (EHCI) - 480 Mb/s
(you can check this in lsusb)
The two devices are sharing data on a shared connection at different rates
And having a radio transmitter/receiver close to the DAC connection may not help

I can only really connect my Logitech receiver to the top USB plug of my case, as if I plug it into the back I think its too far away because then my mouse will occasionally stutter.

If the wireless device has already been unreliable you should replace it to troubleshoot the DAC

I do not know many users who tolerate using a wireless mouse, but they usually stick the receiver to the underside of the desk directly below the mouse

I suggest you get a USB extension cable for the wireless device and place it close to the mouse and away from the DAC

My PulseAudio settings are actually all defaults. I also just checked and Discord is set up to play to the default output. It must just be going rogue to play audio straight from the DAC instead! I can’t believe it but since not running Discord this problem is completely gone.

I think at this point I’m just going to run Discord on my laptop instead, and leave my Desktop be.

Its actually really reliable when I have the USB receiver plugged into the top of the case, just unreliable if I plug it far away in the back.

Thanks very much nikgnomic and Fabby for your help!