High VRAM usage on nvidia
Compositor
- [x] niri
Distribution
CachyOS
dms version
0.4.0
Description
Starting dms run on niri startup, I noticed this:
qs -p /usr/share/quickshell/dms takes 799 MiB VRAM (goes down to 500 MiB over time). Just opening the settings, it goes a bit over 1GiB VRAM, which seems a bit excessive.
Tried removing/adding various widgets, but the usage did not change.
The RAM usage is also a bit high at 795 MiB.
Disabling Blur Layer makes the VRAM usage drop to 391 MiB.
Tried to enable GLVidHeapReuseRatio and No VidMem Reuse in nvidia-application-profiles-rc.d for the qs process, but it didn't help.
That seems very unreasonable, there must be some knob somewhere because an amdgpu uses like, 1.5MB
Ok, did some more digging: after disabling Blur Layer and set the GLVidHeapReuseRatio to 0 in nvidia app profiles and restarted it's down to 228 MiB VRAM and 465 MiB RAM.
This may be a qs issue though, I installed noctalia and that also takes 684 MiB VRAM and 611 MiB RAM.
I would still leave this open, just in case someone has the same problem
Managed to boot with dual graphics, and run the niri and qms on the amdgpu. The VRAM usage is the approximately the same unfortunately.
You can try to disable the wallpaper transition (set to none) that will remove the shader.
I don't have any wallpaper set, just the default one that shows the logo in the left corner. But I set the transition to none anyway -> didn't help.
But I found the culprit: Displays -> Wallpaper and disable All displays... now the VRAM usage is 23 MiB. The RAM is still at 676 MiB, which is a bit high.
I can confirm the wallpaper uses an excessive amount of VRAM when the mentioned toggle is turned on. The following data is with two screens and the same applications open. Changing the wallpaper brings the VRAM quite a bit higher, but it settles lower after some time.
With a custom wallpaper and the blur layer, this uses even more VRAM than the gnome-shell, which already has a longstanding bad reputation of high VRAM usage.
╰▶︎ nvidia-smi
+-------------------------------------------------------+
| Processes: |
| GPU PID Type Process name GPU Memory |
| Usage |
|=======================================================|
| 0 4694 G qs 520MiB | # custom wallpaper + blur layer
| 0 75120 G /usr/bin/gnome-shell 460MiB | # custom wallpaper
| 0 4694 G qs 367MiB | # default wallpaper + blur layer
| 0 4694 G qs 238MiB | # custom wallpaper, no blur layer
| 0 4694 G qs 155MiB | # default wallpaper, no blur layer
| 0 4694 G qs 115MiB | # no wallpaper + blur layer
| 0 4694 G qs 16MiB | # no wallpaper, no blur layer
quickshell 0.2.1-3.1
dms-shell-bin 0.6.2-1
niri 25.08-2.1
gnome-shell 1:49.2-1.1