Using too much VRAM on Linux crashes Editor

Most recent crash info

Behaviour: When UE4 runs low on VRAM when running in Vulkan (now the default on Linux), the editor crashes.

Expected: When the editor runs low on VRAM, it takes some kind of steps to reduce VRAM usage (In OpenGL it appears to drop the framerate, but I’m not sure what happens exactly behind-the-scenes).

Notable error line: [203]LogVulkanRHI: Error: Out of Device Memory, Requested=16384.000000Kb MemTypeIndex=7

My setup that probably contributes to the issue:
Antergos Linux (Arch)
3x 1920x1200 screens attached
GeForce GTX 760 (2GB VRAM) with 410.66 drivers (also tried with 396.54.09)
24 GB of normal RAM
A fair number of running programs

Steps to reproduce:

  1. Use plenty of VRAM (In my case, I had a few browser windows open, probably a video playing, as well as Steam and a few Discord windows open. I monitored the VRAM usage in a terminal window with nvidia-smi
  2. Open Unreal Engine 4.21 editor with Vulkan, and open a project (In my case, the Twin Stick template)
  3. Once the editor’s finished opening, try to push it to use more than 2GB of VRAM (2GB being the limit on my system), such as by expanding the editor window, but I’ve also crashed it a few times by trying to access Blueprints or other engine features.
  4. The engine crashes once it attempts to exceed 2GB of VRAM.

Same problem with UE 4.22.

OS: Ubuntu 18.04

GPU: GTX 660 2GB (driver 410.48)

Found the solution in another thread.

Running with -opengl4 solved the problem.

$ ./Engine/Binaries/Linux/UE4Editor -opengl4

Although it is mentioned in the documentation, the problem is not obvious.

That is indeed what I do so I can continue using UE4. Hopefully Epic will improve the Vulkan renderer in the future so this will not be needed.