Bug 492440 - Setting cap_sys_nice on KWin prevents System Monitor app and widgets from being able to query its memory usage
Summary: Setting cap_sys_nice on KWin prevents System Monitor app and widgets from bei...
Status: RESOLVED FIXED
Alias: None
Product: ksystemstats
Classification: Frameworks and Libraries
Component: General (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2024-08-31 05:03 UTC by Nate Graham
Modified: 2024-10-02 14:19 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.2.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2024-08-31 05:03:09 UTC
KWin sets this when built from source and recommends that distros set it too; see https://community.kde.org/Distributions/Packaging_Recommendations#KWin_package_configuration.

However this prevents ksystemstats from querying its memory usage; open the app, go to the processes page and search for "kwin", and you'll see that it has its CPU usage reported, but not memory.

This is a somewhat significant omission as KWin is a core system component especially in a Wayland session, so being able to monitor its memory usage is important.

`top` is able to gather memory usage statistics for KWin in this state, so ksystemstats ought to be able to do so as well.
Comment 1 Nate Graham 2024-10-02 14:18:44 UTC
cap_sys_nice appears to have been a red herring, and this was caused by https://invent.kde.org/plasma/libksysguard/-/commit/1f48d7e9c420a40372b7ecfaf20d99d2e876168c. It's fixed in 6.2.0 by Arjen Hiemstra with https://invent.kde.org/plasma/libksysguard/-/commit/f23b43c56df616ec8ca582676050cdf69b0727cd