Constant CPU usage with Niri
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
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
and the dms backend should use 0 at idle, basically - since its not doing any type of polling - just 1 dbus connection + compositor connection
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.
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.