this post was submitted on 03 Apr 2025
31 points (100.0% liked)

Linux Gaming

17592 readers
922 users here now

Discussions and news about gaming on the GNU/Linux family of operating systems (including the Steam Deck). Potentially a $HOME away from home for disgruntled /r/linux_gaming denizens of the redditarian demesne.

This page can be subscribed to via RSS.

Original /r/linux_gaming pengwing by uoou.

Resources

WWW:

Discord:

IRC:

Matrix:

Telegram:

founded 2 years ago
MODERATORS
 

My transition to full on Linux gaming mostly went okay, but recently I've started running into some issues with more demanding games. In games like Cyberpunk 2077, Stalker 2, and inZOI I sometimes get KDE and/or Wayland crashes when the VRAM runs out. In Cyberpunk I can avoid it by not enabling RTX, which is fine. But Stalker 2 and inZOI are basically all-in on raytracing and therefore seem to also fully eat up my 8GB of VRAM.

Is there any way of constraining the games to like 7.5 GB or something? Because they seem to actively work to stay below 8GB, so clearly there is still stuff they can clean up. And even if they'd go over the limit, I'd prefer the game to crash rather than basically having Wayland restart, losing everything I had open. I'm curious for you experiences

top 10 comments
sorted by: hot top controversial new old
[–] Virkkunen@fedia.io 6 points 2 days ago (1 children)

From my understanding, with Nvidia there's no shared memory on Linux, so when your VRAM maxes out, you get a crash or your game will run in single digit frames.

There is nothing to be done except lowering textures and other VRAM intensive settings, and hoping that one day Nvidia fixes the no shared memory issue.

(I'm assuming you have a Nvidia GPU solely based on those low VRAM numbers)

[–] gerryflap@feddit.nl 1 points 8 hours ago

Ah that would explain the issues and the difference with Windows. I'm on NVIDIA yeah. Going over the VRAM limit and writing into RAM surely isn't ideal either, but it would beat crashing out entirely. It also seems that Unreal engine 5 games just consume all VRAM they can. Like they're almost claiming everything they can get away with, but somehow usually work fine. But once I alt+tab or switch workspace there is no VRAM left and Wayland commits sudoku (for good reasons).

[–] off@programming.dev 4 points 2 days ago

It shouldn't. You can even use vram as swap and max it out.

because it crashes when maxed out instead of just killing the game I assume you're on nvidia? It should just kill the game, I know nvidia had some issues releasing vram with stuff running in wine for years.

[–] Matty_r@programming.dev 4 points 2 days ago (2 children)

Kinda, I have this issue with Diablo 4. It might with work other games that use dxvk, but you van try creating a config file in the same directory as the executable:

"dxvk.conf" with the following lines: dxgi.maxDeviceMemory=8192 dxgi.maxSharedMemory=8192

Worth a shot.

[–] gerryflap@feddit.nl 2 points 8 hours ago* (last edited 8 hours ago)

Oh yeah I found something similar just now which might work? Using DXVK_CONFIG="dxgi.maxDeviceMemory = 6144:" %command% to try and limit the game to 6GB VRAM. It hasn't crashed since, but I'm unsure whether that's because of this. I could try the other parameter as well and see if that works, though reading the comments I'm unsure about that. Worth a try

EDIT: I also found a comment on the NVIDIA forums detailing this solution. Apparently you can configure this system-wide, which would limit the VRAM on all DXVK games

[–] Virkkunen@fedia.io 4 points 2 days ago (1 children)

As far as I know, there's no shared memory with Nvidia on Linux so that last flag might not do anything

[–] Matty_r@programming.dev 2 points 2 days ago

Maybe, but it definitely helped keep it playable.

[–] Maiq@lemy.lol 8 points 2 days ago* (last edited 2 days ago)

Never had this happen on my setup. Have a nv3080 optimus with integrated AMD GPU though.

I don't think I can help per say but it might help others if they knew a bit more about your setup.

  1. Distro
  2. Nvidia driver version nivida-smi
  3. Kernel version uname -a
  4. Plasma version plasmashell --version
  5. KDE version Kf5-config --version

Those bits might help.

[–] cdegroot@lemmy.ca 6 points 2 days ago (1 children)

Lower settings. Sorry, thats all there is to it. 8GB is not a lot these days (i have two older cards in my PC and they're both 12). Textures, screen resolution, there's a bunch you can do.

Crashes are unavoidable, given that everyone wants max performance everywhere, things get shipped with all the debugging and checking stripped.

[–] gerryflap@feddit.nl 1 points 8 hours ago* (last edited 8 hours ago)

I know that 8GB is too little. NVIDIA is really stingy when it comes to VRAM unfortunately. Beack when I made the decision this 3070Ti was the most expensive I could buy and I needed CUDA for some projects I was working on. Back then AMD's ROCm had bad support on consumer GPUs and also in libraries, so I didn't have a choice. I'm hearing better noises now though, so maybe my next card will be AMD.

Either way, I'd expect at most the game to crash. That would be acceptable, though annoying. Preferably it'd use the RAM as a sort of swap, which would grind everything to a halt but wouldn't outright kill the game or my desktop. I really shouldn't be losing all open windows