Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some games won't launch via Steam on Xorg when flex-launcher is running #37

Open
ashleybone opened this issue Jul 16, 2023 · 2 comments

Comments

@ashleybone
Copy link

ashleybone commented Jul 16, 2023

Hi,

I'm running flex launcher on garuda linux with Xorg with an RX 7900 XTX and 5900X CPU.

I've run into an issue with a few games (specifically Blasphemous, Hollow Knight, and Ender Lilies) which won't launch from Steam when flex-launcher is running. They either won't run at all or hang forever just after launch. If Steam is launched without flex-launcher running, the games all work fine.

I was able to track down the problem to line 199 in launcher.c:

setenv("SDL_VIDEODRIVER", "wayland,x11", 0);

If I comment the line out or remove wayland, all the games launch fine.

I'm not sure what the underlying issue is. As I mentioned above, I'm using Xorg and don't even have wayland installed. If I run Ender Lilies from the command line without Steam, it launches fine without any changes to flex-launcher.

All the games use Vulkan, and I have seen some reports of long-standing bugs with Steam, Vulkan, and Wayland (such as this one, but the reports I've seen happen when people are actually using Wayland.

Perhaps the SDL_VIDEODRIVER environment variable shouldn't be passed on to launched programs?

Edit: A couple of more bits of info. Two of those games use the Unity engine, the other uses Unreal. Also, all of them work fine if I force Steam to run the windows version via Proton. It's only the linux-native versions that have this issue.

@complexlogic
Copy link
Owner

Thanks for the report and detailed debugging.

I set that environment variable because the default SDL behavior is to choose XWayland over native Wayland for Wayland users. However, I hadn't considered the impact that it would have on the launched child processes.

The overwrite argument is set to 0 so that the program won't overwrite the environment variable if the user already had it set. So, you can set it yourself manually to prevent Flex Launcher from setting it, e.g. run the launcher like so: SDL_VIDEODRIVER=x11 flex-launcher. That should be a preferable workaround to maintaining a modified build, and in the meantime I will look for an alternative solution to have SDL use native Wayland by default for Wayland users.

@ashleybone
Copy link
Author

That is a much better idea, thanks! I forgot all about the overwrite argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants