Posted February 08, 2020
Hi!
It is well known that Cook, Serve, Delicious does not start on Linux with the AMD open source drivers. The workaround one finds by doing a quick google search is to disable hardware acceleration. This runs mostly fine, but can lead to noticeable performance drops if lots of things are on screen.
The game Turmoil is built on the same engine, and after installing it today, I found that the Turmoil developers (or GoG, no idea who set up the run.sh script for it) offer a better workaround for the crash, which seems to work quite well with the amdgpu kernel module. Sadly it does not seem to work with the radeon kernel module, so if you have an older card, you're still stuck with software rendering. The workaround is to enable debug output for vertex and pixel shaders. I have no idea why dumping the shader source code, intermediate code and assembly to console prevents the crash, but it does.
This workaround seems to also work very well with Cook, Serve, Delicious, hence this post.
Both workarounds can be easily implemented by editing the start.sh script file, and setting an environment variable In the "run_game()" function.
To use the amdgpu workaround, just replace the line
./"runner"
with
R600_DEBUG="vs,ps" ./"runner"
To disable hardware acceleration, replace the same line with
LIBGL_ALWAYS_SOFTWARE=1 ./"runner"
As said, I have no idea why outputting shader (+shader compiler) debug output works around the crash on amdgpu... Probably some race condition in the game engine code that does not happen if the shader compilation takes longer.
In any case, I hope this is useful to someone.
Have a great day,
Andi
It is well known that Cook, Serve, Delicious does not start on Linux with the AMD open source drivers. The workaround one finds by doing a quick google search is to disable hardware acceleration. This runs mostly fine, but can lead to noticeable performance drops if lots of things are on screen.
The game Turmoil is built on the same engine, and after installing it today, I found that the Turmoil developers (or GoG, no idea who set up the run.sh script for it) offer a better workaround for the crash, which seems to work quite well with the amdgpu kernel module. Sadly it does not seem to work with the radeon kernel module, so if you have an older card, you're still stuck with software rendering. The workaround is to enable debug output for vertex and pixel shaders. I have no idea why dumping the shader source code, intermediate code and assembly to console prevents the crash, but it does.
This workaround seems to also work very well with Cook, Serve, Delicious, hence this post.
Both workarounds can be easily implemented by editing the start.sh script file, and setting an environment variable In the "run_game()" function.
To use the amdgpu workaround, just replace the line
./"runner"
with
R600_DEBUG="vs,ps" ./"runner"
To disable hardware acceleration, replace the same line with
LIBGL_ALWAYS_SOFTWARE=1 ./"runner"
As said, I have no idea why outputting shader (+shader compiler) debug output works around the crash on amdgpu... Probably some race condition in the game engine code that does not happen if the shader compilation takes longer.
In any case, I hope this is useful to someone.
Have a great day,
Andi