-
Notifications
You must be signed in to change notification settings - Fork 86
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
/etc/asound.conf in the runtime does not provide default PulseAudio module device #623
Comments
I could confirm that this patch fixed the issue. --- pressure-vessel/runtime.c~ 2023-09-29 02:32:13.000000000 +0900
+++ pressure-vessel/runtime.c 2023-09-29 03:49:52.226273507 +0900
@@ -7833,8 +7833,8 @@
/* Make the PulseAudio driver the default.
* We do this unconditionally when we are under Flatpak for parity
* with the freedesktop.org Platform. */
- const gchar *alsa_config = "pcm.!default pulse\n"
- "ctl.!default pulse\n";
+ const gchar *alsa_config = "pcm.!default { type pulse }\n"
+ "ctl.!default { type pulse }\n";
if (bwrap != NULL)
{ |
This will be addressed a different way through SDL3 updates in CS2 and Dota2. |
Thank you for your reply. I understand the CS2 and Dota2 issues will be addressed in the SDL3 updates, however should we stay |
@smcv The CS2 and Dota2's sound issues are fixed for now (btw, congrats and gj for all developers and contributors). However, this issue still can be observed. Below is the diff of the outputs of --- unpatched 2023-09-29 09:59:53.965990593 +0900
+++ patched 2023-09-29 10:07:31.445481581 +0900
@@ -14,6 +14,7 @@
Plugin for channel upmix (4,6,8)
vdownmix
Plugin for channel downmix (stereo) with a simple spacialization
+default
hw:CARD=HDMI,DEV=3
HDA ATI HDMI, HDMI 0
Direct hardware device without any conversions The patched runtime has the To be precise, I invoked Finally, excuse me for bothering you all. |
If this is correct and portable to all OSs, then I think we probably do want this change. @TTimo or @kisak-valve, please could you reopen this for now? However, the asound.conf that is currently written out worked on the OSs I tested it on (most likely Debian, Ubuntu and/or Arch) and I'm concerned that making it work on @nm004's Fedora 38 could have the side-effect of making it regress elsewhere, so this will need more testing. |
The only reason why this was useful for CS2 and Dota 2 was that they had their own copy of SDL, which had accidentally been compiled without PulseAudio audio output support. This has now been fixed in the affected games. The wrong SDL build meant that they could only output audio via libasound (alsa-lib) or Pipewire, with libasound as a higher priority, and Pipewire only as an opt-in (because of libsdl-org/SDL#7541: there's currently no good way to detect whether Pipewire is in the Pulseaudio-like audio-server role, or whether it's just there for its video capabilities). Now that CS2 and Dota have been fixed, this is a much lower severity and priority: it's only beneficial for the minority of games that output directly via libasound, instead of via some middleware library like SDL or OpenAL that can auto-detect Pulseaudio on its own. The example that I know about is Shadowrun Returns (#371). |
libasound configuration syntax is not amazingly well-documented, but as far as I can tell, the
has the semantics of: whatever the The sniper container runtime defines the device named For the configuration that @nm004 proposes:
the semantics are a bit different. Instead of making The proposed configuration matches what appears in |
@smcv Thank you for your reply and giving me correct information.
In that sense, below could be the correct configuration if I am not mistaken.
The That configuration (with
|
I think if we change this at all, we want to use what @nm004 initially suggested (which is functionally equivalent to I haven't been able to reproduce the problem described here, though, and neither has a colleague. I downloaded the
... and the result was that |
SDL's CS2/Dota 2 were only using the I think we should still try what @nm004 suggested, but not as part of the same hotfix as fixing #624. |
I tested the same case too, and could see the same result as you do. I don't have any idea why |
Today's I don't know why that was advantageous for SDL3 either, but moving closer to what's in |
Since the original reproducer for this was some misconfigured versions of CS2 and Dota 2 that are no longer available, and we don't know a way to reproduce the bug with a game that works correctly, I think we can close this now. |
Your system information
steamapps/common/SteamLinuxRuntime_sniper/VERSIONS.txt
?Please describe your issue in as much detail as possible:
/etc/asound.conf
in the container currently contains the following content, which does not work as expected: cannot get PulseAudio module as the default ALSA device, which ends in the game having no sound.Writing this to
~/.asoundrc
did not work either.The game has sound by writing the following to
~/.asoundrc
that is the semantically same as the above.I think we need to fix this code to produce the
/etc/asound.conf
with the correct syntax.Steps for reproducing this issue:
~/.asoundrc
Expected result
~/.asoundrc
Related issues
The text was updated successfully, but these errors were encountered: