Skip to content

Commit 27af21b

Browse files
committed
fix(resume): drop the hyprlock cover, pin workspace on wake
The qs restart no longer stacks hyprlock on the still-active session lock, which read as a compositor crash. Disables workspace_swipe_create_new and focus_on_activate, and logs compositor state after each wake until the workspace jump is pinned. Also drops the vmware exec: this is bare metal. Assisted-by: AI
1 parent 731e69f commit 27af21b

4 files changed

Lines changed: 53 additions & 11 deletions

File tree

hypr/custom/execs.lua

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
-- This file will not be overwritten across dots-hyprland updates.
22
-- The file name is for the sake of organization and does not matter
33
-- See the corresponding files in ~/.config/hypr/hyprland for examples
4-
5-
hl.on("hyprland.start", function ()
6-
-- VMware guest clipboard/resize bridge (no-ops on bare metal)
7-
hl.exec_cmd("/usr/bin/vmware-user-suid-wrapper")
8-
end)

hypr/custom/general.lua

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,18 @@ hl.config({
77
kb_layout = "us,gr",
88
kb_options = "grp:win_space_toggle,grp:alt_shift_toggle",
99
},
10+
11+
-- Two upstream defaults that can silently move me off workspace 1 on resume.
12+
-- With workspaceGroupSize = 10 the jump is sticky: from ws 23, SUPER+1 goes to
13+
-- 21, not 1, so it has to be undone by hand.
14+
gestures = {
15+
-- A palm on the touchpad while opening the lid reads as a 4-finger
16+
-- horizontal swipe; create_new then keeps inventing workspaces past the end.
17+
workspace_swipe_create_new = false,
18+
},
19+
misc = {
20+
-- An app firing xdg-activation on wake would otherwise drag focus (and me)
21+
-- to whatever workspace it lives on.
22+
focus_on_activate = false,
23+
},
1024
})
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
# Record compositor state right after a wake, to pin down why resume sometimes
3+
# lands on a high workspace number. Runs from resume_restart_quickshell.sh.
4+
#
5+
# Reads three things:
6+
# - whether eDP-1 was torn down and re-added (Hyprland assigns a fresh, higher
7+
# workspace ID to a monitor it re-creates)
8+
# - whether a gesture or an activation request moved the focus
9+
# - which workspaces exist and which one is focused
10+
#
11+
# Delete this script and its call in resume_restart_quickshell.sh once the cause
12+
# is known.
13+
14+
LOGFILE="$HOME/notes/resume-debug.log"
15+
mkdir -p "$(dirname "$LOGFILE")"
16+
17+
sleep 3 # let the compositor and the relaunched shell settle
18+
19+
{
20+
echo "===== wake $(date -Is) ====="
21+
echo "--- active workspace ---"
22+
hyprctl activeworkspace 2>&1 | head -5
23+
echo "--- workspaces ---"
24+
hyprctl workspaces 2>&1 | grep -E "^workspace|windows:"
25+
echo "--- monitors ---"
26+
hyprctl monitors 2>&1 | grep -E "^Monitor|active workspace|dpmsStatus|disabled"
27+
echo "--- hyprland log tail ---"
28+
HL=$(ls -t /run/user/"$(id -u)"/hypr/*/hyprland.log 2>/dev/null | head -1)
29+
[ -n "$HL" ] && grep -iE "monitor|workspace|gesture|activate|dpms|destroy" "$HL" \
30+
| grep -viE "GL_|extensions" | tail -40
31+
echo
32+
} >>"$LOGFILE" 2>&1

hypr/custom/scripts/resume_restart_quickshell.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
#!/usr/bin/env bash
22
# Quickshell's renderer can freeze after suspend/resume with no recovery
33
# (end-4/dots-hyprland #2320, #2971) — restart it on wake.
4-
# The qs lock screen dies with the restart, so cover the gap with hyprlock first.
5-
6-
if ! pidof hyprlock >/dev/null; then
7-
hyprlock &
8-
sleep 0.5 # let hyprlock grab the session before the qs locker dies
9-
fi
4+
#
5+
# No hyprlock cover: this used to start hyprlock before killing qs, which left two
6+
# lock screens stacked on every wake and read as a compositor crash. The session is
7+
# still locked by logind, and misc.allow_session_lock_restore = true lets the
8+
# relaunched qs re-attach to that lock, so the gap covers itself.
109

1110
qs kill -c ii 2>/dev/null
1211
pkill -x qs 2>/dev/null # fallback if the freeze took the IPC socket with it
@@ -22,3 +21,5 @@ done
2221
pkill -9 -x qs 2>/dev/null # force-kill a frozen holdout that ignored SIGTERM
2322

2423
qs -c ii -d # no -n: the old instance is gone, nothing to duplicate
24+
25+
~/.config/hypr/custom/scripts/resume_debug_snapshot.sh &

0 commit comments

Comments
 (0)