Godot not starting with DRI_PRIME=1 anymore

I have a desktop entry that starts Godot with the gpu and it looks like this:

[Desktop Entry]
Type=Application
NoDisplay=false
Terminal=false
Exec=env DRI_PRIME=1 /home/ps/apps/Godot/Godot --display-driver wayland --rendering-driver opengl3 --single-window
Icon=/home/ps/icons/godot.png
Name=Godot
Comment=Godot C#
Categories=dev,development,coding,code,programming

Which doesn’t work anymore - and it used to a few days ago.

Turns out Godot crashes like this

❯ env DRI_PRIME=1 /home/ps/apps/Godot/Godot --display-driver wayland --rendering-driver opengl3 --single-window
Godot Engine v4.4.1.stable.mono.official.49a5bc7b6 - https://godotengine.org

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.4.1.stable.mono.official (49a5bc7b616bd04689a2c89e89bda41f50241464)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib64/libc.so.6(+0x1a050) [0x7fa4eb5e1050] (??:0)
[2] /lib64/libEGL_mesa.so.0(+0x23fec) [0x7fa4c0333fec] (??:0)
[3] /lib64/libEGL_mesa.so.0(+0x21e49) [0x7fa4c0331e49] (??:0)
[4] /lib64/libEGL_mesa.so.0(+0x183d8) [0x7fa4c03283d8] (??:0)
[5] /lib64/libEGL_mesa.so.0(+0x6b58) [0x7fa4c0316b58] (??:0)
[6] /home/ps/apps/Godot/Godot() [0x174ddb4] (??:0)
[7] /home/ps/apps/Godot/Godot() [0x4fe356d] (??:0)
[8] /home/ps/apps/Godot/Godot() [0x4bcb89] (??:0)
[9] /home/ps/apps/Godot/Godot() [0x4c5339a] (??:0)
[10] /home/ps/apps/Godot/Godot() [0x4c36377] (??:0)
[11] /home/ps/apps/Godot/Godot() [0x4c4b715] (??:0)
[12] /home/ps/apps/Godot/Godot() [0x41e3c8] (??:0)
[13] /lib64/libc.so.6(+0x3248) [0x7fa4eb5ca248] (??:0)
[14] /lib64/libc.so.6(__libc_start_main+0x8b) [0x7fa4eb5ca30b] (??:0)
[15] /home/ps/apps/Godot/Godot() [0x44440a] (??:0)
-- END OF BACKTRACE --
================================================================
[1]    752479 IOT instruction (core dumped)  env DRI_PRIME=1 /home/ps/apps/Godot/Godot --display-driver wayland  opengl3

If I use the integrated gpu it works

env DRI_PRIME=0 /home/ps/apps/Godot/Godot --display-driver wayland --rendering-driver opengl3 --single-window

Checking:

❯ lspci -nn | grep VGA
03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 33 [Radeon RX 7600/7600 XT/7600M XT/7600S/7700S / PRO W7600] [1002:7480] (rev c1)
c4:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1 [1002:15bf] (rev c2)

I tried starting it with

env DRI_PRIME=1002:7480! /home/ps/apps/Godot/Godot --display-driver wayland --rendering-driver opengl3 --single-window

But that also crashes Godot.

Did something change in a recent Fedora update that could affect this?

Thanks!

There is a kernel bug in 6.13.6 (and mesa 25) and up that causes the dGPU to fail to exit sleep mode once it is put to sleep.

there are patches for 6.14 that resolve, but the solution until that hits mainline for you would be to downgrade your kernel to 6.13.5 or earlier

or as a workaround since 6.14 with patches should hit “real soon now™”, reboot and before the dGPU goes to sleep run an app that prevents it from sleeping (i’ve found nvtop to be effective there) that will keep the dGPU awake but it only works while the PC is awake, if it goes to sleep so will the dGPU and you’ll need to reboot to get it back again.

see this thread for more info: Graphics card not available

3 Likes

Thanks!

Now that I know I think I can just use the integrated gpu. I was worried the discrete gpu was fried.

Then I’ll just have to wait for the update to come out.

What Linux distro are you using?

You can either go back to kernel 6.10 or jump to 6.14. Whatever is in the middle was very buggy for our dGPUs. :slight_smile: