#[0.0.7] Audio issue on Linux

82 messages ยท Page 1 of 1 (latest)

azure depot
#

the meme, yes

I'm on Ubuntu 22.04 with XFCE.

I have two audio devices: an HDMI screen and bluetooth headphones. I start the game with HD 250BT selected, and I get no audio (audio is of course enabled in the game). However, switching the audio output device to Starship and then back to HD 250BT makes the audio work (I can hear the banger soundtrack)


Temporary fix: after startup, manually switch the game to the default output device

brave apex
#

Make sure the game is outputting to that device

#

The game defaults to the first audio output instead of the default but it's not a bug the devs can fix

azure depot
#

why is it not fixable? ๐Ÿ˜ฆ

brave apex
#

I can't pull up the old bug report because Discord's search is terrible, but it's a bug with a framework they can't touch

dapper agate
#

That temp fix worked for me. Kind of a pain though.

quick ironBOT
#

Unfortunately afterlooking into the issue, there is little we can do to fix this specific issue for Linux.

#

๐Ÿšซ We've reviewed your bug report, but unfortunately, we won't be able to fix it at this time. We appreciate your help in identifying issues in our game and hope you continue to enjoy playing!

west flume
#

I'm experiencing this issue, but I can't see anywhere to change where it's outputting? is it a linux setting we're talking about?

dapper agate
brave apex
#

Yes, in your audio manager

west flume
#

ok, cool. Thanks! I'll check it out!

#

that did work, unfortunate that it can't be fix easily ๐Ÿ˜ฆ minor issue though, Thanks for the quick response!

pallid bloom
#

Remember you can always force using proton, this bug is fixed if you use it.

dapper agate
#

I was able fix this permanently on my system by disabling the other non-used audio controllers.

plucky laurel
#

same issue here. fixed by forcing proton

pallid bloom
limpid star
#

could it be "fixed" with a pipewire config? forcing by name that output to be on default? i don't know if this is possible tbh i don't know how powerful pipewire can be

terse ember
#

I found a workaround for the audio issue by disabling other audio controllers. However, it would be great if the game could include an option to select the output device directly in the settings, similar to what many other games offer. This would provide a more user-friendly solution for players experiencing audio problems.

gaunt lava
#

really frustrating that this is marked as "won't fix", even though the game claims to support Linux. I don't have the sound settings mentioned earlier in the thread, and Proton resulted in 1FPS. Don't want to tweak my settings for another hour. Was unfortunately a frustrating start and thus I've refunded the game for now.

opaque elm
#

Seems a small ask to add a dropdown for the discovered audio controllers in the audio settings, but ๐Ÿคทโ€โ™‚๏ธ we're pretty resourceful so it's nbd

#

Although I understand that's not really a bugfix as much as a feature add ๐Ÿ™‚

sturdy narwhal
#

Yeah I'm going to have to say this shouldn't say that it supports linux if you have to finangle around with the audio for a while. Marking it as won't fix is a huge deal for a lot of people.

trim flower
#

The issue is that unity doesn't allow us to select the audio device

#

We'd have to switch to an entirely different audio system (like fmod)

#

which might happen in the future but we don't want to promise something we can't hold

austere sierra
#

audio issues is a common problem with a whole lot of games. infact i have had to do stuff like this when on windows. this doesnt make it less compatible. ANYWAYS if your using KDE plasma disable your other audio source by following these image.

brave apex
#

Hello fellow KDE user

austere sierra
#

if your using pipewire and dont want to disable your thing you can find the game (FMOD Ex App.) in a patchbay like helvum. and drag it so the lines go to the output you want. it can even go to multiple outputs if your playing with friends with headphones

austere sierra
austere sierra
fresh umbra
#

[POP!os]Ok, fixed my problem too. However, the fix is a little bit different as the unity seems to be doing some stuff that i am not aware off. But selecting another device in the sound control panel and reselecting the correct one, the sound now works.

frank flint
pallid bloom
#

Okay, i made a shell script to fix this issue, it seems to work perfectly!

#!/bin/sh

# Get the name of the first available audio output device
first_sink=$(pactl list short sinks | awk 'NR==1 {print $2}')

# Get the name of the current default audio output device
original_sink=$(pactl get-default-sink)

# Launch the game in the background
steam steam://rungameid/2162800 &

# Wait for 10 seconds to give the game time to start
sleep 10

# Use the first available audio output device
pactl set-default-sink $first_sink

# Use the original default audio output device
pactl set-default-sink $original_sink

If you want, you should be able to launch the shell script as a non-steam game too.

#

Some of these tips should probably go in #linux-specific too

proper hearth
#

How do you reconcile the claim that 'Unity cannot select a default audio device for Linux' with the fact that other Unity games that run natively on Linux such as Hollow Knight, Tabletop Simulator, Getting Over It, Blasphemous, Plague Inc: Evolved, 7 Days to Die, Graveyard Keeper, Dusk, Darkwood, and Superhot have audio that works out of the box?

azure depot
#

Yeah, I didn't have any audio issues with Hollow Knight and Getting Over It

willow cedar
#

its a unity engine bug. the bug was fixed in 2022.3.27f1, and the game currently runs 2022.3.10 , i dont know the dev environment he uses, but i assume he has something that breaks if he updates the game engine, and i dont blame him for not wanting to. complaining that other games can do it @proper hearth isnt the answer, game dev is actually hard, and linux audio continues to be duct tape and faith.

trim flower
#

We might look into upgrading unity but we ran into a lot of issues last time

azure depot
#

to be clear, I totally understand that this is a minor issue and it may not be trivial to solve ๐Ÿ‘ cross-platform support is hard

pallid bloom
#

Yeah np! Glad it works.

#

I've still been trying to figure out if i can fix it using steam launch options

#

If i ever do i'll share it here!

hushed oxide
#

Can confirm the "bug" I was experiencing involving audio on linux was indeed the game defaulting to a different audio device. Disabled other audio devices (they don't work anyway, I don't need them as options) and it now defaults to the only working audio device and voila, sound.

Can also confirm the switching audio device to one of the others, then back to the one I want causes sound to start working in-game (even without disabling other audio devices). That script previously mentioned should work if you don't want to disable those other audio outputs (like if you have speakers and headphones and like to switch between the two)

trim flower
#

Linked this bug to #๐Ÿ”troubleshooting

proper hearth
#

Are the issues in upgrading unity caused by updating to a too recent/unstable version? Would the latest LTS (2022.3.42f1) be impossible? It seems like that would include the bugfix from 2022.3.27f1 and I wouldn't imagine it would cause breaking changes.

proper hearth
#

From what I can gather changes should be rather minimal within 2022 LTS updates (documentation section for upgrades addresses only changes between LTS year/major version, not within the year - which seems to imply they should be relatively trivial) but I am admittedly no unity developer.

proper hearth
#

The bugfix in question for reference

pallid bloom
#

Yeah, LTS releases should have no feature differences, just bug or security fixes, so idk but upgrading to that probably would be fine?

trim flower
#

We had some bad experiences with upgrading (game crashing constantly) so we are very careful

brave apex
#

Personally I'd rather deal with needing to manually switch it than have the game start crashing frequently ๐Ÿ˜…

proper hearth
#

Well hopefully it's not one or the other. I just wanted to bring this to attention.

eager maple
#

I think the ideal solution would be to have an audio output picker in the audio settings, so that the user can select the desired sink if it was not picked automatically.

eager maple
brave apex
eager maple
#

TIL: https://qa.fmod.com/t/is-unitys-audio-system-actually-fmod-core/17463
IG that's why the app reports itself as FMOD then?

eager maple
#

Toggling the default sink did not work for me, but grabbing the client ID for the game and moving the sink explicitly did```bash
#!/bin/bash

Get a list of all clients with sink connections

CLIENTS=$(pactl -f json list sink-inputs)

Extract just the client sink ID and binary name

CLIENTS=$(echo "$CLIENTS" | jq 'map({ index: .index, name: .properties."application.process.binary" })')

Get the ID of the Shapez 2 binary, if it exists

SHAPEZ_ID=$(echo "$CLIENTS" | jq '.[] | select(.name | startswith("shapez 2")) | .index')

if [[ -z "$SHAPEZ_ID" ]]; then
echo "No app found"
else
echo "Moving sink input for Shapez: $SHAPEZ_ID"
pactl move-sink-input "${SHAPEZ_ID}" 0
fi

proven hamlet
#

Requires third party tool, jq

brave apex
#

This is (potentially) fixed in 0.0.8, by one report ๐Ÿ˜…

#

No promises

proven hamlet
#

Which is fine, unix is built on toolchains, but you should list your dependencies โค๏ธ

eager maple
#

I kind of assumed it was included by default on Ubuntu, but it appears that actually not many packages depend on it (directly) ๐Ÿค”

#

Ah, yes, that would be why I have it installed

proven hamlet
#

mmhmm mmhmm

trim flower
#

Could you try and see if it persists in 0.0.8? ( #โœจupdates ) It should be fixed in that version

mortal pike
#

Same here. It chooses this instead of the system wide default.

brave apex
#

See if 0.0.8 fixes it ( #โœจupdates )

mortal pike
eager maple
#

Can confirm 0.0.8 correctly selects the default audio device

eager maple
# eager maple Ah, yes, that would be why I have it installed

Actually, I was mistaken about this ๐Ÿ‘€
The manually installed dependent was obscuring the fact that jq is indeed installed automatically in Ubuntu. That's been bothering me for the last two days because I could have sworn it was a requirement for desktop ๐Ÿ˜…
But yes, on other systems it might not be installed automatically

azure depot
#

Strange, has there been an update or something? It works for me on 0.0.7 now

willow cedar
#

As of the beta 0.0.8, i can confirm the game now uses the default audio device on my pc, which was previously not working as expected. Thank you @trim flower

willow cedar
# azure depot Strange, has there been an update or something? It works for me on 0.0.7 now

the bug relates to unity not picking the default device, but picking the first device listed. it is possible that your audio devices initialised in a different order resulting in your default device being the first device, while at other times being not the first device. i just tested and it is still broken in 0.0.7, but updating to the 0.0.8 beta via steam did fix it for me

azure depot
#

ah