We help IT Professionals succeed at work.

Linux Sound Issue in VMWare

Gary Case
Gary Case used Ask the Experts™
on
I've installed several Linux distributions in virtual machines running under VMWare Workstation v15.5  [Elementary v5.0,  Linux Mint v19.2,  Ubuntu LTS v18.04.4,  and Ubuntu v19.10

NONE of them have sound when they boot up -- they all display the following message during the boot process:

Linux Sound Issue in VMWare
The "FIX" is very simple:   After the OS is running, just go to VM - Settings - Sound Card and click on the "Connected" box and all will be well.

But it'd be nice if this wasn't necessary.   Anyone know how to resolve it?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Gary CaseRetired
Most Valuable Expert 2013
Top Expert 2009

Author

Commented:
By the way, they are all set to "Connect at power on", and I've tried both "Use default host sound card" and "Specify host sound card"  in the sound card settings for the VM

And VMWare Tools is installed in all of them [The VMWare version in Elementary and Mint;  the open source version in the Ubuntu distros]
Peter HutchisonSenior Network Systems Specialist

Commented:
TRy this simple fix in the VMX file for Linux to enable sound.
Change sound.fileName="-1" and adding a new line: sound.autodetect="TRUE"

See https://www.tenforums.com/virtualization/118790-no-sound-vmware-linux-mint.html
Gary CaseRetired
Most Valuable Expert 2013
Top Expert 2009

Author

Commented:
Thanks for what sounded like a simple fix UNTIL the following …

(1)  I opened the VMX file and it turns out it already has both of those lines in it.

(2)  Just for grins, I moved those two lines to the end (as suggested in the link you provided) … but it didn't make any difference.

So no joy.   As I noted, it's no big deal … just a few seconds to enable the sound after the VM boots; but it just seems like it should work :-)
Peter HutchisonSenior Network Systems Specialist

Commented:
You could try adding a delay before starting the sound service in the service init file:
https://stackoverflow.com/questions/43001223/how-to-ensure-that-there-is-a-delay-before-a-service-is-started-in-systemd
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
Probably busted again!
Gary CaseRetired
Most Valuable Expert 2013
Top Expert 2009

Author

Commented:
I compared the sound-related lines in the VMX files for the Linux systems I've been trying and the Windows VM's I have (which all work perfectly).    The Windows VM's all have a line that says  sound.virtualDev = "hdaudio"

So, just for grins, I added this line to one of my Linux VM's VMX file.

Now when I boot I get this message during the boot process:

"Error in creating sound stream.   Recording may not work"

BUT … sound now works fine :-)
Retired
Most Valuable Expert 2013
Top Expert 2009
Commented:
I'm marking this solved, since adding the line I noted in my last post results in sound working fine on Linux distros … although you do get the note about recording not working.