ValveSoftware / gamescope

SteamOS session compositing window manager
Other
3.12k stars 210 forks source link

[Bug/SteamDeck] 4K pipewire capture crash #561

Open parkerlreed opened 2 years ago

parkerlreed commented 2 years ago

Using the gstreamer pipewiresrc with vaapi causes the gamecope instance to crash when running at 4K (Both within Game Mode Steam UI and within a game running at native 4K)

crankshaft from Discover pulls in the needed gsteramer deps to replicate this https://crankshaft.space/

GST_VAAPI_ALL_DRIVERS=1 \
GST_PLUGIN_PATH=/home/deck/.var/app/space.crankshaft.Crankshaft/data/crankshaft/plugins/recapture/dist/deps/plugins \
LD_LIBRARY_PATH=/home/deck/.var/app/space.crankshaft.Crankshaft/data/crankshaft/plugins/recapture/dist/deps/lib \
gst-launch-1.0 \
pipewiresrc do-timestamp=true \
        ! vaapipostproc \
        ! queue \
        ! vaapih264enc \
        ! h264parse \
        ! mp4mux name=sink \
        ! filesink location=/home/deck/Videos/recapture/2022-07-21_17-25-55.mp4 \
         pulsesrc device="echo-cancel-sink.monitor" \
         ! audioconvert \
         ! lamemp3enc target=bitrate bitrate=128 cbr=true \
         ! sink.audio_0

Journalctl of the session crashing (which in turns reconnects external monitor and relaunches Steam client in game mode)

https://gist.github.com/parkerlreed/70eb83a9fb767f53bb2092feb8731210

parkerlreed commented 2 years ago

Further testing seems to show the gstreamer vaapi support possibly being an issue? If I immediately do a fakesink after the pipewiresrc, gamemode continues to run fine (in both cases gstreamer never crashes). With vaapi enabled, gamescope segfaults but gstreamer keeps running.

(1)(deck@steamdeck ~)$ GST_VAAPI_ALL_DRIVERS=1 GST_PLUGIN_PATH=/home/deck/.var/app/space.crankshaft.Crankshaft/data/crankshaft/plugins/recapture/dist/deps/plugins LD_LIBRARY_PATH=/home/deck/.var/app/space.crankshaft.Crankshaft/data/crankshaft/plugins/recapture/dist/deps/lib gst-launch-1.0 pipewiresrc do-timestamp=true         ! fakesink