DankMaterialShell icon indicating copy to clipboard operation
DankMaterialShell copied to clipboard

NixOS Battery widget no percentage/power profile error.

Open argosnothing opened this issue 1 year ago • 6 comments

For the dank shell on niri with the dms home module there is no battery percent display and changing power profiles yields the attached screenshot.

Compositor

  • [x] niri
  • [ ] Hyprland
  • [ ] Other (specify)

Description

Expected Behavior

Steps to Reproduce

1.Nixos Unstable 2.Use home module with niri integration 3.setup battery widget

Screenshots/Recordings

Image

relevant nix configuration where i setup dank-shell https://github.com/argosnothing/nixos-config/blob/18d50ad2b601580c64f158971e372a1d79e130a2/modules/gui/desktop-shells/dank-shell.nix#L10

argosnothing avatar Oct 11 '25 04:10 argosnothing

I relabeled because it's not a bug, but a configuration thing. I'm not saying it's your fault because nixOS is a black box to me and I don't understand what's going on over there.

I would guess that, a dbus interface is inaccessible or not available (upower) or potentially your user doesn't have permission to access it. Either case I'm not familiar enough with nix to suggest the proper way to fix it

bbedward avatar Oct 11 '25 05:10 bbedward

add this

services.upower.enable = true;
services.power-profiles-daemon.enable = true;

bokicoder avatar Oct 11 '25 06:10 bokicoder

Will do, thanks mate

add this

services.upower.enable = true;
services.power-profiles-daemon.enable = true;

argosnothing avatar Oct 11 '25 13:10 argosnothing

Same Issue I am facing in arch How can I fix it

maheswar-dileep avatar Oct 15 '25 19:10 maheswar-dileep

Same Issue I am facing in arch How can I fix it

You need power profiles daemon

bbedward avatar Oct 15 '25 19:10 bbedward

add this

services.upower.enable = true;
services.power-profiles-daemon.enable = true;

I just encountered this myself (battery percentage warn't showing), I think this could be mentioned in the NixOS installation docs.

vypxl avatar Feb 17 '26 09:02 vypxl