Never Man
Never Man

Reputation: 1

Unreal Engine 5 fails to start on Ubuntu 22.04

On Ubuntu 22.04 freshly installed from Server ISO (Ubuntu 22.04.3 LTS x86_64 5.15.0-91-generic) UE5 fails to start with SIGSEGV in libc.6.so. Engine does not tell any details about function which caused crash. It happens just after showing the loading screen on 0%. Log details:

[2024.01.06-16.50.17:131][  0]LogInit: Using SDL_WINDOW_VULKAN
[2024.01.06-16.50.17:131][  0]LogVulkanRHI: Display: Built with Vulkan header version 1.3.239
[2024.01.06-16.50.17:132][  0]LogVulkanRHI: Starting Vulkan Profile check for VP_UE_Vulkan_SM5_RT:
MESA-INTEL: warning: Haswell Vulkan support is incomplete
Signal 11 caught.
Malloc Size=262146 LargeMemoryPoolOffset=262162 
CommonUnixCrashHandler: Signal=11
[2024.01.06-16.50.17:463][  0]LogCore: === Critical error: ===
Unhandled Exception: SIGSEGV: invalid attempt to read memory at address 0x0000000000000000

[2024.01.06-16.50.17:463][  0]LogCore: Fatal error!

0x00007fd6dca12520 libc.so.6!UnknownFunction(0x4251f)

[2024.01.06-16.50.17:504][  0]LogExit: Executing StaticShutdownAfterError

Engine version is 5.3.2 built from source. Crash persists on 5.3.1 and binary 5.3.2. Output of nvidia-smi:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.157                Driver Version: 390.157                   |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Quadro K1100M       Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   46C    P0    N/A /  N/A |    143MiB /  1999MiB |      3%      Default |
+-------------------------------+----------------------+----------------------+

Output of Unreal.log:

[2024.01.06-16.50.17:131][  0]LogInit: Using SDL_WINDOW_VULKAN
[2024.01.06-16.50.17:131][  0]LogVulkanRHI: Display: Built with Vulkan header version 1.3.239
[2024.01.06-16.50.17:132][  0]LogVulkanRHI: Starting Vulkan Profile check for VP_UE_Vulkan_SM5_RT:
[2024.01.06-16.50.17:463][  0]LogCore: === Critical error: ===
Unhandled Exception: SIGSEGV: invalid attempt to read memory at address 0x0000000000000000

[2024.01.06-16.50.17:463][  0]LogCore: Fatal error!

0x00007fd6dca12520 libc.so.6!UnknownFunction(0x4251f)

[2024.01.06-16.50.17:504][  0]LogExit: Executing StaticShutdownAfterError

Diagnostics:

Generating report for minidump

Application version 5.3.2.0
 ... built from changelist 0

OS version Linux 5.15.0-91-generic (network name: thicc-pad)
Running 2 x86_64 processors (4 logical cores)
Exception was "SIGSEGV: invalid attempt to read memory at address 0x0000000000000000"

<SOURCE START>
<SOURCE END>

<CALLSTACK START>
libc.so.6!UnknownFunction(0x4251f)

<CALLSTACK END>

0 loaded modules

Report end!

It was working flawlessly on Ubuntu 20.04, however few days ago I have installed fresh Ubuntu 22.04. Epic claims that it even is recommended system for Linux Unreal development.

What I tried:

Upvotes: 0

Views: 766

Answers (1)

Tom
Tom

Reputation: 1

Ran into this (or a very similar) issue that was caused a seg fault on calling vpCreateInstance() in VulkanRHI.cpp in Unreal Engine. Graphics card is an nvidia 3080 Ti, and was working pretty great up until a few days ago, when the 550 drivers from nvidia became the new proprietary/tested driver version in Ubuntu Snap. After installing these, not even downgrading to the driver version I had installed before would work.

It turns out the problem was not with the graphics driver, but with the gcc compiler version.

I am on 22.04.5, which uses the 6.8 kernel, which was compiled using gcc-12. Ubuntu 22.04 uses gcc 11.4 by default. When installing graphics drivers, they need to be compiled using the same version of gcc as the kernel. If they are not, the headers will be different, the build will fail, and the driver will not be entirely installed. tl;dr install gcc 12 (or whatever version your kernel was built with), make it the default, re-install your graphics drivers, and reboot.

Run gcc --version to check the default gcc version being used. It might be 11.4. That's what mine was.

sudo apt install gcc-12

to install gcc 12, if it is not already.

sudo update-alternatives --query gcc

to check any existing update-alternatives priorities for gcc

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 50

to make it the default for gcc. I didn't have any existing ones, so 50 seemed like a nice number to me. You might need a higher or lower one, depending on if you have any existing priorities for gcc.

gcc --version again to make sure it is 12, then re-ran the nvidia driver install, which completed successfully.

init 6

caused my machine to reboot, and when it did, I had a very snappy feeling desktop across all of my monitors and a UE5 that worked again.

Upvotes: 0

Related Questions