Skip to content

Battery percentage is sometimes very inaccurate #2207

Description

@allen-liaoo

Compositor

Niri

Distribution

NixOS

If Other, please specify

No response

Select your Installation Method

Source (Flake)

Was this your original Installation method?

Yes

If no, specify

No response

dms doctor -vC

Click to expand ## DMS Doctor Report

System

  • [ok] Operating System: NixOS 25.11 (Xantusia)
    • Supported for runtime (install via NixOS module or Flake)
  • [ok] Architecture: amd64
  • [ok] Display Server: Wayland
    • WAYLAND_DISPLAY=wayland-1

Versions

  • [ok] DMS CLI: dms 1.4.4+date=2026-04-07_9798d78
    • /nix/store/5ylcikfrxv60smxjim9h89609gvghk70-dms-shell-1.4.4+date=2026-04-07_9798d78/bin/.dms-wrapped
  • [ok] Quickshell: quickshell 0.2.1, revision 41828c4180fb921df7992a5405f5ff05d2ac2fff, distributed by: Official-Nix-Flake
    • /home/allenl/.nix-profile/bin/qs
  • [ok] DMS Shell: 1.4.4+date=2026-04-07_9798d78
    • /nix/store/5ylcikfrxv60smxjim9h89609gvghk70-dms-shell-1.4.4+date=2026-04-07_9798d78/share/quickshell/dms

Installation

  • [ok] DMS Configuration: Found
    • /nix/store/5ylcikfrxv60smxjim9h89609gvghk70-dms-shell-1.4.4+date=2026-04-07_9798d78/share/quickshell/dms
  • [ok] shell.qml: Present
    • /nix/store/5ylcikfrxv60smxjim9h89609gvghk70-dms-shell-1.4.4+date=2026-04-07_9798d78/share/quickshell/dms/shell.qml
  • [info] Install Type: Nix store
    • /nix/store/5ylcikfrxv60smxjim9h89609gvghk70-dms-shell-1.4.4+date=2026-04-07_9798d78/share/quickshell/dms

Compositor

  • [ok] niri: 25.11
    • /run/current-system/sw/bin/niri
  • [info] Active: niri

Quickshell Features

  • [ok] Polkit: Available
    • Authentication prompts
  • [ok] IdleMonitor: Available
    • Idle detection
  • [ok] IdleInhibitor: Available
    • Prevent idle/sleep
  • [ok] ShortcutInhibitor: Available
    • Allow shortcut management (niri)

Optional Features

  • [warn] accountsservice: Not available
    • User accounts
  • [ok] power-profiles-daemon: Available
    • Power profile management
  • [ok] logind: Available
    • Session management
  • [warn] cups-pk-helper: Not available (install cups-pk-helper)
    • Printer management
  • [info] I2C/DDC: No monitors detected
    • External monitor brightness control
  • [ok] qt6-imageformats: Installed (4 formats)
    • Formats: WebP, TIFF, JP2, ICNS (/nix/store/5zprmbrqvh7b8kmp9z8xpsak95660b9r-qtimageformats-6.10.2/lib/qt-6/plugins/imageformats)
  • [ok] kimageformats: Installed (4 formats)
    • Formats: AVIF, HEIF, JXL, EXR (/nix/store/5bnrqbwbp2x5f1iwbygjjmv2is5b5y79-kimageformats-6.20.0/lib/qt-6/plugins/imageformats)
  • [ok] Terminal: alacritty
  • [ok] Network: NetworkManager
    • NetworkManager present. Using NM API.
  • [ok] matugen: Installed
    • Dynamic theming
  • [ok] dgop: Installed
    • System monitoring
  • [ok] cava: Installed
    • Audio visualizer
  • [info] khal: Not installed
    • Calendar events
  • [info] danksearch: Not installed
    • File search
  • [ok] fprintd: Installed
    • Fingerprint auth

Config Files

  • [warn] settings.json: Present (read-only)
    • /home/allenl/.config/DankMaterialShell/settings.json
  • [ok] clsettings.json: Present
    • /home/allenl/.config/DankMaterialShell/clsettings.json
  • [info] plugin_settings.json: Not yet created
    • /home/allenl/.config/DankMaterialShell/plugin_settings.json
  • [warn] session.json: Present (read-only)
    • /home/allenl/.local/state/DankMaterialShell/session.json
  • [ok] dms-colors.json: Present
    • /home/allenl/.cache/DankMaterialShell/dms-colors.json

Services

  • [ok] dms.service: enabled, active
  • [ok] greetd: enabled

Environment

  • [info] QT_QPA_PLATFORMTHEME: gtk3
  • [info] QS_ICON_THEME: Not set

Summary: 0 error(s), 4 warning(s), 27 ok

Description

DMS has shown that my device has 0~1% battery all day (see screenshot below). It has previously shown very low battery percentages as well. This is so far only observed when device is on battery.

When on battery, restarting the dms service does not do anything. When plugged into power, it updated and corrected the battery level.
At the time of writing, DMS shows:
Image
Whereas upower shows:

~ ❯ upower --enumerate
/org/freedesktop/UPower/devices/battery_BAT1
/org/freedesktop/UPower/devices/line_power_ACAD
/org/freedesktop/UPower/devices/line_power_ucsi_source_psy_USBC000o001
/org/freedesktop/UPower/devices/line_power_ucsi_source_psy_USBC000o002
/org/freedesktop/UPower/devices/line_power_ucsi_source_psy_USBC000o003
/org/freedesktop/UPower/devices/line_power_ucsi_source_psy_USBC000o004
/org/freedesktop/UPower/devices/mouse_dev_E3_63_74_06_29_4A
/org/freedesktop/UPower/devices/keyboard_dev_C9_02_74_DA_0E_31
/org/freedesktop/UPower/devices/DisplayDevice

~ ❯ upower -i /org/freedesktop/UPower/devices/battery_BAT1
  native-path:          BAT1
  vendor:               NVT
  model:                FRANGWA
  serial:               025B
  power supply:         yes
  updated:              Sat 11 Apr 2026 07:30:34 PM CDT (8 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               charging
    warning-level:       none
    energy:              27.059 Wh
    energy-empty:        0 Wh
    energy-full:         59.4587 Wh
    energy-full-design:  60.6042 Wh
    voltage-min-design:  15.48 V
    capacity-level:      Normal
    energy-rate:         36.8269 W
    voltage:             16.431 V
    charge-cycles:       106
    time to full:        52.8 minutes
    percentage:          46%
    capacity:            98.1098%
    technology:          lithium-ion
    icon-name:          'battery-good-charging-symbolic'
  History (charge):
    1775953834	46.000	charging
    1775953774	45.000	charging
  History (rate):
    1775953834	36.827	charging
    1775953804	33.994	charging
    1775953774	34.845	charging
    1775953744	36.688	charging

Expected Behavior

No response

Steps to Reproduce

Not sure.

Error Messages/Logs

No response

Screenshots/Recordings

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions