VMware Communities > VMTN > Desktop Products > VMware Workstation > Discussions
5 Replies Last post: Nov 10, 2008 6:45 PM by Aaron44126
Reply

VMWare PulseAudio HOWTO

Aug 17, 2008 6:21 PM

Click to view ritterwolf's profile Enthusiast ritterwolf 49 posts since
Jul 23, 2006
Disclaimer: I accept no resposnsibility for any horrible things that happen to you, your computer, and those around you as a result of you following this HOWTO. It may cause you, or those around you, to get fired, kill your dog, insult your mother or make your computer explode and various other things that you might have thought impossible. You follow these instruction at your own risk.

I did this with Workstation 6.5 RC1 build 110068 on Ubuntu 8.04 64-bit.

With that out of the way, the instructions

1. shut down all your virtual machines
2. remove OSS emulation from ALSA, by adding the following lines to the bottom of /etc/modprobe.d/blacklist-oss

blacklist snd_pcm_oss
blacklist snd_mixer_oss
blacklist snd_seq_oss

3. unload those modules

$ sudo modprobe -r snd_pcm_oss
$ sudo modprobe -r snd_mixer_oss
$ sudo modprobe -r snd_seq_oss

4. we move the real vmware-vmx executable aside, and create a wrapper script

$ cd /usr/lib/vmware/bin
$ sudo mv vmware-vmx vmware-vmx.real
$ sudo touch vmware-vmx

edit this new vmware-vmx file in your favorite text editor, remembering to start is as root, eg 'sudo vim vmware-vmx'
        • start: vmware-vmx ----
#!/bin/bash

padsp $0.real "$@"
        • end: vmware-vmx ----

5. Now to set the required permissions on the wrapper script.

$ sudo chmod a+x,u+s vmware-vmx

6. Now to set the permissions on the library used to send OSS calls to PulseAudio.

$ sudo chmod u+s /usr/lib/libpulsedsp.so

That's it!

I tested this by playing music out of rhythmbox, and logging into a Windows XP guest. When I heard that dreaded login sound, I knew it was all working.

If you get stuttering sound, do the following:

$ sudo adduser $USER pulse-access
$ sudo adduser $USER pulse-rt

and add the following lines to $HOME/.pulse/daemon.conf

        • start: daemon.conf
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 5
default-fragments = 8
default-fragment-size-msec = 5
resample-method = speex-float-3
        • end: daemon.conf

restart the daemon, and stuttering should be better. Try tuning the values in daemon.conf if there is still stuttering.
Reply Re: VMWare PulseAudio HOWTO Oct 9, 2008 7:53 AM
Click to view sseremeth's profile Novice sseremeth 5 posts since
Jan 10, 2006
Anyone get this working with vmplayer (on Ubuntu Hardy)? I'm having no luck.
Reply Re: VMWare PulseAudio HOWTO Nov 4, 2008 4:59 AM
Click to view dowhurst's profile Lurker dowhurst 1 posts since
Nov 4, 2008

I did this with VMware 6.5.0 and Ubuntu 8.0.4.1 32bit exactly as described yet do not get sound. The guest WinXP is set to autodetect sound. No sound is detected. Pulsed is running so I've obviously got some difference going on here. 32 bit vs 64 bit should not make a difference based on your procedure. Not sure why padsp didn't provide the answer.

Thanks for your procedure though! It is a start.

Dow

Reply Re: VMWare PulseAudio HOWTO Nov 4, 2008 2:39 PM
in response to: dowhurst
Click to view ritterwolf's profile Enthusiast ritterwolf 49 posts since
Jul 23, 2006

Interesting. I only use 32-bitLinux in VMs, so I can't really help.The only thing I can suggest is rebooting to make sure there's no OSS compatibility in the kernel.

I've got it working with Workstation 6.5 final and Ubuntu 8.10 now, using those exact instructions.

Reply Re: VMWare PulseAudio HOWTO Nov 8, 2008 10:46 PM
in response to: dowhurst
Click to view HNH90's profile Lurker HNH90 1 posts since
May 24, 2007
Hi,

I think that you should set the sound card "/dev/dsp" manually on your virtual machine settings.
VMware WS can't detect the sound card after unloading the modules "snd_oss_*" because "/dev/dsp" is automatically deleted when these modules are unloaded on recent Linux distributions.

I got sound with VMware WS 6.5.0 and PulseAudio 0.9.8 in Fedora 8 on 32bit box after changing the setting to "/dev/dsp".
(I didn't get sound with "Auto Detect". )
Reply Re: VMWare PulseAudio HOWTO Nov 10, 2008 6:45 PM
Click to view Aaron44126's profile Novice Aaron44126 27 posts since
Dec 20, 2005

Any other suggestions to fix the stuttering?

I got VMware working with PulseAudio using the information here with no trouble, but audio coming from guests makes a terrible stuttering sound. I tried adding the recommended stuff to daemon.conf and even changing the values but it doesn't seem to make any difference. :-P

I still prefer the stuttering to VMware complaining that the audio device is in use all the time, so thanks for this info!

Actions