Skip to main content
This guide covers common issues and solutions when running niri with NVIDIA GPUs.

High VRAM Usage Fix

If you see close to 1 GiB of VRAM usage in nvtop instead of the expected ~100 MiB, you’re likely hitting the NVIDIA driver memory leak issue.
Presently, there is a quirk in the NVIDIA drivers that affects niri’s VRAM usage. The driver does not properly release VRAM back into the pool, causing the heap to not return freed buffers to the driver.

Solution

You can mitigate this by configuring the NVIDIA drivers with a per-process application profile:
  1. Create the configuration directory:
sudo mkdir -p /etc/nvidia/nvidia-application-profiles-rc.d
  1. Create the configuration file /etc/nvidia/nvidia-application-profiles-rc.d/50-limit-free-buffer-pool-in-wayland-compositors.json with the following content:
{
    "rules": [
        {
            "pattern": {
                "feature": "procname",
                "matches": "niri"
            },
            "profile": "Limit Free Buffer Pool On Wayland Compositors"
        }
    ],
    "profiles": [
        {
            "name": "Limit Free Buffer Pool On Wayland Compositors",
            "settings": [
                {
                    "key": "GLVidHeapReuseRatio",
                    "value": 0
                }
            ]
        }
    ]
}
The filename in /etc/nvidia/nvidia-application-profiles-rc.d/ can be anything and doesn’t require a specific extension.
  1. Restart niri to apply the changes.

Background

This solution comes from the upstream NVIDIA issue. There’s a slim chance that NVIDIA may update their built-in application profiles to apply this automatically to niri in the future. The fix shipped in the driver at the time of writing uses a value of 0, while the initial config posted by an NVIDIA engineer approximately a year prior used a value of 1.

Screencast Flickering Fix

This section applies to niri versions up to 25.08. The problem has been properly fixed in later versions.
If you experienced screencast glitches or flickering on NVIDIA in older versions of niri (up to 25.08), you could set this debug flag in the niri config:
debug {
    wait-for-frame-completion-in-pipewire
}
This debug flag has since been removed because the underlying problem was properly fixed in niri.

Build docs developers (and LLMs) love