omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Setting `SDL_VIDEODRIVER=wayland` as a default causes compatibility issues with Proton games

Open RyanBreaker opened this issue 1 year ago • 13 comments

System details

Omarchy 3.1.3, AMD 6800 XT, AMD 5800X3D

What's wrong?

The following global env var appears to cause compatibility issues with games launched with Proton, causing many to not even launch (examples: Deadlock, The Finals, ARC Raiders, etc).

https://github.com/basecamp/omarchy/blob/73036988ede57cc0c36a0695f92e8476168b3705/default/hypr/envs.conf#L9

My local fix has been to unset it in my ~/.config/hypr/envs.conf file with:

env = SDL_VIDEODRIVER,

I've yet to run a game that seems to actually need this value set to run, and the SDL documentation says that SDL auto-detects the platform it's on, this just forces it to target a specific one at runtime. Note that the modern value is actually SDL_VIDEO_DRIVER with SDL3, but SDL_VIDEODRIVER is also recognized for backwards compatibility with SDL2.

https://wiki.libsdl.org/SDL3/SDL_HINT_VIDEO_DRIVER

By default, SDL will try all available video backends in a reasonable order until it finds one that can work, but this hint allows the app or user to force a specific target, such as "x11" if, say, you are on Wayland but want to try talking to the X server instead.

I think it may be best to either comment out or remove the value from the default config as it seems to cause more bugs that are hard to track down than help.

EDIT:

My above workaround does not actually seem to resolve the issue consistently, I believe that this is because SDL may interpret the blank value as "don't use any driver". I have instead found that one of the following are the current workarounds to fully unset the variable:

  • Set the Launch Options to SDL_VIDEODRIVER=windows %command% for individually affected games in Steam.
  • Edit the steam.desktop file to exec env -u SDL_VIDEODRIVER steam.
  • Edit the ~/.local/share/omarchy/default/hypr/envs.conf file and comment out the SDL_VIDEODRIVER line.

The first option is the least invasive. The last is fine but just be aware that it may get wiped in an Omarchy update, but hopefully it'll be fixed soon anyway. Ensure as well that any references to SDL_VIDEODRIVER are also removed in ~/.config/hypr/envs.conf, and do a reboot after any env config file changes as well.

RyanBreaker avatar Oct 19 '25 16:10 RyanBreaker

For reference, there's also been a lot of discussion about this on the #omarchy-gaming channel on the Discord.

RyanBreaker avatar Oct 19 '25 16:10 RyanBreaker

Created a PR for consideration. This is my first contribution here so apologies if I missed something, please let me know if I need to do anything else.

RyanBreaker avatar Oct 19 '25 16:10 RyanBreaker

An alternative could be to set it to a list if we really wanted to assert Wayland as a priority, e.g.:

env = SDL_VIDEODRIVER, windows,wayland

I have yet to test this though, or with them swapped. I may mess with that later to see.

RyanBreaker avatar Oct 19 '25 16:10 RyanBreaker

Following this because my setup hasn't got this problem. I'm currently playing 2025 games like Dying light: the beast

ludo237 avatar Oct 19 '25 17:10 ludo237

For those that couldn't make it work with unsetting the SDL_VIDEODRIVER env variable in global config/local try this to run steam with this command: env -u SDL_VIDEODRIVER steam If that works for you, then modify your desktop entry for steam to always start steam like that

Elphyn avatar Oct 19 '25 17:10 Elphyn

Following this because my setup hasn't got this problem. I'm currently playing 2025 games like Dying light: the beast

Have you tried games that use SDL and are launched with Proton such as Deadlock?

RyanBreaker avatar Oct 19 '25 17:10 RyanBreaker

For those that couldn't make it work with unsetting the SDL_VIDEODRIVER env variable in global config/local try this to run steam with this command: env -u SDL_VIDEODRIVER steam If that works for you, then modify your desktop entry for steam to always start steam like that

Added this to my list of workarounds, thanks!

RyanBreaker avatar Oct 19 '25 23:10 RyanBreaker

Have you tried setting env = SDL_VIDEODRIVER,wayland,x11 to allow it to fallback to x11?

ryanrhughes avatar Oct 25 '25 20:10 ryanrhughes

Have you tried setting env = SDL_VIDEODRIVER,wayland,x11 to allow it to fallback to x11?

This would still break Proton games which, at least for those I've tried that use SDL (mainly Deadlock, ARC Raiders, The Finals, a couple others), will only run with the windows driver under Proton. As of now I think the best play is simply to leave the value unset (don't even set it to a blank value, remove it entirely) and let SDL decide the driver, which for most (if not all?) Proton games that use SDL would be windows, which follows with what I've been seeing with others with many other titles as well online.

For Proton GE I have been using env = PROTON_USE_WAYLAND, 1, that at least puts the host Proton window itself into a native Wayland mode, but this only works for the GE version of Proton or any other forks of it.

RyanBreaker avatar Oct 27 '25 11:10 RyanBreaker

I have that same problem with Horizon Chase Turbo, which is a native game.

What worked for me:

  • env = SDL_VIDEODRIVER, in ~/.config/hypr/envs.conf; or
  • SDL_VIDEODRIVER= %command% or SDL_VIDEODRIVER=x11 %command% in launch options (SDL_VIDEODRIVER=windows doesn't work)

EDIT: same with Old World.

lucasfais avatar Oct 28 '25 14:10 lucasfais

I have that same problem with Horizon Chase Turbo, which is a native game.

What worked for me:

  • env = SDL_VIDEODRIVER, in ~/.config/hypr/envs.conf; or
  • SDL_VIDEODRIVER= %command% or SDL_VIDEODRIVER=x11 %command% in launch options (SDL_VIDEODRIVER=windows doesn't work)

EDIT: same with Old World.

Thanks a lot! That worked for me.

GuppyTheCat avatar Dec 14 '25 05:12 GuppyTheCat

Is this bug really still unaddressed in the current version of the system..?

RyanBreaker avatar Dec 18 '25 14:12 RyanBreaker

It is. How has this gone months and that default config is still the same in the trunk branch? This system cannot be advertised as gamer-friendly while breaking a significant number of games.

RyanBreaker avatar Dec 18 '25 14:12 RyanBreaker