Memory usage slowly increasing with amdgpu driver
Brief summary of the problem:
I have noticed a slow memory leak on my AMD laptop. The memory doesn't leak at a constant pace, but rather when I open/close applications such as Firefox (and others of course). After a day of operation, about 4GiB can be lost. The sum of the resident memory of all user-space processes differs from that reported by free
or htop
by multiple gigabytes.
I tried several versions of the kernel, only those which don't yet have the right driver didn't leak. After that, I compiled the kernel with kmemleak, which didn't report any memory leaks (yet the memory was still leaking).
Multiple occurrences of the bug have been confirmed on different hardware and Linux distributions.
Hardware description:
Lenovo IdeaPad 5 Pro 16ACH6
- CPU: AMD Ryzen 7 5800H with Radeon Graphics (16)
- GPU: 05:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [1002:1638] (rev c5)
- System Memory: 16GiB
- Display(s): eDP connected primary 2560x1600+0+0 (normal left inverted right x axis y axis) 345mm x 215mm
System information:
- Distro name and Version: Void
- Kernel version: 5.16.16_1
- Custom kernel: N/A
- AMD official driver version: N/A
How to reproduce the issue:
- open and close a bunch of graphical applications such as Firefox
- opening and closing 100 instances of Firefox can leak about 4GiB