Skip to content

flatpak-session-helper high CPU usage and excessive window monitoring whenStreamController running #457

@mensfeld

Description

@mensfeld

StreamController causes the flatpak-session-helper process to consume 33% CPU consistently and triggers an infinite loop of xprop commands that monitor unrelated windows on the system. This results in significant system resource consumption and performance degradation.

With StreamController:

Image

Without:

Image

To Reproduce

I don't know. I just have StreamController running. I tried running it with cache wiped and no data/settings/plugins. Same

Expected behavior

StreamController should run without causing excessive CPU usage in background Flatpak processes. The flatpak-session-helper should remain at minimal CPU usage (typically <1%).

System Information

  • OS: Linux amida 6.11.0-29-generic #29~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jun 26 14:16:59 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
  • Desktop Environment: GNOME Shell 46.0
  • Flatpak version: Flatpak 1.14.6
  • StreamController version:
          ID: com.core447.StreamController
         Ref: app/com.core447.StreamController/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 1.5.0-beta.11
     License: GPL-3.0-or-later
      Origin: flathub
  Collection: org.flathub.Stable
Installation: user
   Installed: 668.1 MB
     Runtime: org.gnome.Platform/x86_64/48
         Sdk: org.gnome.Sdk/x86_64/48

      Commit: 4f8d7c575cbb2f6160b6bd87a726d2652fd5d5f904a6c4d782b9cab5f536b4cd
      Parent: b8ee8c12e396bcb4d3282bb51bda4a1179fd392e78a7cee0d2c90adc108ba9c7
     Subject: Bump version to 1.5.0-beta.11 (#24) (5235167dbf4c)
        Date: 2025-06-04 18:26:59 +0000

Technical Details

Symptoms observed:

  • flatpak-session-helper process constantly using 33% CPU
  • Continuous execution of xprop commands targeting window ID 0x220000c
  • The monitored window belongs to an unrelated application (Guake terminal in my case)
  • CPU usage immediately stops when StreamController is closed
  • xdg-dbus-proxy also showing abnormal memory usage (6GB) simultaneously

strace output showing the problem:

[pid XXXXX] execve("/usr/bin/xprop", ["xprop", "-id", "0x220000c", "WM_NAME"], ...) = 0
[pid XXXXX] +++ exited with 0 +++
[pid XXXXX] execve("/usr/bin/xprop", ["xprop", "-id", "0x220000c", "WM_CLASS"], ...) = 0
[pid XXXXX] +++ exited with 0 +++

This pattern repeats continuously in a tight loop.

Window being monitored (unrelated to StreamController):

WM_CLASS(STRING) = "guake", "Guake"
WM_NAME(STRING) = "/home/user/path"
*NET*WM_STATE(ATOM) = *NET*WM_STATE_SKIP_PAGER, *NET*WM_STATE_SKIP_TASKBAR, 
                      *NET*WM_STATE_FULLSCREEN, *NET*WM_STATE_ABOVE, 
                      *NET*WM_STATE_STICKY, *NET*WM_STATE_FOCUSED

Analysis

The issue appears to be related to portal permissions or desktop integration requests from StreamController that cause the Flatpak session helper to monitor all active windows instead of just StreamController's own windows. The monitoring gets stuck on windows with special properties like SKIP_TASKBAR, FULLSCREEN, ABOVE, and STICKY.

Workarounds

  • Closing StreamController immediately stops the CPU usage
  • Killing the flatpak-session-helper process temporarily stops the loop (but it restarts)

Debug commands used:

  • strace -p $(pgrep flatpak-session-helper)
  • xprop -id 0x220000c
  • flatpak permission-show com.core447.StreamController
  • journalctl --user -f | grep -E "(portal|stream)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions