Editor Crash on Arch Linux (VK_ERROR_DEVICE_LOST)

Dear Answer Hub,
I am making a game with UE5 on Arch Linux, though I had the same issue on Master branch when it was 4.26. The issue is, it constantly crashes. I tried switching from Vulcan_sm5 to Vulkan_sm4, which makes it go from crashing at launch to crashing after 30is min to a few hours depending on how long ago I restarted my computer. I was wondering if there is a patch or setting I should look into to fix this.

I am using an RTX 3070 with the latest Nvidia proprietary drivers, and have 16GB of ram and a Ryzen 5 2600.

Thank you

Here is the call stack:

`Fatal error: [File:/home/mcp613/Documents/GitHub/UnrealEngine/Engine/Source/Runtime/VulkanRHI/Private/VulkanUtil.cpp] [Line: 904] VulkanRHI::vkQueueSubmit(Queue, 1, &SubmitInfo, Fence->GetHandle()) failed, VkResult=-4 at /home/mcp613/Documents/GitHub/UnrealEngine/Engine/Source/Runtime/VulkanRHI/Private/VulkanQueue.cpp:71 with error VK_ERROR_DEVICE_LOST << callstack too long >>

libUnrealEditor-VulkanRHI.so!VulkanRHI::VerifyVulkanResult(VkResult, char const*, char const*, unsigned int) [/home/mcp613/Documents/GitHub/UnrealEngine/Engine/Source/Runtime/VulkanRHI/Private/VulkanUtil.cpp:903]
libUnrealEditor-VulkanRHI.so!FVulkanQueue::Submit(FVulkanCmdBuffer*, unsigned int, VkSemaphore_T**) [/home/mcp613/Documents/GitHub/UnrealEngine/Engine/Source/Runtime/VulkanRHI/Private/VulkanQueue.cpp:71]
libUnrealEditor-VulkanRHI.so!FVulkanCommandBufferManager::SubmitActiveCmdBufferFromPresent(VulkanRHI::FSemaphore*) [/home/mcp613/Documents/GitHub/UnrealEngine/Engine/Source/Runtime/VulkanRHI/Private/VulkanCommandBuffer.cpp:650]
libUnrealEditor-VulkanRHI.so!FVulkanViewport::Present(FVulkanCommandListContext*, FVulkanCmdBuffer*, FVulkanQueue*, FVulkanQueue*, bool) [/home/mcp613/Documents/GitHub/UnrealEngine/Engine/Source/Runtime/VulkanRHI/Private/VulkanViewport.cpp:865]
libUnrealEditor-VulkanRHI.so!FVulkanCommandListContext::RHIEndDrawingViewport(FRHIViewport*, bool, bool) [/home/mcp613/Documents/GitHub/UnrealEngine/Engine/Source/Runtime/VulkanRHI/Private/VulkanRHI.cpp:901]
libUnrealEditor-RHI.so!FRHICommand::ExecuteAndDestruct(FRHICommandListBase&, FRHICommandListDebugContext&) [/home/mcp613/Documents/GitHub/UnrealEngine/Engine/Source/Runtime/RHI/Public/RHICommandList.h:745]
libUnrealEditor-RHI.so!FRHICommandListExecutor::ExecuteInner_DoExecute(FRHICommandListBase&) [/home/mcp613/Documents/GitHub/UnrealEngine/Engine/Source/Runtime/RHI/Private/RHICommandList.cpp:373]
libUnrealEditor-RHI.so!FExecuteRHIThreadTask::DoTask(ENamedThreads::Type, TRefCountPtr const&) [/home/mcp613/Documents/GitHub/UnrealEngine/Engine/Source/Runtime/RHI/Private/RHICommandList.cpp:429]
libUnrealEditor-RHI.so!TGraphTask::ExecuteTask(TArray >&, ENamedThreads::Type, bool) [/home/mcp613/Documents/GitHub/UnrealEngine/Engine/Source/Runtime/Core/Public/Async/TaskGraphInterfaces.h:960]
libUnrealEditor-Core.so!FNamedTaskThread::ProcessTasksNamedThread(int, bool) [/home/mcp613/Documents/GitHub/UnrealEngine/Engine/Source/Runtime/Core/Private/Async/TaskGraph.cpp:730]
libUnrealEditor-Core.so!FNamedTaskThread::ProcessTasksUntilQuit(int) [/home/mcp613/Documents/GitHub/UnrealEngine/Engine/Source/Runtime/Core/Private/Async/TaskGraph.cpp:621]
libUnrealEditor-Core.so!FTaskGraphCompatibilityImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type) [/home/mcp613/Documents/GitHub/UnrealEngine/Engine/Source/Runtime/Core/Private/Async/TaskGraph.cpp:1992]
libUnrealEditor-RenderCore.so!FRHIThread::Run() [/home/mcp613/Documents/GitHub/UnrealEngine/Engine/Source/Runtime/RenderCore/Private/RenderingThread.cpp:320]
libUnrealEditor-Core.so!FRunnableThreadPThread::Run() [/home/mcp613/Documents/GitHub/UnrealEngine/Engine/Source/Runtime/Core/Private/HAL/PThreadRunnableThread.cpp:25]
libUnrealEditor-Core.so!FRunnableThreadPThread::_ThreadProc(void*) [/home/mcp613/Documents/GitHub/UnrealEngine/Engine/Source/Runtime/Core/Private/HAL/PThreadRunnableThread.h:185]
libpthread.so.0!UnknownFunction(0x9258)
libc.so.6!clone(+0x42)`

Device lost means driver crashed, just informs about it UE4/5 and as it can’t render anymore (and it needed it for editor UI too) all UE can do crash it self. Try changing you GPU driver setup. Also don’t expect master branch to be stable, it more WIP then Preview builds.

There is still the defrag issue, this kind of crash was resolved for me after adding

[SystemSettings]
r..EnableDefrag=0

To DefaultEngine.ini

I tried this, but it didn’t work for me

What drivers would you recommend?

Hey @mcp613, I faced the same issue.

I resolved it after updating my NVIDIA drivers by following the instructions mentioned in this link

Nevermind. I switched to an amd graphics card and it works now