https://bugs.kde.org/show_bug.cgi?id=479846

            Bug ID: 479846
           Summary: Thumbnail Grid, Wayland: video memory leak each time
                    Task Switcher is shown, leading to OOM crash on NVIDIA
                    GPUs
    Classification: Plasma
           Product: kwin
           Version: 5.92.0
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: crash
          Priority: NOR
         Component: effects-window-management
          Assignee: kwin-bugs-n...@kde.org
          Reporter: mooodyhun...@outlook.com
  Target Milestone: ---

SUMMARY

When "Thumbnail Grid" is configured to be the task switcher, each time Alt+Tab
is pressed (and the switcher is shown), a chunk of video RAM is allocated, and
doesn't seem to be released anymore, even if after the switcher is hidden.

Other task switchers doesn't seem to have the issue.

STEPS TO REPRODUCE
1. In Settings > Window Management > Task Switcher, set Thumbnail Grid as
Visualization (other options doesn't seem to affect)
3. Open some windows (the more, the quicker it runs out of vram)
4. With `nvidia-smi`, run the following command to see how much VRAM
kwin_wayland has used:

watch -n1 'nvidia-smi -q -d PIDS | grep -A1 kwin_wayland'

5. Alt+Tab to switch the windows, and observe the memory usage

OBSERVED RESULT

The VRAM usage goes up and down, but does not continuously increase

EXPECTED RESULT

The VRAM usage continuously increases, nearly 100M per one "switch"

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.92.0
KDE Frameworks Version: 5.248.0
Qt Version: 6.7.0
Kernel Version: 6.7.0-arch3-1 (64-bit)
Graphics Platform: Wayland
Processors: 32 × 13th Gen Intel® Core™ i9-13900HX
Memory: 62.6 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 4050 Laptop GPU/PCIe/SSE2
Manufacturer: LENOVO
Product Name: 82WK
System Version: Legion Y9000P IRX8

ADDITIONAL INFORMATION

I cannot do screen recording probably due to some other bug(s) (the portal
doesn't get shown)

The backtrace when crashing (which is not useful as it's a nullptr deref) 

Stack trace of thread 54639:
#0  0x000070471f8b5984 _ZNK4KWin16EglSwapchainSlot6bufferEv (libkwin.so.6 +
0x2b5984)
#1  0x000070471fa744a2 n/a (libkwin.so.6 + 0x4744a2)
#2  0x000070471f7c9d3f _ZN4KWin10Compositor9compositeEPNS_10RenderLoopE
(libkwin.so.6 + 0x1c9d3f)
#3  0x000070471cdbeaa9 n/a (libQt6Core.so.6 + 0x1beaa9)
#4  0x000070471f7e17f7 _ZN4KWin10RenderLoop14frameRequestedEPS0_ (libkwin.so.6
+ 0x1e17f7)
#5  0x000070471f7e75f8 _ZN4KWin17RenderLoopPrivate8dispatchEv (libkwin.so.6 +
0x1e75f8)
#6  0x000070471cdbeaa9 n/a (libQt6Core.so.6 + 0x1beaa9)
#7  0x000070471cdc4244 _ZN6QTimer10timerEventEP11QTimerEvent (libQt6Core.so.6 +
0x1c4244)
#8  0x000070471cdafc16 _ZN7QObject5eventEP6QEvent (libQt6Core.so.6 + 0x1afc16)
#9  0x000070471df7bf5b
_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent (libQt6Widgets.so.6 +
0x17bf5b)
#10 0x000070471cd65488 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent
(libQt6Core.so.6 + 0x165488)
#11 0x000070471ced26cd _ZN14QTimerInfoList14activateTimersEv (libQt6Core.so.6 +
0x2d26cd)
#12 0x000070471ced91d1
_ZN20QEventDispatcherUNIX13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE
(libQt6Core.so.6 + 0x2d91d1)
#13 0x000070471d9f2ce2
_ZN23QUnixEventDispatcherQPA13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE
(libQt6Gui.so.6 + 0x5f2ce2)
#14 0x000070471cd6d67e _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE
(libQt6Core.so.6 + 0x16d67e)
#15 0x000070471cd690b8 _ZN16QCoreApplication4execEv (libQt6Core.so.6 +
0x1690b8)
#16 0x00005ae76a355e7e n/a (kwin_wayland + 0x4ce7e)
#17 0x000070471c645cd0 n/a (libc.so.6 + 0x27cd0)
#18 0x000070471c645d8a __libc_start_main (libc.so.6 + 0x27d8a)
#19 0x00005ae76a35be85 n/a (kwin_wayland + 0x52e85)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to