No graphics output on Linux, window never opens
Moderator: GZDoom Developers
Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.
If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.
Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.
If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.
Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!
No graphics output on Linux, window never opens
In recent dev builds, I can start GZDoom and get the IWAD picker menu, but the actual startup process stalls after that. It never opens the main game window; it just sits there and does nothing.
Building GZDoom on my own machine, I've narrowed it down to the following commit. The commit immediately before this one works fine.
https://github.com/ZDoom/gzdoom/commit/ ... 5f87c05325
I am on Kubuntu 25.04, using Nvidia graphics (driver family version 575.x) in a Wayland session.
Building GZDoom on my own machine, I've narrowed it down to the following commit. The commit immediately before this one works fine.
https://github.com/ZDoom/gzdoom/commit/ ... 5f87c05325
I am on Kubuntu 25.04, using Nvidia graphics (driver family version 575.x) in a Wayland session.
- Attachments
-
- gzdoomfailedstart.txt
- (3.46 KiB) Downloaded 10 times
-
- Posts: 15
- Joined: Thu Jul 17, 2025 7:29 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Fedora
Re: No graphics output on Linux, window never opens
Hey, I'm currently trying to reproduce this.
You said that you're using wayland, but the logs say the display backend being used is x11. If you're certain you're using wayland, can you check if the builds that do work are also using the x11 backend?
You said that you're using wayland, but the logs say the display backend being used is x11. If you're certain you're using wayland, can you check if the builds that do work are also using the x11 backend?
Re: No graphics output on Linux, window never opens
My actual user session is running in Wayland. I'm just using GZDoom's CMake script with all of its default settings, so it's running that through X11 (XWayland) in KDE.
If I roll back to commit 4a8421099, the one immediately before yours, re-run the build changing no settings whatsoever, and launch the program, it runs fine. Doesn't matter whether GZDoom is trying to do full-screen or windowed. When I roll forward to c3fb744f4, it fails with the symptoms I previously described.
What other deps do I need to install to make GZDoom create an actual Wayland window? Setting the VULKAN_USE_WAYLAND parameter alone does not appear to be enough, and I am also not sure what packages provide the dependencies needed for this part of the CMake build (below). It'd be interesting to try this, to see if the behavior changes at all.
-- Checking for modules 'wayland-client;wayland-client++;wayland-client-extra++;wayland-client-unstable++;wayland-cursor++;xkbcommon>=0.5.0'
-- Package 'wayland-client++', required by 'virtual:world', not found
-- Package 'wayland-client-extra++', required by 'virtual:world', not found
-- Package 'wayland-client-unstable++', required by 'virtual:world', not found
-- Package 'wayland-cursor++', required by 'virtual:world', not found
I can find libwaylandclient++1, but that doesn't provide headers to build with, it's just a client lib.
If I roll back to commit 4a8421099, the one immediately before yours, re-run the build changing no settings whatsoever, and launch the program, it runs fine. Doesn't matter whether GZDoom is trying to do full-screen or windowed. When I roll forward to c3fb744f4, it fails with the symptoms I previously described.
What other deps do I need to install to make GZDoom create an actual Wayland window? Setting the VULKAN_USE_WAYLAND parameter alone does not appear to be enough, and I am also not sure what packages provide the dependencies needed for this part of the CMake build (below). It'd be interesting to try this, to see if the behavior changes at all.
-- Checking for modules 'wayland-client;wayland-client++;wayland-client-extra++;wayland-client-unstable++;wayland-cursor++;xkbcommon>=0.5.0'
-- Package 'wayland-client++', required by 'virtual:world', not found
-- Package 'wayland-client-extra++', required by 'virtual:world', not found
-- Package 'wayland-client-unstable++', required by 'virtual:world', not found
-- Package 'wayland-cursor++', required by 'virtual:world', not found
I can find libwaylandclient++1, but that doesn't provide headers to build with, it's just a client lib.
- Attachments
-
- gzdoomsuccessfulrun.txt
- (3.63 KiB) Downloaded 4 times
-
- Posts: 15
- Joined: Thu Jul 17, 2025 7:29 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Fedora
Re: No graphics output on Linux, window never opens
Looks like the package you would need for a wayland build is `waylandpp-dev`
- Chris
- Posts: 2978
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: No graphics output on Linux, window never opens
With Debian, I believe it was just waylandpp-dev that I needed to handle those missing dev modules. Probably the same in Ubuntu derivatives.
As for running with a Wayland window, you need to set the environment variable SDL_VIDEODRIVER=wayland when running GZDoom. SDL2 uses x11 by default for compatibility reasons, but can be told to use Wayland with that environment variable (there are some behavioral differences that some apps may be sensitive to while others are fine). SDL3 should use Wayland by default when running in Wayland, but GZDoom doesn't use that and would need to be modified to support it as some functions and functionality have been changed (some event handling has changed a bit, function return values have changed, and things that SDL2 implicitly did may need a bit more care/synchronization with SDL3).
In either case, I'm seeing the same thing. Doesn't matter if I use X11 (with XWayland) or Wayland native. Both used to work just fine, but after updating to the latest Git version, neither do. The game window doesn't show and it just freezes during or after initialization. With SDL using X11, I get:
Code: Select all
$ ./gzdoom
GZDoom g4.15pre-527-g9065681c4 - 2025-08-27 14:36:10 -0700 - SDL version
Compiled on Aug 27 2025
OS: Debian GNU/Linux forky/sid, Linux 6.12.38+deb13-amd64 on x86_64
GZDoom version g4.15pre-527-g9065681c4
W_Init: Init WADfiles.
adding /home/chris/projects/gzdoom/zdbuild/gzdoom.pk3, 709 lumps
adding /home/chris/projects/gzdoom/zdbuild/game_support.pk3, 3308 lumps
adding /home/chris/.local/share/doom_games/doom2.wad, 2919 lumps
adding /home/chris/projects/gzdoom/zdbuild/lights.pk3, 7 lumps
adding /home/chris/projects/gzdoom/zdbuild/brightmaps.pk3, 499 lumps
adding /home/chris/projects/gzdoom/zdbuild/game_widescreen_gfx.pk3, 214 lumps
S_Init: Setting up sound.
I_InitSound: Initializing OpenAL
Opened device Virtual Surround Sink
EFX enabled
Using video driver x11
Number of detected displays 1 .
Creating window [2036x1080] on adapter 0
Vulkan device: AMD Radeon RX 580 Series (RADV POLARIS10)
Vulkan device type: discrete gpu
Vulkan version: 1.4.305 (api) 25.0.7 (driver)
Max. texture size: 16384
Max. uniform buffer range: -1
Min. uniform buffer offset alignment: 4
Resolution: 2560 x 1440
I_Init: Setting up machine state.
CPU Vendor ID: AuthenticAMD
Name: AMD Ryzen 5 3600 6-Core Processor
Family 23 (23), Model 113, Stepping 0
Features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2 F16C FMA3 BMI1 BMI2 HyperThreading
V_Init: allocate screen.
ST_Init: Init startup screen.
Checking cmd-line parameters...
S_InitData: Load sound definitions.
G_ParseMapInfo: Load map definitions.
Texman.Init: Init texture manager.
ParseTeamInfo: Load team definitions.
LoadActors: Load actor definitions.
script parsing took 447.21 ms
R_Init: Init Doom refresh subsystem.
DecalLibrary: Load decals.
M_Init: Init menus.
P_Init: Init Playloop state.
ParseSBarInfo: Loading custom status bar definition.
D_CheckNetGame: Checking network game status.
Init complete.
Received signal 2, shutting down
Received signal 2, exiting
Code: Select all
$ SDL_VIDEODRIVER=wayland ./gzdoom
GZDoom g4.15pre-527-g9065681c4 - 2025-08-27 14:36:10 -0700 - SDL version
Compiled on Aug 27 2025
OS: Debian GNU/Linux forky/sid, Linux 6.12.38+deb13-amd64 on x86_64
GZDoom version g4.15pre-527-g9065681c4
W_Init: Init WADfiles.
adding /home/chris/projects/gzdoom/zdbuild/gzdoom.pk3, 709 lumps
adding /home/chris/projects/gzdoom/zdbuild/game_support.pk3, 3308 lumps
adding /home/chris/.local/share/doom_games/doom2.wad, 2919 lumps
adding /home/chris/projects/gzdoom/zdbuild/lights.pk3, 7 lumps
adding /home/chris/projects/gzdoom/zdbuild/brightmaps.pk3, 499 lumps
adding /home/chris/projects/gzdoom/zdbuild/game_widescreen_gfx.pk3, 214 lumps
S_Init: Setting up sound.
I_InitSound: Initializing OpenAL
Opened device Virtual Surround Sink
EFX enabled
Using video driver wayland
Number of detected displays 1 .
Creating window [2036x1080] on adapter 0
[HDR Layer] Created HDR surface
Vulkan device: AMD Radeon RX 580 Series (RADV POLARIS10)
Vulkan device type: discrete gpu
Vulkan version: 1.4.305 (api) 25.0.7 (driver)
Max. texture size: 16384
Max. uniform buffer range: -1
Min. uniform buffer offset alignment: 4
Resolution: 2560 x 1440
I_Init: Setting up machine state.
CPU Vendor ID: AuthenticAMD
Name: AMD Ryzen 5 3600 6-Core Processor
Family 23 (23), Model 113, Stepping 0
Features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2 F16C FMA3 BMI1 BMI2 HyperThreading
V_Init: allocate screen.
[HDR Layer] Enabling format: 64 colorspace: 1000104008
[HDR Layer] Enabling format: 58 colorspace: 1000104008
[HDR Layer] Enabling format: 97 colorspace: 1000104002
[HDR Layer] Enabling format: 97 colorspace: 1000104005
[HDR Layer] Enabling format: 64 colorspace: 1000104008
[HDR Layer] Enabling format: 58 colorspace: 1000104008
[HDR Layer] Enabling format: 97 colorspace: 1000104002
[HDR Layer] Enabling format: 97 colorspace: 1000104005
[HDR Layer] Creating swapchain for id: 33 - format: VK_FORMAT_R16G16B16A16_SFLOAT - colorspace: VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT
ST_Init: Init startup screen.
Checking cmd-line parameters...
S_InitData: Load sound definitions.
G_ParseMapInfo: Load map definitions.
Texman.Init: Init texture manager.
ParseTeamInfo: Load team definitions.
LoadActors: Load actor definitions.
script parsing took 424.96 ms
Received signal 2, shutting down
Received signal 2, exiting
With Wayland native, it stops after script parsing took ..., while with X11 it continues past that and stops after Init complete.. In both cases, when it freezes up, pressing ctrl-c in the terminal will cause it to print Received signal 2, shutting down but it will remain locked up. Pressing ctrl-c again causes it to print Received signal 2, exiting and it will then quit.
-
- Posts: 15
- Joined: Thu Jul 17, 2025 7:29 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Fedora
Re: No graphics output on Linux, window never opens
I have finally been able to re-create this with debian 13.
It seems the only difference between my working systems and my non-working system is the sdl version. All of my working systems are using `sdl3 (3.2.x)` with `sd2-compat (2.32.x)`, and my non-working system is using `sdl2 (2.32.4)` directly.
Can you confirm if you are using sdl2 or sdl2-compat? I think that would explain why my system defaults to wayland, and yours to x11, also.
It seems the only difference between my working systems and my non-working system is the sdl version. All of my working systems are using `sdl3 (3.2.x)` with `sd2-compat (2.32.x)`, and my non-working system is using `sdl2 (2.32.4)` directly.
Can you confirm if you are using sdl2 or sdl2-compat? I think that would explain why my system defaults to wayland, and yours to x11, also.
Re: No graphics output on Linux, window never opens
Yup, same behavior I'm getting. It'll respond to CTRL-C, but it never actually spawns the main window.
Just to see if it made any difference, I tried switching to an old X11 session. Didn't help.
Just to see if it made any difference, I tried switching to an old X11 session. Didn't help.
- Chris
- Posts: 2978
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: No graphics output on Linux, window never opens
I'm using sdl2 (2.32.8+dfsg-2), not sdl2-compat. With sdl2-compat, it works with X11 (the default, XWayland) but not Wayland native (with SDL_VIDEODRIVER=wayland, it stops at the same point).phinet wrote: ↑Wed Aug 27, 2025 8:31 pm It seems the only difference between my working systems and my non-working system is the sdl version. All of my working systems are using `sdl3 (3.2.x)` with `sd2-compat (2.32.x)`, and my non-working system is using `sdl2 (2.32.4)` directly.
Can you confirm if you are using sdl2 or sdl2-compat? I think that would explain why my system defaults to wayland, and yours to x11, also.
EDIT:
Reverting just the aforementioned commit makes it work again without sdl2-compat, for both X11 and Wayland. Also to note, when using sdl2-compat with X11, the loading screen with the GZDoom logo and loading bar was skipped, which reverting that commit makes show up again.
Re: No graphics output on Linux, window never opens
I have regular old SDL2, as well. Same version as Chris, above. This machine is in as close to an "out-of-the-box" configuration as I can manage (most software is installed via Flatpak or other containment mechanisms, only a handful of programs are installed from the package repo), so it is reasonable to assume that at least some other users with Debian-based distros (Ubuntu, Mint, etc.) will be in a similar state.
In fact:
So there's a decent chance I didn't even install it, it's just there because I have KDE Plasma.
Code: Select all
sudo apt list | grep libsdl2-2.0-0
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libsdl2-2.0-0/plucky,now 2.32.2+dfsg-2 amd64 [installed,automatic]
libsdl2-2.0-0/plucky 2.32.2+dfsg-2 i386
Code: Select all
apt-cache rdepends --installed libsdl2-2.0-0
libsdl2-2.0-0
Reverse Depends:
libavdevice61
libsdl2-compat-shim
ffmpeg
libsdl2-compat-shim
steam-libs
libsdl2-compat-shim
plasma-desktop
libsdl2-compat-shim
libmpv2
libsdl2-compat-shim
libavdevice61
libsdl2-compat-shim
ffmpeg
libsdl2-compat-shim
plasma-desktop
libsdl2-compat-shim
-
- Posts: 15
- Joined: Thu Jul 17, 2025 7:29 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Fedora
Re: No graphics output on Linux, window never opens
Thank you for the information.
I believe I have a fix. Would you be able to test if this fixes the issue for you?
https://github.com/the-phinet/gzdoom/tr ... um-t-80790
(branch fix-forum-t-80790, commit 26f147c2b8)
Edit: added fix for missing loading screen in commit affbcb5034
I believe I have a fix. Would you be able to test if this fixes the issue for you?
https://github.com/the-phinet/gzdoom/tr ... um-t-80790
(branch fix-forum-t-80790, commit 26f147c2b8)
Edit: added fix for missing loading screen in commit affbcb5034
Last edited by phinet on Thu Aug 28, 2025 3:40 pm, edited 1 time in total.
- Chris
- Posts: 2978
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: No graphics output on Linux, window never opens
It seems to fix it with X11, but not Wayland native (using SDL_VIDEODRIVER=wayland), which still freezes after script parsing ... without the game/window showing.phinet wrote: ↑Thu Aug 28, 2025 3:04 pm Thank you for the information.
I believe I have a fix. Would you be able to test if this fixes the issue for you?
https://github.com/the-phinet/gzdoom/tr ... um-t-80790
(branch fix-forum-t-80790, commit 26f147c2b8)
Edit: added fix for missing loading screen in commit affbcb5034
Re: No graphics output on Linux, window never opens
It's actually working fine for me in both X11 and Wayland native output windows, both running from the command line and invoking directly from the windowing environment. However, I am using dependencies repackaged from Ubuntu 24.04, since I actually keep all my build environments in containers.
-
- Posts: 15
- Joined: Thu Jul 17, 2025 7:29 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Fedora
Re: No graphics output on Linux, window never opens
> It's actually working fine for me in both X11 and Wayland native output windows
Awesome! Glad to hear. I'll send the fix upstream soon. Sorry for breaking things in the first place.
> which still freezes after script parsing ... without the game/window showing
I think this is a different issue, I'm currently trying to see if I can replicate it.
Awesome! Glad to hear. I'll send the fix upstream soon. Sorry for breaking things in the first place.
> which still freezes after script parsing ... without the game/window showing
I think this is a different issue, I'm currently trying to see if I can replicate it.
- Chris
- Posts: 2978
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: No graphics output on Linux, window never opens
Some quick debugging, and it seems to be freezing here:
Code: Select all
Thread 1 (Thread 0x7ffff61a4980 (LWP 489326) "gzdoom"):
#0 __syscall_cancel_arch () at ../sysdeps/unix/sysv/linux/x86_64/syscall_cancel.S:56
#1 0x00007ffff6ba9668 in __internal_syscall_cancel (a1=<optimized out>, a2=<optimized out>, a3=<optimized out>, a4=<optimized out>, a5=a5@entry=8, a6=a6@entry=0, nr=271) at ./nptl/cancellation.c:49
#2 0x00007ffff6ba96ad in __syscall_cancel (a1=<optimized out>, a2=<optimized out>, a3=<optimized out>, a4=<optimized out>, a5=a5@entry=8, a6=a6@entry=0, nr=271) at ./nptl/cancellation.c:75
#3 0x00007ffff6c1de6e in __GI_ppoll (fds=fds@entry=0x7fffffffbe00, nfds=nfds@entry=1, timeout=<optimized out>, timeout@entry=0x0, sigmask=sigmask@entry=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:42
#4 0x00007ffff799cb77 in ppoll (__fds=0x7fffffffbe00, __nfds=1, __timeout=0x0, __ss=0x0) at /usr/include/x86_64-linux-gnu/bits/poll2.h:101
#5 wl_display_poll (display=display@entry=0x555556ef2fd0, events=events@entry=1, timeout=timeout@entry=0x0) at ../src/wayland-client.c:2006
#6 0x00007ffff799e4ed in wl_display_dispatch_queue_timeout (display=0x555556ef2fd0, queue=0x5555571894d0, timeout=timeout@entry=0x0) at ../src/wayland-client.c:2086
#7 0x00007ffff799e5ef in wl_display_dispatch_queue (display=<optimized out>, queue=<optimized out>) at ../src/wayland-client.c:2163
#8 0x00007ffff2588d60 in wsi_wl_swapchain_queue_present (wsi_chain=0x555558c465e0, image_index=1, present_id=0, damage=0x0) at ../src/vulkan/wsi/wsi_common_wayland.c:2465
#9 0x00007ffff257f3f3 in wsi_common_queue_present (wsi=0x555558bbd848, device=<optimized out>, queue=<optimized out>, queue_family_index=<optimized out>, pPresentInfo=0x7fffffffc320) at ../src/vulkan/wsi/wsi_common.c:1579
#10 0x00007ffff47c1504 in HdrLayer::VkDeviceOverrides::QueuePresentKHR (pDispatch=0x555558bab550, queue=0x555557795cc0, pPresentInfo=0x7fffffffc320) at ../src/VkLayer_hdr_wsi.cpp:815
#11 0x00007ffff47b6499 in vkroots::wrap_QueuePresentKHR<HdrLayer::VkInstanceOverrides, vkroots::NoOverrides, HdrLayer::VkDeviceOverrides> (queue=0x555557795cc0, pPresentInfo=0x7fffffffc320) at ../subprojects/vkroots/vkroots.h:5060
#12 0x0000555555d56d62 in VulkanSwapChain::QueuePresent (this=0x555557d9ae20, imageIndex=<optimized out>, semaphore=<optimized out>) at /home/chris/projects/gzdoom/libraries/ZVulkan/src/vulkanswapchain.cpp:262
#13 0x000055555585e0dd in VkFramebufferManager::QueuePresent (this=<optimized out>) at /home/chris/projects/gzdoom/src/common/rendering/vulkan/textures/vk_framebuffer.cpp:78
#14 0x0000555555843c6a in VkCommandBufferManager::WaitForCommands (this=0x555558b2df20, finish=finish@entry=true, uploadOnly=uploadOnly@entry=false) at /usr/include/c++/14/bits/unique_ptr.h:193
#15 0x00005555558406f4 in VkCommandBufferManager::WaitForCommands (this=<optimized out>, finish=true) at /home/chris/projects/gzdoom/src/common/rendering/vulkan/system/vk_commandbuffer.h:22
#16 VulkanRenderDevice::Update (this=0x5555577937a0) at /home/chris/projects/gzdoom/src/common/rendering/vulkan/system/vk_renderdevice.cpp:230
#17 0x0000555555ac04ec in FStartScreen::Render (this=this@entry=0x5555575d5790, force=force@entry=false) at /home/chris/projects/gzdoom/src/common/startscreen/startscreen.cpp:705
#18 0x0000555555ac0685 in FStartScreen::Progress (this=0x5555575d5790, advance=advance@entry=1) at /home/chris/projects/gzdoom/src/common/startscreen/startscreen.cpp:652
#19 0x0000555555883fe1 in D_InitGame (iwad_info=<optimized out>, iwad_info@entry=0x5555576ea420, allwads=std::vector of length 0, capacity 0, pwads=std::vector of length 0, capacity 0) at /home/chris/projects/gzdoom/src/d_main.cpp:3440
#20 0x0000555555886414 in D_DoomMain_Internal () at /home/chris/projects/gzdoom/src/d_main.cpp:3846
#21 GameMain () at /home/chris/projects/gzdoom/src/d_main.cpp:3927
#22 0x00005555556a6bd2 in main (argc=1, argv=0x7fffffffdb38) at /home/chris/projects/gzdoom/src/common/platform/posix/sdl/i_main.cpp:207
-
- Posts: 15
- Joined: Thu Jul 17, 2025 7:29 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Fedora
Re: No graphics output on Linux, window never opens
Okay, this is interesting. Unfortunately, I'm still unable to replicate the issue you're having. Thankfully, native wayland with sdl2 (non compat) is not the default, so I don't think this will end up being an issue (though I might be wrong).
I'm wondering if this has something to do with your framerate? That specific render call never happens on my machine, due to the throttling that is implemented. If I disable the throttling, things still work as expected. I'm curious what would happen on your system if the throttling is disabled.
To do that you can change the if statement at `startscreen.cpp:668` from to
I'm wondering if this has something to do with your framerate? That specific render call never happens on my machine, due to the throttling that is implemented. If I disable the throttling, things still work as expected. I'm curious what would happen on your system if the throttling is disabled.
To do that you can change the if statement at `startscreen.cpp:668` from
Code: Select all
if (nowtime - screen->FrameTime > minwaittime || force)
Code: Select all
if (1)