RobertBeckebans / RBDOOM-3-BFG

Doom 3 BFG Edition source port with updated DX12 / Vulkan renderer and modern game engine features
https://www.moddb.com/mods/rbdoom-3-bfg
GNU General Public License v3.0
1.38k stars 247 forks source link

Linux: Vulkan fails to create swap chain on second launch #831

Closed Cygon closed 5 months ago

Cygon commented 5 months ago

I've compiled RBDoom-3-BFG v1.5.1 on my Linux system. The SSAO HLSL shaders needed two small tweaks (select() instead of ternary operator), but then it compiled and ran beautifully.

However, after setting my screen resolution (2560x1440), fullscreen mode, then quitting once and restarting, I get the following error message from the RBDoom3BFG executable:

/proc/cpuinfo CPU processors: 16
/proc/cpuinfo CPU logical cores: 16
execing default.cfg
execing D3BFGConfig.cfg
couldn't exec autoexec.cfg
----- R_InitOpenGL -----
Initializing Vulkan subsystem
Enabled Vulkan instance extensions:
    VK_EXT_debug_utils
    VK_KHR_xlib_surface
    VK_KHR_surface
    VK_KHR_get_physical_device_properties2
Enabled Vulkan layers:
Unknown command 'vid_restart'
Sys_Error: Cannot find a Vulkan device that supports all the required extensions and properties.
NVIDIA GeForce RTX 3090:
  - cannot support the requested swap chain size: requested 2560x1440,  available 2560x1332 - 2560x1332

I can't imagine where that weird 2560x1332 comes from. Maybe it's my desktop minus the height of KDE's task bar? Is that message from Vulkan? Can you create a fullscreen Vulkan render device... minus the task bar area?

Also, as a side note, it may be misdetecting my CPUs. There are actually 32 processors with 32 logical cores (2 sockets, each w/16 cores = 32 cores, HyperThreading is disabled).

Cygon commented 5 months ago

Found a workaround:

  1. Delete ~/.local/share/rbdoom3bfg to get it to launch again
  2. Run ./RBDoom3BFG again
  3. Switch to "Borderless Fullscreen"
  4. Kill process with -9 (yep, it hung that hard, normal kill wouldn't make it budge)
  5. Run ./RBDoom3CFG

From that point on, it seems to work fine.

SRSaunders commented 5 months ago

The SSAO shader issue is solved by feffa4a4dd9a2a5f3c608f720cde41bea37797d3 and 8f84e54bb053cad9599e443675761087ce884563. And the swap chain sizes issue is solved by 330486ecdf18a17866b572a54664354c9d7693f8.

I suggest you try the head stream which includes these fixes.

RobertBeckebans commented 5 months ago

As SRSaunders mentioned. This is fixed in the master branch.