Open snj33v opened 7 years ago
If I understand this request correctly, the specifics of this request is to build the SDL 2 library used with the steam client with wayland support.
Beyond the scope of the steam client itself, Xwayland is still needed for games that are not using a middleware library that supports wayland and interactions with wayland libraries from older distro releases may need to be checked.
@kisak-valve, yes, that's the goal, so that xwayland will used for games but not for client
This would be nice :)
@snj33v It must be used for games as well. glmark shows 2-3 times better OpenGL performance on wayland.
@snj33v It could be much better if there was no such thing as steam-runtime, it just deprecated copies of libraries that every GNU/Linux distro has.
If source code was open, community could fix this issue already. Proprietary software sucks.
@DmitryHetman without steam-runtime, you'll get stuck with glibc/openssl forever (or you'll have to use chroot / docker), and get a lot of problems on rolling distributions.
As soon as sandboxing becomes common for linux apps, for example with flatpak (which could solve the issue with the steam-runtime, btw), this becomes a security issue aswell. Under X, there's no client isolation so any app could read inputs (of e.g. credit card information). Wayland prohibits that. See #4473
Edit: ok this was a bit misleading. Sensitive information is usually only entered in the steam app, which would need to use wayland. Thats not the issue here. But it would be great for security if the steam client would also support wayland sometime soon, as people use it to enter sensitive information like credit card information.
I think it already works as is - I'm able to use Steam on KDE Wayland, when I launch it with environment variable SDL_VIDEODRIVER=wayland
Of course, actual games fail to run when you try launching them.
seems this is very dependent on CEF(Chromium Embedded Framework) to actually work, guess we should wait till CEF adopts wayland completely
@sandy-8925 I tried but it's on Xwayland
wayland support required, please.
CEF is on their way to support Wayland. A patch is already available to switch between X11 and Ozone backend. The patch has not been merged yet.
Combine that with ozone-wayland, CEF will work with Wayland protocol. In fact there is already a working branch for Chromium's Wayland support.
http://www.phoronix.com/vr.php?view=26841
Is anyone benchmarked games with SDL2 and SDL_VIDEODRIVER=wayland? Seems like Phoronix tested XWayland performance instead of Xorg vs. Wayland performance.
@RussianNeuroMancer Steam seems to launch and work fine with SDL_VIDEODRIVER=wayland set, but most (if not all) Steam games fail to launch in that case. They're all using older/custom versions of SDL that don't work under Wayland.
@sandy-8925 Does not work for me. Are you sure it is not running under xwayland? Try running WAYLAND_DEBUG=1 steam
. If you get wayland debug output it is running under wayland otherwise it is using xwayland.
@sandy-8925 Im affraid its running still on xwayland. I know it because of this https://www.reddit.com/r/linuxquestions/comments/7d445v/does_my_app_run_on_wayland_or_xwayland/
I'd say the biggest blocker here is Chromium still. The entire Steam main UI will not work without X11. If that wasn't an issue, it might be be reasonable to aim for a setup where some games (whitelist) used Wayland but that seems ambitious for now. As for games that don't work: bundling libSDL in games (not Steam runtime) is by far the biggest compatibility issue I've seen
Seems like proton can't use OpenGl through Xwayland.
Sorry, I had another problem likely an outdated mesa or something.
@RussianNeuroMancer Steam seems to launch and work fine with SDL_VIDEODRIVER=wayland set, but most (if not all) Steam games fail to launch in that case. They're all using older/custom versions of SDL that don't work under Wayland.
It launches just fine but when I run xlsclients, it shows steam running under xwayland.
I would strongly urge everyone not to set SDL_VIDEODRIVER globally unless you're trying to test SDL2. There's a priority list inside SDL2 and no doubt when the devs consider Wayland support stable enough, it will take precedence over X11 without user interaction.
Update?
Hey, if any of you folks over at Valve need help with this, feel free to get in touch: sir@cmpwn.com
If source code was open, community could fix this issue already. Proprietary software sucks.
contact chromium & Igalia team, they need help with wayland codebase
To be honest it also seems to me Chromium (or parts of it) have been suffering of inadequate amounts of competent reviewers so which has slowed down Wayland change integration speed. It will happen eventually.
They say proprietary software is good because it brings funding which brings support and bug fixes. Intellectual fascism, the more accurate term for IP, is a big black hole full of lies. Just look here, almost a year and a half, and nothing happens. Nothing. It is our job to kill IP, lest our descendants ridicule us forever. Even a child can easily understand that keeping knowledge a secret is not good. Anyone who believes the lies of intellectual fascism is really missing some bolts at this point.
Is there any progress on this? I am struggling to get Wayland working even when using the native version with the latest SDL preloaded
I think you should just give up on Wayland. It's MO is basically the same as X11, except in extreme cases.
If I want to use steam remote play I have to switch to X11 for hardware decoding, getting hardware decoding support in Wayland would be great.
@blotch That sounds like a driver issue? Also you should consider abandoning Wayland, the benefits it was supposed to have it doesn't... Native Wayland is effectively identical to X11 more than %90 of the time, but if you add in Xwayland usage it's a clear loss.
@cheako Please stop suggesting people abandon native Wayland. It might not be worth it now, but when compatibility issues are fixed it will be a lot better
Not directly related to the topic but for interested parties: Valve is working on it's own Wayland compositor for SteamOS at https://github.com/Plagman/gamescope
There's also a short explanation why Wayland compositor + Xwayland can be faster than pure X11 can ever be.
off-topic: @rhysperry111 I think you are mistaken. The idea that Wayland is somehow more performant over X11 is a myth. Wayland does have an API that could be used to surpass X11 performance, but it's usage is so rare that's it's not worth discussing. Normal Wawland usage is done using the same shared memory X11 has used for decades, offering no advantage.
"Normal Wawland usage is done using the same shared memory X11 has used for decades, offering no advantage." That's XWayland, not wayland, and this information is still incorrect.
Referring to this https://wayland-book.com/surfaces/shared-memory.html most every Native Wayland application uses it... and Native X11 applications use a similar transport(when running locally). The promise of Wayland was that https://wayland-book.com/surfaces/dmabuf.html would be used. What I'm referring too is that Wayland offers no technical advantage over X11... Real world testing is nice, but if you can't explain where the performance you are seeing is coming from then you can't do anything to keep the performance through upgrades... you don't know what to keep.
Can you please take the "which is faster" discussion elsewhere?
This issue is for tracking Wayland support. If you think Wayland is slow, this isn't the place to discuss it. If you think it's fast, it's not either. You're spamming everyone following this topic.
For many of us it's not possible to downgrade to X11 (e.g.: I'd have to find replacements for wayland-only apps). Discussion of which platform is better is off-topic here. This feature is needed because Wayland is a successor to X11, and works on specific hardware setups where X11 does not.
You're free to use whatever you prefer in the meantime, and discuss this preference in the appropriate places.
Minor nitpick: this is tagged as "feature request", since op wants multi-gpu support and alike.
On many scenarios, the lack of wayland-native support results in blurry and almost unreadable text from the steam client (since XWayland doesn't support scaling). I'd argue this is a bug, not merely a feature request.
I am getting to the point I need to use a 100% wayland system and having issues running steam on it.... :( please hurry up on wayland native support. X11 has no future
TBH, I honestly don't see why Steam can't release more of the source to their client so we can address much of this ourselves ("we" as in "the community").
There's really no benefit for Steam to keep it closed source.
@WhyNotHugo Chromium is opensource. You are free to contribute in its Wayland support.
Chromium can now work natively on Wayland, iirc CEF had some Wayland bits in place already
Not sure how relevant it is, but it seems that from Chromium 87 ozone can be enabled in regular build and wayland can be enabled on the same build, see https://aur.archlinux.org/packages/chromium-ozone/#comment-776085
@Faalagorn Yup, the upstream chromium snapshots already work fine on Wayland, and as of Chromium 89, the stable builds will too.
The work on the chromium / electron side is all done; it's a matter of Steam not adopting it (I do wish they'd open source parts of their clients so we, the community, could just address this ourselves).
Slightly offtopic for interested readers: there's is a PR for glfw to use libdecoration to provide window decorations on the Wayland backend on compositors not offering system decorations (SSD). Notably Gnome/Mutter and Weston. The same library could also used by SDL2, clearing a major blocker to enable the Wayland backend by default.
Looks like the X11 servers are in a state of disowned... So time has run out?
@rmader, think valve is already working on a compositor and providing inputs to wayland(xwayland included) community, for games, (important on vsync situation, backward compatibility)
@cheako just a nitpick but this is nothing new. X.org X11 has been in this state for years now.
The same library could also used by SDL2, clearing a major blocker to enable the Wayland backend by default.
IMHO, I don't think the lack of decorations is a blocker. Steam could well support Wayland and later deal with these, since they're really not a dealbraker -- Steam would work fine without these.
This is feature request
This will greatly help users with multi-gpu setups like optimus / SLI and developrs to move forward with wayland adoption