Unable to install games. 256 & 13568 error codes

I tried to install several games from my GOG library and every time installation process ends with 256 error:

I found on the forum topic with suggestion to turn off fsync and esync for the wine runner. I made this config change and now I get error with 13568 code:

INFO     2023-12-27 14:14:05,543 [files_box.on_file_available:114]:All files available
INFO     2023-12-27 14:14:05,543 [installerwindow.on_files_available:631]:All files are available, continuing install
DEBUG    2023-12-27 14:14:05,543 [interpreter.create_game_folder:213]:Creating destination path /home/platonov/Games/gog/rage-of-mages
DEBUG    2023-12-27 14:14:05,543 [interpreter._iter_commands:349]:Installer command: {'task': {'executable': 'goginstaller', 'name': 'wineexec', 'prefix': '$GAMEDIR'}}
ERROR    2023-12-27 14:14:05,589 [wine.detect_prefix_arch:87]:Prefix not found: /home/platonov/Games/gog/rage-of-mages
INFO     2023-12-27 14:14:05,589 [wine.create_prefix:99]:Creating a win64 prefix in /home/platonov/Games/gog/rage-of-mages
DEBUG    2023-12-27 14:14:05,589 [system.execute:74]:Executing /home/platonov/.local/share/lutris/runners/wine/wine-ge-8-25-x86_64/bin/wineboot
DEBUG    2023-12-27 14:14:05,589 [system.execute:80]:WINEARCH=win64 WINEPREFIX=/home/platonov/Games/gog/rage-of-mages WINEDLLOVERRIDES=winemenubuilder= WINE_MONO_CACHE_DIR=/home/platonov/.local/share/lutris/runners/wine/wine-ge-8-25-x86_64/mono WINE_GECKO_CACHE_DIR=/home/platonov/.local/share/lutris/runners/wine/wine-ge-8-25-x86_64/gecko
INFO     2023-12-27 14:19:06,119 [wine.create_prefix:154]:win64 Prefix created in /home/platonov/Games/gog/rage-of-mages
ERROR    2023-12-27 14:19:06,166 [nvidia.get_nvidia_glx_path:42]:Unable to load libGLX_nvidia.so.0
WARNING  2023-12-27 14:19:06,166 [nvidia.get_nvidia_dll_path:90]:Unable to locate libGLX_nvidia
lutris-wrapper: /home/platonov/.local/share/lutris/runners/wine/wine-ge-8-25-x86_64/bin/wine
Started initial process 249303 from /home/platonov/.local/share/lutris/runners/wine/wine-ge-8-25-x86_64/bin/wine /home/platonov/.cache/lutris/installer/rage-of-mages/gog/setup_rage_of_mages_2.1.0.3.exe
Start monitoring process.
0100:err:environ:run_wineboot boot event wait timed out
wine: could not load kernel32.dll, status c0000135
Monitored process exited.
Initial process has exited (return code: 13568)
All processes have quit
Exit with return code 13568
DEBUG    2023-12-27 14:24:06,352 [command.on_stop:195]:Process 249301 has terminated with code 13568
DEBUG    2023-12-27 14:24:06,374 [commands._monitor_task:448]:Return code: 13568
ERROR    2023-12-27 14:24:06,374 [errors.__init__:18]:Command exited with code 13568
ERROR    2023-12-27 14:24:06,374 [exceptions.wrapper:69]:Command exited with code 13568
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/lutris/exceptions.py", line 67, in wrapper
    return function(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/lutris/installer/commands.py", line 450, in _monitor_task
    raise ScriptingError(_("Command exited with code %s") % command.return_code)
lutris.installer.errors.ScriptingError: Command exited with code 13568

As I can understand, this problem affects all game that require wine.

My system:
Fedora workstation 39, Gnome 45.3, Wayland, Lutris version 0.5.14 (flatpak),

Hardware:
AMD Ryzen 5 7600, 16 GB RAM

These are two completely different errors and problems.

  1. error 256
    most likely the executable could not find required data and aborted. e.g. required .bin file is not in same directory. as the exe is called with /silent /nogui /suppress… you don’t face any requesters

  2. return code 13568
    in these case i guess the WINEPREFIX var is not exported to subprocesses.
    export WINEPREFIX=~/ Games/gog/rage-of-mages
    might fix that problem

and fwiw: i’m running Fallout 1 with hires-patch on my Ryzen 3600 without issues. so, it is possible.