Bug 450770 - Kwin Plastik style leaks GPU memory in Xorg on window resize
Summary: Kwin Plastik style leaks GPU memory in Xorg on window resize
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: aurorae (other bugs)
Version First Reported In: 5.24.2
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-23 20:41 UTC by Błażej Szczygieł
Modified: 2024-06-04 11:53 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Błażej Szczygieł 2022-02-23 20:41:56 UTC
SUMMARY
Resizing any window with Plastik style on X11 uses more and more GPU memory. It doesn't happen with Oxygen and Breeze styles. The GPU memory can be freed on kwin_x11 restart. I can observe this problem on Radeon (Mesa) and NVIDIA with proprietary drivers.


STEPS TO REPRODUCE
1. Run X11 session.
2. Set Plastik KWin style.
3. Resize any window for a long time (e.g 1 minute).

OBSERVED RESULT
GPU memory usage increases on every window resize.

EXPECTED RESULT
GPU memory usage doesn't increase on window resize.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.24.2
KDE Frameworks Version:  5.91.0
Qt Version: 5.12.2
Mesa: 21.3.6
Nvidia: 510.54

ADDITIONAL INFORMATION
GPU memory monitoring:
- `watch -t -n 1 "vulkaninfo 2> /dev/null | grep -A 2 'memoryHeaps\['"`
- `watch -n 1 nvidia-smi`
- `sudo radeontop`

AMD Radeon 6900XT, before resizing:
        memoryHeaps[0]:
                size   = 17163091968 (0x3ff000000) (15.98 GiB)
                budget = 17118306304 (0x3fc54a000) (15.94 GiB)
--
        memoryHeaps[1]:
                size   = 17163091968 (0x3ff000000) (15.98 GiB)
                budget = 14769287168 (0x370517000) (13.75 GiB)

AMD Radeon 6900XT, after 60 seconds of resizing:
        memoryHeaps[0]:
                size   = 17163091968 (0x3ff000000) (15.98 GiB)
                budget = 8399335424 (0x1f4a3b000) (7.82 GiB)
--
        memoryHeaps[1]:
                size   = 17163091968 (0x3ff000000) (15.98 GiB)
                budget = 1272381440 (0x4bd70000) (1.18 GiB)

It consumed over 16 GiB memory visible by the GPU!
Comment 1 David Edmundson 2024-06-04 11:53:25 UTC
We have no duplicate reports and this is an old issue. This tends to imply a driver bug at the time