protonscr

[Question] Memory allocation failed, falling back to system memory.

vkd3dclosed
HansKristian-Work/vkd3d-proton#1814 · opened 2023-12-18 by shelterx · updated 2024-09-04 · 9 comments · github
Sshelterx 2023-12-18 github

I noticed I get vkd3d_allocate_device_memory: Memory allocation failed, falling back to system memory. in the logs.
It's a bit unclear what the warning actually means. Is that normal for Nvidia RTX 3060Ti?

Ddoitsujin maintainer 2024-01-05 github

This generally just means that you're running out of VRAM, the fallback mechanism is necessary for games not to crash but will cost performance. Whether or not this is expected depends on which game you're getting this with and with what settings, games wanting more than 8GB isn't unheard of these days.

Can you post a log file?

Sshelterx 2024-01-05 github

@doitsujin
I just happen to see it when fiddling around with REBAR on/off and ingame settings, because I was wondering why the performance hit was so big in AC Valhalla in Linux compared to Windows.
Here's the log file from that game:
vkd3d.log

I only have time right now to provide a log from that specific game but I saw the same behavior for another game too..

Some screenshots from the game showing vram usage:
vram
ingame-vram

(updated with proper log, it got overwritten by UPlay)

Sshelterx 2024-01-10 github

Also, the game performance is bad. High graphics settings on Linux gives about the same results as Ultra High on Windows. Which's a bit weird because most games that I have tried runs about the same as on Windows, but not this game.
I don't think it's because of the system memory issue, something else is bottlenecking here (I have tried everything, different drivers, disabling rebar, differeent kernels/drivers and vkd3d/proton versions, I barely notice any change in performance no matter whatI try.)

Sshelterx 2024-01-14 github

Closing this, seems to be a VRAM OOM issue really which's weird since I had a 8GB card and as far as i know there were memory left to allocate. But Linux vram management very good so if you have other apps running, it might eat up vram and then vkd3d uses system memory instead. If you launch the game with minimal programs running the message dissappers.

Ffelixpelletier 2024-01-14 github

I'm having that issue with Far Cry 6. nvidia-smi tells me I still have 5GB free, but I still get that message. Performance is really bad even at low settings with an i9-13900k and an RTX 3080, so I'm suspecting this might be an issue. FarCry6.exe still manages to use 4GB of VRAM though. ReBAR didn't make a difference either.

EDIT: And I'm on GE-Proton8-27.

Sshelterx 2024-01-15 github

@felixpelletier Yeah, could still be some memory detection issue, I mean, I'm pretty sure I had enough memory when I started Valhalla, and as seen in the screenshots, only 6,3GB of my VRAM is in use.
Btw, nvtop is a nice utility to check VRAM usage.

Sshelterx 2024-01-15 github

However nvtop and mangohud shows the same VRAM usage. nvidia-smi seems to show what's actually in use (?) (not only allocated. there's a 400Mb difference here between nvtop and nvidia-smi). So I'm not exactly sure what to trust in this scenario.

Sshelterx 2024-03-13 github

I am still not sure what's going on here, if it's a normal message when ReBar is enabled.
Because I still saw this message in Valhalla and also Ready or Not when I had VKD3D_DEBUG=warn set. I have 12Gb of vram now since i changed graphics cards.
image

045c:warn:vkd3d_allocate_device_memory: Memory allocation failed, falling back to system memory.
0458:warn:vkd3d_allocate_device_memory: Memory allocation failed, falling back to system memory.

Sshelterx 2024-09-04 github

Disabling Rebar in bios makes the message go away. However it may decrease performance in some titles, while some titles seem to benefit from it.
Same message occurs in windows too with vkd3d-proton so it's not Linux specifc.

Proton versions

Launch options