Moderator Note
This ticket includes switching between all types of audio devices, not just headphones.
To work around the issue, you can manually reload sounds (and all other resources) with F3+T
.
The game fails to switch audio outputs, meaning that headphones cannot start or stop being used after game start.
After the game start, plugging in the headphones should have audio going through the headphones. Unplugging them should have audio going through the speakers (Unless, the default speakers say otherwise).
After plugging (or unplugging) headphones, no sound can be heard because the sound is still going to the jack. (or still not going to the jack. The Computer OS detects the headphones muting the speakers, which is normal operation)
Reproduction steps
No audio through headphones
Start minecraft with no headphones in headphone jack*
Plug headphones into headphone jack* (title screen or in-game)
*Headphones can be typical audio jack or USB
No audio through speakers
Start minecraft with headphones in headphone jack*
Unplug headphones from headphone jack* (title screen or in-game)
*Headphones can be typical audio jack or USB
I'm unaware if this problem can be caused from the launcher.
Workaround
See LWJGL forum post:
In the meantime, you could try fixing this with a virtual audio device. I'm not sure what's available on Linux/PulseAudio, but it's certainly possible on Windows. You create a virtual audio device and configure it as the default. It's what Minecraft/OpenAL Soft will use to output audio. Then you configure the virtual device to forward any audio to the real audio device of your choice. You should then be able to change the downstream device, on the fly, without breaking Minecraft/OpenAL Soft.
Suggested fix
See LWJGL forum post:
What could be done to resolve this? Suggestions:
Minecraft regularly queries
alcGetInteger(device, ALC_CONNECTED)
, via theALC_EXT_disconnect
extension. If it returnsALC_FALSE
, it automatically recreates the audio context.Minecraft regularly queries
alcGetString(NULL, ALC_DEFAULT_ALL_DEVICES_SPECIFIER)
. This returns a string that describes the default audio device. If it changes, it automatically recreates the audio context.Minecraft queries
ALC_ALL_DEVICES_SPECIFIER
(also regularly updates it) and displays the list of available audio devices. Instead of changing the default audio device from the OS settings, users can change the audio device used by Minecraft itself. This is the simplest and most robust solution. I don't remember a PC game that doesn't have such an option in its audio settings.
Related issues
Comments
@Carl I think you are right about the sound library. The way MC is written I believe due to supporting so many OSes that MC does not support audio switching within Windows. I think it grabs control of the audio device at startup.
I suspect this may working as intended but the ability to switch without restarting would be nice.
Pressing F3+S should reset the sound system.
SOLUTION: CHANGE RESOURCE PACK. MINECRAFT CHANGES DEFAULT SOUNDCARD AS WELL WHEN DOING IT.
are they never going to fix this?
@Rosenberg Please don't caps
For now, hold F3+T to reload resource pack while in game to temporarily fix audio
This doesn't solve the issue when playing with large modpacks.
Tried F3+T and the resourcepack didn't reload even after 20 minutes.
This is not a solution.
Large modpacks are not supported by Mojang.
If I understand it correctly, this ticket has been resolved as "Won't Fix" since fixing this would cause more technical issues than it's worth fixing, seeing as this can just be fixed by restarting the game or reloading resources (which takes maybe up to 10 seconds in vanilla). Most people don't change audio output device too often while playing Minecraft.

It is moderately annoying that there no longer is a way to reload just the sound engine without reloading all other assets (which was at one point possible with F3+S), but that still is a feature request and not a bug (and I suspect that the separate way of reloading them was removed due to some kind of dependency issue and isn't just something that can be immediately re-added).
At this time Minecraft Java appears to be the ONLY audio application / game that I have that has this issue, I am surprised this is classed as a feature request and not a bug. Simply trying to switch to a call on a bluetooth headset will trigger this issue.
I'm with David... Every other app on my computer can do it, why does Mojang think they're different.
Nah, it happens with Wurm too (Java based) – both their online MMO and Unlimited releases.
We also had this issue at Sven Co-op, which uses Firelight's FMODEX for sound. Turns out we had to implement a listener for a "device change" event, then completely re-initialise the sound output.
It's almost always games it happens with though, as it takes additional effort to reset sound engines at the middle of runtime. Other applications get around the problem because they just offload their sound output to a built-in provider from the OS, like DirectSound, which handles these events for the app at a lower level. That makes it kinda on the fence as to whether its a genuine bug or feature request, because a specific implementation has to be worked out to resolve this.
(Not saying I don't want it resolved though. 🙂)
I am having this bug as well, but I found that pressing F3+T (Fn+F3+T on some computers) usually fixes it. It's the shortcut to reload the ressource pack, so be prepared for a bit of a lag spike for a few seconds!
Just here to confirm that F3 + T works like a charm to get the input working again. There is a waiting period as it reloads textures but it beats closing and reopening the entire client. Thanks to Nicolas for figuring out a workaround until Mojang decides not to give up on important issues anymore!
Also I can confirm that it affects version 20w21a, and will likely affect all versions to come, which isn't surprising.
I'm switching between two Bluetooth headsets (when one dies I swap it with the second one). And every time I switch the game sounds are gone. This is a little bit frustrating having to relaunch the game because of such an issue (thanks for the F3+T tip, I didn't know that). Especially a system that only has 3Gb of RAM and barely manages to handle Minecraft at all.
Workaround of F3+T does not work on Linux Mint 19.3 XFCE Edition. I am unable to change the audio device for Minecraft in the OS normally to be able to reload it through the game. See MC-201581 for more details.
Also see MC-201581 for more technical details. This isn't an issue with Java or LWJGL. Please see this thread for feedback from LWJGL developers: http://forum.lwjgl.org/index.php?topic=7081.0. Please confirm if this is an issue with the OpenAL Soft implementation.
This bug should be fixed to allow Minecraft to properly respect OS level changes to the sound output without a resource pack reload being required, as this workaround isn't always possible.
Also, can a Feature Enhancement be logged to have Minecraft Java Edition allow the user to use a "Default" audio device, as well as manually specify the audio device in the game client, as many other games do? I am unable to log this.
I would like to request to ownership this report
I thought I was a problem of my computer. Huh.
I am having a repeatable error with sound. If I lock the computer and/or turn off the HDMI monitor (sound output), sound does NOT resume with the game.
I also have the issue with HDMI sound output not working for MC after computer wakes up from sleep.
It's 2021... why is this still an issue?

In the next snapshot you will be able to change the device that the game uses for audio. For some I think this is a solution, but I'm considering it a workaround for now and will leave this issue open until the game can detect and switch automatically. <3
Bit of a problem with Windows, as well. for even Windows sounds, you have to switch back to proper output after sleepmode.
So, yah, still a problem in 2021 ;P (Not only a minecraft problem... but, hopefully a solution is on it's way)

It's also (still) present on Linux unfortunately :/ Realoding with F3+T works as a workaround... but that's not something I'd like to do. Is there a corresponding ticket for Linux?

I am not expecting this issue on Linux. What audio backend are you using? (PulseAudio/Pipewire iirc)

I'm running PulseAudio (default on Ubuntu 20.04).
I don't have sound in minecraft
Sennheizer hd560s + behringer 204hd
I don't think this is a Minecraft problem, as this is something that either the OS, the Drivers, or the sound library the game is using (paulscode?) should handle. I'm leaning towards the sound library, myself.