Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old May 25th, 2006   #1
Roner
5 Cups of Ubuntu
 
Join Date: Apr 2006
Beans: 26
VMPlayer and ALSA

I have had a nagging problem with VMPlayer: it uses OSS for sound. That means that unless OSS is enabled and loaded, I get the annoying /dev/dsp not found message when the player starts; as I was moving to Dapper, many updates broke OSS and made the problem reappear. Additionally, this means that while another application is using OSS and the player tries to access it, it will hang with an error message.

To enable OSS to begin with, follow the first section of this thread:
http://www.ubuntuforums.org/showthre...light=oss2jack

The best solution for me was adapted from this thread on the vmware forums; it uses the alsa-oss package and enables VMPlayer to use ALSA for sound.

1. Install VMPlayer and create your image. I was greatly helped by this guide; browse the rest of the thread for instructions on using qemu without wine.

After you have a working image and preliminary installation of the guest OS:

2. Get the alsa-oss package:
Code:
sudo apt-get install alsa-oss
3. Ensure that the /usr/lib/libaoss.so.0.0.0 library is setuid:
Code:
sudo chmod +s /usr/lib/libaoss.so.*
4. Rename the VMPlayer bin file:
Code:
sudo mv /usr/bin/vmplayer /usr/bin/vmplayerorig
5. Create a new VMPlayer bin file:
Code:
sudo vi /usr/bin/vmplayer
Copy and paste the following into the file:
Code:
#!/bin/bash
LD_PRELOAD=libaoss.so exec /usr/bin/vmplayerorig "$@"
Make the new file executable:
Code:
sudo chmod +x /usr/bin/vmplayer
That's it. In the Multimedia Systems Selector choose either ALSA or Autodetect, and you will have sound in VMPlayer, and no hangs.
Roner is offline   Reply With Quote
Old June 11th, 2006   #2
flibble
5 Cups of Ubuntu
 
Join Date: Feb 2005
Beans: 29
Smile Re: VMPlayer and ALSA

Fixed it for me. Thanks for your work!
flibble is offline   Reply With Quote
Old June 11th, 2006   #3
Rizado
Way Too Much Ubuntu
 
Join Date: Nov 2005
Location: Sweden
Beans: 253
Kubuntu 9.10 Karmic Koala
Send a message via AIM to Rizado
Re: VMPlayer and ALSA

I tried this but now I can't open or edit my windows xp vm.
Code:
Unable to get information for disk (IDE 0:0)
Unable to open file "/home/username/.vmware/Windows XP Professional/Windows XP Professional.vmdk": Fil för stor.
Fil för stor = File too large. I didn't want to change the original message.

I can open it if I start vmwareorig.

Last edited by Rizado; June 17th, 2006 at 05:50 AM..
Rizado is offline   Reply With Quote
Old June 16th, 2006   #4
Roner
5 Cups of Ubuntu
 
Join Date: Apr 2006
Beans: 26
Re: VMPlayer and ALSA

Rizado, this fix is specifically for VMPlayer. VMWare server has the option to choose the sound device. I prefer the player simply because it seems to be the same speed of the server, and the interface is not as cluttered. The server gives you, naturally, much more for the money you don't pay.

Grundlebug, I am glad I helped. This problem is application-specific, and as I said, was already solved in the VMWare server. Generally speaking, this workaround helps with many applications that default to OSS.
Roner is offline   Reply With Quote
Old July 18th, 2006   #5
Sir_Brizz
Spilled the Beans
 
Join Date: Jun 2006
My beans are hidden!
Re: VMPlayer and ALSA

Quote:
Originally Posted by Rizado View Post
I tried this but now I can't open or edit my windows xp vm.
Code:
Unable to get information for disk (IDE 0:0)
Unable to open file "/home/username/.vmware/Windows XP Professional/Windows XP Professional.vmdk": Fil för stor.
Fil för stor = File too large. I didn't want to change the original message.

I can open it if I start vmwareorig.
How did you fix this? I'm having the same problem and have no clue what to look for next...
Sir_Brizz is offline   Reply With Quote
Old July 23rd, 2006   #6
Rizado
Way Too Much Ubuntu
 
Join Date: Nov 2005
Location: Sweden
Beans: 253
Kubuntu 9.10 Karmic Koala
Send a message via AIM to Rizado
Re: VMPlayer and ALSA

Quote:
Originally Posted by Sir_Brizz View Post
How did you fix this? I'm having the same problem and have no clue what to look for next...
I couldn't fix it, had to reinstall windows, but it was a fresh install anyway. I've seen the same problem on vmware forums but noone knew how to fix it. The audio is crap using alsa anyway so I'm back to oss.
Rizado is offline   Reply With Quote
Old April 25th, 2008   #7
lobius
First Cup of Ubuntu
 
Join Date: Apr 2008
Beans: 1
Re: VMPlayer and ALSA

I found I had to give the full name of the library to get it working, i.e.

LD_PRELOAD=libaoss.so.0.0.0 exec /usr/bin/vmplayer "$@"
lobius is offline   Reply With Quote
Old June 5th, 2008   #8
lviggiani
A Carafe of Ubuntu
 
lviggiani's Avatar
 
Join Date: Mar 2008
Location: Somma Lombardo - Italy
Beans: 152
Ubuntu 9.04 Jaunty Jackalope
Re: VMPlayer and ALSA

Hi, I'm trying to make it work on Hardy but it doesn't...

I followed your guide. The only difference is that instead of renaming wmplayer I did a new script called /usr/bin/vmplayer-alsa that contains:

Code:
#!/bin/bash
LD_PRELOAD=libaoss.so exec /usr/bin/vmplayer "$@"
the rest is as in your guide.

Then I run it:
Code:
vmplayer-alsa <path to my vmx file>
It starts but I get the message that the sound device is (actually) busy.

That was working with Gusty...

In the vmx file I have the following settings:

Code:
sound.present = "TRUE"
sound.virtualDev = "es1371"
sound.device = /dev/snd/pcmC0D0c
and that was working with Gusty.
Any idea?
lviggiani is offline   Reply With Quote
Old June 16th, 2006   #9
Grundlebug
First Cup of Ubuntu
 
Join Date: May 2006
My beans are hidden!
Re: VMPlayer and ALSA

I know this is three weeks old, but thanks for posting it! Got my VMPlayer sound going.

When's Ubuntu going to fully switch to ALSA?!? I've been cleaning up little sound problems all over the place.
Grundlebug is offline   Reply With Quote
Old June 17th, 2006   #10
Rizado
Way Too Much Ubuntu
 
Join Date: Nov 2005
Location: Sweden
Beans: 253
Kubuntu 9.10 Karmic Koala
Send a message via AIM to Rizado
Re: VMPlayer and ALSA

Well I have sound through the kernel oss emulation but if I use that I can't use anything else. Will this guide make it mixable or is it just for people with sound problems?

EDIT: Ok I got mixing working now, don't know what the problem was but now it works. But the sound is horrible! It's crackeling and too slow and just crap. Is it like this for you too?

BTW it's no problem getting vmware to work with this guide. The steps are the same.

Last edited by Rizado; June 17th, 2006 at 05:39 AM..
Rizado is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:55 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry