No sound with multiple applications running

Hey guys!

I recently switched from Ubuntu to Manjaro KDE.

It works just fine but i have a problem. I downloaded minecraft since i wanted to play with my friends and i experienced that when i start minecraft after discord, minecraft will not have sound. If i start minecraft first it will have sound but other applications like discord or firefox will not have any sound and i can only fix it by restarting my computer. I searched for answers on many sites but i could not find any relatable questions or answers to this problem.

How can i possibly fix this?

Can you check in pavucontrol if those applications can actually connect and send audio to the PulseAudio server? (Go to the “Playback” tab and see if you see Firefox, etc. there, and if they’re actually playing anything.)

I checked it and in both scenarios every application shows up but minecraft does not.

The minecraft icon does not have a speaker icon on the tray while firefox and discord do have the icon.

I am not familiar with KDE to know exactly what package is displaying audio in system tray
but I expect it is showing audio streams in PulseAudio

If minecraft is not shown as playing through PulseAudio it is probably configured to connect direct to an audio device in ALSA, which would usually give exclusive use of the audio device to one package at a time. Other audio streams that normally play from PulseAudio would be unable to access the audio device in use for minecraft audio

If minecraft settings allow PulseAudio to be used instead of ALSA all packages should be able to share of the audio device

If you cannot see any way to change audio to PulseAudio set audio output to ‘default’ instead of a named audio device

I managed to fix the problem. I installed minecraft with sudo privileges and it installed the whole game in the root directory. I removed the game files from the root directory then reinstalled it without sudo and it worked just fine. Btw thanks for the help!