ublue-os / bazzite

Bazzite is a custom image built upon Fedora Atomic Desktops that brings the best of Linux gaming to all of your devices - including your favorite handheld.
https://bazzite.gg
Apache License 2.0
3.72k stars 219 forks source link

Steam as an overlay is completely broken #531

Closed garrett closed 8 months ago

garrett commented 10 months ago

The change @ https://github.com/ublue-os/bazzite/pull/525 was a surprise this morning and it completely broke Steam here for me... I was using Steam via Flatpak, and the new layered Steam auto-starts, requires a new login, doesn't have my downloaded games.

I manually added the game library to the new overlay Steam to give it a chance, but after quitting it, it no longer starts. I get an app icon in the system tray extension, but no Steam window. When trying to run it, I do get focus steals every few seconds. I guess Steam is trying to launch and crashing?

This is on my desktop, with these specs:

I also set up my partner with her own computer and rebased her to Bazzite on the 2.0 launch (for Fedora 39) and I'll have to deal with this all on her computer too, either later today or tomorrow (whenever she boots for the first time after the update). 😮‍💨

Oddly, if I run /usr/bin/steam from the command line, it works. If I use the launcher, it doesn't.

This seems to indicate that there's something specific in the environment to the RPM-based Steam when launched from the launcher that's causing it to crash, as it works in the Flatpak and also from the command line.

I do remember at some point, I did set DRI_PRIME=0 and PrefersNonDefaultGPU=true in Flatseal for the Flatpak Steam from Flathub, but I removed those a while ago, as there was a fix. I'm not sure if the crashing in this instance is the multiple GPU issue (again) or something else.

Now this is a pretty big problem as I now have two copies of Steam: a working one and a broken one, and the broken one auto-starts.

Even the best case scenario for people who were using the Flatpak of Steam (if it wasn't crashing): They have two copies of Steam on their system; one has their games, screenshots, save files, and configuration — and the other doesn't. And they have to log back in... And at least in my own case (and likely for others), the Steam overlay is broken and tries to start by default (and then keeps stealing focus and crashing and restarting every few seconds).

garrett commented 10 months ago

I'm using Bazzite-GNOME.

When I right-click on the icon and tell it to run on my integrated GPU, then it launches and works. (This isn't the default, and I do want to game on the discrete GPU, of course.)

garrett commented 10 months ago

If I use a DRI_PRIME=1 variable as a prefix to launch Steam from the command line, it has the same issue.

Using DRI_PRIME=0 is fine, just like not using a variable at all. I think this is related to how it's launched by default in GNOME.

$ DRI_PRIME=1 steam

steam.sh[183370]: Running Steam on fedora 39 64-bit
steam.sh[183370]: STEAM_RUNTIME is enabled automatically
setup.sh[183442]: Steam runtime environment up-to-date!
steam.sh[183370]: Steam client's requirements are satisfied
[2023-11-11 12:40:18] Startup - updater built Oct 31 2023 02:08:17
[2023-11-11 12:40:18] Startup - Steam Client launched with: '/var/home/garrett/.local/share/Steam/ubuntu12_32/steam'
11/11 12:40:18 Init: Installing breakpad exception handler for appid(steam)/version(1698777785)/tid(183488)
[2023-11-11 12:40:18] Loading cached metrics from disk (/var/home/garrett/.local/share/Steam/package/steam_client_metrics.bin)
[2023-11-11 12:40:18] Using the following download hosts for Public, Realm steamglobal
[2023-11-11 12:40:18] 1. https://client-update.akamai.steamstatic.com, /, Realm 'steamglobal', weight was 1000, source = 'update_hosts_cached.vdf'
[2023-11-11 12:40:18] 2. https://cdn.cloudflare.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'update_hosts_cached.vdf'
[2023-11-11 12:40:18] 3. https://cdn.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'baked in'
[2023-11-11 12:40:18] Verifying installation...
[2023-11-11 12:40:18] Verification complete

Steam logging initialized: directory: /var/home/garrett/.local/share/Steam/logs

XRRGetOutputInfo Workaround: initialized with override: 0 real: 0xec2b1170
XRRGetCrtcInfo Workaround: initialized with override: 0 real: 0xec2af880
steamwebhelper.sh[183581]: Runtime for steamwebhelper: defaulting to /var/home/garrett/.local/share/Steam/ubuntu12_64/steam-runtime-heavy
steamwebhelper.sh[183581]: glibc >= 2.34, partially disabling sandbox until CEF supports clone3()
CAppInfoCacheReadFromDiskThread took 70 milliseconds to initialize
Steam Runtime Launch Service: starting steam-runtime-launcher-service
Steam Runtime Launch Service: steam-runtime-launcher-service is running pid 183765
bus_name=com.steampowered.PressureVessel.LaunchAlongsideSteam
BRefreshApplicationsInLibrary 1: 175ms
BuildCompleteAppOverviewChange: 772 apps
RegisterForAppOverview 1: 26ms
RegisterForAppOverview 2: 26ms
steamwebhelper.sh[185143]: Runtime for steamwebhelper: defaulting to /var/home/garrett/.local/share/Steam/ubuntu12_64/steam-runtime-heavy
steamwebhelper.sh[185143]: glibc >= 2.34, partially disabling sandbox until CEF supports clone3()
BuildCompleteAppOverviewChange: 772 apps
RegisterForAppOverview 1: 16ms
RegisterForAppOverview 2: 16ms
steamwebhelper.sh[186314]: Runtime for steamwebhelper: defaulting to /var/home/garrett/.local/share/Steam/ubuntu12_64/steam-runtime-heavy
steamwebhelper.sh[186314]: glibc >= 2.34, partially disabling sandbox until CEF supports clone3()
BuildCompleteAppOverviewChange: 772 apps
RegisterForAppOverview 1: 14ms
RegisterForAppOverview 2: 14ms
steamwebhelper.sh[187566]: Runtime for steamwebhelper: defaulting to /var/home/garrett/.local/share/Steam/ubuntu12_64/steam-runtime-heavy
steamwebhelper.sh[187566]: glibc >= 2.34, partially disabling sandbox until CEF supports clone3()
BuildCompleteAppOverviewChange: 772 apps
RegisterForAppOverview 1: 12ms
RegisterForAppOverview 2: 13ms

It crashes and restarts a few times, but doesn't specifically mention the crash here. It does in other logs, but doesn't provide any more info than a crash.

Here's a tail -f of the logs directory, to get all the logs, in order.

steam-issues.txt

The repeating crash line is: [1111/121322.110677:INFO:crash_reporting.cc(271)] Crash reporting enabled for process: renderer (not so useful, really).

I did try to rpm-ostree override remove steam but that didn't work.

I guess I need to switch back to vanilla Silverblue for now?

KyleGospo commented 10 months ago

Hi there,

First I just wanted to say my apologies for breaking your use case here. Our original intent was for most users on desktop images to be running Steam within distrobox, for which this transition should be seamless thanks to them using the same directories in your home dir.

Your solution with PrefersNonDefaultGPU is the correct one, this is an upstream Steam bug (https://github.com/flathub/com.valvesoftware.Steam/issues/559) that cannot be solved automatically on our end where it occurs. In the interest of making this easier I have pushed an update (https://github.com/ublue-os/bazzite/commit/2534fb9f1976dc65064d6f462d50448a9a9cabdb) which removes Steam from autostart on the desktop images and leaves autostarting it up to the end user.

My intention is for this to be our last architectural change of this nature. Originally desktop images exclusively used Distrobox and the Deck images were the only ones layered due to Steam being used as DE on those images, but this later changed when Nvidia drivers began having issues under Distrobox. Making all images use layered Steam keeps things consistent and makes the support load for us lower, ensuring that different images do not need different fixes for different problems. (https://github.com/ublue-os/bazzite/commit/c99970620f2edc60520d08b652d229a3d35ffce8#diff-12a51cfc1d2fb1b61ec073937df1fd8d5d0c1e528d0b1feb226bce165107aafd)

It also comes with the following benefit over distrobox/flatpak: 1: HDR support in the very near future, KDE has already merged the needed changes. 2: Full VR headset support without a just command to fix install issues. 3: Functioning Steam Input under Wayland desktop. 4: Ability to use Gamescope as a nested compositor restored.

Lastly, as of the update to Fedora 39 as a base we've moved to a multi-step deployment process where changes are pushed to :unstable, then :testing, then lastly :latest to ensure time for community feedback before things are merged. These branches can be selected from SteamOS Game Mode on the deck builds.

Let me know if you have any other issues or any further feedback for us, I'd like to improve anything you think we can do better.

garrett commented 10 months ago

Thanks for your quick reply! :+1:

And thanks for removing it from autostart on the system level. Without having autostart in the way, I could pin the Flatpak version and ignore the system one. That could work.

I had been running Steam in Flatpak on Silverblue for quite some time; I didn't get into the distrobox layer that Bazzite provides, as the Flatpak build worked for me, including Steam Input (with a PS5 controller) and Gamescope too. (I don't have an HDR display nor do I (yet) have a VR headset for my computer — although support for VR sounds amazing. I'm tempted to pick up whatever VR headset Valve announces next.)