Add Wayland support to the Steam overlay
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:
- Take any game with a recent SDL version (my go-to is the public Steam beta for FEZ)
- Set
SDL_VIDEODRIVER=wayland %command% /gldevice:XXXas a launch option, whereXXXcan beOpenGLorVulkan - Observe no overlay
Related to this, https://github.com/ValveSoftware/steam-runtime/issues/473#issuecomment-953932369 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.
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.
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.
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=waylandand see if it works better.
#7889
@flibitijibibo thanks, Ethan, that's exactly the issue. You can add the list of games you have there.
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.
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.
Here we are again

Going to try this one more time for SDL 2.28: https://github.com/libsdl-org/SDL/pull/6362
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.
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.
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.
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!
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.
@kisak-valve @Plagman Any update? Will be support of Steam, Dota 2 of native Wayland? Is there work going on in this direction?
Any movement on this?
... our only blockers are this and NVIDIA finishing their driver support
It's 2024 and Nvidia on Wayland is looking better than ever. Many distros are now beginning to default to Wayland on their chosen DEs / compositors. It's time for Steam to do their end and implement Wayland support for their client and overlay.
I've been testing out and running Counter-Strike 2 with native wayland for quite a while now. This was achieved by editing the game/cs2.sh file in the CS2 game file directory, and changing the SDL_VIDEO_DRIVER line to use Wayland instead. This has worked almost flawlessly for a while now, and other than a few hiccups like crashing on loading screens if you move your mouse, it has worked perfectly. To be honest with you, it's better than running through XWayland. I noticed immediately that frametimes were improved, and even though I was seeing the same / similar FPS, the game just felt so much smoother.
With many native games supporting Wayland, and now Wine (and then proton soon), everything is now moving over to a Native wayland backend. When will we see these roadblocks for the steam client and overlay solved?
You can add Left 4 Dead 2 to this also. I am on CachyOS.
Launch commands
STEAM_COMPAT_RUNTIME_SDL2=1 SDL_VIDEODRIVER=wayland %command% -vulkan
Also when you select ' Wayland' as the graphics driver in Factorio in the Graphics settings menu. The Steam in-game overlay is not working. When you switch back to ' x11' it does work again. I assume it is related to this issue.
I think it's related to shortcuts on wayland. If you try to use any shortcuts, to display steamoverlay, or other apps like MangoHUD, it does not work. But with X11, all work.
MangoHUD shortcuts work fine for me in CS2 Wayland mode. Steam Overlay does not however.
I think it's related to shortcuts on wayland. If you try to use any shortcuts, to display steamoverlay, or other apps like MangoHUD, it does not work. But with X11, all work.
If that were the case, the FPS overlay would work anyway, but it doesn't.
Mangohud may not work with OpenGL Wayland games on Steam, for them, at least right now, it additionally requires LD_PRELOAD=""
You are right, with latest MangoHUD build, it work fine in wayland.
But Steamoverlay not....
Confirming that after the latest CS2 updates, it seems to have broken support for the steam overlay on native wayland for that game specifically, as running the game under the gamescope microcompositor returns the steam overlay functionality. Seems specific to CS2 as other native games like TF2 still work fine.
Tested with KDE Plasma 6.4.3 and gamescope 3.16.2
Confirming that after the latest CS2 updates, it seems to have broken support for the steam overlay on native wayland for that game specifically, as running the game under the gamescope microcompositor returns the steam overlay functionality. Seems specific to CS2 as other native games like TF2 still work fine.
Tested with KDE Plasma 6.4.3 and gamescope 3.16.2
Can you share your launch command with gamescope ?
I tried with gamescope but in my case it launch cs2 with xwayland, so overlay work. But with the expand wayland option, overlay does not work too, like cs2 wayland without gamescope.
I fixed the steam overlay issue temporarily by setting these startup flags for cs2:
SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0 SDL_VIDEO_WAYLAND_SCALE_TO_DISPLAY=1 SDL_VIDEO_DRIVER=x11 gamemoderun %command%Running
KDE Plasma 6.4.3andgamemode 1.8.2-1.1on CachyOS Linux :) 👍🏼
That's because you set it to XWayland with "SDL_VIDEO_DRIVER=x11"
I fixed the steam overlay issue temporarily by setting these startup flags for cs2:
SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0 SDL_VIDEO_WAYLAND_SCALE_TO_DISPLAY=1 SDL_VIDEO_DRIVER=x11 gamemoderun %command%Running
KDE Plasma 6.4.3andgamemode 1.8.2-1.1on CachyOS Linux :) 👍🏼
This might get the overlay running; however, that is beside the point of this issue. The issue is, that the overlay doesn't work on wayland, where as your method forces the use of x11/xwayland.
As I understand it, the overlay (just like the Steam client itself) is based on fundamentally incompatible software and will have to be manually ported to wayland or maybe even entirely rewritten.
Did this get fixed in latest cs2 update? Overlay seems to work again, and I'm using wayland.
from cs2.sh:
# There is Wayland support in SDL but a recent (7/30/2025) attempt at
# allowing SDL to default to Wayland caused a number of customer issues so
# keep the default at X11 for now. Don't override any user setting so
# people can easily use Wayland if they want.
if [ "$UNAME" == "Linux" ]; then
if [ -z "$SDL_VIDEO_DRIVER" ]; then
export SDL_VIDEO_DRIVER=x11
fi
fi
The game defaults to x11/Xwayland again.
You can run it with SDL_VIDEO_DRIVER=wayland %command% to use wayland.
@NyCodeGHG
Replying to https://github.com/ValveSoftware/steam-for-linux/issues/8020#issuecomment-3141060558
As an aside, this explains the behavior of Gamescope.
In my case, I initialize the SDL_VIDEO_DRIVER=wayland environment variable via the Hyprland configuration file :
env = SDL_VIDEO_DRIVER,wayland
The bahavior, is the same as an export SDL_VIDEO_DRIVER=wayland for all system.
So, the game launches in its Wayland version every time with the overlay problem mentioned here.
However, in Gamescope, it does not inherit the environment variable. Therefore, according to the cs2.sh script, it will be defined in X11 and thus systematically start on xwayland (unless this same script is modified).
This confirms the observation made in this comment :
@TheOdd
Confirming that after the latest CS2 updates, it seems to have broken support for the steam overlay on native wayland for that game specifically, as running the game under the gamescope microcompositor returns the steam overlay functionality. Seems specific to CS2 as other native games like TF2 still work fine.
Tested with KDE Plasma 6.4.3 and gamescope 3.16.2
Did this get fixed in latest cs2 update? Overlay seems to work again, and I'm using wayland.
It is not fixed and will not work until Valve fixes it. You cannot fix this on your own because it is a problem with the Steam Overlay program itself so no amount of modifying files or adding launch parameters will work.