Help changing Minecraft Java Edition Audio Stream

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
TheOneBlackMage
Level 1
Level 1
Posts: 18
Joined: Mon Sep 24, 2018 7:07 pm

Help changing Minecraft Java Edition Audio Stream

Post by TheOneBlackMage »

I believe this is the same issue this thread describes. I've searched quite a bit, but I can't find a solution that works.

This is what my Volume Control looks like when Minecraft Java Edition 1.16.3 is running:
Image

If I click the dropdown on "Steelseries Arctis 7 Analog Audio", I can see all of my audio output devices, but if I select any of them, it doesn't change to it, but just stays on the default.

I've read that there are some bugs with Minecraft that aren't being fixed, where you have to force reload using F3+T in order for audio source to update: I've tried upgrading my Java version to OpenJDK 11.0.8, but this hasn't helped.

Code: Select all

$java -version
openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment (build 11.0.8+10-post-Ubuntu-0ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.8+10-post-Ubuntu-0ubuntu118.04.1, mixed mode, sharing)
Checking my directory, I have lwjgl 3.2.2:

Code: Select all

~/.minecraft/libraries/org/lwjgl/lwjgl$ ls
3.2.2
I tried downgrading this to 2.8.0 as per the bug, by creating a new profile and changing the JSON file to point to the 2.8.0 jar file, and I overwrote the native files in ~/.minecraft/bin/profilefolder

Minecraft launches with the new profile, but I don't know if it's taking the older version of lwjgl, and I still can't switch my audio stream.

This seems overly complicated for what I'm trying to do, and reading the other bugs, I feel like this should have been fixed in newer versions of lwjgl.

Does anyone else have this issue, and is there a working solution for 1.16.3?

Thanks!
TheOneBlackMage
Level 1
Level 1
Posts: 18
Joined: Mon Sep 24, 2018 7:07 pm

Re: Help changing Minecraft Java Edition Audio Stream

Post by TheOneBlackMage »

FYI one workaround that I've found is to use this method to force the default audio sink by running this:

Code: Select all

pacmd set-default-sink "alsa_output.usb-Schiit_Audio_Schiit_Modi_3-00.iec958-stereo"
Or in /etc/pulse/default.pa, edit the set-default-sink line so it will persist through a reboot:

Code: Select all

set-default-sink "alsa_output.usb-Schiit_Audio_Schiit_Modi_3-00.iec958-stereo"
This sets the default audio device when Minecraft starts to the one I want, but then there is no way to change it, if I switch between headphones, audio devices, etc.
User avatar
MrEen
Level 22
Level 22
Posts: 16673
Joined: Mon Jun 12, 2017 8:39 pm

Re: Help changing Minecraft Java Edition Audio Stream

Post by MrEen »

Hi TheOneBlackMage,

I believe the source of your issue is outside of PulseAudio, but hopefully we can still use it to find an acceptable workaround. I say hopefully because I believe what you tried with the Playback tab of pavucontrol does this same thing we're about to try.

While Minecraft is running, run this in the terminal:

Code: Select all

pacmd list-sink-inputs
With luck, it shouldn't be hard to determine which index number we want to move. Then you'd run something like this to change it:

Code: Select all

pacmd move-sink-input 12 0
In the above case, 12 is the index of the sink-input we want to move, and 0 is the index of the sink we want the sound moved to. Running pacmd list-sinks will show which sink indexes are available.

And now that I've typed all that, I'm betting it wont work. But give it a shot just in case.

Good luck.
TheOneBlackMage
Level 1
Level 1
Posts: 18
Joined: Mon Sep 24, 2018 7:07 pm

Re: Help changing Minecraft Java Edition Audio Stream

Post by TheOneBlackMage »

Hi MrEen,

Thanks for the suggestion. OK so I launched Minecraft, and here is the sink for it:

Code: Select all

1 sink input(s) available.
    index: 580
    	media.name = "Playback Stream"
		application.name = "java"
I ran "pacmd list-sinks" and I see the following:

Code: Select all

4 sink(s) available.
    index: 0
	name: <alsa_output.usb-SteelSeries_SteelSeries_Arctis_7-00.analog-stereo>
    index: 1
	name: <alsa_output.pci-0000_00_1b.0.iec958-stereo>
    index: 2
    	name: <alsa_output.usb-Schiit_Audio_Schiit_Modi_3-00.iec958-stereo>
    index: 3
	name: <alsa_output.usb-Grace_Design_SDAC-00.iec958-stereo>
I tried running your suggestion, and I got this:

Code: Select all

$ pacmd move-sink-input 580 0
Moved failed.
I get the same error regardless of which sink I try. So it looks like it's the same problem as in the GUI.
User avatar
MrEen
Level 22
Level 22
Posts: 16673
Joined: Mon Jun 12, 2017 8:39 pm

Re: Help changing Minecraft Java Edition Audio Stream

Post by MrEen »

TheOneBlackMage wrote:
Sun Oct 04, 2020 6:55 pm
I get the same error regardless of which sink I try. So it looks like it's the same problem as in the GUI.
Indeed it is. From the links you posted, it appears to be an issue with Java/Operating system. Unfortunately either of those is beyond my capability to help with.

Did you try F3+T (or Fn+F3+T) and did it do anything?
TheOneBlackMage
Level 1
Level 1
Posts: 18
Joined: Mon Sep 24, 2018 7:07 pm

Re: Help changing Minecraft Java Edition Audio Stream

Post by TheOneBlackMage »

It doesn't even get that far. If I could switch the audio device in Linux, then I could force reload in Minecraft using that key combo.

I can force a reload in game, but it still won't let me change the audio device out of game.
User avatar
MrEen
Level 22
Level 22
Posts: 16673
Joined: Mon Jun 12, 2017 8:39 pm

Re: Help changing Minecraft Java Edition Audio Stream

Post by MrEen »

Okay, gotcha. From your four sinks above, which one is it playing to, and which do you want to move it to?
TheOneBlackMage
Level 1
Level 1
Posts: 18
Joined: Mon Sep 24, 2018 7:07 pm

Re: Help changing Minecraft Java Edition Audio Stream

Post by TheOneBlackMage »

I like to change it around. Sometimes I'll be using the Steelseries if I need to walk around with a wireless headset.

For better audio quality, or if I'm going to stream on Twitch/Discord, I like to use the Schiit Modi 3 with my Beyerdynamic Fox microphone.

Right now I've got audio successfully defaulted to the Schiit Modi 3, which works for Minecraft, and for any other game I can change the audio in the Volume Control.
Last edited by TheOneBlackMage on Sun Oct 04, 2020 7:39 pm, edited 2 times in total.
User avatar
MrEen
Level 22
Level 22
Posts: 16673
Joined: Mon Jun 12, 2017 8:39 pm

Re: Help changing Minecraft Java Edition Audio Stream

Post by MrEen »

Okay, why I was asking was building on something you sort of tried earlier.

So right now you're on sink 2. To try to change to the Arctic, run this:

Code: Select all

pacmd set-default-sink alsa_output.usb-SteelSeries_SteelSeries_Arctis_7-00.analog-stereo
Then try a force reload in the game.

I'm wondering if that might work to pick up the change.
TheOneBlackMage
Level 1
Level 1
Posts: 18
Joined: Mon Sep 24, 2018 7:07 pm

Re: Help changing Minecraft Java Edition Audio Stream

Post by TheOneBlackMage »

Yes that worked. As soon as I reloaded with T+F3 in the Minecraft client, the audio device updated to the Steelseries.
User avatar
MrEen
Level 22
Level 22
Posts: 16673
Joined: Mon Jun 12, 2017 8:39 pm

Re: Help changing Minecraft Java Edition Audio Stream

Post by MrEen »

Okay, at least you have a workaround until the actual issue is sorted out.

I'm afraid that's the best I can do for you myself. Hopefully someone might be able to help with the Java aspect of this.
TheOneBlackMage
Level 1
Level 1
Posts: 18
Joined: Mon Sep 24, 2018 7:07 pm

Re: Help changing Minecraft Java Edition Audio Stream

Post by TheOneBlackMage »

Yup thanks. I put in a ticket with Mojang to ask about the bug... I'm not sure how to approach getting an actual fix for this. I think it's in the lwjgl integration... so maybe I should take it up with them?
User avatar
MrEen
Level 22
Level 22
Posts: 16673
Joined: Mon Jun 12, 2017 8:39 pm

Re: Help changing Minecraft Java Edition Audio Stream

Post by MrEen »

Well, this link you posted seemed to be resolved with a weird set of steps about 4 posts up from the bottom.

Personally, I really don't understand any of it myself. But it looks like the last post was saying the error they got after trying the steps was fixed by going to OpenJDK. That last step you've done, so maybe the other stuff there will get you over the final hurdle. I'd certainly make a Timeshift snapshot before trying it myself, but you may understand it all better than I do.
TheOneBlackMage
Level 1
Level 1
Posts: 18
Joined: Mon Sep 24, 2018 7:07 pm

Re: Help changing Minecraft Java Edition Audio Stream

Post by TheOneBlackMage »

MrEen wrote:
Sun Oct 04, 2020 8:52 pm
Well, this link you posted seemed to be resolved with a weird set of steps about 4 posts up from the bottom.
I tried to follow that, and it didn't work for me. Plus it has you downgrade to a really old version of LWJGL, and I feel like it should work with the 3.x code line somehow, as the 2.x line was depreciated in 2015.
User avatar
MrEen
Level 22
Level 22
Posts: 16673
Joined: Mon Jun 12, 2017 8:39 pm

Re: Help changing Minecraft Java Edition Audio Stream

Post by MrEen »

Gotcha. I failed to even look at the dates involved. Of course everything there will be outdated now. :(

I'd say go ahead and contact the lwjgl people as well. Someone is not accessing PulseAudio properly causing this issue.
TheOneBlackMage
Level 1
Level 1
Posts: 18
Joined: Mon Sep 24, 2018 7:07 pm

Re: Help changing Minecraft Java Edition Audio Stream

Post by TheOneBlackMage »

Started a thread here to see what they say: http://forum.lwjgl.org/index.php?topic=7081.0

I've also got a ticket open with Mojang.

We'll see who points the finger.
User avatar
MrEen
Level 22
Level 22
Posts: 16673
Joined: Mon Jun 12, 2017 8:39 pm

Re: Help changing Minecraft Java Edition Audio Stream

Post by MrEen »

Well done!

And we both know they'll each point their finger at the other. :lol:
TheOneBlackMage
Level 1
Level 1
Posts: 18
Joined: Mon Sep 24, 2018 7:07 pm

Re: Help changing Minecraft Java Edition Audio Stream

Post by TheOneBlackMage »

Got an update from the LWJGL forums. Logged a Mojang Bug:

https://bugs.mojang.com/browse/MC-201581
User avatar
MrEen
Level 22
Level 22
Posts: 16673
Joined: Mon Jun 12, 2017 8:39 pm

Re: Help changing Minecraft Java Edition Audio Stream

Post by MrEen »

Hey! Progress on multiple fronts. I'm honestly rather shocked! :shock:

Hope this leads somewhere positive! :D
TheOneBlackMage
Level 1
Level 1
Posts: 18
Joined: Mon Sep 24, 2018 7:07 pm

Re: Help changing Minecraft Java Edition Audio Stream

Post by TheOneBlackMage »

I'm very persistent :lol:

I'll keep an eye on the Mojang bug MC-44055 as that seems to be the one they are linking all the duplicates to. I've added my comments, so hopefully that can help move things forward.
Post Reply

Return to “Software & Applications”