fix: drop upstream multi-GPU workarounds that don't work on Chester
Restore hypridle.conf to the working Chester baseline (Step 1 dim + simple step-3 resume) keeping our after_sleep_cmd (sleep 2; dpms on). Remove the orphaned wake-display.sh / unstick-display.sh scripts added upstream for the multi-GPU black-screen workaround.
This commit is contained in:
parent
d0cfa59fb0
commit
997f112baa
3 changed files with 16 additions and 72 deletions
|
|
@ -2,10 +2,21 @@ general {
|
||||||
inhibit_sleep = 3
|
inhibit_sleep = 3
|
||||||
lock_cmd = pidof hyprlock || ~/.config/hypr/scripts/lock.sh
|
lock_cmd = pidof hyprlock || ~/.config/hypr/scripts/lock.sh
|
||||||
before_sleep_cmd = loginctl lock-session
|
before_sleep_cmd = loginctl lock-session
|
||||||
after_sleep_cmd = hyprctl dispatch dpms off && sleep 1 && hyprctl dispatch dpms on
|
# Small delay so the DRM/GPU is ready before re-enabling the display;
|
||||||
|
# running `dpms on` immediately at resume is the classic cause of a black screen.
|
||||||
|
after_sleep_cmd = sh -c 'sleep 2; hyprctl dispatch dpms on'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Step 1: Lock screen at 2 min idle
|
# Step 1: Dim monitor at 115 sec idle (warning that it will lock soon)
|
||||||
|
listener {
|
||||||
|
timeout = 115
|
||||||
|
# Only dims the screen, does not lock yet
|
||||||
|
# This shows you that lock will happen soon
|
||||||
|
on-timeout = dim
|
||||||
|
on-resume = pkill -x dim
|
||||||
|
}
|
||||||
|
|
||||||
|
# Step 2: Lock screen at 2 min idle
|
||||||
listener {
|
listener {
|
||||||
timeout = 120
|
timeout = 120
|
||||||
on-timeout = ~/.config/hypr/scripts/lock.sh
|
on-timeout = ~/.config/hypr/scripts/lock.sh
|
||||||
|
|
@ -24,19 +35,13 @@ listener {
|
||||||
# Both together ensure the screen is fully off visually and electrically
|
# Both together ensure the screen is fully off visually and electrically
|
||||||
|
|
||||||
# When the user becomes active again, restore display
|
# When the user becomes active again, restore display
|
||||||
#
|
on-resume = hyprctl dispatch dpms on && ddcutil setvcp 10 100 && wpctl set-mute @DEFAULT_AUDIO_SINK@ 0
|
||||||
# Cycles DPMS only if the display was actually turned off (avoids flicker
|
|
||||||
# when the user returns before step 3 fires). Needed because otherwise
|
|
||||||
# hyprlock surfaces may lose focus after a dpms off cycle
|
|
||||||
# (same issue covered in after_sleep_cmd above).
|
|
||||||
on-resume = ~/.config/hypr/scripts/wake-display.sh
|
|
||||||
|
|
||||||
# Explanation:
|
# Explanation:
|
||||||
# - wake-display.sh checks if dpms is off; only then does a dpms off/on
|
# - hyprctl dispatch dpms on → ensures the display is powered on by the compositor
|
||||||
# cycle to force Hyprland to recreate hyprlock surfaces
|
|
||||||
# - ddcutil setvcp 10 100 → restores monitor brightness to full
|
# - ddcutil setvcp 10 100 → restores monitor brightness to full
|
||||||
#
|
#
|
||||||
# Both together guarantee the screen wakes reliably
|
# Both together guarantee the screen wakes reliably on all monitors
|
||||||
}
|
}
|
||||||
|
|
||||||
# Step 4: Suspend system after 30 min idle
|
# Step 4: Suspend system after 30 min idle
|
||||||
|
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# Recovery script for when Hyprland display goes black after lock/sleep.
|
|
||||||
# This resets the display pipeline without killing your session.
|
|
||||||
# Run from another TTY (Ctrl+Alt+F3).
|
|
||||||
|
|
||||||
export XDG_RUNTIME_DIR=/run/user/$(id -u)
|
|
||||||
|
|
||||||
# Find the active Hyprland instance by trying each socket until one responds
|
|
||||||
for SIG in "$XDG_RUNTIME_DIR/hypr"/*/; do
|
|
||||||
[ -d "$SIG" ] || continue
|
|
||||||
SIGNAME=$(basename "$SIG")
|
|
||||||
export HYPRLAND_INSTANCE_SIGNATURE=$SIGNAME
|
|
||||||
if hyprctl monitors >/dev/null 2>&1; then
|
|
||||||
FOUND=1
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -z "$FOUND" ]; then
|
|
||||||
echo "Could not find active Hyprland socket. Is Hyprland running?"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Resetting display pipeline..."
|
|
||||||
|
|
||||||
pkill hyprlock 2>/dev/null
|
|
||||||
hyprctl dispatch dpms off
|
|
||||||
sleep 1
|
|
||||||
hyprctl dispatch dpms on
|
|
||||||
|
|
||||||
# Force a layer tree rebuild to clear orphaned surfaces (e.g. dim_layer)
|
|
||||||
pkill -x waybar 2>/dev/null
|
|
||||||
hyprctl dispatch exec waybar 2>/dev/null
|
|
||||||
|
|
||||||
echo "Done. Switch back to Hyprland (Ctrl+Alt+F2)."
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# hypridle step 3 on-resume — wake display after idle off.
|
|
||||||
# Cycles DPMS only if the display was actually turned off (avoids flicker
|
|
||||||
# when the user returns before step 3 fires).
|
|
||||||
|
|
||||||
export XDG_RUNTIME_DIR=/run/user/$(id -u)
|
|
||||||
|
|
||||||
# Find the active Hyprland socket (not old/stale ones)
|
|
||||||
for SIG in "$XDG_RUNTIME_DIR/hypr"/*/; do
|
|
||||||
[ -d "$SIG" ] || continue
|
|
||||||
SIGNAME=$(basename "$SIG")
|
|
||||||
export HYPRLAND_INSTANCE_SIGNATURE=$SIGNAME
|
|
||||||
hyprctl monitors >/dev/null 2>&1 && break
|
|
||||||
done
|
|
||||||
|
|
||||||
DPMS=$(hyprctl monitors 2>/dev/null | grep dpmsStatus | awk '{print $2}')
|
|
||||||
|
|
||||||
if [ "$DPMS" = "0" ]; then
|
|
||||||
# Display was off — cycle DPMS to force re-creation of hyprlock surfaces
|
|
||||||
hyprctl dispatch dpms off
|
|
||||||
sleep 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
hyprctl dispatch dpms on
|
|
||||||
ddcutil setvcp 10 100
|
|
||||||
wpctl set-mute @DEFAULT_AUDIO_SINK@ 0
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue