protonscr

Mass Effect 2: DxvkMemoryAllocator Memory allocation failed

dxvkclosed
doitsujin/dxvk#1312 · opened 2020-01-01 by XXXBold · updated 2020-03-31 · 15 comments · github
1 matching comments, n / p to jump
XXXXBold 2020-01-01 github

I've installed Mass Effect 2 with some Texture/Video mods (ALOT: https://www.nexusmods.com/masseffect2/mods/68?tab=description and ALOV: https://www.nexusmods.com/masseffect2/mods/245).

Game starts fine, however, when a loading screen appears, the game freezes and must be quit manually. By freezing I mean that the sound from the loading screen keeps playing, but the loading animation is frozen. The initial loading screen is fine, but the 2nd will make the error occur.

In the d3d9/proton Log below, you'll find the DxvkMemoryAllocator-Error.

This issue doesn't occur when using WINED3D, that's why I quit the game after the 2nd loading screen was over when recording the API-Trace. Not sure if the trace is helpful in this case, though.

Software information

Mass Effect 2 Steam Version (24980)

System information

  • GPU: AMD Radeon RX 5700XT
  • Driver: mesa-git 20.0 (oibaf ppa)
  • Wine version: Proton 4.11.11
  • DXVK version: 1.5.0 (shipped with proton)

Apitrace file(s)

https://drive.google.com/file/d/1wzBemmVMTvQo5xJJ0xyFKBg4pjLAuJPm/view?usp=sharing

Log files

Ddoitsujin maintainer 2020-01-02 github

This is a known issue with 32-bit games, please try PROTON_FORCE_LARGE_ADDRESS_AWARE=1.

XXXXBold 2020-01-02 github

I read about it, here: https://github.com/doitsujin/dxvk/wiki/Common-issues (The 32-bit games Section), so that's the issue then?

I'll give it a try using the Large address aware tweak, will report results when tested.

Edit:
Tested, Tweak didn't fix it, still the same issue.

Ddoitsujin maintainer 2020-01-02 github

Well, unfortunately this isn't something that can just be easily fixed. According to your log, it eats over 1GB of system memory for mapped buffers and stuff, which is a lot.

Maybe @Joshua-Ashton has an idea.

GGitArUs 2020-01-02 github

Two things which helped me in the past in similar situations in case of 32-bit games:

  • disable shared memory for pulseaudio or at least set it's size to significantly smaller value than default 64MB (put enable-shm = no or shm-size-bytes = 1048576 in ~/.config/pulse/daemon.conf and restart pulseaudio daemon)
  • set d3d9.evictManagedOnUnlock = True in dxvk.conf
XXXXBold 2020-01-02 github

Two things which helped me in the past in similar situations in case of 32-bit games:

* disable shared memory for pulseaudio or at least set it's size to significantly smaller value than default 64MB (put enable-shm = no or shm-size-bytes = 1048576 in ~/.config/pulse/daemon.conf and restart pulseaudio daemon)

* set d3d9.evictManagedOnUnlock = True in dxvk.conf

Thanks for your hints. Unfortunately they don't help.
d3d9.evictManagedOnUnlock = True: leads to broken textures, game still crashes.
The pulseaudio settings didn't have any visible effect for me.

Jjrugia 2020-01-02 github

Regarding the Large Address Aware flag, you could try patching the exe manually.

I use this program to do it: https://github.com/randomstuff/pe-set-laa

This helped me resolve a lot of crashes with 32bit games, maybe it will also help your case too.

XXXXBold 2020-01-03 github

Regarding the Large Address Aware flag, you could try patching the exe manually.

I use this program to do it: https://github.com/randomstuff/pe-set-laa

This helped me resolve a lot of crashes with 32bit games, maybe it will also help your case too.

Thanks, I tried it, still no change.

Mmisyltoad 2020-01-04 github

I will try and reproduce this sometime this week

XXXXBold 2020-01-05 github

I will try and reproduce this sometime this week

Nice!
For installing ALOT, I used this: https://github.com/MassEffectModder/MassEffectModder/releases (409 contains Linux Binary release)

For installing ALOV, I manually copied the data to the appropriate folders.

Bbirdstream 2020-01-09 github

I've had the same issue with World Of Tanks behaving the same way on Ubuntu 18.04 (liqourix kernel) with my i7-4970K, 8GB RAM & Nvidia GTX980. I've tested different wine/proton versions, different kernels, lighter DE's, tweaked vm swappiness values and God knows what else by this point. But never gotten to play like 2 or more matches before the game freezes and i see that pesky DxvkMemoryAllocator error in the log. Keeping other apps and stuff at a minimum just seems to buy some time at best before it crashes

BUT: I think i finally found a solution that really works:

in terminal, just:

echo 1048576 | sudo tee /proc/sys/vm/min_free_kbytes

Now i don't know for sure, but it leads me to thinking that the memory allocator does only care about what's reported as "free" mem and really doesn't try to allocate if it's any less than what it wants?
Anyway i think everybody should give this a go! I've played several matches in a row now, highest graphical settings possible (enhanced client) with no hiccups and even had chrome running in the bg etc.. Damnit i'm gonna try HD textures now xD

EDIT: should the game still crash, i'd suggest raising that number a bit, not TOO much tho.. i tried 4GB and my system really didnt like that lol

XXXXBold 2020-01-09 github

I've had the same issue with World Of Tanks behaving the same way on Ubuntu 18.04 (liqourix kernel) with my i7-4970K, 8GB RAM & Nvidia GTX980. I've tested different wine/proton versions, different kernels, lighter DE's, tweaked vm swappiness values and God knows what else by this point. But never gotten to play like 2 or more matches before the game freezes and i see that pesky DxvkMemoryAllocator error in the log. Keeping other apps and stuff at a minimum just seems to buy some time at best before it crashes

BUT: I think i finally found a solution that really works:

in terminal, just:

echo 1048576 | sudo tee /proc/sys/vm/min_free_kbytes

Now i don't know for sure, but it leads me to thinking that the memory allocator does only care about what's reported as "free" mem and really doesn't try to allocate if it's any less than what it wants?
Anyway i think everybody should give this a go! I've played several matches in a row now, highest graphical settings possible (enhanced client) with no hiccups and even had chrome running in the bg etc.. Damnit i'm gonna try HD textures now xD

EDIT: should the game still crash, i'd suggest raising that number a bit, not TOO much tho.. i tried 4GB and my system really didnt like that lol

Thanks for the hint, I tried this(1 and 2GB), but still the same.

BBabylonAS 2020-03-07 github

Can confirm for Galactic Civilizations III (the game appears to freeze on maps if they are large enough — and then a game-specific error message appears), but I can only run GalCiv3 on unmodified Proton 4.2-9 (it crashes outright on loading screen under 4.11 and 5.0; my regular Wine is 5.0). I suppose I’ll have to manually replace Proton 4.2’s version of DXVK with the latest one to investigate this issue.

And yes, it’s a 64-bit game.

KK0bin maintainer 2020-03-07 github

@BabylonAS That's completely unrelated, please make a new issue if you can provide the required apitrace.

About ME2: setting d3d9.evictManagedResources to true in the DXVK config file (check the wiki) might help.

XXXXBold 2020-03-10 github

@K0bin
I've already tried that, see above.

Ddoitsujin maintainer 2020-03-31 github

Closing since this type of issue is now tracked at #1318 .

Proton versions

Launch options