Sunday, 9 August 2009

Making Wine sound work with PulseAudio on Ubuntu - properly

Wine sounds in Ubuntu has had a problem for a while now since they introduced to PulseAudio sound server. There are a lot of kludgy workarounds on the Internet that will get the sound working for one particular application, but the side effect is that it stops it working for everything else. And you lose pulseaudio's ability to move sound streams between sound cards and sound servers.

There is a way of fixing it properly, and that is to run a version of Wine with a native Pulseaudio driver installed. The code exists, but due to the politics of Open Source it hasn't been included in the main upstream codebase.

Since I can't stand kludgy workarounds I decided to take it upon myself to create a wine package with the pulseaudio driver in place and now that is available on my PPA.

It is targeted at the Karmic Koala release, which contains the required version of PulseAudio. Can I ask all those currently testing the new Ubuntu release to try out the package and see if it improves matter for you. Everybody else will have to wait until October :)

If you do try out the software can you report back your experiences in Launchpad

https://bugs.launchpad.net/wine/+bug/371897

The more data we collect, the more evidence we have that this should be included in Ubuntu as standard. And of course if you have problems I can work with upstream to get them sorted.

You can install the software from my PPA

https://launchpad.net/~neil-aldur/+archive/ppa

To install the software follow the instructions on Launchpad (https://help.launchpad.net/Packaging/PPA/InstallingSoftware)

Read more about the Winepulse patches and why they're not in the mainline

38 comments:

WEBagentene said...

this did wonders for my spotify. better sound and no crashes..
Nice work

Arjen said...

Works great. Thanks!

Anonymous said...

Thanks Neil that worked a treat!

Anonymous said...

Thanks works like a charm!!!!!!!!!!

David said...

Thanks a bunch! Worked for me too.

Here's what I did for anyone wondering how to do it:

- Installed the repositories as explained on your site
- removed wine (sudo apt-get remove wine)
- updated apt (sudo apt-get update)
- installed your patch (sudo apt-get install wine1.2)
- ran winecfg, clicked the Audio tab
- Chose 'pulseaudio' as the sound driver, unchecked ALSA.
- Clicked Apply and OK.

I then ran Spotify and it worked straight away.

Gorsh said...

ohhh! I followed the steps described by David... and Spotify is working like a charm!

thank you VERY much!

AP said...

Works better than ALSA, but still some clipping in the sound, which started to annoy after a while. EsounD works in terms of sound quality - but when I'm using EsounD, Spotify does not start playing after pausing a song.

Anonymous said...

Brilliant, thank you :)

WEBagentene said...

i got 2 machines with this setup now, both running ubuntu 9.10, had some clipping on one of the machines, but after upgrading from 8.04 (the LTS) to 9.10 the problem was gone.
Can post more details if anybody want it...

lost@void said...

THNX a million. I've got now a running spotify in all my computers.

mvkorpel said...

I was experiencing stutter and complete failure of sound in Spotify. This fix worked perfectly!

Johan said...

Thank you, thank you, thank you!!!!

Jussi said...

Thank you Neil!

Spotify works now perfectly on my Ubuntu Karmic.

KI said...

Sweet!
... and thanx to Davids comment as well. (First time Linux user today... had to get Spotify) :)

Niklas said...

Thanx! Needed it for spotify, neither OSS nor ALSA worked at all. Works excellent with my ubuntu karmic!

Timo said...

Now my Spotify works perfectly with Ubuntu 9.10 Karmic.

Thank you!

dlind said...

Hello, Neil!

Really nice work! Made my day :-)

/David

Nemno said...

Thanks Neil,

Now i can play Red Alert 3 on wine with sound.
I spend a day downloading wine applying patches and i didn't get it working. It seemed to crash on a sound issue. I had
tried alsa, oss. starting with padsp and without, killing pulseaudio etc..etc...

So thank you

aslak said...

Works perfect!

Thanks

Anonymous said...

Omg, it actually works perfectly now!
Awsome job man!

Anonymous said...

Lot of thanks! Really

Eric said...

Thank you very much!

My Ubuntu experience has been flawless since I made the jump starting with v6.10.

It's only in v9.10 that I experienced glitches... I hope things get better in v10.

Anonymous said...

works perfectly... thank you so much

Anonymous said...

Absolute magic!!! Worked a charm.

Anonymous said...

Thankyou so much! hello spotify!

Anonymous said...

aaahhh... the bliss. sounds perfect. no more of that crackling, braking horror. thanks for the post!

Anonymous said...

awesome, ty so much

ajmedwards said...

Amazing!

Thank you so so so much!

David's comments really helped too...

Joseph Schwenker said...

Is this project still alive? I am using it currently, and am wondering if it is keeping up with WINE's updates.

Neil Wilson said...

It's keeping up with the version in the ubuntu repository. So if you're Beta testing Ubuntu Lucid Lynx, you'll currently find 1.1.41 with winepulse 0.36 in my PPA.

Having said that Lucid with the standard ALSA plugin seems to perform pretty well, and is probably worth testing out.

Cressida said...

You are my new favourite person in the world ever. THANK YOU SO MUCH!! :)

Anonymous said...

Thanks a lot again! I'm puzzled that the PulseAudio for Wine has not made it even to the Ubuntu 10.04! How much longer can it take before we get this out of box on Ubuntu...

Andreas Knapp said...

Great, now the sound in Spotify (under Wine) is just as good as under Windows 7, maybe even better. I used Axl Rose's voice in Paradise City that was extremely distorted with ALSA or OSS, with Pulse Audio it’s clear and really good. Even house music with lots of base is now really good. I have Spotify Premium so I get the highest bitrates possible from Spotify. Great work!

David Steele said...

This seems to have worked brilliantly, although as a very new Ubuntu User I found it tricky to understand the terminal and its proper uses. I got there in the end!
Special thanks to "David" - After following the update info I followed his instructions on getting rid of the old Wine and installing the new one. Great help. Thanks.

TraineeTheorist said...

Just wanted to say thanks very much for that Neil, works fantastically and has really improved my everyday ubuntu use!

Joseph Schwenker said...

Are you sure that you are updating the PPA to have use the latest version of Wine? I keep seeing new things in OMG! Ubuntu about Wine having support for icons in executable files, but I'm not seeing an update in the PPA. Is the icon support only in the development version, and if so, are you just using the stable version for the PPA?

Neil Wilson said...

Yes, the PPA versions are simply a rebuild of the version in the main archive for that version of Ubuntu - with the appropriate pulse audio driver enabled.

Any further updates to Wine will now be in Maverick, where hopefully we'll finally get the all new sound infrastructure based on OpenAL we've been waiting for!

Adam said...

Wow sincerely thanks, I did this because my Warcraft kept crashing with ALSA and now not only is my game no longer crashing but its FPS went up. Hope you'll continue to either provide version updates or at least tell the developers at wine to get this implemented immediately. =D