NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.34k stars 14.3k forks source link

Steam fails to launch and causes the user environment to become unresponsive. #292690

Open xusiai opened 9 months ago

xusiai commented 9 months ago

Describe the bug

At some point in the past month Steam broke for me. When I attempt to launch it now no window ever appear and it seems to break something else as spawning a new shell environment for the active user becomes impossible after launching Steam. Environments spawned prior to Steam continue to work but new ones are stuck in a permanent initialization stage (terminal show nothing but a blinking underscore; prompt never appears). It remains like this until I kill the entire user session/reboot. Terminating the Steam process is not sufficient to resolve this.

Steps To Reproduce

  1. Set programs.steam.enable to true.
  2. Launch Steam.

Expected behavior

Steam window appears.

Additional context

steam.sh[12011]: Running Steam on nixos 24.05 64-bit
steam.sh[12011]: STEAM_RUNTIME is enabled automatically
setup.sh[12089]: Steam runtime environment up-to-date!
steam.sh[12011]: Steam client's requirements are satisfied
03/02 01:23:39 Init: Installing breakpad exception handler for appid(steam)/version(1709168962)/tid(12143)
steamwebhelper.sh[12162]: === Sat Mar  2 01:23:48 AM CET 2024 ===
steamwebhelper.sh[12162]: Starting steamwebhelper under bootstrap sniper steam runtime at /home/kama/.local/share/Steam/ubuntu12_64/steam-runtime-sniper
CAppInfoCacheReadFromDiskThread took 47 milliseconds to initialize
Steam Runtime Launch Service: starting steam-runtime-launcher-service
Steam Runtime Launch Service: steam-runtime-launcher-service is running pid 12232
libEGL warning: egl: failed to create dri2 screen
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
src/steamUI/steamuisharedjscontroller.cpp (546) : Failed creating offscreen shared JS context
src/steamUI/steamuisharedjscontroller.cpp (546) : Failed creating offscreen shared JS context
03/02 01:24:14 Init: Installing breakpad exception handler for appid(steam)/version(1709168962)/tid(12143)
assert_20240302012414_31.dmp[12446]: Uploading dump (out-of-process)
/tmp/dumps/assert_20240302012414_31.dmp
src/clientdll/steamengine.cpp (2646) : Assertion Failed: CSteamEngine::BMainLoop appears to have stalled > 15 seconds without event signalled
src/clientdll/steamengine.cpp (2646) : Assertion Failed: CSteamEngine::BMainLoop appears to have stalled > 15 seconds without event signalled
{
  pkgs,
  config,
  ...
}: {
  services.xserver.videoDrivers = ["nvidia"];

  environment.variables = {
    GBM_BACKEND = "nvidia-drm";
    WLR_NO_HARDWARE_CURSORS = "1";
    LIBVA_DRIVER_NAME = "nvidia";
    __GLX_VENDOR_LIBRARY_NAME = "nvidia";
  };

  environment.systemPackages = with pkgs; [
    vulkan-loader
    vulkan-validation-layers
    vulkan-tools
    libglvnd
  ];

  hardware = {
    nvidia = {
      package = config.boot.kernelPackages.nvidiaPackages.beta;
      open = false;
      powerManagement.enable = true;
      modesetting.enable = true;
    };
    opengl = {
      enable = true;
      driSupport = true;
      driSupport32Bit = true;
      extraPackages = with pkgs; [
        nvidia-vaapi-driver
        vaapiVdpau
        libvdpau-va-gl
      ];
    };
  };
}

Notify maintainers

@jagajaga @jonringer

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 6.7.6-xanmod1, NixOS, 24.05 (Uakari), 24.05.20240229.1536926`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.19.3`
 - nixpkgs: `/nix/store/lwyjz70qh12nq6cb7fixl85vryzxqm3c-source`

Add a :+1: reaction to issues you find important.

CountingBeeps commented 8 months ago

I am trying to setup steam for the first time after installing nixos, and I have the same issue. I can provide any logs if they are needed.

YBeaugnon commented 8 months ago

Same issue for me, on nvidia with dwl. It appears the crash happen when the 'main' client open.

physics-enthusiast commented 8 months ago

Based on the logs, I wonder if this might be related to NVK being enabled in #289051?

CountingBeeps commented 8 months ago

Maybe, but I get the error message in a lot of other applications too, and they still work. For example lutris.

jonringer commented 8 months ago

If you set programs.steam.enable = true; do you still have the same behavior?

xusiai commented 8 months ago

If you set programs.steam.enable = true; do you still have the same behavior?

Yes.

woojiq commented 7 months ago

This happens to me when I click on "Library" sometimes. I found a workaround to open Steam and then open the game directly using app runner (wofi in my case).

TheOnlyMrCat commented 5 months ago

I'm getting this issue too. I have Intel Alder Lake integrated graphics, so it might not necessarily be an NVK issue

xusiai commented 1 month ago

This issue still occurs for me. The end result is the same but the output differ a bit. Did any of you manage to resolve this?

steam.sh[7958]: Running Steam on nixos 24.11 64-bit
steam.sh[7958]: STEAM_RUNTIME is enabled automatically
setup.sh[8036]: Steam runtime environment up-to-date!
steam-runtime-identify-library-abi: Failed to execute child process ?/sbin/ldconfig? (No such file or directory)
run.sh[8048]: steam-runtime-identify-library-abi --ldconfig-paths failed, falling back to ldconfig
run.sh[8048]: Warning: An unexpected error occurred while executing "/sbin/ldconfig -XNv", the exit status was 127
steam.sh[7958]: Steam client's requirements are satisfied
[2024-10-09 18:26:28] Startup - updater built Sep 17 2024 20:02:19
[2024-10-09 18:26:28] Startup - Steam Client launched with: '/home/lx/.local/share/Steam/ubuntu12_32/steam' '-srt-logger-opened'
10/09 18:26:28 minidumps folder is set to /tmp/dumps
10/09 18:26:28 Init: Installing breakpad exception handler for appid(steam)/version(1726604483)/tid(8096)
[2024-10-09 18:26:28] Loading cached metrics from disk (/home/lx/.local/share/Steam/package/steam_client_metrics.bin)
[2024-10-09 18:26:28] Failed to load cached hosts file (File 'update_hosts_cached.vdf' not found), using defaults
[2024-10-09 18:26:28] Using the following download hosts for Public, Realm steamglobal
[2024-10-09 18:26:28] 1. https://client-update.steamstatic.com, /, Realm 'steamglobal', weight was 1, source = 'baked in'
[2024-10-09 18:26:28] Verifying installation...
[2024-10-09 18:26:29] Verification complete
UpdateUI: skip show logo
Steam logging initialized: directory: /home/lx/.local/share/Steam/logs

XRRGetOutputInfo Workaround: initialized with override: 0 real: 0xf0451840
XRRGetCrtcInfo Workaround: initialized with override: 0 real: 0xf0450000
steamwebhelper.sh[8106]: Using supervisor /home/lx/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/bin/steam-runtime-supervisor
steamwebhelper.sh[8106]: Starting steamwebhelper under bootstrap sniper steam runtime via /home/lx/.local/share/Steam/ubuntu12_64/steam-runtime-sniper.sh
steamwebhelper.sh[8106]: Using CEF sandbox \(try with -no-cef-sandbox if this fails\)
steamwebhelper.sh[8106]: Starting steamwebhelper with Sniper steam runtime at /home/lx/.local/share/Steam/ubuntu12_64/steam-runtime-sniper/_v2-entry-point
pressure-vessel-wrap[8133]: E: While reading a line from /home/lx/.local/share/Steam/ubuntu12_64/steam-runtime-sniper/sniper_platform_0.20240618.92328/usr-mtree.txt.gz: Need more input
Steam Runtime Launch Service: starting steam-runtime-launcher-service
Steam Runtime Launch Service: steam-runtime-launcher-service is running pid 8184
bus_name=com.steampowered.PressureVessel.LaunchAlongsideSteam
libEGL warning: egl: failed to create dri2 screen
steamwebhelper.sh[8242]: Using supervisor /home/lx/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/bin/steam-runtime-supervisor
steamwebhelper.sh[8242]: Starting steamwebhelper under bootstrap sniper steam runtime via /home/lx/.local/share/Steam/ubuntu12_64/steam-runtime-sniper.sh
steamwebhelper.sh[8242]: Using CEF sandbox \(try with -no-cef-sandbox if this fails\)
steamwebhelper.sh[8242]: Starting steamwebhelper with Sniper steam runtime at /home/lx/.local/share/Steam/ubuntu12_64/steam-runtime-sniper/_v2-entry-point
pressure-vessel-wrap[8268]: E: While reading a line from /home/lx/.local/share/Steam/ubuntu12_64/steam-runtime-sniper/sniper_platform_0.20240618.92328/usr-mtree.txt.gz: Need more input
steamwebhelper.sh[8308]: Using supervisor /home/lx/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/bin/steam-runtime-supervisor
steamwebhelper.sh[8308]: Starting steamwebhelper under bootstrap sniper steam runtime via /home/lx/.local/share/Steam/ubuntu12_64/steam-runtime-sniper.sh
steamwebhelper.sh[8308]: Using CEF sandbox \(try with -no-cef-sandbox if this fails\)
steamwebhelper.sh[8308]: Starting steamwebhelper with Sniper steam runtime at /home/lx/.local/share/Steam/ubuntu12_64/steam-runtime-sniper/_v2-entry-point
pressure-vessel-wrap[8334]: E: While reading a line from /home/lx/.local/share/Steam/ubuntu12_64/steam-runtime-sniper/sniper_platform_0.20240618.92328/usr-mtree.txt.gz: Need more input
src/steamUI/steamuisharedjscontroller.cpp (653) : Failed creating offscreen shared JS context
src/steamUI/steamuisharedjscontroller.cpp (653) : Failed creating offscreen shared JS context
10/09 18:26:51 Init: Installing breakpad exception handler for appid(steam)/version(1726604483)/tid(8096)
10/09 18:26:51 Failed writing minidump, nothing to upload.
steamwebhelper.sh[8449]: Using supervisor /home/lx/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/bin/steam-runtime-supervisor
steamwebhelper.sh[8449]: Starting steamwebhelper under bootstrap sniper steam runtime via /home/lx/.local/share/Steam/ubuntu12_64/steam-runtime-sniper.sh
steamwebhelper.sh[8449]: Using CEF sandbox \(try with -no-cef-sandbox if this fails\)
steamwebhelper.sh[8449]: Starting steamwebhelper with Sniper steam runtime at /home/lx/.local/share/Steam/ubuntu12_64/steam-runtime-sniper/_v2-entry-point
pressure-vessel-wrap[8475]: E: While reading a line from /home/lx/.local/share/Steam/ubuntu12_64/steam-runtime-sniper/sniper_platform_0.20240618.92328/usr-mtree.txt.gz: Need more input
steamwebhelper.sh[8540]: Using supervisor /home/lx/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/bin/steam-runtime-supervisor
steamwebhelper.sh[8540]: Starting steamwebhelper under bootstrap sniper steam runtime via /home/lx/.local/share/Steam/ubuntu12_64/steam-runtime-sniper.sh
steamwebhelper.sh[8540]: Using CEF sandbox \(try with -no-cef-sandbox if this fails\)
steamwebhelper.sh[8540]: Starting steamwebhelper with Sniper steam runtime at /home/lx/.local/share/Steam/ubuntu12_64/steam-runtime-sniper/_v2-entry-point
pressure-vessel-wrap[8566]: E: While reading a line from /home/lx/.local/share/Steam/ubuntu12_64/steam-runtime-sniper/sniper_platform_0.20240618.92328/usr-mtree.txt.gz: Need more input
reaping pid: 8540 -- unknown
src/steamexe/main.cpp (297) : Assertion Failed: ReapProcess: waitid failed: 'No child processes'. Possibly leaking a zombie.

src/steamexe/main.cpp (297) : Assertion Failed: ReapProcess: waitid failed: 'No child processes'. Possibly leaking a zombie.

10/09 18:27:21 Init: Installing breakpad exception handler for appid(steam)/version(1726604483)/tid(8096)
10/09 18:27:21 Failed writing minidump, nothing to upload.
steamwebhelper.sh[8653]: Using supervisor /home/lx/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/bin/steam-runtime-supervisor
steamwebhelper.sh[8653]: Starting steamwebhelper under bootstrap sniper steam runtime via /home/lx/.local/share/Steam/ubuntu12_64/steam-runtime-sniper.sh
steamwebhelper.sh[8653]: Using CEF sandbox \(try with -no-cef-sandbox if this fails\)
steamwebhelper.sh[8653]: Starting steamwebhelper with Sniper steam runtime at /home/lx/.local/share/Steam/ubuntu12_64/steam-runtime-sniper/_v2-entry-point
pressure-vessel-wrap[8680]: E: While reading a line from /home/lx/.local/share/Steam/ubuntu12_64/steam-runtime-sniper/sniper_platform_0.20240618.92328/usr-mtree.txt.gz: Need more input
reaping pid: 8653 -- unknown
src/steamexe/main.cpp (297) : Assertion Failed: ReapProcess: waitid failed: 'No child processes'. Possibly leaking a zombie.

src/steamexe/main.cpp (297) : Assertion Failed: ReapProcess: waitid failed: 'No child processes'. Possibly leaking a zombie.

steamwebhelper.sh[8713]: Using supervisor /home/lx/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/bin/steam-runtime-supervisor
steamwebhelper.sh[8713]: Starting steamwebhelper under bootstrap sniper steam runtime via /home/lx/.local/share/Steam/ubuntu12_64/steam-runtime-sniper.sh
steamwebhelper.sh[8713]: Using CEF sandbox \(try with -no-cef-sandbox if this fails\)
steamwebhelper.sh[8713]: Starting steamwebhelper with Sniper steam runtime at /home/lx/.local/share/Steam/ubuntu12_64/steam-runtime-sniper/_v2-entry-point
pressure-vessel-wrap[8739]: E: While reading a line from /home/lx/.local/share/Steam/ubuntu12_64/steam-runtime-sniper/sniper_platform_0.20240618.92328/usr-mtree.txt.gz: Need more input
[2024-10-09 18:27:42] Shutdown
CountingBeeps commented 1 month ago

At this point I'm pretty sure this is an upstream issue. This crash looks pretty identical to mine: https://github.com/ValveSoftware/steam-for-linux/issues/11326