iXit / wine-nine-standalone

Build Gallium Nine support on top of an existing WINE installation
GNU Lesser General Public License v2.1
272 stars 23 forks source link

No sound in Dragon Age: Origins when Gallium Nine is active in Proton #26

Closed cyro666 closed 5 years ago

cyro666 commented 5 years ago

There's a very weird issue where the sound will not work when I activate Gallium Nine using Proton. I tried versions 4.2-2 and 3.7-8. Deactivating and using wined3d will bring back the sound.

Native Direct3D 9 v0.4.0.294-release is active.
For more information visit https://github.com/iXit/wine-nine-standalone
mesa: for the -simplifycfg-sink-common option: may only occur zero or one times!
mesa: for the -global-isel-abort option: may only occur zero or one times!
mmap() failed: Cannot allocate memory
Failed to create permanent mapping for memfd region with ID = 2434629491
mmap() failed: Cannot allocate memory
Failed to create permanent mapping for memfd region with ID = 1098982661
Ignoring received block reference with non-registered memfd ID = 1098982661
mmap() failed: Cannot allocate memory
Failed to create permanent mapping for memfd region with ID = 2434629491
mmap() failed: Cannot allocate memory
Failed to create permanent mapping for memfd region with ID = 179006683
Ignoring received block reference with non-registered memfd ID = 179006683
ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave
mmap() failed: Cannot allocate memory
Failed to create permanent mapping for memfd region with ID = 2434629491
mmap() failed: Cannot allocate memory
Failed to create permanent mapping for memfd region with ID = 3889170548
Ignoring received block reference with non-registered memfd ID = 3889170548
mmap() failed: Cannot allocate memory
Failed to create permanent mapping for memfd region with ID = 2434629491
mmap() failed: Cannot allocate memory
Failed to create permanent mapping for memfd region with ID = 4001902658
Ignoring received block reference with non-registered memfd ID = 4001902658
mmap() failed: Cannot allocate memory
Failed to create permanent mapping for memfd region with ID = 2434629491
mmap() failed: Cannot allocate memory
Failed to create permanent mapping for memfd region with ID = 1699157232
Ignoring received block reference with non-registered memfd ID = 1699157232
ERROR: ld.so: object '/home/matej/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
>>> Adding process 15717 for game ID 47810
ERROR: ld.so: object '/home/matej/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
>>> Adding process 15722 for game ID 47810
wine: Unhandled page fault on write access to 0x00000000 at address 0xf7abd4d9 (thread 0036), starting debugger...
ERROR: ld.so: object '/home/matej/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
>>> Adding process 15729 for game ID 47810
pid 15606 != 15605, skipping destruction (fork without exec?)
Game removed: AppID 47810 "", ProcID 15650 
Exiting app 47810

Unfortunately, there are further problems. As you can see, the game actually crashes when I try to load a save (unhandled page fault). Initially, I didn't have this problem. I re-installed the whole prefix and gallium nine in hopes of fixing the sound issues, but it made it worse, it started crashing after that each time I loaded a save. I'm not sure what version of Nine I had before it started crashing, though :/

The sound issue seems to be here: ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave But I'm not sure why this would only happen with Gallium Nine active.

Nine was installed with protontricks.

EDIT: Forgot to add my machine's specs

Arch Linux, all packages up to date: mesa 19.0.2-1 Proton 4.2-2 AMD FX-6300 AMD RX 590 16GB RAM

axeldavy commented 5 years ago

Could you try: . set "shm-size-bytes=1048576" in /etc/pulse/daemon.conf . PROTON_FORCE_LARGE_ADDRESS_AWARE=1 PROTON_NO_D3D11=1 PROTON_NO_D3D10=1 PROTON_NO_ESYNC=1

cyro666 commented 5 years ago

Finally had time to do it. Just setting these fixed it: PROTON_FORCE_LARGE_ADDRESS_AWARE=1 PROTON_NO_D3D11=1 PROTON_NO_D3D10=1 I didn't try to narrow it down further yet though and didn't have time to do a lengthy gaming session. Do you want me to do test drive this and maybe narrow it down further which of these are really needed?

EDIT: Looks like PROTON_FORCE_LARGE_ADDRESS_AWARE=1 is needed for sound.

dhewg commented 5 years ago

Dragon Age is known to exhaust its address space rather quick. When I set "texture detail" to "high" (iirc), it starts up but crashes rather soon. With a certain texture pack mod the game doesn't even start anymore. Setting large address aware fixed both points for me. It's not just required for sound.

cyro666 commented 5 years ago

Hm, that didn't use to happen to me with wine+gallium9 actually. I remember it working quite well until recently.

axeldavy commented 5 years ago

The error message sounded like it just hadn't enough memory to allocate things for sounds, which is why I advised these. Closing.

shmerl commented 4 years ago

I hit the same bug with Dragon Age: Origins in Wine 4.17 with faudio 19.10. Is there some similar workaround for it like PROTON_FORCE_LARGE_ADDRESS_AWARE?

Related Wine bug was closed before: https://bugs.winehq.org/show_bug.cgi?id=43685

shmerl commented 4 years ago

I found a workaround. The game binary can be patched to enable large address aware bit. You can find the patcher here: https://github.com/randomstuff/pe-set-laa

shmerl commented 4 years ago

Filed also: https://bugs.winehq.org/show_bug.cgi?id=47883