Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No sound in other programs when pausing a Linux native game (e.g. Minecraft) #2

Open
reteov opened this issue Oct 9, 2023 · 3 comments

Comments

@reteov
Copy link

reteov commented Oct 9, 2023

I have encountered an issue when using this script with Minecraft... when using this script to pause a running Minecraft client, any other audio being played (I use Pipewire) is muted (the clip/video/program continues running). This seems to be one-way; audio in MC does not shut down when I pause the other app.

@Zerodya
Copy link
Owner

Zerodya commented Oct 10, 2023

I've tested this and I'm able to replicate the issue not just with Minecraft, but with SuperTuxKart too, so my guess is that this problem is related to how some linux native games handle their sound implementation. They probably use native libraries to implement sound and by stopping the game process, it also stops the sound for every other program in linux.

I don't have control over the sound implementation of these games and there is no direct way to resume only a specific thread within a process in linux from another process, so unfortunately this doesn't seem fixable.

Running the games in gamescope doesn't fix this either. I use Pipewire too so it would be useful if someone else could test this with a different sound server like Pulseaudio and Jack, but I highly doubt that Pipewire is the issue.

@Zerodya Zerodya changed the title Sounds with Certain Programs No sound in other programs when pausing a Linux native game (e.g. Minecraft) Oct 10, 2023
@Zerodya
Copy link
Owner

Zerodya commented Nov 23, 2023

but I highly doubt that Pipewire is the issue.

As it turns out, Pipeware was in fact the issue 😅

I've been in contact with @Merrit, the developer behind Nyrna (which is an awesome utility to suspend games in X11 desktops that I recommend you check out), and they were able to pin down the issue to Pipewire#3509.

Will have to wait until that issue is solved or a workaround is found.

Related issue at Merrit/nyrna#199

@reteov
Copy link
Author

reteov commented Nov 24, 2023

Looking at the thread, it looks like the issue will not be resolved without introducing latency to the audio, so it probably won't get fixed. ☹ Thanks for looking into it, at least it wasn't anything to do with hyprfreeze.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants