Author Topic: Enabling Shadows Freezes System When A Ship Is Loaded  (Read 948 times)

0 Members and 1 Guest are viewing this topic.

Enabling Shadows Freezes System When A Ship Is Loaded
I recently got the itch to get back into Freespace, and finally finished Freespace Port. When I went to play FS2, My game completely froze my computer when loading in the tutorial. After lots of google trawling and messing around, I've finally deduced that having shadows enabled in the FSO Options causes this freeze whenever a ship is loaded in any mod, like when entering a mission or going into the tech room. It's easy to disable, and the game doesn't look ugly without this option enabled, but considering this was a default setting for FS2's MediaVPs and nothing I've found shows how to stop this bug, I'd like to find a solution.

Debug Log: https://fsnebula.org/log/60165d46d2517f95b5a8d5aa

Launcher: Knossos
OS: Arch Linux
CPU: Ryzen 5 1400
GPU: RX 480 8GB
RAM: 16GB

 
Re: Enabling Shadows Freezes System When A Ship Is Loaded
Hi, I've got the same problem, also on Arch, same graphics card. As far as I can determine, it's an error in the last few AMDGPU drivers.
So far I've found two workarounds:

- Set engine flag -shadow_quality 2. AMDGPU can handle the lower quality.

- Use AMDGPU-PRO's OpenGL library. It results in lower FPS, but is stable even with -shadow_quality 4
To do that, I've built but did not install amdgpu-pro-libgl from aur, uncompressed it to get a .pkg folder,
put that into /opt/fs2_open, and edited the knossos.desktop file to set the following envvars:
Code: [Select]
Exec=env QT_QPA_PLATFORM= LD_LIBRARY_PATH="/opt/fs2_open/amdgpu-pro-libgl-20.40_1147286-1-x86_64.pkg/opt/amdgpu-pro/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH}" LIBGL_DRIVERS_PATH="/opt/fs2_open/amdgpu-pro-libgl-20.40_1147286-1-x86_64.pkg/usr/lib/x86_64-linux-gnu/dri/" dri_driver="amdgpu" python3 -mknossos %UYou'll need to edit the path depending on which version of AMDGPU-PRO you're building.

This way, your other applications still use the AMDGPU driver, and you can still use gnome-wayland, for example.

I've also thought of trying out OpenGL drivers from older mesa versions this way, but as of yet I have no experience with that approach.

EDIT: I was a little unclear here. With AMDGPU I meant the open-source graphics stack (Kernel module amdgpu + mesa's OpenGL RadeonSI) as opposed to AMDGPU-PRO stack (Kernel module amdgpu + AMD's OpenGL AMDGPU-PRO). The error seems to be in radeonsi.
« Last Edit: January 31, 2021, 02:02:27 pm by themaddin »

 

Offline m!m

  • 211
Re: Enabling Shadows Freezes System When A Ship Is Loaded
I can confirm that we are aware of this bug since I had the same issue on the same GPU on Linux.

I am relatively certain that we have some sort of graphics bug somewhere in there but I was never able to narrow down where it might be coming from :sigh:

 
Re: Enabling Shadows Freezes System When A Ship Is Loaded
I'm not sure the error lies with the engine - I've recently tried it out with various versions of mesa
(loading it from Archlinux Archive or archive.org and manually tracking down the old dependencies),
and it seems to get better the newer the driver is.

So when the techroom opens to the view of Ulysses (I always test drivers by browsing the techroom first, with shadows at 4),
with mesa 17.2 all I see is a red outline, with newer drivers I see a red-tinted Uly and missing pieces of techroom UI.

Maybe I should add that I flashed my card to RX580 (to solve hangs in wine/proton), but I had the same issues with a RX560,
and before i flashed it.

Intelgrated and nvidia GT1030 don't have this issue, but, of course, atrocious performance.