Bug 434417 - Using a window rule to force all Plasma windows to larger than the screen size size KWin allows causes CPU and memory leaking
Summary: Using a window rule to force all Plasma windows to larger than the screen siz...
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: rules (show other bugs)
Version: 5.21.2
Platform: Neon Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-15 01:45 UTC by The Feren OS Dev
Modified: 2023-06-20 19:35 UTC (History)
4 users (show)

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


Attachments
system tray size (751.62 KB, image/png)
2023-05-26 19:13 UTC, Codezela
Details
note size (753.27 KB, image/png)
2023-05-26 19:13 UTC, Codezela
Details
calc size (741.30 KB, image/png)
2023-05-26 19:14 UTC, Codezela
Details

Note You need to log in before you can comment on or make changes to this bug.
Description The Feren OS Dev 2021-03-15 01:45:25 UTC
SUMMARY
I decided for a laugh to try a suggestion by an internet friend that tried to make Kickoff be at a maximum size, and due to this I found out something interesting:
If you make a window rule from a pinned Plasma Plasmoid popup's window menu for Plasma, with the window set to all types of window, and the only rule being Force size at the maximum possible value it allows in both width and height, and then save... well, looking at top it seems to max out CPUs and eat A LOT of RAM.


STEPS TO REPRODUCE
1. Trigger the window menu via the menu hotkey on a pinned Plasmoid popup (a non-pinned one will cause the menu to immediately close with the popup itself)
2. Make a rule for that window
3. Set the window types to match to be ALL the window types
4. Add the Size effect
5. Set the effect to Force
6. Set the values it forces to to the maximum values (quick way is typing 99999)
7. Save

OBSERVED RESULT
The RAM usage and CPU usage skyrockets because of plasmashell, and eventually the DE dies because of Linux freaking out, probably, since both resource types are being used uncontrollably.

EXPECTED RESULT
The DE wouldn't 'leak' those resources when trying to cope with this...? That or KWin wouldn't even allow this to be possible to begin with.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: KDE neon 5.21.2
(available in About System)
KDE Plasma Version: 5.21.2
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
bruh.
Comment 1 The Feren OS Dev 2021-03-15 01:52:12 UTC
For context: I used Menu -> More Options -> Configure Special Window Settings...
Comment 2 Codezela 2023-05-26 19:13:24 UTC
Created attachment 159272 [details]
system tray size
Comment 3 Codezela 2023-05-26 19:13:50 UTC
Created attachment 159273 [details]
note size
Comment 4 Codezela 2023-05-26 19:14:19 UTC
Created attachment 159274 [details]
calc size
Comment 5 Nate Graham 2023-06-20 19:35:49 UTC
> quick way is typing 99999
Yeahhhhhhhhhhhhhhhhhhhhhh maybe don't do that. :) 

Window Rules are an advanced feature and there's a certain amount of responsibility involved. But we can maybe restrict this to at least not be larger than the screen size. That's not a valid thing that KWin should allow.