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

[Feature Request]Need the client to support wayland(not through xwayland) #4924

Open
snj33v opened this issue Apr 9, 2017 · 175 comments
Open

Comments

@snj33v
Copy link

snj33v commented Apr 9, 2017

This is feature request

This will greatly help users with multi-gpu setups like optimus / SLI and developrs to move forward with wayland adoption

@snj33v snj33v changed the title Need the client to support wayland(not through xwayland) [Feature Request)]Need the client to support wayland(not through xwayland) Apr 9, 2017
@snj33v snj33v changed the title [Feature Request)]Need the client to support wayland(not through xwayland) [Feature Reques]Need the client to support wayland(not through xwayland) Apr 9, 2017
@snj33v snj33v changed the title [Feature Reques]Need the client to support wayland(not through xwayland) [Feature Request]Need the client to support wayland(not through xwayland) Apr 9, 2017
@kisak-valve
Copy link
Member

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.

@snj33v
Copy link
Author

snj33v commented Apr 9, 2017

@kisak-valve, yes, that's the goal, so that xwayland will used for games but not for client

@noobmagnet
Copy link

This would be nice :)

@DmitryHetman
Copy link

@snj33v It must be used for games as well. glmark shows 2-3 times better OpenGL performance on wayland.

@DmitryHetman
Copy link

@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.

@DmitryHetman
Copy link

If source code was open, community could fix this issue already. Proprietary software sucks.

@soredake
Copy link

soredake commented Jul 9, 2017

@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.

@rmader
Copy link

rmader commented Sep 30, 2017

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.

@sandy-8925
Copy link

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.

@snj33v
Copy link
Author

snj33v commented Feb 8, 2018

seems this is very dependent on CEF(Chromium Embedded Framework) to actually work, guess we should wait till CEF adopts wayland completely

@dimitrisarnellos
Copy link

@sandy-8925 I tried but it's on Xwayland

@RorraVox
Copy link

wayland support required, please.

@yookoala
Copy link

yookoala commented May 30, 2018

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.

@RussianNeuroMancer
Copy link

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.

@sandy-8925
Copy link

@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.

@ppascher
Copy link

@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.

@edoantonioco
Copy link

@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/

@nanonyme
Copy link

nanonyme commented Sep 25, 2018

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

@cheako

This comment has been minimized.

@cheako
Copy link

cheako commented Nov 13, 2018

Sorry, I had another problem likely an outdated mesa or something.

@nortexoid
Copy link

@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.

@nanonyme
Copy link

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.

@FurtadoPires
Copy link

FurtadoPires commented Mar 2, 2024

@kisak-valve would be possible to lock the comments in this issue, until we have a proper feedback from Valve?

Me and most of the others following this issue are expecting an official feedback from developers, and those people who treat git issues as Reddit aren't helping.

Personally I think would be better to remain locked (or open just for those already following this) until Valve decide to publicly announce they made a progress on it.

As it is now, we are just receiving emails about off-topic discussion and people bumping it without new useful information.

@Root-Core
Copy link

We got some kind of an official statement, just as anticipated..

Updated embedded Chromium build in Steam, clearing path for further updates soon.

Source: https://store.steampowered.com/news/app/593110/view/4161959294800836361


In fact, it would be nice to get an "official" official statement.

@vially
Copy link

vially commented Mar 3, 2024

Manually patching the ~/.local/share/Steam/ubuntu12_64/steamwebhelper_sniper_wrap.sh script to add the --ozone-platform=wayland flag and then starting steam with the -noverifyfiles flag does make the main steam window run as a native Wayland client.

However, a lot of other windows (most of them corresponding to the drop-down menus) also get automatically opened in the process and various other stuff seems to be broken.

# Patch `steamwebhelper` wrapper script to add Chromium Wayland flags
sed -i '1 aset -- "$@" "--ozone-platform=wayland"' \
  ~/.local/share/Steam/ubuntu12_64/steamwebhelper_sniper_wrap.sh

# Run steam with the `-noverifyfiles` flag so that the patched script doesn't get reverted
steam -noverifyfiles

# Enjoy the fireworks!

But I still think this is a great progress overall and maybe with some custom windows rules it might actually become usable for some people.

@WhitleyStriber
Copy link

WhitleyStriber commented Mar 8, 2024

Have to test the patches posted here but I would LOVE to develop VR games on Wayland. Right now it's not 100%. Valve has been great patching a few bugs for Xorg but running VR Preview in UE5 doesn't seem to work correctly just yet.

VR Room Setup is still borked for me on both X and Wayland.

@kekkoudesu
Copy link

Manually patching the ~/.local/share/Steam/ubuntu12_64/steamwebhelper_sniper_wrap.sh script to add the --ozone-platform=wayland flag and then starting steam with the -noverifyfiles flag does make the main steam window run as a native Wayland client.

On my NVIDIA card / Arch Linux / Plasma 6.0.1,, this just results in a completely black screen 😅

There are two XWayland windows and about...17 Wayland windows?

image

I was hoping it might fix the flickering issue (#10313), but no dice.

@Mikaela
Copy link

Mikaela commented Mar 8, 2024

How recent is the Electron version used by Steam? Would it understand and respect export ELECTRON_OZONE_PLATFORM_HINT=wayland?

@jthoward64
Copy link

How recent is the Electron version used by Steam? Would it understand and respect export ELECTRON_OZONE_PLATFORM_HINT=wayland?

Steam does not use Electron AFAIK, it is Chromium Embedded Framework

@cwegener
Copy link

cwegener commented Mar 8, 2024

I was hoping it might fix the flickering issue (#10313), but no dice.

That will be addressed with the new implicit sync wayland protocol for Linux drm backend.

@cwegener
Copy link

cwegener commented Mar 8, 2024

Steam does not use Electron AFAIK, it is Chromium Embedded Framework

That is correct.

@FurtadoPires
Copy link

Steam does not use Electron AFAIK, it is Chromium Embedded Framework

Then this PR is probably relevant

From PR:

CEF on Wayland is already there. It’s just it doesn’t support proper embedding (aka client is creating a wl_surface and embeds that into Chromium). If I’m not mistaken, it’s the views usage that works.

Regarding what’s missing - everything was OK except that some demo clients were not updated. But I doubt it’ll work well now is is as we have done quite a few of refactorings in the Chromium upstream so this implementation for CEF has to be revisited.

Unless Valve is working in a in-house fork of CEF with those patches merged, this one it appears to be stuck due to nobody working on it currently.

@tranarchy
Copy link

tranarchy commented Jun 2, 2024

Replying to #4924 (comment)

This still doesn't work. With Xwayland support completely disabled, and doing the above trick Steam just crashes with this error:

Unable to open a connection to X

I wonder if there is any way to to launch and play wayland native games like TF2 without running the steam client on Xwayland.

@benley
Copy link

benley commented Jun 2, 2024

I wonder if there is any way to to launch and play wayland native games like TF2 without running the steam client on Xwayland.

This seems to be possible. I haven't tried TF2, but I've definitely seen Factorio running as a native Wayland app without without doing anything special to Steam. I just had to set an environment variable for it, SDL_VIDEODRIVER=wayland according to https://www.gamingonlinux.com/2023/03/factorio-gets-official-wayland-support-on-linux/

@tranarchy
Copy link

I wonder if there is any way to to launch and play wayland native games like TF2 without running the steam client on Xwayland.

This seems to be possible. I haven't tried TF2, but I've definitely seen Factorio running as a native Wayland app without without doing anything special to Steam. I just had to set an environment variable for it, SDL_VIDEODRIVER=wayland according to https://www.gamingonlinux.com/2023/03/factorio-gets-official-wayland-support-on-linux/

Yes I can run both TF2 and CS2 under wayland without xwayland, the issue is that steam itself needs xwayland.
Btw I tried launching tf2 outside of steam like so:

$HOME/.steam/steam/steamapps/common/SteamLinuxRuntime_sniper/run -- $HOME/.steam/steam/steamapps/common/Team\ Fortress\ 2/tf.sh

And tf2 ran on wayland without xwayland, but it crashes after the loading screen due to the missing steamapi.

[S_API FAIL] SteamAPI_Init() failed; create pipe failed.[S_API FAIL] Tried to access Steam interface SteamNetworkingUtils004 before SteamAPI_Init succeeded.

If there was a way to run steamapi without xwayland / xorg, we could easily play games that support wayland, without the need of xwayland.

@benley
Copy link

benley commented Jun 2, 2024

Ah sorry, I misunderstood what you were saying.

@FurtadoPires
Copy link

So the official page of CEF project states:

  • Vote for issues in the CEF issue tracker that are important to you. This helps with development prioritization.

and this one is the issue relevant to us.

So I think it would be nice if people following this issue could go there and give a thumbs up in the first comment, to signal developers that this request is relevant to us.
(please do not spam comments asking for when it'll be ready or something like that)

Also if anyone following this issue has technical knowledge, would be great if you could help them with code and tests, because unlike the steam client, we actually have access to the source code of CEF and this could result in better feedback.

Hopefully this could speed up the implementation of a steam wayland client.

@MicroGame0
Copy link

[Wayland] Implement IME support.

@opensourcecheemsburgers

Running steam through gamescope on a Hyprland session with xwayland disabled works:

gamescope --steam -- env steam

Running: hyprctl clients | grep 'xwayland: 1' returns nothing when Steam is open.

@jthoward64
Copy link

Running steam through gamescope on a Hyprland session with xwayland disabled works:

gamescope --steam -- env steam

Running: hyprctl clients | grep 'xwayland: 1' returns nothing when Steam is open.

I haven't tested but that is almost certainly just because XWayland is running inside of Gamescope now

@Twig6943
Copy link

Any progress on this?

@LethalManBoob
Copy link

LethalManBoob commented Oct 31, 2024

SDL_VIDEODRIVER=wayland works for me if i boot steam with it but games dont have the overlay. otherwise its fine?
if games fail, use wayland,x11,windows

@regalialong
Copy link

SDL_VIDEODRIVER=wayland works for me if i boot steam with it but games dont have the overlay. otherwise its fine? if games fail, use wayland,x11,windows

Has no effect for me on build 1726604483
image

@izmyname
Copy link

Switching from cef to qt6 (which is the native toolkit of KDE - steamOS default desktop) would solve this issue. Plus, qt6-webengine is chrome-based and does display web content very well. Just sayin.

@LethalManBoob
Copy link

nah i think making steam an electron app would 100% be the most obvious solutions
:)

@izmyname
Copy link

Still better, than relying on an ancient piece of code.

@major-mayer
Copy link

I wouldn't call CEF an ancient piece of code. It's still actively developed: https://bitbucket.org/chromiumembedded/cef/commits/branch/master
The Wayland support not being ideal is a different story.

@izmyname
Copy link

By ancient code, I meant Xorg.

@VortexAcherontic
Copy link

VortexAcherontic commented Nov 22, 2024

Guys this is an issue tracker and not a discussion forum. Please stop spamming everybody inboxes who want to keep an eye on this issue for an official response from a Valve employee.

@MisterSheeple
Copy link

MisterSheeple commented Nov 22, 2024

Guys this is an issue tracker and not a discussion forum. Please stop spamming everybody inboxes who want to keep an eye on this issue for an official response from a Valve employee.

For the record, imho I'm not bothered by discussions of workarounds and potential fixes. It doesn't have to be from a Valve employee as long as it's actually adding something substantial to the discussion. That hasn't been the case here lately though.

@Txordi00
Copy link

KDE 6.2 released on the main branch of SteamOS. But it still defaults to X11. I believe that this makes the release of a native wayland steam client closer.

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

No branches or pull requests