godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.19k stars 21.21k forks source link

AMD and KDE Plasma crash #82184

Open Cha14ka opened 1 year ago

Cha14ka commented 1 year ago

Godot version

4.1.1.stable

System information

Godot v4.1.1.stable unknown - Arch Linux #1 ZEN SMP PREEMPT_DYNAMIC Wed, 13 Sep 2023 08:37:16 +0000 - Vulkan (Forward+) - dedicated AMD Radeon RX 6500 XT (RADV NAVI24) () - AMD Ryzen 5 5600X 6-Core Processor (12 Threads)

Issue description

If you set Camera3D.near = 0 instead of 0.001, the whole desktop freezes. Journalctl shows the error: [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring gfx_0.0.0.0 timeout, but soft recovered

Godot logs output: ERROR: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST at: swap_buffers (drivers/vulkan/vulkan_context.cpp:2360)

I don't know what happens on Windows, but on Linux the whole system freeze (with AMD and Plasma, idk about Nvidia and etc)

I understand that there is no reason to assign 0, but I have a moment in _process() when distance_to gives 0 at the very beginning and it causes the whole system to freeze. The fix is simple

var near_pos = link_cam.global_position.distance_to(linked_portal.global_position)
if near_pos == 0: near_pos = 0.001
link_cam.set_near(near_pos)

Steps to reproduce

Create Camera3D and in _process() set $Camera3D.near = 0

Minimal reproduction project

N/A

danilw commented 1 year ago

[drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring gfx_0.0.0.0 timeout, but soft recovered

Welcome to AMD - this bug exist on AMD for 5 years already - AMD does not care, yes this also exist on Windows not just Linux.

https://bugzilla.kernel.org/show_bug.cgi?id=201957

or just google amdgpu: ring gfx timeout - and see how many results everywhere, there even 10+ threads on amd-forum about it

on Linux the whole system freeze

obviously System should not freeze from any graphic application behavior, but you have AMD... so ye now you know why everyone use Nvidia

I mean - this is 100% AMD bug in drivers, and Godot have nothing to do with it.

There many ways to trigger this bug on AMD - on kernel bugzilla link above there video file attached - if you play those video file on AMD it freeze system - yep AMD.

P.S. also if you read latest comments on bugzilla link above, people say:

crash on (kernel 6.5.2). No problems on Fedora 38 (kernel 6.2.x).

so staying on kernel 6.2.x - is current solution, I have AMD and im on 6.2.8 kernel - no amd crashes.