DankMaterialShell icon indicating copy to clipboard operation
DankMaterialShell copied to clipboard

Constant CPU usage with Niri

Open ChrHorn opened this issue 2 months ago • 2 comments

Compositor

  • [x] niri
  • [ ] Hyprland
  • [ ] dwl (MangoWC)
  • [ ] sway
  • [ ] other

Distribution

NixOS

dms version

0.3.4

Description

I'm noticing near-constant CPU activity from both Quickshell (~ 7%) and Niri (~ 5%), even when nothing is happening on the screen.

I don't have this issue with my normal setup (waybar, swaync, ..). CPU load, including Niri, goes to 0 with no active windows.

Solutions Tried

Disabling the bar doesn't change anything.

Every new dms instance has the same constant CPU usage. Niri CPU usage also creeps up slowly with more dms instances.

Configuration Details

Fairly basic NixOS setup. Used home-manager to setup dms:

  programs.dankMaterialShell = {
    enable = true;
    niri = {
      enableSpawn = true;
      enableKeybinds = true;
    };
  };

Screenshots/Recordings

Image

ChrHorn avatar Nov 05 '25 08:11 ChrHorn

It's a little atypical, especially for qs to use more than niri - I frequently monitor it for bad behavers and we use basically nothing. What's your CPU? Is it 1-core or all core average

Image

and the dms backend should use 0 at idle, basically - since its not doing any type of polling - just 1 dbus connection + compositor connection

Image

You should also make sure you start dms with dms run and not qs - qs directly works but it'd be less CPU-friendly due to the spawning of external processes more frequently.

bbedward avatar Nov 05 '25 23:11 bbedward

It's a little atypical, especially for qs to use more than niri - I frequently monitor it for bad behavers and we use basically nothing. What's your CPU? Is it 1-core or all core average

CPU is an older Skylake laptop, 2/4HT cores. Load distribution looks to be equal for all cores. The bar shows a constant idle load of about 14%.

and the dms backend should use 0 at idle, basically - since its not doing any type of polling - just 1 dbus connection + compositor connection

The dms process itself doesn't show any CPU usage, only the .quickshell-wrap, and niri processes do.

You should also make sure you start dms with dms run and not qs - qs directly works but it'd be less CPU-friendly due to the spawning of external processes more frequently.

That's what I'm doing. Also tried to launch it via systemd. Same result.

ChrHorn avatar Nov 06 '25 13:11 ChrHorn