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

  • Matty_r@programming.dev
    link
    fedilink
    English
    arrow-up
    4
    ·
    2 days ago

    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.nlOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      3 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
      link
      fedilink
      arrow-up
      4
      ·
      2 days ago

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