Wine and Raspberry Pi: no sound in games

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Post Reply
nru1979
Newbie
Newbie
Posts: 3
Joined: Thu Nov 05, 2020 3:23 am

Wine and Raspberry Pi: no sound in games

Post by nru1979 » Thu Nov 05, 2020 3:55 am

Hello,

I have been using wine for ages and reading a lot, but I am now facing a wall on this topic.

I hope this post can help people who want to install Wine on Raspberry Pi as well.

First of all, yes, Wine works on a Raspberry Pi with Qemu.
Second, the performance is acceptable on a RPI 3B+. I could make Heroes of Might and Magic 3 Demo run fluidly, so it is not a dead idea to make run Wine on a Raspberry without exagear.
Third, even though there are several guides on internet, it is a real challenge to make it work.

What i did is:
1) Install from PINN the RPI-x86 image from mikerr. This images comes with a wheezy chroot which is unusable, but it has the advantage of being a stretch base and being a 1G/3G kernel. It saves a whole lot of time if you dont want to recompile the kernel.
2) I followed novaspirit guide for debootstrapping a stretch x86 chroot. it is quite straightforward and at the end you should get leafpad or xarclock running without any problems.
3) Installed wine debian package and winetricks.
4) Rebooted out of Pixel by selecting the right option in raspi-config. I had to do that to do a X --configure. X --configure seemed not to work but it actually refreshed my availlable resolution, allowing me to play games in full screen instead of an emulated desktop.
5) Installed HOMM3 demo -- at this point HOMM3 should run slowly with no sound
6) Tweaked settings in Winetricks. I am not sure which one did the job (trial-error) but i have a narrow list from my winetricks.log:
- cfc = disable
- csmt = on (but i am pretty sure it is not this one)
- cfc = disable
- ddr = gdi
- glsl = enabled
- gsm = 0
- hidewineexports=disable
- multisampling=enabled
- mwo=disable (but enabled it back later, no performance difference)
- orm=backbuffer
- winxp
7) Heroes should work fluidly now.
8) did several tries with winehq stable 5.0 and wine debian 1.8, no real difference
9) tried sound alsa, oss and pulse. I broke my wine machine several times but i could conclude this:
- Alsa does not detect anything within wine machine. Problem with Qemu? Has anyone solved that problem?
- Oss definately made me break my wine machine several times. I dropped that idea.
- Pulse is the closest of what works. I ran my pulse on a tcp server in my main machine and did not start any server on my wine machine:
- Sounds actually play with aplay. Sounds also play with winecfg if set to sound=pulse. But if ever I set sound=pulse in winetricks, my test game heroes 3 demo does some kind of deadlock in a black screen without any wine debug message.
- I can switch back to Alsa after installing the pulse server, same working: Alsa detects the remote server, plays sound with aplay, winecfg works if sound=alsa is set, black screen and lock if played within a game.

Has anyone succeeded in making sounds work?

Another question, not related to this post (might remake a post with it if I see people are interested), has any compatibility list been made with wine-qemu-rpi? I can foresee it is quite narrow: I did not succeed in making diablo 2 work nor Heroes 4, neither Fallout 2 (it runs but does not recognize any keyboard or mouse).

Thanks in advance!

spoon0042
Level 5
Level 5
Posts: 404
Joined: Thu Dec 24, 2009 11:00 am

Re: Wine and Raspberry Pi: no sound in games

Post by spoon0042 » Thu Nov 05, 2020 1:44 pm

Assuming the pi is multi-core there's a known issue running H3, it may be necessary to run as 'taskset -c 0 wine Heroes3.exe'. Or it could be unrelated but it's something to try.

https://bugs.winehq.org/show_bug.cgi?id=14055#c68

nru1979
Newbie
Newbie
Posts: 3
Joined: Thu Nov 05, 2020 3:23 am

Re: Wine and Raspberry Pi: no sound in games

Post by nru1979 » Sat Nov 07, 2020 6:01 am

Hello,

seems that sound issue happens in every game I try. It might be a problem with dsound but no matter if I use dsound native or builtin, it still deadlocks.

btw noticed that performance toggle for raspberry (see 6 in my first post) is ddr=gdi. it certainly changes performance from very poor to fair. Also had to raspi-config ==> Advanced ==>A7 GL Driver ==> Full-KMS to be able to play in full screen.

I will be trying other games, if I manage to get one work with pulseaudio client/server, I will keep you informed.

Post Reply