protonscr

SteamDeck: switch to desktop starts steam client with memory leak

steamopen Steam clientDistro Family: SteamOS
ValveSoftware/steam-for-linux#9895 · opened 2023-07-22 by ardje · updated 2023-08-30 · 4 comments · github
Aardje 2023-07-22 github

Your system information

  • Steam client version (build number or date): Steam Version: 1689983533
  • Distribution (e.g. Ubuntu): SteamOS MAIN "build_id" : "20230630.1000"
  • Opted into Steam client beta?: Yes
  • Have you checked for system updates?: Yes
  • Steam Logs: [generate by running this command in a terminal tar -zcvf ~/Desktop/steam-logs.tar.gz ~/.steam/steam/logs]
  • GPU: SteamDeck

Please describe your issue in as much detail as possible:

Describe what you expected should happen:
Switching to desktop mode should just be possible

and what did happen:
Switching to desktop causes the steam client to be active and visible on the taskbar only.
However, one of the steamwebhelper processes will eat up memory until the deck goes down, the RSS will be way over 8GB just this process.
In my case: at the end of the day it will die if I don't interfere.

Steps for reproducing this issue:

  1. Switch to desktop mode.
  2. type in top in a terminal.
  3. Work on your deck until it goes down hard.

or:

  1. exit steam client from taskbar icon

or: workaround

  1. open library from taskbar icon

So:

  • if you open the settings from the taskbar, the specific steamwebhelper stays big
  • if you open the library from the taskbar, the specific steamwebhelper process frees memory (in my last run it dropped from 3.4G RSS to 200M RSS).
  • The leak for me is about 3.4G per 8 hours. So during a long day it crashes my system at the most inconvenient time (hinting it is time for bed ;-) ).

I'm not sure how to attach the logs, this thing called "dragging & dropping" is new to me if you have worked with serial terminals for a long time.

Note: this is an original SteamOS Main, no unlocks or other trickery.

Aardje 2023-07-22 github

So github attach doesn't work from firefox flatpak on the steam deck.
steam-logs.tar.gz

Aardje 2023-07-23 github
(deck@steamdeck ~)$ ps faux|grep 6006
deck        6006 26.5  6.8 5809408 1043632 ?     Sl   11:25  33:34  |           |   \_ /home/deck/.local/share/Steam/ubuntu12_64/steamwebhelper --type=renderer --no-sandbox --force-device-scale-factor=1.00 --log-file=/home/deck/.local/share/Steam/logs/cef_log.txt --field-trial-handle=3962620600315495388,5904772364712157020,131072 --enable-features=CastMediaRouteProvider --disable-features=SameSiteByDefaultCookies --enable-blink-features=ResizeObserver,Worklet,AudioWorklet --disable-blink-features=Badging --lang=en-US --log-file=/home/deck/.local/share/Steam/logs/cef_log.txt --product-version=Valve Steam Client --force-device-scale-factor=1.00 --buildid=1689983533 --steamid=0 --num-raster-threads=4 --enable-main-frame-before-activation --renderer-client-id=6 --shared-files=v8_snapshot_data:100
(deck@steamdeck ~)$ date
Sun Jul 23 01:32:21 PM CEST 2023

So 2 hours in, 1GB RSS now
Opening store:

(deck@steamdeck ~)$ ps faux|grep 6006
deck        6006 26.5  1.4 5850048 225872 ?      SNl  11:25  34:19  |           |   \_ /home/deck/.local/share/Steam/ubuntu12_64/steamwebhelper --type=renderer --no-sandbox --force-device-scale-factor=1.00 --log-file=/home/deck/.local/share/Steam/logs/cef_log.txt --field-trial-handle=3962620600315495388,5904772364712157020,131072 --enable-features=CastMediaRouteProvider --disable-features=SameSiteByDefaultCookies --enable-blink-features=ResizeObserver,Worklet,AudioWorklet --disable-blink-features=Badging --lang=en-US --log-file=/home/deck/.local/share/Steam/logs/cef_log.txt --product-version=Valve Steam Client --force-device-scale-factor=1.00 --buildid=1689983533 --steamid=0 --num-raster-threads=4 --enable-main-frame-before-activation --renderer-client-id=6 --shared-files=v8_snapshot_data:100
Aardje 2023-08-22 github
  1. Someone who was to lazy to comment here had the same problem on a generic desktop opening steam in minimal mode.

  2. I've let my steam store window open all night and was greeted with 7GB of RSS usage this morning.
    It is cleaned up when closing the window and opening it again.

So it reeks like a standard javascript frontend leak.

When I have time I will try to monitor this in game mode, but of course game mode will auto sleep...
I do hope this is just desktop mode that has a javascript leak and not the deck mode.

RRodoMa92 2023-08-30 github

I'm affected by the same bug on both stable and beta. It will periodically leak memory until it will blow up my memory and either begin to stutter assuming I can get to the task manager to kill it or lock the system hard forcing a reboot.

EDIT: It's not distro specific, I'm running Bazzite (Fedora 38 Immutable) on a Steam Deck and I'm affected all the same.

Nothing extracted yet.