Audio distortion under Linux
Environmental audio is regularly distorted, echoey and intensely unpleasant to listen to. This is an intermittent fault.
Switching between JACK and system audio doesn't appear to consistently make a difference.
The issue is most pronounced in 1.20, 1.120.1 and snapshot 23w31a. It's also an issue for versions 1.19.3 and 1.19.4, albeit more intermittently. It does not affect 1.18.2 or earlier.
It may be an issue with directional audio processing, and I'd speculate that it might relate to the version of libopenal.so that has shipped with Minecraft recently. Here's the MD5 file hash: 293580d3c5953c6b94851c6abf4a6d5e
Disabling or enabling direction audio in the game does not affect the problem, however.
I've reproduced this on another computer running the same Linux distro (albeit with a number of other differences). Both affected systems use USB audio devices.
(Of course, now that I'm finally writing a bug report, I can't get the issue to reproduce itself, but I'll attach video as soon as it next appears.)
Environment
Pop!_OS Linux version 22.04 LTS
Linux pop-os 6.2.15-060215-generic #202305111601 SMP PREEMPT_DYNAMIC Thu May 11 22:43:51 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
openjdk version "17.0.8" 2023-07-18
OpenJDK Runtime Environment (build 17.0.8+7-Ubuntu-122.04)
OpenJDK 64-Bit Server VM (build 17.0.8+7-Ubuntu-122.04, mixed mode, sharing)
Created Issue:
Audio distortion under Linux
Environmental audio is regularly distorted, echoey and intensely unpleasant to listen to. This is an intermittent fault.
Switching between JACK and system audio doesn't appear to consistently make a difference.
The issue is most pronounced in 1.20, 1.120.1 and snapshot 23w31a. It's also an issue for versions 1.19.3 and 1.19.4, albeit more intermittently. It does not affect 1.18.2 or earlier.
It may be an issue with directional audio processing, and I'd speculate that it might relate to the version of libopenal.so that has shipped with Minecraft since May. Here's the MD5 file hash: 293580d3c5953c6b94851c6abf4a6d5e
Disabling or enabling direction audio in the game does not affect the problem, however.
I've reproduced this on another computer running the same Linux distro (albeit with a number of other differences). Both affected systems use USB audio devices.
(Of course, now that I'm finally writing a bug report, I can't get the issue to reproduce itself, but I'll attach video as soon as it next appears.)
Environment
Pop!_OS Linux version 22.04 LTS
Linux pop-os 6.2.15-060215-generic #202305111601 SMP PREEMPT_DYNAMIC Thu May 11 22:43:51 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
openjdk version "17.0.8" 2023-07-18
OpenJDK Runtime Environment (build 17.0.8+7-Ubuntu-122.04)
OpenJDK 64-Bit Server VM (build 17.0.8+7-Ubuntu-122.04, mixed mode, sharing)
Environmental audio is regularly distorted, echoey and intensely unpleasant to listen to. This is an intermittent fault.
Switching between JACK and system audio doesn't appear to consistently make a difference.
The issue is most pronounced in 1.20, 1.120.1 and snapshot 23w31a. It's also an issue for versions 1.19.3 and 1.19.4, albeit more intermittently. It does not affect 1.18.2 or earlier.
It may be an issue with directional audio processing, and I'd speculate that it might relate to the version of libopenal.so that has shipped with Minecraft
since May. Here's the MD5 file hash: 293580d3c5953c6b94851c6abf4a6d5eDisabling or enabling direction audio in the game does not affect the problem, however.
I've reproduced this on another computer running the same Linux distro (albeit with a number of other differences). Both affected systems use USB audio devices.
(Of course, now that I'm finally writing a bug report, I can't get the issue to reproduce itself, but I'll attach video as soon as it next appears.)
Environmental audio is regularly distorted, echoey and intensely unpleasant to listen to. This is an intermittent fault.
Switching between JACK and system audio doesn't appear to consistently make a difference.
The issue is most pronounced in 1.20, 1.120.1 and snapshot 23w31a. It's also an issue for versions 1.19.3 and 1.19.4, albeit more intermittently. It does not affect 1.18.2 or earlier.
It may be an issue with directional audio processing, and I'd speculate that it might relate to the version of libopenal.so that has shipped with Minecraft recently. Here's the MD5 file hash: 293580d3c5953c6b94851c6abf4a6d5e
Disabling or enabling direction audio in the game does not affect the problem, however.
I've reproduced this on another computer running the same Linux distro (albeit with a number of other differences). Both affected systems use USB audio devices.
(Of course, now that I'm finally writing a bug report, I can't get the issue to reproduce itself, but I'll attach video as soon as it next appears.)
Environmental audio is regularly distorted, echoey and intensely unpleasant to listen to. This is an intermittent fault.
Switching between JACK and system audio doesn't appear to consistently make a difference.
The issue is most pronounced in 1.20, 1.120.1 and snapshot 23w31a. It's also an issue for versions 1.19.3 and 1.19.4, albeit more intermittently. It does not affect 1.18.2 or earlier.
It may be an issue with directional audio processing, and I'd speculate that it might relate to the version of libopenal.so that has shipped with Minecraft recently. Here's the MD5 file hash: 293580d3c5953c6b94851c6abf4a6d5e
Disabling or enabling direction audio in the game does not affect the problem, however.
I've reproduced this on another computer running the same Linux distro (albeit with a number of other differences). Both affected systems use USB audio devices.
(Of course, now that I'm finally writing a bug report, I can't get the issue to reproduce itself, but I'll attach video as soon as it next appears.)
Environmental audio is regularly distorted, echoey and intensely unpleasant to listen to. This is an intermittent fault.
Switching between JACK and system audio doesn't appear to consistently make a difference.
The issue is most pronounced in 1.20, 1.120.1 and snapshot 23w31a. It's also an issue for versions 1.19.3 and 1.19.4, albeit more intermittently. It does not affect 1.18.2 or earlier.
It may be an issue with directional audio processing, and I'd speculate that it might relate to the version of libopenal.so that has shipped with Minecraft recently. Here's the MD5 file hash: 293580d3c5953c6b94851c6abf4a6d5e
Disabling or enabling direction audio in the game does not affect the problem, however.
I've reproduced this on another computer running the same Linux distro (albeit with a number of other differences). Both affected systems use USB audio devices.
(Of course, now that I'm finally writing a bug report, I can't get the issue to reproduce itself, but I'll attach video as soon as it next appears.)
Are you sure that this isn't a technical support issue
It's not impossible that I'm missing something, but the fact that it's a reproducible issue on different computers that affects only specific versions appears to point to MC - or at least its interaction with another aspect of this distribution's system configuration - being the key issue.
It's been proving a little hard to trace more precisely, as Minecraft appears to keep its audio routing well separated from system audio (so it doesn't show up on my Jack or Pipewire monitoring tools.)
If there are steps I should further take to rule it in/out as a qualified bug, I'm happy to go through them. I haven't first posted on https://www.minecraftforum.net/, so can take it there if that's required or desirable.
I also started having this issue on my Arch Linux system recently. Same as Owlbear, I get severe audio distortion in all Minecraft versions newer than 1.18.1. The issue occurs for about 50% of desktop sessions (and can be triggered by resuming from sleep as well), and affects all minecraft instances launched during that session. Logging out of my desktop and back in will usually resolve the issue, and the issue seems most likely to crop up on the first log in following a reboot, or when resuming from sleep.
I did some digging, and I believe this is a Pipewire bug, specifically in the pipewire-pulse server. It appears that the issue was introduced in Pipewire 0.3.77, as I was not able to reproduce the issue after downgrading pipewire-pulse to 0.3.76. I will open up an issue on the Pipewire repo to report this issue.
Edit: I have submitted the issue at https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3499
I actually got a little further with this after getting a third person to try to replicate and after a pipewire update broke sound entirely, so hopefully this will be useful to either your bug report to Pipewire, @taylor85345, or to the Minecraft team.
We identified that the distortion was regularly occurring when multiple audio devices were in use, most reliably a group chat with a mic input on one device and speaker output on another, which, as you say, firmly points to Pipewire.
However, it does specifically appear to being caused by an issue between OpenAL and Pipewire, apparently related to OpenAL's device selection behaviour, which has come up elsewhere in the past - see https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3176
(Possibly also related to the Jack device selection opacity mentioned in this 2020 issue completed on OpenAL - https://github.com/kcat/openal-soft/issues/280 )
We've also identified a fix, which is to force OpenAL to use a specific audio subsystem by setting an environment variable for OpenAL at the command line, thus:
(A quick search on this specifically gets us to someone coming up with the same solution to the the issue a few months ago: https://www.reddit.com/r/linux_gaming/comments/13psb81/minecraft_no_audio_on_arch/ )
I still feel that this is something that would ideally have a fix implemented in Minecraft's audio device selection, but that might not be possible in the context of OpenAL's device handling.
Edit: agree, addressing the issue in Pipewire would most directly resolve the buggy interaction.
A device selection issue checks out, as it looks like there were changes to how pipewire-pulse handles device selection in the 0.3.77 release. I also observed that if I uninstalled pipewire-pulse and switched back to pulseaudio, all audio would disappear in Minecraft unless I killed the pipewire process entirely, suggesting to me that Minecraft was trying to send all audio to pipewire even through pipewire was no longer acting as the audio server (very uneducated guess).
I will try out your workaround and see if it helps on my end, and I'll add the detail to my bug report. I think ultimately this issue is better addressed in Pipewire, as any fix implemented in Minecraft or OpenAL would presumably only apply to future releases, leaving older installations broken.
Does this still occur in 1.20.2 or later?
Nope, looks like we're good.
I've commented out the line that forces OpenAL to use pulse from my .profile and I'll report back if it recurs, but the new audio device selection options should make it easy to avoid in case of any weird conflicts.
Thank you very much.
Today I encountered this issue on 1.20.4 with win10 , it's still there, pretty severe.
Even restarting the computer didn't fix it. None of the settings worked
Eventually, I saw a related post on GitLab mentioning the File Explorer.
I tried restarting the File Explorer multiple times through the Task Manager, but it didn't work.
In the end, I had to shutdown the process of the File Explorer directly. Then, my desktop disappeared and didn't restart automatically. I opened the directory of any running application through the Task Manager, and the process of the File Explorer reappeared in the Task Manager. I manually clicked on the explorer.exe program to start it from there, and my desktop came back. It's worth mentioning that I kept Minecraft running while doing all this to observe. So, I noticed that when I manually restarted the File Explorer, the game's sound immediately returned to normal without any delay.