Bug 448822

Summary: High CPU usage by Kwin_Wayland when screencasting
Product: [Plasma] kwin Reporter: Behzad A <behzad.a_ir>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DOWNSTREAM    
Severity: normal CC: aleixpol, nate
Priority: NOR Keywords: efficiency-and-performance, wayland-only
Version: 5.23.5   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Behzad A 2022-01-20 13:15:18 UTC
You can see the issue in this video
https://youtu.be/Zj0PdAkxkDw

System InfoSystem:    Host: localhost.localdomain Kernel: 5.16.0-1-default x86_64 bits: 64 compiler: gcc v: 11.2.1
           Desktop: KDE Plasma 5.23.5 tk: Qt 5.15.2 wm: kwin_wayland dm: SDDM Distro: openSUSE Tumbleweed 20220111
CPU:       Info: Dual Core model: Intel Core2 Duo T6670 bits: 64 type: MCP arch: Penryn rev: A cache: L2: 2 MiB
           flags: lm nx pae sse sse2 sse3 sse4_1 ssse3 vmx bogomips: 8771
           Speed: 1280 MHz min/max: 1200/2201 MHz boost: enabled Core speeds (MHz): 1: 1280 2: 1930
Graphics:  Device-1: Intel Mobile 4 Series Integrated Graphics vendor: Sony driver: i915 v: kernel bus-ID: 00:02.0
           chip-ID: 8086:2a42
           Device-2: Ricoh Sony Vaio Integrated Webcam type: USB driver: uvcvideo bus-ID: 1-2:2 chip-ID: 05ca:18b3
           Display: wayland server: X.org 1.21.1.3 compositor: kwin_wayland driver: loaded: modesetting unloaded: fbdev,vesa
           alternate: intel resolution: <missing: xdpyinfo>
           OpenGL: renderer: Mesa Mobile Intel GM45 Express (CTG) v: 2.1 Mesa 22.0.0-devel-git-8d2be391 direct render: Yes
Comment 1 Vlad Zahorodnii 2022-01-20 13:18:24 UTC
obs doesn't use dmabuf, which results in high cpu usage. Aleix is there anything that we can do on the compositor? or is it a client issue?
Comment 2 Behzad A 2022-01-20 16:35:30 UTC
I just now noticed when hiding Obs main window this issue is disappear
Comment 3 Nate Graham 2022-01-20 23:23:10 UTC
Sounds like it's an OBS issue then. Can you report this to them at https://github.com/obsproject/obs-studio/issues?

Thanks!
Comment 4 Aleix Pol 2022-01-20 23:46:04 UTC
OBS is transitioning to use dmabuf (and all of their modifiers changes), I'd hope once they are fully there this is less of a problem.