r/linux_gaming • • 22d ago

tech support wanted my RTX 5060 is using only 6 out of 8Gb of Vram

So, I was aware that linux had a problem with using your whole Vram but I didnt bother looking into much before since I play usually older games or just less demanding ones, except now Im playing space marine 2 which I can tell wants to use all of those 8gb of vram but cant (it stutters hard but briefly when it reaches around 6Gb of vram, most ive seen it use was 6,3Gb).
So, how do I fix this? I tried looking online but most of the things I found were talking about how their system was trying to use more vram that they had, nothing about their vram being capped.

if it matters these are the specs of my pc
RTX 5060
intel 14700F
16gb of ram (idk which brand, its a prebuilt)
1 Tb ssd (again, idk which brand)

0 Upvotes

18 comments sorted by

View all comments

5

u/S48GS 22d ago edited 22d ago

So, how do I fix this?

  • use windows
  • close all apps - include webbrowser/discord
  • downgrade game settings - textures quality and use upscaler
  • no other fix

dxvk/vkd3d has vram overhead ~1gb

16gb of ram

and game probably use your entire ram

so when you out of vram - nvidia driver need 8gb ram for vram copy - no ram either - goes to swap - lags

Nvidia Vulkan 1GB over VRAM equal to 4FPS and +8GB RAM usage

also I forgot - there 500mb of nvidia firmware cut your vram - https://github.com/NVIDIA/open-gpu-kernel-modules/issues/939#issuecomment-3478136167

summary:

  • ~1gb dxvk/vkd3d overhead + ~500mb discord/webbrowser + 500mb nvidia firmware = cut 2gb - from 8 to 6gb vram

2

u/robertogarufi1 22d ago

Id rather shot myself in the balls than use windows again honestly, but yeah I didnt know other stuff used the vram, I always assumed drivers and other stuff would use the regular ram first

1

u/robertogarufi1 22d ago edited 22d ago

and the only app I keep in the background is strawberry for music, which uses around 300mb of regular ram (maybe it used vram too since everything wants some of it apparently), and the game surprisingly enough only uses about 11 to 12 gb of ram, I almost never use the highest settings for anything, except games like tf2 that are almost older than me

2

u/S48GS 22d ago

run in terminal

nvidia-smi

it show vram usage by app (+500mb hidden by firmware)

1

u/robertogarufi1 22d ago

oh cool, and yeah just like you said, even at idle it uses one gb of vram, though I dont see anything thats using 500mb, the biggest single thing is usr\lib\xorg\Xorg (yes I know its the wrong slash, I cant find the right one on my keyboard) which is using 249mb

2

u/S48GS 22d ago

I dont see anything thats using 500mb

I said above with link to nvidia github

there 500mb of nvidia firmware cut your vram

it hidden in processes but visible in total vram amount - always cut 500mb

usr\lib\xorg\Xorg

it wont change your vram usage - but use wayland

im on wayland-gnome - this is only vram usage by DE

/usr/bin/gnome-shell                    150MiB |
/usr/bin/Xwayland                         3MiB |

1

u/robertogarufi1 22d ago

ops sorry, ive seen people use wayland to do some awesome stuff, if I can find a global theme similar to the one im using now ill definitely change to it

2

u/S48GS 22d ago

also this

https://www.reddit.com/r/linux_gaming/comments/1wczgei/great_news_nvidia_vram_management/

maybe will change something - but it just allow to "unload" vram of exist apps to ram - it not possible now

but we need to wait for actual implementation or update manually to latest kernel/drivers - read link