I’ve tested this with (on arch linux, kernel 6.10)
nvidia versions:
560.35.03
555.58.02
550.78
compositors:
kwin_wayland
sway
weston
(reports that this happens on gnome-shell as well, but I haven’t tested myself)
egl-wayland versions:
1.1.9
1.1.13
1.1.2
1.1.16
All with the same behaviour, on my 24GB 4090, if I resize a window, nvidia-smi reports that the compositor increases in memory usage, and it won’t free it up until it uses approximately 10% of the total VRAM, around 2.4 to 2.5GB.
Even after closing the windows, the VRAM does not get freed. This does not happen on my AMD GPU.
Ok, yeah, 100MB isn’t much either, compared to Nvidia allocating over 1GB.
Anyway, they aknowledged this, at least the Xwayland “leak”, hopefully we will get a fix in the next driver release.
It’s been awfully quiet from Nvidia on the forum recently, hopefully they are busy crunching.
Mhh… but kwin_wayland uses libGL as well so… I don’t know if it’s specific to EGL.
It could be a libGL issue too, since Xwayland doesn’t have EGL linked in at all, and it doesn’t free memory for Xwayland either.
But what do I know, all we know it’s in the driver somewhere.
So something is really strange – as suggested by @shelter , I was playing around with window minimizing in kwin_wayland, and found that if you just use the alt-tab switcher, the VRAM usage of kwin_wayland gets freed after resizing. Maybe it has to do with a call that’s being made to generate the live window thumbnails for the switcher?
If you read the github solution fully, there are two issues, the Xwayland issue and this. They figured out the solution for this issue, not the Xwayland one since they can’t reproduce it.