Bug 498556 - Memory leak when external monitor is connected
Summary: Memory leak when external monitor is connected
Status: RESOLVED DUPLICATE of bug 496469
Alias: None
Product: kwin
Classification: Plasma
Component: performance (show other bugs)
Version: 6.2.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen
Depends on:
Blocks:
 
Reported: 2025-01-12 13:13 UTC by Dylan Hetzel
Modified: 2025-01-29 14:40 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dylan Hetzel 2025-01-12 13:13:38 UTC
SUMMARY
Whenever I have an external monitor connected via HDMI (I'm using an Acer Nitro 5 an515-45), the process kwin-wayland slowly starts increasing memory usage. Eventually, once all 16Gb of ram are filled, my system crawls to a halt as it tries to move things into swap. Unplugging the monitor and plugging it back in restores the ram usage to around 256 Mb.

STEPS TO REPRODUCE
1. Start kde wayland session with external monitor connected
2. Use computer normally for 4-5 hours
3. System significantly slows down until I unplug and replug the monitor

OBSERVED RESULT
Steady increase of ram usage from the kwin-wayland process, until all memory is full.

EXPECTED RESULT
kwin-wayland process, staying roughly the same, not ballooning to use all system resources

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.6.70-1-lts / 6.2.5
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.1

ADDITIONAL INFORMATION
16Gb RAM, Ryzen 7 5800H, RTX 3060 mobile, eDP-1920x1080@144hz, HDMI-1920x1080@75hz, Acer Nitro 5 an515-45
Comment 1 clash-raisin-liver 2025-01-29 02:40:45 UTC
[BRIEF]
I have encountered the same problem. Unplugging and re-plugging the HDMI cable instantaneously reverts the RAM usage from about 99% to 45%. It's as dylanjesse said, RAM usage increases as time goes on until system is out of memory and crashes. 

[INFO]
Operating System: Fedora Linux 41
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.1
Kernel Version: 6.12.10-200.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx
Memory: 17.4 GB of RAM
Graphics Processor: AMD Radeon Vega 8 Graphics
Manufacturer: HP
Product Name: HP Pavilion Gaming Laptop 15
Comment 2 Zamundaaa 2025-01-29 14:40:17 UTC

*** This bug has been marked as a duplicate of bug 496469 ***