VMware Communities
gnttz79xro
Contributor
Contributor

No sound in Linux on Apple Silicon

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?

Labels (2)
0 Kudos
23 Replies
ColoradoMarmot
Champion
Champion

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?

0 Kudos
gnttz79xro
Contributor
Contributor

@ColoradoMarmot 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 @anaconda 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 

 

0 Kudos
abiosoft
Contributor
Contributor

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.

0 Kudos
gnttz79xro
Contributor
Contributor


@abiosoft 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.

0 Kudos
abiosoft
Contributor
Contributor

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

Thanks.

0 Kudos
gnttz79xro
Contributor
Contributor


@abiosoft 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.

0 Kudos
gnttz79xro
Contributor
Contributor

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

0 Kudos
Technogeezer
Immortal
Immortal

@gnttz79xro 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.

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
0 Kudos
abiosoft
Contributor
Contributor

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

0 Kudos
toce
Contributor
Contributor

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.

0 Kudos
Technogeezer
Immortal
Immortal

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. 

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

 

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
0 Kudos
toce
Contributor
Contributor

@Technogeezer: 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...

0 Kudos
Technogeezer
Immortal
Immortal

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

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
0 Kudos
toce
Contributor
Contributor

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.

0 Kudos
abiosoft
Contributor
Contributor

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.

Technogeezer
Immortal
Immortal

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.

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
0 Kudos
abiosoft
Contributor
Contributor

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.

0 Kudos
maxmori
Contributor
Contributor

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

 

 

abiosoft
Contributor
Contributor

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 ?

0 Kudos