Fusion

 View Only
Expand all | Collapse all

No sound in Linux on Apple Silicon

  • 1.  No sound in Linux on Apple Silicon

    Posted May 19, 2023 09:09 AM

    Hello! I have MacBook Air M1, macOS Ventura 13.3.1 and VMware Fusion 13.0.2. Installed Fedora 38 from the image Fedora-Workstation-Live-aarch64-38-1.6.iso. In the system settings I try to check the sound. I press the ‘Test’ button, but I hear nothing. Sometimes some sounds come through. It looks like a stutter. I have the same problem on Ubuntu 23.04. Does anyone else have this problem?



  • 2.  RE: No sound in Linux on Apple Silicon

    Posted May 19, 2023 03:25 PM

    My sound works fine, though I find that I have to have it connected before booting.

    Did you install open-vm-tools, and did you build the VM using the instructions in the unofficial guide?



  • 3.  RE: No sound in Linux on Apple Silicon

    Posted May 19, 2023 04:26 PM
     wrote:

    My sound works fine, though I find that I have to have it connected before booting.

    Did you install open-vm-tools, and did you build the VM using the instructions in the unofficial guide?


    I don't understand what it means to build a virtual machine. I didn't see anything about it in the unofficial guide.
    By the way, in Fedora 38 open-vm-tools are installed automatically. It seems to me that just means that the package is installed by the system installer.

     

    [gnttz79xro@fedora ~]$ dnf list installed | grep open-vm
    open-vm-tools.aarch64                                12.1.5-3.fc38                      @anaconda              
    open-vm-tools-desktop.aarch64                        12.1.5-3.fc38                      @anaconda 

     



  • 4.  RE: No sound in Linux on Apple Silicon

    Posted May 22, 2023 06:08 AM

    I am having exact issues as well. I have tried multiple distros including Ubuntu, Fedora, Debian and NixOS and the behaviour is same.

    Basically, the sound stutters in the beginning for about 5-30 seconds and eventually starts playing normally. If you pause an audio/video for over 10 seconds and you play again, you get same behaviour.

    The mic behaves same way and it becomes pretty much useless.

    I do however notice that the audio works fine in some distros with older kernels (like Ubuntu 22.04). However, GPU acceleration is missing in those distros.

    Considering that USB cameras work fine, I suspect that USB headset/speakers/mic might work.

    It has been a blocker for me and I hope there are some workarounds.



  • 5.  RE: No sound in Linux on Apple Silicon

    Posted May 22, 2023 03:46 PM

     wrote:

    I am having exact issues as well. I have tried multiple distros including Ubuntu, Fedora, Debian and NixOS and the behaviour is same.


    Thanks for your feedback. I checked Ubuntu 22.04.2 (ubuntu-22.04.2-live-server-arm64.iso) and the sound really works there. I installed 22.10 (ubuntu-22.10-live-server-arm64.iso) and there is a problem with the sound. It seems to me that the point here is that in version 22.10 Ubuntu switched from PulseAudio to a PipeWire.

     

    On Ubuntu 22.10 I did the following:

    1. Open file

     

    sudo nano /usr/share/pipewire/pipewire.conf

     

    2. Found lines

     

    #default.clock.rate          = 48000
    #default.clock.allowed-rates = [ 48000 ]

     

    3. Replaced with

     

    default.clock.rate          = 44100
    default.clock.allowed-rates = [ 44100 ]​

     

    4. Reboot

     

    These actions seem to have helped to solve the sound problem on Ubuntu 22.10. For some reason, this does not work in Fedora 38.



  • 6.  RE: No sound in Linux on Apple Silicon

    Posted May 22, 2023 06:30 PM

    If I may ask, where did you find those instructions?

    Thanks.



  • 7.  RE: No sound in Linux on Apple Silicon

    Posted May 23, 2023 12:25 AM

     wrote:

    If I may ask, where did you find those instructions?

    Thanks.


    I found this solution here No Sound in VMware Fusion or VirtualBox VM's with Fedora 34 Gnome/KDE

    Unfortunately in Fedora 38 this solution did not help. I tried it in Ubuntu. I looked up information about the sound server using the command

    pactl info

    In ubuntu 22.04.2 I get this output

    Server String: /run/user/1000/pulse/native
    Library Protocol Version: 35
    Server Protocol Version: 35
    Is Local: yes
    Client Index: 8
    Tile Size: 65472
    User Name: gnttz79xro
    Host Name: ubuntu
    Server Name: pulseaudio
    Server Version: 15.99.1
    Default Sample Specification: s16le 2ch 44100Hz
    Default Channel Map: front-left,front-right
    Default Sink: alsa_output.pci-0000_01_01.0.analog-stereo
    Default Source: alsa_input.pci-0000_01_01.0.analog-stereo
    Cookie: c3ea:fdb0

     In ubuntu 22.10

    Server String: /run/user/1000/pulse/native
    Library Protocol Version: 35
    Server Protocol Version: 35
    Is Local: yes
    Client Index: 63
    Tile Size: 65472
    User Name: gnttz79xro
    Host Name: ubuntu
    Server Name: PulseAudio (on PipeWire 0.3.58)
    Server Version: 15.0.0
    Default Sample Specification: float32le 2ch 48000Hz
    Default Channel Map: front-left,front-right
    Default Sink: alsa_output.pci-0000_01_01.0.analog-stereo
    Default Source: alsa_input.pci-0000_01_01.0.analog-stereo
    Cookie: 88a6:3b3f

    I saw that the sample is different and tried to change it to 44100.



  • 8.  RE: No sound in Linux on Apple Silicon

    Posted May 23, 2023 05:09 AM

    It seems that Stuttering Audio (in Virtual Machine) works in Fedora 38. I checked it fixed the sound problem.



  • 9.  RE: No sound in Linux on Apple Silicon

    Posted May 23, 2023 02:29 PM

     This is great information, and I can confirm that it works on Fedora 38. Will this same solution work on Ubuntu or are the changes to the pipewire.conf file the you posted earlier the recommended method?

    I'll include this in the next version of the Companion Guide and credit you for finding the solution.

    Thanks.



  • 10.  RE: No sound in Linux on Apple Silicon

    Posted May 24, 2023 06:54 AM

    I can confirm as well that it works on Fedora 38. However, none of the suggestions work on Ubuntu 23.04.



  • 11.  RE: No sound in Linux on Apple Silicon

    Posted May 29, 2023 07:32 PM

    Fully confirming the observations in the post of abiosoft above concerning the stuttering issue in Debian, in my case Debian 12 (still RC, due to be released in 1st half of June). The solution proposed by gnttz79xro does improve things, but does not solve the issue. Also noteworthy is that I have no problem with audio in a Debian 12 VM running on my Intel MBP.



  • 12.  RE: No sound in Linux on Apple Silicon

    Posted May 29, 2023 07:55 PM

    If you have the ability to open this as a support request to VMware, it might be a good idea.

    There were issues in the Tech Preview about audio on Apple Silicon systems, perhaps this is more of the same. 

     have your folks heard anything or are aware of issues with audio working strangely on Fusion on Apple Silicon Macs vs Intel Macs?

     



  • 13.  RE: No sound in Linux on Apple Silicon

    Posted May 31, 2023 11:27 AM

    : Unfortunately my account does not provide the ability to open a support request.
    And yes, we've seen (heard) audio issues as of early in the Tech Preview. I expected that by now they would have been resolved. Will probably take some more time...



  • 14.  RE: No sound in Linux on Apple Silicon

    Posted May 31, 2023 01:59 PM

    Some sound related issues were fixed from the Tech Preview. It's possible they didn't get all of them.



  • 15.  RE: No sound in Linux on Apple Silicon

    Posted Jun 02, 2023 08:41 PM

    Hummm.... I screwed up a few things. Attempting to correct now.

    In this thread two solutions are proposed by gnttz79xro.
    The first one is to change settings in /usr/share/pipewire/pipewire.conf. That's the one I tried. It improved things but did not solve audio issues in Debian 12 RC.
    The second one contains a link to a resource that proposes to modify the WirePlumber configuration.

    What I now did was to undo the pipewire solution and instead implement the WirePlumber solution.
    I confirm that that one works great on Debian 12 RC4.

    Apologies for any confusion I may have caused.



  • 16.  RE: No sound in Linux on Apple Silicon

    Posted Aug 05, 2023 07:24 AM

    With the release of Linux kernel 6.2 support for Ubuntu 22.04, it appears to now be the best all round supported distro for Fusion on Apple Silicon devices.

    The audio works fine and the Linux kernel 6.2 brings graphics/GPU support.

    The kernel 6.2 can be installed with sudo apt install linux-image-generic-hwe-22.04.



  • 17.  RE: No sound in Linux on Apple Silicon

    Posted Aug 05, 2023 08:13 PM

    It does appear that Canonical has upgrade the HWE kernel for 22.04 to a 6.2 version. Until the last update, the HWE kernel was a 5.19 version. The 6.2 kernel in general works better on arm64 architectures due to improvements made in 6.0 and later. And by using a 6.2 kernel, they have included many fixes that they (in many cases poorly) back ported to 5.19.

    I strongly disagree that Ubuntu is the "best all around supported distro on Apple Silicon devices". in the approximately 2 years since I've been working with Linux under Fusion on Apple Silicon, it is the worst mainstream distribution that I've worked with on Apple Silicon. It by far has given me the most problems. Many of these problem have caused Ubuntu to be unusable. You can find others on this board will echo this opinion.

    IMO they do not take arm64 seriously - their time is spent on x64 and any work on arm64 appears to be an after-thought. Canonical does not provide an out-of-the-box arm64 version of Ubuntu Desktop. Their 23.04 and 23.10 daily desktop builds for arm64 (and other) archiectrures are broken (nothing to do with Fusion) and have been for over 2 months now (they know about it but have not said when they're going to fix it). They've improperly back-ported kernel "fixes" to their 5.19 kernels in 22.10 that have broken working virtual machines (taking over 4 months to deliver a fix).

    OpenSUSE Tumbleweed and Fedora have been much more stable and reliable distros for arm64 than Ubuntu from my experience. Even Debian bookworm and RHEL 9 have been better than Ubuntu. Admittedly Ubuntu is getting better, but they've got to prove over the next couple of releases that they've cleaned up their act and deserve my recommendation.



  • 18.  RE: No sound in Linux on Apple Silicon

    Posted Aug 07, 2023 06:19 AM

    I guess I probably didn't choose the right words and I agree with your experience with Ubuntu.

    I have a use-case for audio (including mic) and graphics acceleration in a Linux VM and none of the distros have been as supported on Fusion as I'd like. The older kernel supports audio while the newer (6.x) kernel support graphics.

    The pipewire audio fix works in the new kernel for some (like Debian and Fedora) but there's still some lag in the audio.

    The HWE kernel 6.2. for Ubuntu 22.04 is the first time I got audio (without input lag) and graphics to work properly, hence my statement. It was mainly for my use-case.

    I totally agree that Ubuntu has been treating arm64/aarch64 as an afterthought. It is still required to manually convert a server image to desktop image to reliably boot Ubuntu on Fusion.

    A distro I am yet to try is OpenSUSE, I will give it a shot.

    Thanks.



  • 19.  RE: No sound in Linux on Apple Silicon

    Posted Dec 09, 2023 03:13 PM

    Hello everyone,
    I definitively solved the problem by switching from pipewire to pulseaudio for audio management!
    I have a Macbook Pro with Apple Silicon and Vmware Fusion 13.5.0.
    I tested this solution on Ubuntu 23.10 virtual machine.

    Here are the steps to follow:

     

     

    # Installing the "pulseaudio pulseaudio-utils" packages automatically 
    # removes the "pipewire-alsa pipewire-audio" packages.
    # Alternatively you can remove the "pipewire-alsa pipewire-audio" packages 
    # which will install the "pulseaudio pulseaudio-utils" packages.
    # Example: sudo apt remove -y pipewire-alsa pipewire-audio
    
    sudo apt install -y pulseaudio pulseaudio-utils
    
    # Disable pipewire and enable pulseaudio
    sudo systemctl --global disable pipewire-pulse.service pipewire-pulse.socket pipewire
    sudo systemctl --global mask pipewire-pulse.service pipewire-pulse.socket pipewire
    
    sudo systemctl --global unmask pulseaudio.socket pulseaudio.service
    sudo systemctl --global enable pulseaudio.socket pulseaudio.service
    
    reboot

     

     

    After restarting the VM via the command:
    pactl info

    You can observe the actual use of pulseaudio by viewing the line:

     

     

    Server Name: pulseaudio

     

     

     The audio is now perfect in all applications! You can play an audio file, video file or go to YouTube with Firefox without problems!

    PS:
    I also tested Fedora 39.
    On Fedora 39 I have not encountered any audio problems with pipewire.
    However, for those who have problems, even on Fedora it is possible to easily switch from pipewire to pulseaudio.
    Here are the steps to follow:

    sudo dnf install --allowerasing pulseaudio pulseaudio-utils
    
    sudo systemctl --global disable pipewire-pulse.service pipewire-pulse.socket pipewire
    sudo systemctl --global mask pipewire-pulse.service pipewire-pulse.socket pipewire
    
    sudo systemctl --global unmask pulseaudio.socket pulseaudio.service
    sudo systemctl --global enable pulseaudio.socket pulseaudio.service
    reboot

     

     



  • 20.  RE: No sound in Linux on Apple Silicon

    Posted Dec 30, 2023 07:47 AM

    Replacing pipewire with pulseaudio works perfectly.

    However, it breaks Wayland screen recording capabilities for whatever reason. In case screen recording is a required feature for anyone, you may want to stick to Fedora 39 which works fine after runniung sudo dnf upgrade.

    Does anyone know why Fedora works after updating, could it be due to kernel 6.6.x ?



  • 21.  RE: No sound in Linux on Apple Silicon

    Posted Dec 30, 2023 03:07 PM

    From reading some things about Fedora, Fedora 39 contains a newer version of pipewire. Thats my most likely guess about why it’s working better. 



  • 22.  RE: No sound in Linux on Apple Silicon

    Posted Dec 31, 2023 04:53 AM

    I can confirm it is indeed the version of pipewire.

    When I tried Debian Testing that also got pipewire 1.0.0 like Fedora 39, sound works perfectly.

    Thanks.



  • 23.  RE: No sound in Linux on Apple Silicon

    Posted Dec 31, 2023 05:48 AM

    I can also confirm that in Fedora 39 pipewire works correctly.
    Unfortunately the same cannot be said for Ubuntu. In Ubuntu 23.10 only by replacing pipewire with pulseaudio can you get perfectly working audio.



  • 24.  RE: No sound in Linux on Apple Silicon

    Posted Dec 31, 2023 05:59 AM

    Finally I can also use audio in my Ubuntu virtual machine!
    Thanks so much to maxmori for the guide.