Search Unity

Bug No sound from unity application

Discussion in 'Linux' started by chowspacetime, Sep 22, 2023.

  1. chowspacetime

    chowspacetime

    Joined:
    Sep 21, 2023
    Posts:
    5
    Hello, new user here... I have no sound from the unity editor, inspector, or game.
    I have checked that unity is not muted, audio is enabled in settings, volume is not 0.
    If I open sound files they can play with a different application but the don't play inside the unity editor.
    Other applications/chrome play sound normally.
    I don't see any errors in console.
    I have tried oog and wav files.
    In Ubuntu sound settings I dont see "unity" but I see "fmod ex" and the volume is high.
    I have tried opening a new project.
    I am using Ubuntu 22.04 and unity 2022 LTS.
    Anyone have this problem or know the solution? Thanks.
     
    Last edited: Sep 22, 2023
  2. ChiwTheNeko

    ChiwTheNeko

    Joined:
    Mar 24, 2022
    Posts:
    136
    It's normal for Unity to register as FMOD Ex.
    Which format are your sound files? Did you try with a Wav file?
     
  3. chowspacetime

    chowspacetime

    Joined:
    Sep 21, 2023
    Posts:
    5
    Ok good to know that fmod ex is normal. I tried with oog and wave files but had same issue on both audio file types.
     
  4. ChiwTheNeko

    ChiwTheNeko

    Joined:
    Mar 24, 2022
    Posts:
    136
    If you installed Unity using the unofficial flatpak package then it might be a right issue. You can use an app named Flatseal to check if Unity is allowed to access audio. If you installed Unity using the official package then this won't be an issue.

    If everything else fails then the only thing left to do is to check Pulse Audio. I tried doing it on my machine but I can't because I'm on Fedora and Pulse Audio was replaced by Pipe Wire (I checked and Unity 2022 audio works here). So I can't guide you on how to do that. But I can recommend this page which has very good explanation on how to diagnose audio issue. The list-sink-inputs thing is probably what you need. Good luck.
     
  5. chowspacetime

    chowspacetime

    Joined:
    Sep 21, 2023
    Posts:
    5
    Thanks for the suggestion - although I will note that I have not found the solution yet.

    My Unity was installed with unity hub and instructions on main site - not flatpak.

    I checked with pulse audio, with:
    pacmd list-sink-inputs
    and I did not see anything out of ordinary regarding the mute/volume settings of the FMOD Ex App.
     
  6. stayBlind

    stayBlind

    Joined:
    Dec 14, 2020
    Posts:
    6
    I am also running into this. I believe it started when I upgraded from 2021.3.28f1. I am running Pop!_OS 22.04 LTS. I have tried switching audio output to no avail. When I build the game for Linux, I can not hear any audio. The Windows and OSX versions are fine.

    Unity was installed via Unity Hub. Version: 2022.3.10f1
     
    Last edited: Sep 27, 2023
  7. stayBlind

    stayBlind

    Joined:
    Dec 14, 2020
    Posts:
    6
    Downgrading to 2021.3.28f1 fixed my audio issues.
     
    chowspacetime likes this.
  8. chowspacetime

    chowspacetime

    Joined:
    Sep 21, 2023
    Posts:
    5
    Thanks, downgrading from Unity 2022.3.9f1 to Unity 2021.3.30f1 worked for me.
     
  9. ChiwTheNeko

    ChiwTheNeko

    Joined:
    Mar 24, 2022
    Posts:
    136
    You should report a bug. Especially since the player is also affected and not just the editor. Unity will want to fix this.
     
    chowspacetime likes this.
  10. stayBlind

    stayBlind

    Joined:
    Dec 14, 2020
    Posts:
    6
    Thanks. I already did and meant to add that to my update, but forgot. They said "has been confirmed and transferred to the appropriate internal development team at Unity."
     
    chowspacetime likes this.
  11. chowspacetime

    chowspacetime

    Joined:
    Sep 21, 2023
    Posts:
    5
    If you have any link to the bug so I can follow the official fix, please let me know.
     
    sfjohansson likes this.
  12. Lucafro

    Lucafro

    Joined:
    Jun 18, 2018
    Posts:
    3
    I'm also running into this issue in Unity 2022.3.5f1. No audio at all from Unity. Tried everything I can think of and it's not solveable for me. Will downgrade to the 2021 LTS version and try that
     
  13. Irina-uk

    Irina-uk

    Joined:
    Feb 14, 2014
    Posts:
    62
    Unity 2022.3.13f1 there is no sound in the editor. Building WebGl project - sound ok, focus work correct ok. POS OS last version. Please Help. 2019.4.40f1 - Editor sound work ok, Building WebGl project focus not correct work.

    Fix Problem Sound PopOS.
    1-Open Pulse Audio
    2-Open Configuration
    3-(Configuration) Disable HDA Nvidia
    4-(Configuration-Soundcard Mainboard Intel)
    5-Editor Sound Play OK - Unity 2022.3.13f1

    Sorry Up post. Error actual. FMOD send sound HDMI Port, Please Help set default FMOD output sound Speaker Audio.
     
    Last edited: Nov 18, 2023
    stayBlind likes this.
  14. stayBlind

    stayBlind

    Joined:
    Dec 14, 2020
    Posts:
    6
    Sorry, I am just now seeing your post. Unfortunately, the link that Unity emailed me does not even give me access to views the ticket:

    No Access

    You don't have permission to view this portal.
     
  15. grbulat

    grbulat

    Joined:
    Jan 11, 2022
    Posts:
    2
    Same here!
    Unity 2022.3.15f1 and higher.
    Ubuntu 22.04.3
    pacmd list-sink-inputs
    shows:
    0 sink input(s) available.


    No issues in Unity 2022.2.12f1 and
    pacmd list-sink-inputs
    shows:

    1 sink input(s) available.
    index: 28

    Any update from Unity team?
     
  16. Alnoroid

    Alnoroid

    Joined:
    Aug 22, 2013
    Posts:
    1
    Got exactly the same problem... I am on Ubuntu 22.04, using unity 2022.3.13f1. First of all - I have no idea how the hell it worked, but I changed output sound configuration from 5.1 to Analog Stereo Output - and sound is back!

    EDIT:
    And after some time it breaks again...
    Changing settings back to 5.1.. And the sound is working again.. So, it seems ubuntu correctly sets audio outputs for a time if you change settings, and then something redefines them again.
     
    Last edited: Dec 18, 2023
  17. danniekorsgaard

    danniekorsgaard

    Joined:
    Apr 13, 2022
    Posts:
    1
    Have also encountered this bug in version 2022.3.10f1. In most cases it could be fixed by installing pavucontrol, selecting Playback tab and choosing the correct output sink for FMod Ex.

    In one case we dont see FMod Ex when the unity app is running and pacmd list-sink-inputs is empty. Will try to downgrade to see if this solves the issue.
     
    Last edited: Dec 22, 2023
  18. Hayashitsukigin

    Hayashitsukigin

    Joined:
    May 24, 2018
    Posts:
    1
    Same problem(Unity 2022.3.16.f1 & Unity 2022.3.17.f1)
    But I can add a few weird details, clicking play won't play audio, but if I keep certain buttons on the screen checked, like the buttons on Inspector and the ones in the red box below:

    Keep these buttons selected and the audio will start playing. This must be a bug of the editor.
     
    Last edited: Jan 12, 2024
  19. Esteban_Noxfall

    Esteban_Noxfall

    Joined:
    Mar 22, 2018
    Posts:
    3
    I can confirm this is still happening in Unity 2021.3.34f1. At least in standalone builds. It was a known issue for 2021.3.32f1 (release notes) but it disappeared in the next versions without a fix.
    I had to downgrade to .30 to fix it.
     
  20. babaliaris

    babaliaris

    Joined:
    Apr 21, 2013
    Posts:
    40
    Hello guys. In my case, the audio was being sent to the wrong sink:

    Code (CSharp):
    1. index: 186
    2.         driver: <protocol-native.c>
    3.         flags:
    4.         state: RUNNING
    5.         sink: 0 <alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo-output>
    6.         volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
    7.                 balance 0.00
    8.         muted: no
    9.         current latency: 35.00 ms
    10.         requested latency: 32.00 ms
    11.         sample spec: s16le 2ch 48000Hz
    12.         channel map: front-left,front-right
    13.                      Stereo
    14.         resample method: (null)
    15.         module: 11
    16.         client: 129 <FMOD Ex App>
    17.         properties:
    18.                 media.name = "Mixer Stream"
    19.                 application.name = "FMOD Ex App"
    20.                 native-protocol.peer = "UNIX socket client"
    21.                 native-protocol.version = "35"
    22.                 application.process.id = "2318"
    23.                 application.process.user = "babaliaris"
    24.                 application.process.host = "babaliaris"
    25.                 application.process.binary = "Unity"
    26.                 application.language = "en_US.UTF-8"
    27.                 window.x11.display = ":0"
    28.                 application.process.machine_id = "6891a18dc77a4702935d4d10fe72deec"
    29.                 application.process.session_id = "2"
    30.                 module-stream-restore.id = "sink-input-by-application-name:FMOD Ex App"
    31.  
    wrong sink: sink: 0 <alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo-output> (Audio Interface)

    should be:
    sink: 2 <alsa_output.usb-0600_USBFC1-MAX-00.analog-stereo> (My headphones)

    So this was not a Unity bug (at least for me). I had to change the output device of the FMOD X from my desktop environment settings (KDE PLASMA) like in the following pictures:

     
  21. karliss_coldwild

    karliss_coldwild

    Joined:
    Oct 1, 2020
    Posts:
    602
    When you start a regular software it should by choose whatever you have configured as default system output device. If the Unity intentionally overrides the default and chooses wrong device, while all other software are using the correct sound output device, that's a Unity problem.

    I am guessing that this is the issue https://issuetracker.unity3d.com/issues/linux-no-audio-output-when-playing-audio

    The release notes for 2021.3.31 mentions "Fixed a bug with surround sound hardware not being detected on Linux". I am guessing that part of the "fix" involved forcefully picking any surround output device or requesting a device with surround capabilities instead of using default one. Which is equally likely to cause issues as fixing them, since there is no guarantee that that's the one you have currently attached speakers or headphones to.
     
    andersemil likes this.