ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.26k stars 175 forks source link

"Steamwebhelper is not responding" in latest Steam beta with SDL_VIDEODRIVER=wayland set #11358

Open ConnorJC3 opened 1 month ago

ConnorJC3 commented 1 month ago

Your system information

Please describe your issue in as much detail as possible:

Describe what you expected should happen and what did happen. Please link any large code pastes as a Github Gist

Attempting to launch steam when using the public beta, it gets stuck and displays an error message that steamwebhelper has crashed: image

This issue occurs regardless of launching steam with native libraries or the steam runtime. Reverting to the stable client (i.e. rm ~/.steam/steam/package/beta), this issue does not occur.

Steps for reproducing this issue:

  1. Close steam
  2. Opt into the public beta (echo publicbeta > ~/.steam/steam/package/beta)
  3. Attempt to launch steam
kisak-valve commented 1 month ago

Hello @ConnorJC3, ERROR: CCEFThread Init failed to initialize SDL: wayland not available in your webhelper.txt looks like a potential hint.

Can you check if something is setting SDL_VIDEODRIVER=wayland or SDL_VIDEO_DRIVER=wayland in your environment and try running Steam from a terminal with something like unset SDL_VIDEODRIVER; steam?

Frestein commented 1 month ago

unset SDL_VIDEODRIVER; steam

Hey! I did that and after that the steam opened successfully.

Arch Linux Kernel Name: Linux Kernel Version: 6.11.4-zen1-1-zen X Server Vendor: The X.Org Foundation X Server Release: 12401003 X Window Manager: Hyprland :D Steam Runtime Version: steam-runtime_0.20240916.101793

Client Information: Version: 1729208001 Browser GPU Acceleration Status: Enabled Browser Canvas: Enabled Browser Canvas out-of-process rasterization: Enabled Browser Direct Rendering Display Compositor: Disabled Browser Compositing: Enabled Browser Multiple Raster Threads: Enabled Browser OpenGL: Enabled Browser Rasterization: Enabled Browser Raw Draw: Disabled Browser Skia Graphite: Disabled Browser Video Decode: Enabled Browser Video Encode: Disabled Browser Vulkan: Disabled Browser WebGL: Enabled Browser WebGL2: Enabled Browser WebGPU: Disabled Browser WebNN: Disabled

Video Card: Driver: AMD AMD Radeon RX 580 Series (radeonsi, polaris10, LLVM 18.1.8, DRM 3.59, 6.11.4-zen1-1-zen) Driver Version: 4.6 (Compatibility Profile) Mesa 24.2.5-arch1.1

ConnorJC3 commented 1 month ago

Same here - unsetting SDL_VIDEODRIVER works (and I can then launch the beta), but I am setting SDL_VIDEODRIVER to wayland on purpose because this is a wayland environment.

Thus steam should probably manually override/ignore this env var if it isn't going to support wayland (or even better, steam could start supporting wayland - that would be one more application off the X-only list).

smcv commented 1 month ago

I am setting SDL_VIDEODRIVER to wayland on purpose because this is a wayland environment

Please be aware that this is not necessarily an appropriate line of reasoning: even in a Wayland environment, and even outside Steam, some aspects of SDL (and especially SDL 2) work better if they are going via its X11 video driver, which in your case will talk to Xwayland.

If the maintainers of SDL considered its Wayland video driver to be ready to be used by default in Wayland environments, they would already have made it the default. The fact that you have needed to force it by setting an environment variable is a sign that they do not consider it to be ready for that.

smcv commented 1 month ago

@kisak-valve or @ConnorJC3, please could you retitle this to something like

"Steamwebhelper is not responding" in latest Steam beta with SDL_VIDEODRIVER=wayland set

to separate this from other reasons why the same symptom can appear? That will help to keep it on-topic and keep the signal-to-noise ratio high, which makes it more likely that it can be fixed.

smcv commented 1 month ago

If you do want to force SDL games to default to Wayland, overruling the SDL maintainers' recommendation, then a more stable way to achieve that would be to export SDL_VIDEODRIVER=wayland,x11, which means: try to use the Wayland video driver, but if that isn't possible, fall back to the X11 video driver. I suspect you might find that this works as a solution or workaround for this issue.

This is safer to use than SDL_VIDEODRIVER=wayland, because not every build of SDL has the Wayland driver enabled: even if the copy of SDL from your operating system does, other copies of SDL included with Steam or with individual games do not necessarily have that, especially if they were compiled against very old library stacks for maximum compatibility between different OSs.

smcv commented 3 weeks ago

This should be fixed by Steam client beta 1729917543 (2024-10-26). I no longer see the reported issue on a system where I was previously able to reproduce it (AMD/Mesa + Arch Linux + KDE Plasma + Wayland).

Steam client beta 1729917543 (2024-10-26) automatically converts SDL_VIDEODRIVER=wayland into SDL_VIDEODRIVER=wayland,x11, with this warning logged:

warning: SDL_VIDEODRIVER='wayland' does not allow fallback, use 'wayland,x11' instead

It also does the same for SDL_VIDEO_DRIVER (used by SDL 3).

The practical result is that any SDL game that can use native Wayland will still use native Wayland, but games and components that cannot use native Wayland for whatever reason will automatically fall back to X11 via Xwayland.

This doesn't fix any other Wayland-related issues, notably #8020, but it also doesn't make them any worse.