Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run latest master on Debian 12 #930

Open
klaussilveira opened this issue Sep 4, 2024 · 7 comments
Open

Unable to run latest master on Debian 12 #930

klaussilveira opened this issue Sep 4, 2024 · 7 comments

Comments

@klaussilveira
Copy link

Output:

QA Timing INIT: 000696ms
RBDOOM 3 BFG 1.6.0 preview.1403 linux-x86_64 Sep  4 2024 18:23:27
file system initialized.
--------------------------------------
WARNING: Unable to open resource file maps/_startup.resources
WARNING: Unable to open resource file maps/_startup.resources
----- Initializing Decls -----
------------------------------
Couldn't open journal files
/proc/cpuinfo CPU processors: 8
/proc/cpuinfo CPU logical cores: 8
execing default.cfg
execing D3BFGConfig.cfg
couldn't exec autoexec.cfg
----- R_InitOpenGL -----
r_vidMode reset from 11 to 0.
Initializing Vulkan subsystem
Enabled Vulkan instance extensions:
    VK_EXT_debug_report
    VK_KHR_xlib_surface
    VK_KHR_surface
    VK_KHR_get_physical_device_properties2
Enabled Vulkan layers:
WARNING: Error while creating SDL Vulkan surface: VK_KHR_xlib_surface extension is not enabled in the Vulkan instance.
Unknown command 'vid_restart'
Sys_Error: Failed to create a Vulkan window surface, error code = VK_ERROR_SURFACE_LOST_KHR

Debian 12, x11: vulkaninfo.txt

@abalfoort
Copy link

How are you running the game (wine/compiled)?

I just compiled the source on Debian 12 and moved the base directory and the executable to my doom3 directory. I have been playing without a problem (with NVIDIA's proprietary drivers).

I found this error and a patch here: https://forums.developer.nvidia.com/t/doom-3-bfg-vulkan-renderer-running-on-nvidia-jetson-nano/120549/4

@klaussilveira
Copy link
Author

Compiled from latest master, running on a RTX 2060 with the proprietary drivers version 535.183.01. Using X11, not Wayland.

I did check that patch and manually added the VK_KHR_xlib_surface extension the SDL extension list when creating the vector, but that did not fix the issue:

std::vector<const char*> sdlInstanceExtensions = {};

@abalfoort
Copy link

I'm using the latest 560 driver: https://www.nvidia.com/en-us/geforce/drivers/results/230918/
Don't know if that's going to help, though.

Did you copy the source base directory to your game directory?
If you like I can upload my executable.

@klaussilveira
Copy link
Author

Yeah, everything runs fine on 1.4.0, which is the latest tag without NVRHI. Definitely Vulkan-related, and probably X11?

Appreciate the help, though!

@abalfoort
Copy link

These are my installed vulkan packages:

$ aptitude search vulkan | grep ^i
i  libvulkan-dev - Vulkan loader library -- development files
i  libvulkan1 - Vulkan loader library
i  libvulkan1:i386 - Vulkan loader library
i  mesa-vulkan-drivers - Mesa Vulkan graphics drivers
i  mesa-vulkan-drivers:i386 - Mesa Vulkan graphics drivers
i  vulkan-tools - Miscellaneous Vulkan utilities

@klaussilveira
Copy link
Author

I thought this was related to my aging 2060. After having the need for a newer card, I just got a 4060 and upgraded everything along with it: drivers (565.77), vulkan SDK (1.3.296). This error still persists. I ran it with GDB and removed a few safeguards to know where it could be failing. Running latest master: 4f778fcc9d885a5719ccf4d74c77ce3a35db1952.

----- R_InitOpenGL -----
r_vidMode reset from 11 to 0.
Initializing Vulkan subsystem
Enabled Vulkan instance extensions:
    VK_EXT_debug_report
    VK_KHR_xlib_surface
    VK_KHR_surface
    VK_KHR_get_physical_device_properties2
Enabled Vulkan layers:
Enabled Vulkan device extensions:
    VK_NV_mesh_shader
    VK_EXT_memory_budget
    VK_KHR_fragment_shading_rate
    VK_KHR_format_feature_flags2
    VK_KHR_buffer_device_address
    VK_EXT_descriptor_indexing
    VK_KHR_maintenance1
    VK_KHR_synchronization2
    VK_KHR_swapchain
[New Thread 0x7fffdd1ba6c0 (LWP 12577)]
[New Thread 0x7fffdc9b96c0 (LWP 12578)]
[New Thread 0x7fffd7fff6c0 (LWP 12579)]
[New Thread 0x7fffd77fe6c0 (LWP 12580)]
[New Thread 0x7fffd6dfd6c0 (LWP 12581)]
Created Vulkan device: NVIDIA GeForce RTX 4060
VK 1.3.296.
VK 1.3.296.

Thread 1 "RBDoom3BFG" received signal SIGSEGV, Segmentation fault.
0x00007fffe2144aba in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.565.77
(gdb) bt
#0  0x00007fffe2144aba in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.565.77
#1  0x000055555602f681 in nvrhi::vulkan::Device::Device(nvrhi::vulkan::DeviceDesc const&) ()
#2  0x000055555602e69f in nvrhi::vulkan::createDevice(nvrhi::vulkan::DeviceDesc const&) ()
#3  0x0000555555e8ce88 in DeviceManager_VK::CreateDeviceAndSwapChain() ()
#4  0x0000555555efec90 in DeviceManager::CreateWindowDeviceAndSwapChain(glimpParms_t const&, char const*) ()
#5  0x0000555555eff15b in VKimp_Init(glimpParms_t) ()
#6  0x00005555558b0259 in R_SetNewMode(bool) ()
#7  0x0000555555f126e9 in idRenderBackend::Init() ()
#8  0x00005555558b78a7 in idRenderSystemLocal::InitBackend() ()
#9  0x0000555555700cbf in idCommonLocal::Init(int, char const* const*, char const*) ()
#10 0x0000555555ef91e1 in main ()

I'll continue investigating. I sense this could be something that SDL is setting up wrong, since I am able to run all of NVRHI samples, as well as donut_examples. And I have my own Donut project that I have no issues with, on any card/driver. The only difference there seems to be GLFW vs. SDL.

My next steps are going to be: try SDL3, then remove SDL and replace with GLFW.

@klaussilveira
Copy link
Author

The game does run on debug mode. It didn't previously. Here's the cmake args:

cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=g++ -DUSE_PRECOMPILED_HEADERS=OFF ../neo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants