CR-2026-06-19: Implementation

Implementation

Phase 0: Capture Current State

Before — current lid switch bindings
grep -n 'Lid Switch' ~/.config/hypr/hyprland.conf
Expected output (two bindl lines using monitor disable/enable)
58:bindl = , switch:on:Lid Switch, exec, hyprctl keyword monitor "eDP-1, disable"
59:bindl = , switch:off:Lid Switch, exec, hyprctl keyword monitor "eDP-1, preferred, auto, 2"
Before — verify hypridle strategy for comparison
awk '/brightnessctl|monitor|dpms/' ~/.config/hypr/hypridle.conf
hypridle already uses the correct strategy — brightnessctl -s set 0 at 900s instead of DPMS or monitor disable. The lid switch bindings should match.

Phase 1: Replace Lid Switch Bindings

The fix replaces monitor disable/enable with brightnessctl + loginctl lock-session. This keeps eDP-1 alive in Hyprland at all times, avoiding i915 DRM re-initialization entirely.

Before — backup current config
cp ~/.config/hypr/hyprland.conf ~/.config/hypr/hyprland.conf.bak.$(date +%F-%H%M%S)
Change — replace lid switch bindings
sed -i '/switch:on:Lid Switch/s|exec, hyprctl keyword monitor "eDP-1, disable"|exec, loginctl lock-session \&\& brightnessctl -s set 0|' ~/.config/hypr/hyprland.conf
sed -i '/switch:off:Lid Switch/s|exec, hyprctl keyword monitor "eDP-1, preferred, auto, 2"|exec, brightnessctl -r|' ~/.config/hypr/hyprland.conf
After — verify new bindings
grep -n 'Lid Switch' ~/.config/hypr/hyprland.conf
Expected output
58:bindl = , switch:on:Lid Switch, exec, loginctl lock-session && brightnessctl -s set 0
59:bindl = , switch:off:Lid Switch, exec, brightnessctl -r

Phase 2: Update Stow Source (dots-quantum)

The active config is stow-managed from dots-quantum. Apply the same change to the source so stow doesn’t revert it.

Before — check stow source matches active
grep -n 'Lid Switch' ~/atelier/_projects/personal/dots-quantum/hyprland/.config/hypr/hyprland.conf
Change — apply same sed to stow source
sed -i '/switch:on:Lid Switch/s|exec, hyprctl keyword monitor "eDP-1, disable"|exec, loginctl lock-session \&\& brightnessctl -s set 0|' ~/atelier/_projects/personal/dots-quantum/hyprland/.config/hypr/hyprland.conf
sed -i '/switch:off:Lid Switch/s|exec, hyprctl keyword monitor "eDP-1, preferred, auto, 2"|exec, brightnessctl -r|' ~/atelier/_projects/personal/dots-quantum/hyprland/.config/hypr/hyprland.conf
After — verify stow source updated
grep -n 'Lid Switch' ~/atelier/_projects/personal/dots-quantum/hyprland/.config/hypr/hyprland.conf

Phase 3: Reload and Test

Hyprland reads config changes without restart for bindl lines. Force a reload:

hyprctl reload
Test — close lid (no external monitor), wait 10 seconds, open lid

Expected behavior:

  1. Lid close: screen goes black (backlight 0), session locks

  2. Lid open: brightness restores, hyprlock prompt visible on eDP-1

  3. Enter password: desktop resumes normally

Design Decision: Why Not DPMS?

Three options were evaluated:

Approach Mechanism Problem on Arrow Lake-S

monitor disable

Removes eDP-1 from Hyprland entirely — DRM pipe torn down

i915 fails to re-init pipe on lid open. Zero outputs means hyprlock cannot render.

dpms off

Sends DPMS standby signal — keeps output registered but turns off panel

i915 DRM re-initialization required on wake. Same driver bug as INC-2026-05-23-002.

brightnessctl set 0

Sets backlight PWM to 0 — screen visually black but output fully active

No DRM involvement. Display pipe stays up. hyprlock renders normally.

The brightnessctl approach is the same strategy already proven in hypridle.conf (line 60-63). This CR extends it to lid switch handling for consistency.