Platform: KDE Plasma on Wayland
Date: May 14, 2026
Related: Tasks 055-057, SCR-2026-04-21-001
Before testing, ensure you have:
- ✅ KDE Plasma desktop environment running
- ✅ CodeNomad dependencies installed (
npm installcompleted) - ✅ OpenCode CLI installed (
opencode --versionworks) - ✅ Two terminal windows or tmux/screen session
cd /home/dark/Project/codenomad
./test-wake-lock-kde.sh monitorThis will display real-time wake lock status:
◉ WAKE LOCK: ACTIVE= System sleep prevented○ WAKE LOCK: INACTIVE= Normal power management
cd /home/dark/Project/codenomad
npm run devThe Electron app should launch with the CodeNomad UI.
Purpose: Verify wake lock activates when agent is working
Steps:
- Start CodeNomad and create a new session
- Select an agent (e.g., "General Purpose Agent")
- Ask a question that will take 20+ seconds to answer:
"Explain React hooks in detail with code examples" - IMMEDIATELY check Terminal 1 (monitor)
Expected Results:
- ✅ Monitor shows:
◉ WAKE LOCK: ACTIVE - ✅ Session status in UI shows "Working..." or spinner
- ✅
systemd-inhibit --listshows Electron inhibitor
Actual Results (fill in after testing):
Wake lock status: [ ACTIVE / INACTIVE ]
Session status: [ __________ ]
Notes:
Purpose: Verify wake lock releases when agent finishes
Steps:
- Continue from Test 1
- Wait for the agent to complete its response
- Check Terminal 1 when response is fully displayed
Expected Results:
- ✅ Monitor shows:
○ WAKE LOCK: INACTIVE - ✅ Session status shows idle/waiting for input
- ✅
systemd-inhibit --listno longer shows Electron
Actual Results:
Wake lock status: [ ACTIVE / INACTIVE ]
Session status: [ __________ ]
Notes:
Purpose: Verify screen can lock while work is active
Steps:
- Start a long-running agent task (e.g., "Write a comprehensive guide to TypeScript")
- While agent is working, press Ctrl+Alt+L to lock screen
- Wait 5 seconds
- Unlock screen and check CodeNomad
Expected Results:
- ✅ Screen locks successfully
- ✅ Agent continues working in background
- ✅ Response continues after unlock
- ✅ Wake lock remains active during screen lock
Actual Results:
Screen locked: [ YES / NO ]
Agent continued working: [ YES / NO ]
Wake lock status during lock: [ ACTIVE / INACTIVE ]
Notes:
Purpose: Verify display can sleep while work is active
Steps:
- In KDE System Settings, set display sleep to 1 minute:
System Settings → Power Management → Energy Saving → Screen Energy Saving: 1 minute - Start a long-running agent task (3+ minutes)
- Don't touch keyboard/mouse for 1 minute
- Wait for display to turn off
- Move mouse to wake display
Expected Results:
- ✅ Display turns off after 1 minute
- ✅ Agent continues working (check Terminal 1 via SSH or wake display)
- ✅ Response continues/completes when display wakes
Actual Results:
Display turned off: [ YES / NO ]
Agent continued working: [ YES / NO / UNKNOWN ]
Work completed successfully: [ YES / NO ]
Notes:
Purpose: Verify system does NOT sleep during active work
Steps:
- In KDE System Settings, set suspend timeout to 2 minutes:
System Settings → Power Management → Energy Saving → Suspend Session: After 2 minutes - Start a long-running agent task (5+ minutes)
- Don't touch keyboard/mouse for 3 minutes
- System should NOT suspend
Expected Results:
- ✅ System does NOT suspend while work is active
- ✅ Wake lock remains active for entire work duration
- ✅ System CAN suspend after work completes
Actual Results:
System suspended during work: [ YES / NO ]
Wake lock duration: [ _____ seconds/minutes ]
System suspended after work ended: [ YES / NO / NOT TESTED ]
Notes:
Purpose: Verify wake lock releases when waiting for user permission
Steps:
- Trigger an action requiring permission (e.g., file write, git operation)
- Wait for permission dialog to appear
- Check Terminal 1 monitor
Expected Results:
- ✅ Monitor shows:
○ WAKE LOCK: INACTIVE - ✅ UI shows permission dialog
- ✅ Session status is NOT "working"
Actual Results:
Wake lock status during permission: [ ACTIVE / INACTIVE ]
Permission dialog appeared: [ YES / NO ]
Notes:
Purpose: Verify wake lock releases when waiting for user question response
Steps:
- Trigger a workflow that asks a clarifying question
- Wait for question prompt to appear
- Check Terminal 1 monitor
Expected Results:
- ✅ Monitor shows:
○ WAKE LOCK: INACTIVE - ✅ UI shows question prompt
- ✅ Session status is NOT "working"
Actual Results:
Wake lock status during question: [ ACTIVE / INACTIVE ]
Question prompt appeared: [ YES / NO ]
Notes:
After completing all tests, verify implementation matches specification:
- Electron uses
prevent-app-suspension(verified in code) - Tauri uses
display: false, idle: true, sleep: false(verified in code) - Web has no wake lock fallback (verified in code)
- Eligibility excludes
pendingPermission(verified in code) - Eligibility excludes
pendingQuestion(verified in code)
- Wake lock activates during "working" status
- Wake lock releases when work completes
- Screen can lock while work is active
- Display can sleep while work is active
- System does NOT sleep while work is active
- Wake lock does NOT activate for pending permission
- Wake lock does NOT activate for pending question
Possible causes:
- Electron IPC handler not receiving setWakeLock calls
- powerSaveBlocker.start() failing silently
- Session status not properly set to "working"
Debug steps:
# Check Electron console logs
# Look for "[wake-lock]" messages
# Check session status in UI developer tools:
# Right-click → Inspect → Console
# Type: sessionStore.sessionsThis would be a BUG - the implementation should allow screen lock.
Report:
- Note exact steps to reproduce
- Check if using Tauri or Electron
- Verify platform (Linux/KDE/Wayland)
- Include relevant logs
This would be a BUG - wake lock should prevent suspension.
Debug steps:
# Check if inhibitor is actually registered:
systemd-inhibit --list | grep -i electron
# Check journalctl for suspend events:
journalctl -b | grep -i "suspend\|sleep" | tail -20- Uses
org.freedesktop.PowerManagement.InhibitD-Bus interface - Screen lock: Ctrl+Alt+L or
loginctl lock-session - Check inhibitors:
qdbus6 org.freedesktop.PowerManagement /org/freedesktop/PowerManagement/Inhibit HasInhibit
When wake lock is active, systemd-inhibit should show:
WHO UID USER PID COMM WHAT WHY MODE
electron 1000 user 12345 electron sleep Active CodeNomad session block
Watch for PowerManagement inhibit/uninhibit calls:
dbus-monitor --session "interface='org.freedesktop.PowerManagement.Inhibit'"In Electron DevTools console:
// This won't work from renderer, but main process logs should show:
// powerSaveBlocker.start("prevent-app-suspension")If testing Tauri build, check Rust logs for:
display: false
idle: true
sleep: false
After testing, update this file with:
- Summary: Overall PASS/FAIL for each test
- Environment: KDE version, kernel, graphics driver
- Issues Found: Any unexpected behavior
- Recommendations: Suggested fixes or improvements
Then commit results:
git add TESTING-WAKE-LOCK.md
git commit -m "test: wake-lock manual testing results on KDE Wayland"# Start monitor
./test-wake-lock-kde.sh monitor
# Check wake lock once
./test-wake-lock-kde.sh check
# Run CodeNomad
npm run dev
# Check systemd inhibitors
systemd-inhibit --list
# Lock screen manually
loginctl lock-session
# Check if Electron is running
ps aux | grep electron
# Check D-Bus inhibit status
qdbus6 org.freedesktop.PowerManagement /org/freedesktop/PowerManagement/Inhibit HasInhibit-
If tests PASS:
- Update
wake-lock-verification-report.mdwith runtime confirmation - Mark tasks 055-057 as verified
- Update user documentation
- Update
-
If tests FAIL:
- Document exact failure scenario
- Check implementation in relevant file:
- Electron:
packages/electron-app/electron/main/ipc.ts - UI:
packages/ui/src/lib/native/wake-lock.ts - Eligibility:
packages/ui/src/stores/wake-lock-eligibility.ts
- Electron:
- File bug report with reproduction steps
Happy Testing! 🧪