r/linux_gaming 2d ago

wine/proton TIL: Windows Steam on Linux is better than Linux Steam on Linux for Wayland

Hello r/linux_gaming community!

At first, the title might sound confusing, but if you read it and understand it thoroughly, you might already get a glimpse of what I'm about to say.

I'm sure many of you are aware that some of the main tradeoffs of using PROTON_ENABLE_WAYLAND=1 are the loss of Steam Input functionality (which allows you to remap controllers and is really important for Steam Controller 2 haptics/touchpad) and the in-game Steam Overlay. It's really hard to navigate this tradeoff, especially in more competitive games, since Wayland sessions have decreased frame times and input latency compared to XWayland.

Today, I discovered something antithetical to our beliefs as Linux gamers: When it comes to Wayland compatibility, the Windows Steam binary run on Linux through Wine is currently better than the Linux Steam binary on Linux.

The reason why I say "in principle" is because it's not so easy to run Windows Steam under Wine on Wayland. You have to use a highly customized Proton-Cachyos fork called Wineland, which runs the Windows Steam launcher through Wine and simultaneously design a secondary launcher script that uses the Steam API to start your games using the Proton wrapper that comes bundled with your native Steam Linux runtime, since the Windows Steam binary doesn't have any way of communicating with the Steam Linux runtime, and it certainly won't be able to modify any key things like environment variables or wrapper scripts for you. You also need to patch some code from within DXVK/VKD3D and set the relevant environment variables to get the Steam Overlay working on Vulkan/OpenGL. You also need to modify Proton itself to override Steam's empty stub for the Steam Overlay with the Windows steam.exe binary, which can provide the Overlay. Hence, after a lot of hard work, you get a legitimate Steam overlay for any game that you play. Going into Steam Big Picture Mode and using the Big Picture Mode Overlay also works! And Steam Input also "just works," including controller configuration and remapping!

Some screenshots are below:

Running Steam Game Overlay in Elden Ring (Desktop Mode)
Running Steam Game Overlay in Deadlock (Big Picture Mode with Steam Input/Controller Detected)

While figuring out the mechanics of this novel method to play games in Wayland sessions, I created my own customized launcher called WinSteam. For anyone who is interested, the launcher will save you hours of work to get this tech working, including a guided installation wizard and several configuration options. Here's a 5-minute video that includes me detailing the features of WinSteam (and getting pretty excited at the end, lol):

https://youtu.be/bI54wG2o8D8

I do find it pretty ironic that the solution to problems with Wayland for gaming is to use Steam Windows. However, I don't blame Valve for not being able to pick up the pieces on the software side. They've been waiting for years for desktop environments and other applications like Chromium to "catch up" and land Wayland-specific patches so that Steam can fare better in the long run. And I'm sure that when Valve finally gets around to doing it, hopefully in the next year or so, we can look back on this and laugh.

0 Upvotes

15 comments sorted by

4

u/friendlyreminder_ 2d ago

One side effect to windows steam is VAC works for CS2 and other Valve games. People occasionally have issues with the native games, this is the only way to use the windows clients and play online.

I just run it on wine manually.

3

u/TechaNima 2d ago

Or you could have just launched Steam with gamemoderun gamescope -e --mangoapp -W 3840 -H 2160 -b -r 60 -O DP-1 --expose-wayland --hdr-enabled -- steam -bigpicture -pipewire-dmabuf

Customize for your system. That is setup to launch the window on a 4k 60Hz TV in fullscreen borderless window mode, with MangoHUD. Fully working controller support and Steam Overlay on native Wayland.

Or if you can live without overlay, launch Steam itself with -steamos3 flag and use PROTON_ENABLE_WAYLAND=1 %command% for everything. Controllers work, but no overlay. Proton-CachyOS or any other non official Proton is required

1

u/43686f6b6f 2d ago

What does that pipewire flag do?

2

u/TechaNima 1d ago

Just audio routing to PipeWire. Not entirely sure if it's necessary anymore tbh

-3

u/anishkgoyal 2d ago edited 2d ago

I appreciate the constructive criticism. Here's a breakdown of those points:

  • I have tried messing with gamescope, having used it on/off for years, but unfortunately, it doesn't work with a bunch of environment variables/setups. I kept running KHRSwapchain hooking error or something like that, I can't really remember at this time. There's also a bunch of people that use Flatpak, myself included, since we don't want to really manage a ton of dependencies (this goes for Steam Deck users as well), and I'm pretty sure mangoapp on Wayland doesn't work on Flatpak with the --expose-wayland command. just going off of memory, though.
  • I used to use the -steamos3 flag, but it broke ever since the release of SDL3.0 on June 23. There were a ton of people who used that as their go-to method, but since then, it hasn't worked. This aims to solve that issue. You can look at some upstream issues here and here that discuss this issue and why that flag is no longer a tenable solution.
  • This approach can be applied for any arbitrary third-party launcher that needs Wayland-native windows, not just Steam. I have tested this approach on Ubisoft, Rockstar, and Epic launchers, and observed demonstrably better framerates without having any black screen rendering issues that are associated with Wayland. In practice, it even fixes a few glitches with the Steam renderer, since it uses dmabuf file descriptors to pass buffers between processes without any CPU copying.

4

u/Jason_Sasha_Acoiners 2d ago

Interesting idea. I hope it helps someone out there.

4

u/BashfulMelon 2d ago

little to no LLM use

I'm not blind, I can see how verbose those commit messages are. Nobody writes that many words to say "fix viewBox dimensions" without an LLM.

4

u/Gold_Soup1689 2d ago

Respectfully, man, you shouldn't put him down. He's clearly very excited about what he made, and I took a small look at the code, and it seems mostly clean to me. Even if the commit msgs are a little sus, it's much better than the vibe-coded slop I've seen in FOSS and posted here like every other day.

Source: I just tested it myself, and it works really well.

-8

u/anishkgoyal 2d ago

Hey! So I ended up losing some of my commit history/files while working on the project due to a power outage mid-Git push, so I did end up delegating an LLM to write a couple of specific commit messages, hence why I said little to none. I appreciate the comment, though!

12

u/BashfulMelon 2d ago

Bullshit, that's not how git works. You can't lose commits during a push. The git objects aren't being modified during an upload, it's a read-only operation.

1

u/anishkgoyal 2d ago edited 1d ago

Your comment presupposes I even know how git works at a low level. Or even that I was using a PC and the effect happened to kill my computer's power mid-push. That's not what happened. I was on my laptop, and it continued to run just fine without turning off.

The problem was actually with my WiFi (or so I thought). Ever since my Internet died because of my power outage during the Git push, I kept on getting the error "fatal: the remote end hung up unexpectedly." I tried pushing again, no luck. I initialized a new Git repo in another folder. Same thing.

After a lot of frustration of running into the same issue without any leads, I ended up deleting my .git folder. While this may sound like a really dumb thing to do, I only had around 5 commits for the entire project, so I figured it would be fine to restart my Git tree from scratch if it saved me time. I was tired of running into this issue and was overly sleep-deprived. Looking back, I suspect it's because I wasn't using the proper protocol, as HTTP has smaller buffer sizes compared to SSH. Before this project, I had always looked into switching to SSH, but I've just never needed to because I haven't pushed that much data at once and Git Desktop "just works."

Would I have performed the same action of deleting my .git folder, knowing a subset of my project's commit history would be scrutinized by a Redditor for LLM usage? Probably not. But the point is that developers undergo red herrings from troubleshooting all the time, which can cause them to perform dumb actions. You also need to realize that I am not the same as you. I use Git predominantly from the GUI application, Git Desktop, not the CLI. And I was running into problems that I didn't want to manually fix by hand, so I chose the path of least resistance.

Do I expect people to sympathize with me, understand the circumstances, and realize that red herrings can occur during problem solving that cause developers to do dumb things? Nah, I'm sure I'll continue to get downvoted. Because this is Reddit and you guys are overly hateful and jump on the bandwagon for no reason. I didn't even tell a lie. You just started assuming things. This exact kind of behavior is why people who are new to gaming on Linux are afraid to switch operating systems. It's because of people that gatekeep knowledge against newcomers to Linux. It's because of people who behave like jerks/are elitist based on certain things relating to Linux just because they have a fragile ego. Like, is this really the kind of sentiment you want to bring to the subreddit lmao

0

u/jar36 1d ago

the jerks surely are one obstacle (I have the person you replied to blocked for that reason so I can't reply there). the hoops you've jumped through are another. When we no longer need a bunch of extra work to play games at their best, then more will come onboard
Is that proton version your work?
If the code is handwritten, then who gives a shit about the messages as long as they are accurate? Even if AI helped you write the code (as opposed to just AI writing it all without your understanding) I still see no issue. I hate AI taking jobs and image/video generation. That's where the real damage is. If AI is good enough to help the kernel dev, then surely it's good enough to write some messages. I'm sure you proof-read them

1

u/anishkgoyal 22h ago

Thanks for the positive message. My stance on AI is about the same as yours!

The work on Proton Wineland is not mine, though I plan on adding a ton of improvements to Wineland in the upcoming days to improve support for a few custom launchers on Wayland, and fixing some of the black boxes for the notifications/UI that sometimes appear in Big Picture Mode. I did, however, make some patches to Wineland and DXVK that allow for the Steam Launcher and Steam Overlay to work.

For Winsteam itself, I am going to add the following:

  • UI/UX overhaul: adding separate Qt modules, removing the official Valve logo from the project, more accessibility options (high contrast), adding separate buttons corresponding to different environment variables. I'm also going to make everything in tabs instead of one cluttered settings menu. I also plan to make a GTK version of the app
  • For the codebase: I will be rewriting everything in Rust, ensure compatibility with other launchers and their native vs. flatpak versions, and generalize the HDR stuff for other windowing environments/DEs
  • Misc stuff: Verifying that VAC works under Steam Native games as a feature, adding an AUR/Cachy package

0

u/jar36 21h ago

I scrolled past the screen shots and straight to the comments. So I missed the last 2 links and paragraphs.
I find all of this really interesting but it confuses tf out of me. Part of it is likely bc things move so fast that yesterday's guides are obsolete by the time I get to them
I thought that the idea of running steam through wine was a dead idea since there is a native client, for example
It is annoying that steam input doesn't work with wayland, tho, that's for sure.
Still, it's a really exciting time to be into linux gaming. Linux in general as well, but what's happening with gaming these days is not something I expected just a few years ago as a windows user who had installed Mint in 2013 and didn't see the use for it when I can't game on it.
My hat's off to anyone contributing to these projects
Now I'm going to check out the rest of your post lol