Found workaround for AMD/JAVA/Minecraft Audio Noise Problem

Problem: Popping noise in Minecraft Java Edition associated with mouse movement

System: Fedora 36 on AMD B550M motherboard with AMD Ryzen 5 5600X CPU and AMD 6500 XT GPU output via HDMI to A/V Receiver, USB Keyboard and Mouse

Work Around: Connect headphones directly to motherboard jack and select “Starship/Matisse HD Audio Controller Analog Stereo” in Settings → Sound → Output

Note: Fedora 36 uses Pipewire/Wireplumber/ALSA

Asking for any reasonable explanation for what is causing the problem.

I was also experiencing popping noises on F36, AMD, with PipeWire/Wireplumber/ALSA.
However, my problem was a lot different than yours, happening on a system-wide level.

See my post here: https://discussion.fedoraproject.org/t/speaker-makes-popping-noises/74940.
I followed https://fedoraproject.org/wiki/Changes/DefaultPipeWire and replaced PipeWire with PulseAudio via sudo dnf swap --allowerasing pipewire-pulseaudio pulseaudio, which fixed all my problems. I have not had a popping noise ever since.

I’m not suggesting your issue is equivalent to mine or that PipeWire is the root of your problem, but I think it wouldn’t be a terrible idea to, at your discretion, try what I did and see if that fixes your problem.

Sorry this is all the info I can give you, as I simply don’t know more about this.

i looked at your post “Bryan K” and I do think your problem is different, but related to mine.

I received the same “swap in pulseaudio” advice before but what I am really looking for is a possible explanation for why this should make a difference.

I suspect that the audio signal is processed by the video card in order for it to be sent via HDMI to the A/V receiver. The video signal and audio signal are coming from the Java application (Minecraft), so perhaps the mouse movement is causing the application/driver to miss/delay some processing (?too complicated for me)

Hypothetically, the headphone audio works because the game audio is processed by the mother board audio processor and avoids the video card(?)

Last time I tried swapping out pipewire, I lost all audio… but I guess I’ll try it again. What the heck

5 minutes later…

swapping made no difference and did not resolve the problem

Installed: java-17-openjdk-1:17.0.4.1.1-1.fc36.x86_64
However, Minecraft requires its own JVM…
runtime: OpenJDK 64-Bit Server VM Microsoft-32931 (build 17.0.3+7-LTS, mixed mode)

Mojang/Microsoft message:
“Starting from Minecraft 1.12, Java 8 will be required to run Minecraft. If you don’t know whether you have Java 8, don’t worry - our installers supply Minecraft with its own version of Java by default.”

JIRA MC bug Minecraft Launcher MCL-18306, Newer versions of Java are blocked by
JavaCheck.jar

Uninstalled Flatpak Minecraft Launcher using Gnome Software tool.
Installed Minecraft.tar.gz downloaded from Mojang/Microsoft
Popping sound remains the same when audio routed through HDMI

Question: How can I change the JVM Minecraft uses to the newer version?
Mojang: /home/bebopspeaks/.minecraft/runtime/java-runtime-gamma/linux
Fedora: /lib/jvm/java-17-openjdk-17.0.4.1.1-1.fc36.x86_64/bin/java

Launcher Config option: Disable Hardware Acceleration selected
Popping sound remains the same when audio routed through HDMI

Debug Data:
Java: 17.0.4.1 64bit
Mem: 31% 1298/4096MB
Allocation rate: 020MB/s
Allocated:845 3456MB

CPU:12x AMD Ryzen 5 5600X 6-Core Processor

Display: 1920x1011 (AMD)
AMD BEIGE_GOBY (LLVM 14.0.0, DRM 3.47, 5.19.14-200.FC36.X86_64)
4.6 (Core Profile) Mesa 22.1.7

Java Executeable: /lib/jvm/java-17-openjdk-17.0.4.1.1-1.fc36.x86_64/bin/java

Launcher Log:
[bebopspeaks@fedora launcher]$ ./minecraft-launcher
https://launchermeta.mojang.com/v1/products/launcher/6f083b80d5e6fabbc4236f81d0d8f8a350c665a9/linux.json
[1011/154726.035596:INFO:main_context.cpp(130)] CEF initialized successfully.
[1011/154726.035647:INFO:main_context.cpp(132)] CEF version: 99.2.14+g3f796b8+chromium-99.0.4844.84
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[1011/154726.084883:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.
Created browser window for reuse: 0x800003
[1011/154735.298960:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[1011/154738.267435:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[1011/154811.558969:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!
Created browser window for reuse: 0x80001a

Comparison System: Framework laptop connected to same AV Receiver and USB mouse/keyboard

NO Popping sound with audio routed through HDMI

Minecraft Debug Data:
Java: 17.0.3 64bit
Mem: 46% 950/2048MB
Allocation rate: 045MB/s
Allocated: 67% 1376MB

CPU: 8x 11th Gen Intel Core i7-1185G7 @ 3.00GHz
Display: 1920x1011 (Intel)
Mesa Intel Xe Graphics (TGL GT2)
4.6 (Core Profile) Mesa 21.3.9 (git-78c96ae5b6)

No Launcher Errors

Partial Solution:
Select Settings → Sound → Output → Configuration → Digital Stereo (HDMI 2) Output

Instead of

Digital Surround 5.1 (HDMI 2) Output

No more popping sounds in game.

Unfortunately can’t explain why there was a problem in the previous configuration.