Distorted Sound with strange echo of input // Musescore 3 // Manjaro Linux

• Feb 21, 2019 - 22:57
Reported version
S2 - Critical

When using note input, or playing a sheet, the audio comes out distorted and with an echo.
Musescore 3, default settings, running Manjaro Linux. No difference, wether running PulseAudio or ALSA with different buffer settings.

System: Kernel: 4.19.23-1-MANJARO x86_64 bits: 64 compiler: gcc v: 8.2.1 Desktop: KDE Plasma 5.15.0
Machine: Type: Laptop System: HP product: HP Pavilion Laptop 15-cw0xxx
CPU: Topology: Quad Core model: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx bits: 64
Audio: Device-1: Advanced Micro Devices [AMD/ATI] Raven/Raven2/Fenghuang HDMI/DP Audio


Confirming problem with distorted and echo sound, using pulseaudio. Workaround is to restart program two-three times.
I've only looked at jackd (using pulse due to other reasons), and could only see a problem in the jackd procedure callback, perhaps related. The procedure will do memory intense operations at initial play in the time-critical process.

I don't currently use Linux.
But if you ask me as a sound technician (instead of Linux user): There seems to be loop-back somewhere. (Such as redirecting the output back to the input).
Make sure the output in the I/O is directed to a playback device: API [XYZ] Device: [output-device]

In reply to by [DELETED] 14323796

Workaround No Yes

The same here :(

My Hardware :
Ryzen 2700
Motherboard MSI B450 Gaming plus
alsa.name = "ALC892 Analog"
alsa.driver_name = "snd_hda_intel"
device.vendor.id = "1022"
device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
device.product.id = "1457"
device.product.name = "Family 17h (Models 00h-0fh) HD Audio Controller"

Musescore breaks my pulseaudio at startup. "pacmd list-sinks" reports a "current latency" tiny (< 1ms). To fix this issue, I run musescore like that :
env PULSE_LATENCY_MSEC=30 mscore
I have others desktops/laptops and I encounter this issue only with my AMD/Ryzen desktop.

Another working workaround [1] :
in the file /etc/pulse/default.pa, replace the line :
load-module module-udev-detect
load-module module-udev-detect tsched=0

[1] https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Glitche…

"If you are encountering static in your headphone jack, one possible culprit may be ALSA's loopback mixing. In addition to setting tsched=0 as documented above, it may be helpful to disable loopback mixing. This can be accomplished trivially with alsamixer, part of alsa-utils. This should not impact audio playback or microphone recording negatively, unless you require loopback mixing."

Loopback mixing is not the culprit because it is already disabled. I wonder why this issue happens only with musescore. It breaks something when musecore startup and initializes the pulseaudio client. If a developer reads my comment, I can help him by providing debug logs.

In reply to by hamelg

Workaround Yes No

Same here. As soon as I start Musescore, audio gets system-wide distorted, starts crackling and clipping. No problems on my old Intel desktop with the same config (same everything on Arch Linux) and ASUS Z87-K with ALC887 audio.

I have Ryzen 3900X with ASUS TUF X570-PLUS motherboard, Realtek S1200A soundcard.

EDIT: Dang it, the workaround works. Starting MuseScore with PULSE_LATENCY_MSEC=30 works fine. Sorry, my first time posting here...

It sounds like this is the exact same issue reported here: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/797

I can reproduce this issue 100% of the time on my HDMI audio output, and initially thought this was a PulseAudio bug since it was specific to one of my audio outputs.

The feedback I've received from the PulseAudio devs in the above bug is that MuseScore is setting an unreasonably low latency target of 0.5 milliseconds. This is presumably why the workaround of PULSE_LATENCY_MSEC=30 works.

The proper fix for this is for MuseScore to set a reasonably achievable latency goal. Precisely what's reasonable is yet to be determined, but 0.5 msec is definitely not it.

With recent updates, I had to unset PULSE_LATENCY_MSEC. Today, with pulseaudio 13 and musescore 3.4, this issue is vanished and all work fine.