Bug 479306 - Screen Sharing portal freezes the screen for several seconds with large amount of windows open. Presumably due to this, if there's another screenshare running, that screenshare will freeze.
Summary: Screen Sharing portal freezes the screen for several seconds with large amoun...
Status: REPORTED
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (show other bugs)
Version: 5.91.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-01-02 16:45 UTC by Andrej Halveland
Modified: 2024-08-28 05:13 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrej Halveland 2024-01-02 16:45:51 UTC
1. Issue:
When I have many apps/windows open, and then I try to screen share a window in Discord/OBS, the entire screen will freeze for several seconds (in extreme cases even for 10 seconds).

2. Issue
And I believe that because of this freeze, it causes my other screenshares (be it a whole screen or just a window) to freeze indefinitely (until I manually re-share the same screen/window again).

Here's a video demonstration: https://www.youtube.com/watch?v=_azZ6AMHhGc

I used OBS in the steps to reproduce but it's the exact same with Discord in chromium. So it's not OBS specific.

STEPS TO REPRODUCE (1st issue)
1. Have many apps/windows open
2. Try to screenshare a window in OBS

OBSERVED RESULT
The screen will freeze for several seconds.

EXPECTED RESULT
The screen should not freeze.



STEPS TO REPRODUCE (2nd issue)
1. Have many apps/windows open
2. In OBS create the first screenshare and select any screen/window
3. In OBS create a second screenshare of a *window*

OBSERVED RESULT
The screen will freeze for several seconds AND the first screenshare will freeze indefinitely.

EXPECTED RESULT
The screen and other screenshares should not freeze.


SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.91.0
KDE Frameworks Version: 5.247.0
Qt Version: 6.7.0 beta1
Kernel Version: 6.7.0-rc6
Graphics Platform: Wayland
Graphics Drivers: mesa 23.3.2
Processors: AMD Ryzen 9 4900HS
Memory:  24GB of RAM
Graphics Processor: Integrated: Vega 8
Manufacturer: ASUS (Zephyrus G15 GA502IV)
Comment 1 Ember 2024-08-28 05:13:51 UTC
Can reproduce.

NixOS, plasma wayland 5.27.11, linux 6.10, 45-50 windows open

xdg portal spits out a bunch of errors in the journal 

```
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:106: TypeError: Cannot read property 'checked' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]:                                  checked: model.checked === Qt.Checked
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:106: TypeError: Cannot read property 'checked' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:101: TypeError: Cannot read property 'DisplayRole' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]:                                      title: model.DisplayRole || ""
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:101: TypeError: Cannot read property 'DisplayRole' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:102: TypeError: Cannot read property 'DecorationRole' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]:                                      titleIcon: model.DecorationRole || ""
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:102: TypeError: Cannot read property 'DecorationRole' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:110: TypeError: Cannot read property 'Uuid' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]:                                      uuid: model.Uuid
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:110: TypeError: Cannot read property 'Uuid' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:106: TypeError: Cannot read property 'checked' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]:                                  checked: model.checked === Qt.Checked
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:106: TypeError: Cannot read property 'checked' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:101: TypeError: Cannot read property 'DisplayRole' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]:                                      title: model.DisplayRole || ""
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:101: TypeError: Cannot read property 'DisplayRole' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:102: TypeError: Cannot read property 'DecorationRole' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]:                                      titleIcon: model.DecorationRole || ""
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:102: TypeError: Cannot read property 'DecorationRole' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:110: TypeError: Cannot read property 'Uuid' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]:                                      uuid: model.Uuid
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:110: TypeError: Cannot read property 'Uuid' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:106: TypeError: Cannot read property 'checked' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]:                                  checked: model.checked === Qt.Checked
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:106: TypeError: Cannot read property 'checked' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:101: TypeError: Cannot read property 'DisplayRole' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]:                                      title: model.DisplayRole || ""
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:101: TypeError: Cannot read property 'DisplayRole' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:102: TypeError: Cannot read property 'DecorationRole' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]:                                      titleIcon: model.DecorationRole || ""
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:102: TypeError: Cannot read property 'DecorationRole' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:110: TypeError: Cannot read property 'Uuid' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]:                                      uuid: model.Uuid
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:110: TypeError: Cannot read property 'Uuid' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:106: TypeError: Cannot read property 'checked' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]:                                  checked: model.checked === Qt.Checked
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:106: TypeError: Cannot read property 'checked' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:101: TypeError: Cannot read property 'DisplayRole' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]:                                      title: model.DisplayRole || ""
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:101: TypeError: Cannot read property 'DisplayRole' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:102: TypeError: Cannot read property 'DecorationRole' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]:                                      titleIcon: model.DecorationRole || ""
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:102: TypeError: Cannot read property 'DecorationRole' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:110: TypeError: Cannot read property 'Uuid' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]:                                      uuid: model.Uuid
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:110: TypeError: Cannot read property 'Uuid' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:106: TypeError: Cannot read property 'checked' of null
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]:                                  checked: model.checked === Qt.Checked
Aug 27 19:14:30 nixos xdg-desktop-portal-kde[2966]: qrc:/ScreenChooserDialog.qml:106: TypeError: Cannot read property 'checked' of null
Aug 27 19:14:30 nixos pipewire[3035]: mod.protocol-native: 0x5582b0aa3830: connection_data: client 0x5582b4e64680 error -71 (Protocol error)
Aug 27 19:14:30 nixos kwin_wayland_wrapper[2796]: kwin_screencast: PipeWire remote error:  connection error
```