emersion / xdg-desktop-portal-wlr

xdg-desktop-portal backend for wlroots
MIT License
591 stars 56 forks source link

Screensharing freezes after turning monitor off and on #212

Open antoyo opened 2 years ago

antoyo commented 2 years ago

When sharing a screen in a video conference software, i.e. Jitsi in Chrome, the screen sharing will stop updating (looks like a freeze for the other participants) if I disable and then enable the monitor that was shared.

If it's not clear enough or want more info about this, I can provide more info.

I tried version 1.14.4 and this commit.

Thanks to fix this issue.

columbarius commented 2 years ago

Hey, you have to restart the screencast if you disable the monitor and turn it on again. When sway notifies us about a display been removed we have to stop requesting frames from it, since its the same when you disable the monitor or pull the plug from it. We can't predict how long it will be gone or if it's still the same screen when it's turned on again.

antoyo commented 2 years ago

Thanks for your answer. I'm not sure how xdg-desktop-portal works, but could there be any solution to this issue? It's not convenient to restart the screencast.

columbarius commented 2 years ago

Btw. did the screencast resume before? Could you please paste a TRACE log of xdpw with https://github.com/emersion/xdg-desktop-portal-wlr/commit/b5491df0c038a9c8431394f70606f2af295619b2 and without it?

antoyo commented 2 years ago

I've only been using Wayland for a couple weeks, so it's hard to say if it worked before, but I believe it always had this behavior. When you say testing without this commit, do you mean using the latest release or the commit before?

antoyo commented 2 years ago

Here are the logs: portal-wlr-logs.txt

I disconnected the screen around 14:04:22 and reconnected it around 14:05:12. This is with version 0.5.0.

Here are the logs with commit 0bbd652c1ca8e3b73c0130dc65a6bb18b5eaa2d3: portal-wlr-logs-git.txt I disconnected the screen around 14:20:42 and reconnected it around 14:21:05.

Hope it helps.