adamrehn / ue4-docker

Windows and Linux containers for Unreal Engine 4
https://docs.adamrehn.com/ue4-docker/
MIT License
775 stars 172 forks source link

Vulkan Crash #360

Open jrowinski3d opened 1 month ago

jrowinski3d commented 1 month ago

Output of the ue4-docker info command:

ue4-docker version:         0.0.114 (latest available version is 0.0.114)
Operating system:           Linux (Ubuntu 22.04.4 LTS, 5.15.146.1-microsoft-standard-WSL2, running under WSL)
Docker daemon version:      27.0.3
NVIDIA Docker supported:    Yes
Maximum image size:         No limit detected
Available disk space:       879.26 GiB
Total system memory:        98.23 GiB physical, 25 GiB virtual
CPU:                        16 physical, 32 logical (x86_64)

Additional details:

Hi, I am trying to run MovieRenderQueue within the docker container. I am getting Vulkan Driver crashes. I am currently running on a Windows 10 machine try to run these docker containers. I've been trying to match driver versions, rebuild and compile for linux and I seem to be coming to a dead end. Any help would be appreciated!

Engine/Binaries/Linux/UnrealEditor /home/ue4/UnrealEngine/MyProject/MyProject.uproject LevelToLoad -game -MoviePipelineLocalExecutorClass="/Script/MovieRenderPipelineCore.MoviePipelinePythonHostExecutor" -ExecutorPythonClass="/Engine/PythonTypes.MoviePipelineRuntimeExecutor" -LevelSequence="/Level/Sequence" -OutputPath=/mnt/test/ -log -stdout -allowStdOutLogVerbosity -unattended 

My docker run command:

docker run -it --gpus=all -e DISPLAY=192.168.1.115:0.0 -v $(pwd):/home/ue4/UnrealEngine/CitySample ghcr.io/epicgames/unreal-engine:dev-5.4.1

The error I am receiving:

[2024.07.02-18.07.40:826][  0]LogVulkanRHI: Display: Found VULKAN_SDK=
[2024.07.02-18.07.40:826][  0]LogVulkanRHI: Display: Registering provided Vulkan validation layers
[2024.07.02-18.07.40:826][  0]LogVulkanRHI: Display: Updated VK_LAYER_PATH=../../../Engine/Binaries/ThirdParty/Vulkan/Linux
[2024.07.02-18.07.40:826][  0]LogVulkanRHI: Display: Updated LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu:/usr/local/nvidia/lib:/usr/local/nvidia/lib64:../../../Engine/Binaries/ThirdParty/Vulkan/Linux
[2024.07.02-18.07.40:826][  0]LogInit: Using SDL_WINDOW_VULKAN
[2024.07.02-18.07.40:826][  0]LogVulkanRHI: Vulkan PSO Precaching = 0, PipelineFileCache = 1
[2024.07.02-18.07.40:827][  0]LogVulkanRHI: Display: Built with Vulkan header version 1.3.250
[2024.07.02-18.07.40:827][  0]LogVulkanRHI: Starting Vulkan Profile check for VP_UE_Vulkan_SM5_RT:
[2024.07.02-18.07.40:829][  0]LogVulkanRHI: Error: vpCreateInstance(&ProfileInstanceCreateInfo, VULKAN_CPU_ALLOCATOR, &TempInstance) failed, VkResult=-9
 at ./Runtime/VulkanRHI/Private/VulkanRHI.cpp:314
 with error VK_ERROR_INCOMPATIBLE_DRIVER
Fatal error: [File:./Runtime/VulkanRHI/Private/VulkanUtil.cpp] [Line: 1137]
vpCreateInstance(&ProfileInstanceCreateInfo, VULKAN_CPU_ALLOCATOR, &TempInstance) failed, VkResult=-9
 at ./Runtime/VulkanRHI/Private/VulkanRHI.cpp:314
 with error VK_ERROR_INCOMPATIBLE_DRIVER
[2024.07.02-18.07.40:830][  0]LogCore: Error: appError called: Fatal error: [File:./Runtime/VulkanRHI/Private/VulkanUtil.cpp] [Line: 1137]
vpCreateInstance(&ProfileInstanceCreateInfo, VULKAN_CPU_ALLOCATOR, &TempInstance) failed, VkResult=-9
 at ./Runtime/VulkanRHI/Private/VulkanRHI.cpp:314
 with error VK_ERROR_INCOMPATIBLE_DRIVER
0x00007f499caeb815 libUnrealEditor-VulkanRHI.so!VulkanRHI::VerifyVulkanResult(VkResult, char const*, char const*, unsigned int) [/home/ue4/UnrealEngine/Engine/Source/./Runtime/VulkanRHI/Private/VulkanUtil.cpp:1136]
0x00007f499caa2d5e libUnrealEditor-VulkanRHI.so!CheckVulkanProfile(ERHIFeatureLevel::Type, bool) [/home/ue4/UnrealEngine/Engine/Source/./Runtime/VulkanRHI/Private/VulkanRHI.cpp:314]
0x00007f499caa40b9 libUnrealEditor-VulkanRHI.so!FVulkanDynamicRHI::CreateInstance() [/home/ue4/UnrealEngine/Engine/Source/./Runtime/VulkanRHI/Private/VulkanRHI.cpp:692]
0x00007f499caa3cc8 libUnrealEditor-VulkanRHI.so!FVulkanDynamicRHI::FVulkanDynamicRHI() [/home/ue4/UnrealEngine/Engine/Source/./Runtime/VulkanRHI/Private/VulkanRHI.cpp:539]
0x00007f499caa2f40 libUnrealEditor-VulkanRHI.so!FVulkanDynamicRHIModule::CreateRHI(ERHIFeatureLevel::Type) [/home/ue4/UnrealEngine/Engine/Source/./Runtime/VulkanRHI/Private/VulkanRHI.cpp:393]
0x00007f4a59c0b6a1 libUnrealEditor-RHI.so!PlatformCreateDynamicRHI() [/home/ue4/UnrealEngine/Engine/Source/./Runtime/RHI/Private/Linux/LinuxDynamicRHI.cpp:135]
0x00007f4a59c09c46 libUnrealEditor-RHI.so!RHIInit(bool) [/home/ue4/UnrealEngine/Engine/Source/./Runtime/RHI/Private/DynamicRHI.cpp:290]
0x000000000025c348 UnrealEditor!FEngineLoop::PreInitPreStartupScreen(char16_t const*) [/home/ue4/UnrealEngine/Engine/Source/./Runtime/Launch/Private/LaunchEngineLoop.cpp:3248]
0x0000000000252742 UnrealEditor!GuardedMain(char16_t const*) [/home/ue4/UnrealEngine/Engine/Source/./Runtime/Launch/Private/Launch.cpp:136]
0x00007f4a5578ca52 libUnrealEditor-UnixCommonStartup.so!CommonUnixMain(int, char**, int (*)(char16_t const*), void (*)()) [/home/ue4/UnrealEngine/Engine/Source/./Runtime/Unix/UnixCommonStartup/Private/UnixCommonStartup.cpp:269]
0x00007f4a5549cd90 libc.so.6!UnknownFunction(0x29d8f)
0x00007f4a5549ce40 libc.so.6!__libc_start_main(+0x7f)
0x000000000023adb9 UnrealEditor!_start()
TBBle commented 1 month ago

Does Vulkan actually work inside WSL2 for you? And if so, can it be gotten working inside a regular container? (I'm not sure if we have vulkaninfo available inside the unreal-engine dev container but if so, vulkaninfo --summary will help show what state it's in.)

That error suggests that whatever Vulkan driver is being used, it doesn't support what we need it to do. I'm not sure if that's something that lives inside or outside the container though.

Poking around, we might need a special build of mesa to get a Vulkan driver that works under WSL2; see https://github.com/microsoft/wslg/issues/1254 and https://github.com/microsoft/wslg/issues/40#issuecomment-2037539322.