UE5 fails to startup on Linux

Downloaded the Unreal source code on Ubuntu 22.04, followed instructions to install as given. However, when I try to launch it, it gives the following error:

Assertion failed: EnumHasAnyFlags(UEFlags, ETextureCreateFlags::UAV) [File:./Runtime/VulkanRHI/Private/VulkanTexture.cpp] [Line: 446]

libUnrealEditor-VulkanRHI.so!FVulkanSurface::GenerateImageCreateInfo(FVulkanSurface::FImageCreateInfo&, FVulkanDevice&, VkImageViewType, EPixelFormat, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, ETextureCreateFlags, VkFormat*, VkFormat*, bool) [/home/wasayak117/Downloads/UnrealEngine-release(1)/UnrealEngine-release/Engine/Source/./Runtime/VulkanRHI/Private/VulkanTexture.cpp:446]
libUnrealEditor-VulkanRHI.so!FindOrCalculateTexturePlatformSize(FVulkanDevice*, VkImageViewType, unsigned int, unsigned int, unsigned int, unsigned int, unsigned char, unsigned int, unsigned int, ETextureCreateFlags) [/home/wasayak117/Downloads/UnrealEngine-release(1)/UnrealEngine-release/Engine/Source/./Runtime/VulkanRHI/Private/VulkanTexture.cpp:2574]
libUnrealEditor-VulkanRHI.so!FVulkanDynamicRHI::RHICalcTexture2DPlatformSize(unsigned int, unsigned int, unsigned char, unsigned int, unsigned int, ETextureCreateFlags, FRHIResourceCreateInfo const&, unsigned int&) [/home/wasayak117/Downloads/UnrealEngine-release(1)/UnrealEngine-release/Engine/Source/./Runtime/VulkanRHI/Private/VulkanTexture.cpp:2594]
libUnrealEditor-Engine.so!FTexture2DResource::GetPlatformMipsSize(unsigned int) const [/home/wasayak117/Downloads/UnrealEngine-release(1)/UnrealEngine-release/Engine/Source/./Runtime/Engine/Private/Rendering/Texture2DResource.cpp:186]
libUnrealEditor-Engine.so!FStreamableTextureResource::InitRHI() [/home/wasayak117/Downloads/UnrealEngine-release(1)/UnrealEngine-release/Engine/Source/./Runtime/Engine/Private/Rendering/StreamableTextureResource.cpp:169]
libUnrealEditor-RenderCore.so!FRenderResource::InitResource() [/home/wasayak117/Downloads/UnrealEngine-release(1)/UnrealEngine-release/Engine/Source/./Runtime/RenderCore/Private/RenderResource.cpp:120]
libUnrealEditor-RenderCore.so!TEnqueueUniqueRenderCommandType<BeginInitResource(FRenderResource*)::InitCommandName, BeginInitResource(FRenderResource*)::$_160>::DoTask(ENamedThreads::Type, TRefCountPtr const&) [/home/wasayak117/Downloads/UnrealEngine-release(1)/UnrealEngine-release/Engine/Source/Runtime/RenderCore/Public/RenderingThread.h:193]
libUnrealEditor-RenderCore.so!TGraphTask<TEnqueueUniqueRenderCommandType<BeginInitResource(FRenderResource*)::InitCommandName, BeginInitResource(FRenderResource*)::$_160> >::ExecuteTask(TArray<FBaseGraphTask*, TSizedDefaultAllocator<32> >&, ENamedThreads::Type, bool) [/home/wasayak117/Downloads/UnrealEngine-release(1)/UnrealEngine-release/Engine/Source/Runtime/Core/Public/Async/TaskGraphInterfaces.h:975]
libUnrealEditor-Core.so!FNamedTaskThread::ProcessTasksNamedThread(int, bool) [/home/wasayak117/Downloads/UnrealEngine-release(1)/UnrealEngine-release/Engine/Source/./Runtime/Core/Private/Async/TaskGraph.cpp:753]
libUnrealEditor-Core.so!FNamedTaskThread::ProcessTasksUntilQuit(int) [/home/wasayak117/Downloads/UnrealEngine-release(1)/UnrealEngine-release/Engine/Source/./Runtime/Core/Private/Async/TaskGraph.cpp:641]
libUnrealEditor-Core.so!FTaskGraphCompatibilityImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type) [/home/wasayak117/Downloads/UnrealEngine-release(1)/UnrealEngine-release/Engine/Source/./Runtime/Core/Private/Async/TaskGraph.cpp:2114]
libUnrealEditor-RenderCore.so!RenderingThreadMain(FEvent*) [/home/wasayak117/Downloads/UnrealEngine-release(1)/UnrealEngine-release/Engine/Source/./Runtime/RenderCore/Private/RenderingThread.cpp:380]
libUnrealEditor-RenderCore.so!FRenderingThread::Run() [/home/wasayak117/Downloads/UnrealEngine-release(1)/UnrealEngine-release/Engine/Source/./Runtime/RenderCore/Private/RenderingThread.cpp:544]
libUnrealEditor-Core.so!FRunnableThreadPThread::Run() [/home/wasayak117/Downloads/UnrealEngine-release(1)/UnrealEngine-release/Engine/Source/./Runtime/Core/Private/HAL/PThreadRunnableThread.cpp:25]
libUnrealEditor-Core.so!FRunnableThreadPThread::_ThreadProc(void*) [/home/wasayak117/Downloads/UnrealEngine-release(1)/UnrealEngine-release/Engine/Source/Runtime/Core/Private/HAL/PThreadRunnableThread.h:185]
libc.so.6!UnknownFunction(0x94b42)
libc.so.6!UnknownFunction(0x1269ff)

Any idea how to fix this?

2 Likes

Suffering from the same issue on the latest UE5 version. Also on Ubuntu 22.04 64-bit.

I did some digging in the source code at it appears that this part of the code was changed about six months ago: https://github.com/EpicGames/UnrealEngine/commit/53f83f1a5b5bd75d5b409da310679bc2f4644f20#diff-4dcae108ef3932387be48614e848c1af3a1683ce3f36c47a6076bb090e23b53c

I get the editor to run if I re-add the line that was replaced in that commit (Engine/Source/Runtime/VulkanRHI/Private/VulkanTexture.cpp Line 446) and set my resolution down to 1080. But it still dies later with other Vulkan Errors and the performance is atrocious (but it woks fine when I open a menu so it is probably something with the rendering).

Iā€™ll have to get an IDE to take a closer look at that line to figure out what it is supposed to do.

On a positive note there now is an official Linux build: Linux - Unreal Engine but it dies with the same error.

1 Like

So, about this line killing the Editor on startup:

check(EnumHasAnyFlags(UEFlags, TexCreate_UAV));
  • check() causes the editor to crash when the statement given to it evaluates as false.
  • EnumHasAnyFlags() checks if the given Enum (think of it as a row of switches) contains a given flag.
  • UEFlags is a series of flags (e.g. switches) that inform the editor about the state of the environment (I think)
  • TexCreate_UAV is just a redefinition of ETextureCreateFlags::UAV

Translated to plain English the line would read something like:

Crash the editor if the flag TexCreate_UAV is not set.

The funny part

If we lookup the original definition of TexCreate_UAV e.g. ETextureCreateFlags::UAV we find the following in Engine/Source/Runtime/RHI/Public/RHIDefinitions.h:

    // UnorderedAccessView (DX11 only)
    // Warning: Causes additional synchronization between draw calls when using a render target allocated with this flag, use sparingly
    // See: GCNPerformanceTweets.pdf Tip 37
    UAV                               = 1ull << 17,

So Iā€™m in no way an expert but I donā€™t think that DirectX11 is commonly found on Linux. Taking this into account the offending line reads now more like:

Crash the editor if now DX11 is found.

Which of course could be unfavorable re-interpreted as:

Crash the editor if weā€™re not on Windows

Experimental Solution

Comment out or remove the line 446 in Engine/Source/Runtime/VulkanRHI/Private/VulkanTexture.cpp:

check(EnumHasAnyFlags(UEFlags, TexCreate_UAV));

Optional: Add the following line Instead/below/above the previously mentioned line:

ensure((ImageCreateInfo.usage & VK_IMAGE_USAGE_SAMPLED_BIT) == 0);

After this the Editor needs to be (re-)build. It should now start normally (will show an error on the console if the optional line has been added).

This at least works on my system, but something in the Vulkan part causes it to run as smooth as a stubborn mule ridding a chariot pulled by snails.

Vulkan Troubles

No clue yet but it causes a timeout in the Editor which leads to its untimely (self-inflicted) demise.

Iā€™m now installing a unrelated Vulkan Demo to see if there is a general problem with my system.

So I tried the Vulkan Samples from here: GitHub - KhronosGroup/Vulkan-Samples: One stop solution for all Vulkan samples and got about 25 FPS on Average.

I mucked about with some settings in the Editor and manged to get about 8-10 FPS. In Unlit Mode.

Running stat DumpFrame -ms=0.1 pointed me to STAT_VulkanQueuePresent which is counted in Engine/Source/Runtime/VulkanRHI/Private/VulkanSwapChain.cpp line 865.

My current assumption is that the frame pacer is taking to much time for some reason.
Iā€™ll run a trace and see if something pops up

I am running Pop_OS 22.04.

I noticed that it detects my GPU as just ā€œGenericGPUBrandā€

LogInit: OS: Pop!_OS 22.04 LTS (5.18.10-76051810-generic), CPU: AMD Ryzen 9 3950X 16-Core Processor , GPU: GenericGPUBrand

Not sure if that is typical?

I am able to run the Ancient demo at a pretty decent editor framerate for a few minutes (seen in the image below), but then it always eventually crashes with the error ending in:

0x00007f003023cbfe libUnrealEditor-Core.so!FThreadImpl::Run() [/mnt/horde/++UE5/Sync/Engine/Source/./Runtime/Core/Private/HAL/Thread.cpp:66]
0x00007f00301fdd27 libUnrealEditor-Core.so!FRunnableThreadPThread::Run() [/mnt/horde/++UE5/Sync/Engine/Source/./Runtime/Core/Private/HAL/PThreadRunnableThread.cpp:25]
0x00007f003015bf83 libUnrealEditor-Core.so!FRunnableThreadPThread::_ThreadProc(void*) [/mnt/horde/++UE5/Sync/Engine/Source/Runtime/Core/Private/HAL/PThreadRunnableThread.h:185]
0x00007f0025294b43 libc.so.6!UnknownFunction(0x94b42)
0x00007f0025326a00 libc.so.6!UnknownFunction(0x1269ff)

Not sure about the GPU detection but seeing as you got to about 60 FPS it seems to work nicely. For reference what is your GPU type/model?

For the error message, could you please copy it fully? E.g. upwards from what you copied it to the first empty line and the line above it? (It should look similar to what wasay_mostwanted posted at the start of this thread)

EDIT: My apologies, it seems like the issue was with my actual content. Apparently it must have been somewhat corrupted. I originally used the app called ā€œEpic Asset Managerā€ to download the Ancients demo, but at 99% it hung up, and when I reopened it, it said 100% so I thought it was fine.

I used Lutris to install the real Epic Launcher and downloaded the demo from there and just now fired it up and it made it all the way through the mesh compilation/setup processes without crashing and seems to now be working fine.

I was able to actually play the demo in editor mode now without crash.



Itā€™s an AsRock RX 6900XT. I mostly asked that question because I just got the card a few days ago. Prior to that I had an RTX2070, and as such I had all the Nvidia drivers and tools installed.

It took a few days to ā€˜properlyā€™ get the AMD drivers I needed installed and working as there was confusion on my end about the amdgpu-pro deprecation and some PPAā€™s that people used to recommend but no longer do, so as I was making my way through posts on forums, I would try several things, only to see in the next post that I should not have done that.

As of now I have everything worked out, at least, I thought I did until I saw UE say ā€œGenericGPUā€, but everything else seems to recognize it fine, and all test console commands seem to report back properly, so it could just be UE acting goofy, as it is known to do.

As for logs, sure thing. The first log is from when I attempted to hit play. The second log is from just sitting there.

Both of which, I would load the map, then load a small area on the scene loading grid, it looks like it begins to do some compilation, then crashes out at around the same place.

@MostHated Youā€™ve nothing to apologize for in my opinion, quite the opposite actually I would say as you showed me that a decent FPS is no mere pipe dream. Especially because your mention of the Epic Launcher caused me to reassess my installed packages.
Turns out I had some libnvidia-* stuff installed but not the nvidia-driver package itself. After installing it I got 60 FPS on the empty Scene.

As for the logs they say what you already suspected, the file SM_NatureRock_023.uasset didnā€™t download completely but the file itself knew how large it should be causing the Engine to read past the end of the file:

[2022.07.27-00.54.05:595][ 96]LogFileManager: Error: Requested read of 118643 bytes when 5927 bytes remain (file=../../../../../Documents/EpicVault/AncientGame_5.0/data 5.0/Content/AncientContent/Megascans/3DAssets/NatureRock2/SM_NatureRock_023.uasset, size=1013050)

@anonymous_user_f74487ce @CalculonBot I just retried the pre-compiled release from Epic and now it starts without issue so it probably was a driver issue from the start. If youā€™ve a Nvidia card you could try to install the package nvidia-driver-515, it started without issue for me after that.

1 Like

Can confirm as well, I had the same issue, but after switching from the Nouveau driver to nvidia-driver-515, the engine loaded without a problem.

Hey, i am having the same error and after changing the line to your experimental solution, the same error is present, why is it not recognizing the changes?

Assertion failed: EnumHasAnyFlags(UEFlags, ETextureCreateFlags::UAV) [File:./Runtime/VulkanRHI/Private/VulkanTexture.cpp] [Line: 446]
	{
		// Some formats don't support sampling and that's ok, we'll use a STORAGE_IMAGE
		//check(EnumHasAnyFlags(UEFlags, TexCreate_UAV));
		ensure((ImageCreateInfo.usage & VK_IMAGE_USAGE_SAMPLED_BIT) == 0);
		ImageCreateInfo.usage &= ~VK_IMAGE_USAGE_SAMPLED_BIT;
	}

It is probably not recognizing the change because the object file still exists e.g. there exists a compiled (.o) version of the .cpp file and therefore it isnā€™t rebuild.

But my initial solution is not really a fix but more a hack equating to the same as trying to run a whole factory of a single AAA battery e.g. it is not using the GPU correctly. It allows the engine to start but it will at most give you 10 FPS if enough features are disabled. Personally I would discourage you from using it. You should install the correct graphics driver instead. For Nvidia this would be the package nvidia-driver-515 (in Ubuntu). Iā€™m not familiar what the AMD driver is called but I could try looking it up if you need it.

If you really, really want to try my dirty hack you can try to first clean the build files for the Editor and then rebuild it like so (as outlined in the README for the linux build process):

make UnrealEditor ARGS="-clean" && make UnrealEditor

I have seen the exactly same issue on a computer Intel Graphics - Ubuntu 22.04 - but Intel CPU graphics ā€¦ and yet it fails at Vulcan-driver?

1 Like

please help, Iā€™ve alreay installed amd-gpu on my Debian 11 and still have the problem.

Hi, I am having a problem running the successfully packaged project on ubuntu20.04. Is the reason for it the same as you mentioned in this article? This is the log file.
advRootMotion_multiplayer.log (48.4 KB)