Distorted Sound with strange echo of input // Musescore 3 // Manjaro Linux
Reported version
3.0
Type
Functional
Frequency
Many
Severity
S3 - Major
Reproducibility
Always
Status
active
Regression
No
Workaround
Yes
Project
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
Comments
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]
The problem was PulseAudio - for unknown reasons. After switching to ALSA, the problem was gone.
In reply to The problem was PulseAudio -… by [DELETED] 14323796
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.
EDIT :
Another working workaround [1] :
in the file /etc/pulse/default.pa, replace the line :
load-module module-udev-detect
with
load-module module-udev-detect tsched=0
[1] https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Glitche…
citation:
"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 Loopback mixing is not the… by hamelg
I read on the forums and Wiki pages: Pulseauido and ALSA were changing each other's mixer settings.
There are many reports on this subject.
The command "tsched = 0" corrects this error, among others.
In reply to The same here. My Hardware :… by hamelg
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...
Workaround PULSE_LATENCY_MSEC=30 works flawlessly, thank you!
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.
In reply to With recent updates, I had… by hamelg
I don't think so...! (Here we go again)
But thanks to hamelg's help you realize it's easy to fix the problem: simple read the page
https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Glitche…
I'm curious how many other people can reproduce this problem, and if the suggested workaround helps for everyone who encounters it?
I'm on debian and don't have this problem with pulseaudio, But maybe there is some sort of diagnostic I could run that would help me investigate further?
In reply to I'm curious how many other… by Marc Sabatella
I believe it is a compatibility issue with AMD cards... Do you have other brand or AMD?
I’ve had this issue in Ubuntu, Solus and Manjaro, on a desktop and 2 laptops. I’ve usually worked around by using ALSA but it’s a bit tedious killing off Pulseaudio when you want to use Musescore. None of these systems have any AMD components, but the desktop has an ASUS M/B with Realtek sound. The workaround works fine. This is a relatively new install so first time I’ve run into the issue here. I hadn’t used MS with headphones in this install before and couldn’t get ALSA to output to the headphone jack.
Further testing shows that, on my desktop, any value lower than 4 ms produces the distortion.
In reply to I’ve had this issue in… by Moilleadóir
Doesn't seem to be related to AMD components, I have the same issue with Intel components. The
PULSE_LATENCY_MSEC=30
trick indeed solves it but it is quite annoying :-(Adding data point:
Manjaro 20.2
MuseScore3 3.5.2
Also getting screeching noise when app launched(installed with
pacman -Syu musescore
)After changing I/O to ALSA Audio then the noise goes away after restart
To add data points to this discussion: This has been an intermittent problem on my PC ever since I started using Musescore at ver 2.x. Only happens rarely, and I have noticed that when I close 1-2 other running apps; like, say the web browser, or perhaps LibreOffice; then the playback magically fixes itself. So I always assumed it was about system resources. Doesn't happen quite often enough for me to have gone looking for workarounds, so have not tried any of those mentioned here. I am running all Intel, specs below:
Processors: 8 × Intel® Core™ i7-7700K CPU @ 4.20GHz
Memory: 31.2 GiB of RAM
Motherboard: GA-Z270X-Gaming 7
Audio: Creative Sound Core 3D chip
Operating System: Fedora 32
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.75.0
Qt Version: 5.14.2
Kernel Version: 5.9.16-100.fc32.x86_64
OS Type: 64-bit
Same problem here with 3.6.2 on Gentoo Linux. The workaround "env PULSE_LATENCY_MSEC=30 mscore" makes it work flawless. And it has been a problem with all versions after 3.2 (used on debian, devuan) where the pure alsa backend worked. But with pulseaudio allways a problem.
Have a nice day
Yes, I'm also getting this. Jiggling the volume slider used to work until recently.
Now, setting "env PULSE_LATENCY_MSEC=10 mscore %F" as a launcher seems to work fine, meaning there is a latency bug somewhere.
Kernel: 5.13.0-1-MANJARO
CPU: 12-Core AMD Ryzen 9 5900X
Sound Server-1: ALSA v: k5.13.0-1-MANJARO
Sound Server-2: PulseAudio v: 14.2
In reply to Yes, I'm also getting this… by alexandruianu
Hi
I have solved the problem by using the portaudio backend with alsa. It does not work with PA directly.
Have a nice day
In reply to The problem was PulseAudio -… by [DELETED] 14323796
Hey I wanted to say thanks for helping fix this issue. I have this same RealTek/Intel ALC1220 audio chipset in a ROG Strix B550F motherboard and I was getting terrible distortion through the front and back panel output. Disabling the pulse audio daemon and only using alsa was the key to fixing this problem. I'm using Rockly Linux 8.4, so I also had to load the "elrepo" repo and use a ported kernel 5.13, which has direct support for the ALC1220 audio chipset. BTW elrepo is awesome! Check it out of you've not looked at it.
> I'm curious how many other people can reproduce this problem,
+1
> and if the suggested workaround helps for everyone who encounters it?
PULSE_LATENCY_MSEC=30 mscore
Works just fine, thanks!
I expercienced the issue on a new computer (I hadn't used Musescore on this computer yet) with all Musescore versions I tried (form 2 to 3.6).
I can also confirm that, after opening Musescore, any audio played in other applications was distorted.
System: Kubuntu 21.04
CPU: AMD Ryzen 3600
MOBO: MSI MAG B550 Gaming Plus
Audio: AMD Starship/Matisse HD Audio Controller
Audio server: PulseAudio 14.2
Changing
load-module module-udev-detect
to
load-module module-udev-detect tsched=0
in /etc/pulse/default.pa
fixed the problem.
I didn't try "env PULSE_LATENCY_MSEC=30 mscore" because I didn't understand how to do that. Further information about this workaround would be welcome.
That seems like another workaround to me, not a fix