Skip to content

Add Wayland support to the Steam overlay #8020

Open

Description

@flibitijibibo

Your system information

  • Steam client version (build number or date): Jul 20 2021, at 22:25:57
  • Distribution (e.g. Ubuntu): Fedora 34
  • Opted into Steam client beta?: No
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

The Steam overlay currently depends on GLX and X WSI for OpenGL and Vulkan respectively. As a result, when running a Wayland-native application the overlay will not appear.

For OpenGL, gameoverlayrenderer.so overrides glX* but not egl*. For Vulkan, steamoverlayvulkanlayer.so only overrides the functions for VK_KHR_xcb_surface and VK_KHR_xlib_surface, not VK_KHR_wayland_surface.

This will take time to write (mostly for input handling I imagine) so a workaround would be for Steam to set SDL_VIDEODRIVER to x11 if it's unset, being sure to only do this for native applications.

Steps for reproducing this issue:

  1. Take any game with a recent SDL version (my go-to is the public Steam beta for FEZ)
  2. Set SDL_VIDEODRIVER=wayland %command% /gldevice:XXX as a launch option, where XXX can be OpenGL or Vulkan
  3. Observe no overlay

Activity

  1. smcv commented on Jan 4, 2022

    @smcv
    Contributor

    Related to this, ValveSoftware/steam-runtime#473 (comment) mentions that in at least some configurations, the overlay is loaded into a native Wayland app, but causes the app to crash when it is opened.

  2. flibitijibibo commented on Jan 25, 2022

    @flibitijibibo
    Author

    It's starting to look very much like 2.0.22 will be the SDL release that defaults to Wayland... our only blockers are this and NVIDIA finishing their driver support, the latter being actively worked on as we speak.

    As a stepping stone to native support, it might be a good idea for the Steam client to check SDL_VIDEODRIVER and set it to x11 if it's unset? That way we can have Wayland be the default in SDL without having to wait for the Steam team to catch up.

  3. murlakatamenka commented on Feb 8, 2022

    @murlakatamenka

    I've been playing Axiom Verge recently (native, FNA game) and Steam overlay shows up but nothing is rendered. For example, achievement popups has nothing on them, just a flat background. Is it due to this issue?
    I'll launch the game with SDL_VIDEODRIVER=wayland and see if it works better.

  4. flibitijibibo commented on Feb 8, 2022

    @flibitijibibo
    Author

    I've been playing Axiom Verge recently (native, FNA game) and Steam overlay shows up but nothing is rendered. For example, achievement popups has nothing on them, just a flat background. Is it due to this issue? I'll launch the game with SDL_VIDEODRIVER=wayland and see if it works better.

    #7889

  5. murlakatamenka commented on Feb 9, 2022

    @murlakatamenka

    @flibitijibibo thanks, Ethan, that's exactly the issue.
    You can add the list of games you have there.

  6. smcv commented on Jun 9, 2022

    @smcv
    Contributor

    I see Fedora has patched their SDL to make SDL default to native Wayland (which I think is premature, but I'm not a Fedora developer, so it's not up to me)...

    As a stepping stone to native support, it might be a good idea for the Steam client to check SDL_VIDEODRIVER and set it to x11 if it's unset?

    ... so I think it would be a good idea for Steam to do this, as a stopgap until the gameoverlayrenderer has Wayland support.

  7. Conan-Kudo commented on Jun 9, 2022

    @Conan-Kudo

    I see Fedora has patched their SDL to make SDL default to native Wayland (which I think is premature, but I'm not a Fedora developer, so it's not up to me)...

    From my point of view, it's important so that the Wayland backend is actively used and developers wind up encountering it. Otherwise people will continue to develop their applications in a way where the backend won't work.

  8. flibitijibibo commented on Oct 11, 2022

    @flibitijibibo
    Author

    Here we are again

    revival

    Going to try this one more time for SDL 2.28: libsdl-org/SDL#6362

  9. orowith2os commented on Jan 7, 2023

    @orowith2os

    Has Valve done any work towards this? Wayland seems to be the default for SDL2 now, and since Wayland is especially being preferred by more users this would probably be desired (fractional scaling).

    If something is needed to base support for Wayland off of, wouldn't using MangoHUD as an example work? It seems to support native Wayland just fine, more or less. Permissive licensing too (MIT) if that's a concern.

  10. flibitijibibo commented on Jan 8, 2023

    @flibitijibibo
    Author

    Doesn't seem like MangoHud has Wayland input written either: https://github.com/flightlessmango/MangoHud/blob/11142b5b2cdeb1b83a52d14c1adb567ff2513c31/src/keybinds.h#L58

    Presentation works but that's arguably the easy part, since Vulkan layers are a thing and EGL is something that's been overridden before in lots of other places.

  11. orowith2os commented on Jan 8, 2023

    @orowith2os

    Interesting, I thought it was global keybindings that didn't work. IG I'll have to do a bit more testing with native Wayland applications.

    If presentation works, could the keybinds be done via the global shortcuts portal? That seems like the best way to go about it, especially since by design Wayland doesn't like to allow keylogging without permission.

  12. flibitijibibo commented on Apr 28, 2023

    @flibitijibibo
    Author

    The latest Steam client overhauls the rendered contents of the overlay, but not the overlay itself - still no luck with EGL or Wayland WSI yet!

  13. orowith2os commented on Apr 28, 2023

    @orowith2os

    The latest Steam client overhauls the rendered contents of the overlay, but not the overlay itself - still no luck with EGL or Wayland WSI yet!

    They're using portals for the filechooser on the Beta client, at the very least, so I've got hope. Good to see Valve working towards improving the client.

  14. 129 remaining items

  15. RLB2310 commented on Aug 31, 2026

    @RLB2310
  16. perpetuumcontinuum commented on Aug 31, 2026

    @perpetuumcontinuum
  17. RLB2310 commented on Aug 31, 2026

    @RLB2310
  18. flibitijibibo commented on Sep 20, 2026

    @flibitijibibo
    Author

    The latest behavior I've found was while updating Escape Goat 2, the custom level feature depends on the overlay and it turns out the Steamworks API calls to open the overlay do work, so at minimum the rendering portion is still present in the latest stable client (1788652215).

    I guess it's been a pain for them to intercept events, but in the meantime, I wonder if it's worth them doing a temporary solution for SDL games where vkCreateWaylandSurfaceKHR in the overlay layer dlopens libSDL3.so.0, checks SDL_WasInit(SDL_INIT_VIDEO) (which should be true by the time you call SDL_Vulkan_CreateSurface), and then matches the wl_surface given to Vulkan to the list returned by SDL_GetWindows (checking via SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER), and then it can run an SDL_EventFilter that absorbs keyboard/mouse/gamepad events on that SDL_WindowID to do what it needs to do.

    That would probably be just sketchy enough not to do for SDL2 given how far back that library can go, but SDL3 games might be a clean enough slate to try this out.

  19. GPSolo commented on Nov 14, 2026

    @GPSolo

    Has there been any real progress on this issue? Its been 5 years since this was posted, quite ridiculous a user needs to reopen the game with a different SDL_VIDEO_DRIVER just to buy a case key.

  20. testc2n14 commented on Nov 14, 2026

    @testc2n14

    eh i just run my games with these otpins and stop caring

    WINEDLLOVERRIDES="dxgi=n,b" PROTON_LOG=1 DRI_PRIME="pci-0000_03_00_0" PROTON_ENABLE_WAYLAND=1 WINE_WAYLAND_STEAM_OVERLAY_LAYER=1 PROTON_ENABLE_HDR=1 PROTON_FSR4_UPGRADE=1 PROTON_USE_NTSYNC=1 PROTON_NO_STEAMINPUT=0 systemd-run --user --scope -p AllowedCPUs=0-7,16-23 gamemoderun   %command%
    
    GC_FREE_SPACE_DIVISOR=1 SDL_VIDEODRIVER=wayland DRI_PRIME="pci-0000_03_00_0" taskset -c 0-7,16-23 gamemoderun %command% -force-wayland -window-mode windowed -monitor 3
    
  21. YellowAtom commented on Nov 14, 2026

    @YellowAtom

    As a programmer I use the wayland platform API directly, as opposed to using SDL, making this issue particularly pertinent to me. Steam needs better integration with this system.

  22. testc2n14 commented on Nov 14, 2026

    @testc2n14

    yeah it dose but this is my stop gap soultion that more or less just work

  23. immyj-trv commented on Nov 14, 2026

    @immyj-trv

    With every distro and their grandmas moving over to wayland, it's somewhat ridiculous to see the leading storefront/launcher lagging behind in prehistory

  24. testc2n14 commented on Nov 14, 2026

    @testc2n14
  25. GPSolo commented on Nov 14, 2026

    @GPSolo
  26. 0loid commented on Nov 15, 2026

    @0loid

    The Steam Client now has a 64 binary, so I hope this issues gets some traction and will be fixed in the near future!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions