DankMaterialShell icon indicating copy to clipboard operation
DankMaterialShell copied to clipboard

Volume OSD silently stops appearing after a hyprlock unlock plus DPMS resume cycle

Open rollecode opened this issue 5 months ago • 1 comments

Problem

After a hyprlock unlock plus DPMS resume cycle, the Volume OSD popup never appears on subsequent volume keypresses, until dms is restarted. Volume still adjusts, bubble pop sound still plays. Only the visual popup is missing. State persists across many keypresses, hours, even days, until DMS restart. Reproducible on my setup for about a year across multiple DMS versions.

Environment

  • Compositor: Hyprland 0.55.4
  • DMS: dms-shell-hyprland 1.4.6-2 (Arch extra)
  • Quickshell: 0.3.0-2.1
  • Locker: hyprlock, launched directly by hypridle (lock_cmd = pidof hyprlock || hyprlock). DMS customPowerActionLock is empty, so DMS Lock.lock() custom locker branch is never reached.
  • Single monitor: DP-1, 3440x1440 at 144Hz

Reproduction

  1. Boot, DMS starts cleanly, Volume OSD works on volume keypress
  2. Lock with hyprlock, allow screen to DPMS off
  3. Wake screen, unlock hyprlock
  4. Press volume up or down
  5. Expected: OSD popup appears
  6. Actual: bubble pop sound plays, volume changes, no popup. Bar widgets still update normally.

Failure layer

The bug is upstream of DankOSD.show(). Adding console.log at the top of DankOSD.show() and at OSDManager.showOSD() and reproducing post unlock shows zero calls to either. VolumeOSD.qml local Connections { target: AudioService.sink?.audio ?? null; function onVolumeChanged() { root._syncVolume(); if (SettingsData.osdVolumeEnabled) root.show() } } block stops invoking root.show() even though AudioService.onVolumeChanged is firing (AudioService is a singleton and fires the bubble pop sound via playVolumeChangeSoundIfEnabled()).

Patches that modify the early return guard in show() cannot fix this. show() is never reached.

Quickshell warnings observed during DMS startup

qt.qpa.wayland: There are no outputs, creating placeholder screen
WARN: Layershell screen does not correspond to a real screen. Letting the compositor pick.
WARN: attempted to use dangling screen object
WlrOutputService: Received empty outputs list

These appear when DMS is started while the Wayland output list is momentarily empty. Whether they are the trigger or only a related symptom is unclear: the broken OSD also reproduces when DMS was started against a populated output list.

Working theory

The per screen VolumeOSD instance (instantiated via Variants over Quickshell.screens) either gets destroyed without recreation around the DPMS off plus session lock plus DPMS on edge, or retains a screen reference that becomes invalid. AudioService is unaffected because it is a singleton not tied to a screen.

Workaround

KillMode=process on dms.service plus pkill -TERM dms in hypridle unlock_cmd refreshes the DMS process on every unlock without disturbing the rest of the cgroup (chromium, terminals, MCP servers all survive). Restores OSD until next lock cycle. Not a fix.

rollecode avatar Jun 24 '26 18:06 rollecode

Confirmed fixed in v1.5.0 by 4d0aab77.

rollecode avatar Aug 07 '26 16:08 rollecode