-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
segfault when using steam remote play within gamescope #775
Comments
me too, same error |
Same error here on RX 6900 XT. Maybe the function |
This is the exact issue that happens on Steam Deck ValveSoftware/SteamOS#1000 I thought it may be pipewire related as it does not happen if you use pipewire prior to this commit PipeWire/pipewire@7631316 (try with pipewire 0.3.59) Even if it's an issue with pipewire, gamescope should not implode because of it. |
Hello @safijari, your regression should be reported upstream to pipewire's issue tracker so that those devs can ponder their change in behavior. I've looked around a bit and didn't find anything related on https://gitlab.freedesktop.org/pipewire/pipewire/-/issues. |
@kisak-valve thank you for your response. I'm genuinely not sure what the core issue is. I can certainly report that something is wrong to the pipewire devs but as best as I can tell this is only negatively impacting gamescope. I looked a bit more into it and the issue isn't related to pipewiresrc asking for the wrong image size. |
This patch should fix the issue --- a/src/pipewire.cpp
+++ b/src/pipewire.cpp
@@ -358,7 +358,7 @@ static void stream_handle_param_changed(void *data, uint32_t id, const struct sp
const struct spa_pod *buffers_param =
(const struct spa_pod *) spa_pod_builder_add_object(&builder,
SPA_TYPE_OBJECT_ParamBuffers, SPA_PARAM_Buffers,
- SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int(buffers, 1, 32),
+ SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int(buffers, 1, 8),
SPA_PARAM_BUFFERS_blocks, SPA_POD_Int(1),
SPA_PARAM_BUFFERS_size, SPA_POD_Int(shm_size),
SPA_PARAM_BUFFERS_stride, SPA_POD_Int(state->shm_stride), On my system, PipeWire was trying to use 16 buffers even though only up to 8 are available |
Oh wow, great catch. I didn't even know we got to choose that! I have seen this issue before and worked around it locally by adding more screenshot buffers. |
Merged that patch, thanks. |
Doesn't work for me. Still segfaults. How can I tell if pipewire is using more buffers than it should? |
You can try debugging pipewire with
(you might need to omit the
Also, is it the same error as this? A segfault != a failed assert
If so, you can try increasing the number of textures/buffers allocated here and see if that helps: --- a/src/rendervulkan.cpp
+++ b/src/rendervulkan.cpp
@@ -107,7 +107,7 @@ struct VulkanOutput_t
VkFormat outputFormat = VK_FORMAT_UNDEFINED;
- std::array<std::shared_ptr<CVulkanTexture>, 8> pScreenshotImages;
+ std::array<std::shared_ptr<CVulkanTexture>, 32> pScreenshotImages;
// NIS and FSR
std::shared_ptr<CVulkanTexture> tmpOutput; |
Thanks @Starsam80 . The error is this when trying to stream from my machine to another or to my phone with Steam Link:
So seems to be different than a segfault. Still can't stream from one to another and the machine that hosts crashes gamescope.
|
I have no idea what is going on here, but my guess is gamescope (when it has more buffers, something I am still looking into...) is working as it should, but then the video encoding part (vcn_enc) of the GPU driver explodes for some other reason... |
I'll open a different issue to track that then. Because the same doesn't happen on other standalone compositors (like mutter). Thanks for your help @Starsam80 |
This patch is working for me. Thanks!
I use |
I'll try this tonight and report back. Would be great to have this fixed since currently remote play is broken. |
After some quick tests, f13171e fixes Remote Play for me, thanks! 🙂 |
Confirmed on my end here. This fixes streaming on ChimeraOS. |
Confirmed, fixed same error on EndevourOS |
I've tested the patch and it streamed the controller from my phone using Steam link. But in a few seconds the GPU locked the system up entirely with this dmesg:
What should I test next? |
I'd like to use gamescope as a way of providing a 4k output when trying to stream games from my desktop (currently using an ultrawide). When I start to stream to my TV, gamescope crashes.
System details:
GPU is a Radeon 7900 xtx
Mesa:
Pipewire
Console output:
Some more info:
The text was updated successfully, but these errors were encountered: