protonscr

CreateDevice with Windowed=false fails on enterFullscreenMode with wayland

dxvkclosed native
doitsujin/dxvk#5363 · opened 2025-12-03 by muflub · updated 2026-04-14 · 5 comments · github
Mmuflub 2025-12-03 github

Playing C&C Generals Zero Hour on Ubuntu 25.10 fails to start in full screen with the following error:

info:  D3D9DeviceEx::ResetSwapChain:
info:    Requested Presentation Parameters
info:      - Width:              1600
info:      - Height:             900
info:      - Format:             D3D9Format::X8R8G8B8
info:      - Auto Depth Stencil: true
info:                  ^ Format: D3D9Format::D16
info:      - Windowed:           false
info:      - Swap effect:        1
err:   SDL3 WSI: enterFullscreenMode: SDL_SetWindowPosition: wayland cannot position non-popup windows
err:   D3D9: EnterFullscreenMode: Failed to enter fullscreen mode
err:   D3D9: Failed to set initial fullscreen state

Tracing it down with a custom build of dxvk it seems disabling the call to set window position (only doing if not switching modes) here makes every thing work, though no idea what else that breaks.

https://github.com/doitsujin/dxvk/blob/36f23aa729036d51a093c9dbc724135c5c794f5c/src/wsi/sdl3/wsi_window_sdl3.cpp#L96

    if (!ModeSwitch && !SDL_SetWindowPosition(window, bounds.x, bounds.y)) {
      Logger::err(str::format("SDL3 WSI: enterFullscreenMode: SDL_SetWindowPosition: ", SDL_GetError()));
      return false;
    }

Software information

C&C Generals Zero Hour (Linux native build)
https://github.com/Fighter19/CnC_Generals_Zero_Hour

System information

  • GPU: NVIDIA 2070 Ti
  • Driver: 580 proprietary
  • Wine version: None (native build)
  • DXVK version: 20600
Ddoitsujin maintainer 2025-12-04 github

Hm, yeah, if the game is trying to start in full-screen mode with a non-default resolution, then there's going to be a problem since we can't do mode switches on wayland, but DXVK is also not in any position to "emulate" arbitrary resolutions.

I guess one thing to explore is whether or not only reporting the current display mode to the app fixes the problem, but that creates even more fun issues since we don't really know if we're on Wayland or not, and games may not necessarily be happy with whatever display mode you're running either.

Mmuflub 2025-12-04 github

Is the idea of this logic to make the window the same size as the screen and pin it to the top corner?

Seems on wayland that moving the window is disallowed and might need to check the error code if that is the case and just resize the window instead.

Ive also notice this same issue when steam launches the windows version of the same game using wine.

Rrohit-n 2026-01-26 github

I'm running into this issue as well when using DXVK-native on Far Cry's D3D9 renderer. Disabling the SDL_SetWindowPosition call makes setting fullscreen fine. Checking the output for SDL_GetError to decide whether to fail might be a good idea.

Ddoitsujin maintainer 2026-01-26 github

Not sure how you're using dxvk-native on a Windows game, but the problem with removing the call or ignoring the error is that it's just going to break multi-monitor setups, and actual Windows apps (as opposed to native apps that are aware of Wayland design decisions) will just expect these things to work anyway.

I guess ignoring the error is somewhat tolerable, but it's not going to work properly.

Rrohit-n 2026-01-26 github

Sorry, I should have clarified, I'm integrating DXVK-native on a source port of Far Cry based on leaked source code.

Launch options