Debug Qtile
Goal
Separate source/import failures, Qtile IPC failures, service failures, and visual
regressions using reproducible evidence before proposing an edit.
Workflow
Discover QTILE_CONFIG_ROOT, defaulting to $HOME/.config/qtile, and create
a temporary diagnostic directory.
Collect independent evidence. Preserve failures instead of stopping at the
first command:
out="$(mktemp -d "${TMPDIR:-/tmp}/qtile-debug.XXXXXX")"
(cd "$QTILE_CONFIG_ROOT" && python -m py_compile config.py) >"$out/compile" 2>&1 || true
qtile check -c "$QTILE_CONFIG_ROOT/config.py" >"$out/check" 2>&1 || true
qtile --version >"$out/version" 2>&1 || true
systemctl --user status qtile.service --no-pager >"$out/service" 2>&1 || true
journalctl --user -u qtile.service -b -n 200 --no-pager >"$out/journal" 2>&1 || true
qtile cmd-obj -o root -f info >"$out/root-info" 2>&1 || true
qtile cmd-obj -o screen 0 -f info >"$out/screen-0" 2>&1 || true
xrandr --query >"$out/outputs" 2>&1 || true
Classify the failure:
- compile/check output means source, dependency, or generated-file drift;
- service/journal output means startup or runtime failure;
- IPC output means socket, process, or object-path failure;
- clean diagnostics plus a wrong screenshot means a visual regression.
For a visual regression, invoke qtile-confirm. It must take and inspect a
screenshot; do not infer layout from widget configuration or coordinates.
For a source failure, invoke qtile-edit; for a validated runtime change,
invoke qtile-reload. Re-run the failing evidence after each change.
Isolated X11 reproduction
Use a nested Xorg server when a visual or Emacs-frame bug could disturb the
active desktop. Requires Xephyr, Qtile's X11 backend, and scrot for visual
evidence. Follow references/isolated-xorg.md for the exact lifecycle:
- Use an unused display, temporary state directory, and unique Emacs server.
- Start Xephyr and Qtile with
--no-spawn, an explicit socket, and the
isolated DISPLAY.
- Run every IPC/client/screenshot command with that same
DISPLAY and socket.
- Inspect the nested screenshot with
qtile-confirm, then stop only the
recorded Qtile/Xephyr/Emacs PIDs.
A nested session is test isolation, not proof by itself; retain only the
minimum screenshot and exact window geometry needed for the investigation.
Rules
- Prefer the smallest reproducer and quote the exact failing command/output.
- Do not restart Qtile, delete caches, or rewrite generated files as a first
response.
- Treat telemetry JSONL, journal output, screenshots, and window titles as
potentially private. Redact before sharing and retain only the minimum needed.
- Do not declare a visual issue fixed without a fresh focused screenshot.
1---2name: qtile-debug3description: qtile, diagnostics, logs, IPC, crash-analysis4---56# Debug Qtile78## Goal910Separate source/import failures, Qtile IPC failures, service failures, and visual11regressions using reproducible evidence before proposing an edit.1213## Workflow14151. Discover `QTILE_CONFIG_ROOT`, defaulting to `$HOME/.config/qtile`, and create16 a temporary diagnostic directory.172. Collect independent evidence. Preserve failures instead of stopping at the18 first command:1920 ```sh21 out="$(mktemp -d "${TMPDIR:-/tmp}/qtile-debug.XXXXXX")"22 (cd "$QTILE_CONFIG_ROOT" && python -m py_compile config.py) >"$out/compile" 2>&1 || true23 qtile check -c "$QTILE_CONFIG_ROOT/config.py" >"$out/check" 2>&1 || true24 qtile --version >"$out/version" 2>&1 || true25 systemctl --user status qtile.service --no-pager >"$out/service" 2>&1 || true26 journalctl --user -u qtile.service -b -n 200 --no-pager >"$out/journal" 2>&1 || true27 qtile cmd-obj -o root -f info >"$out/root-info" 2>&1 || true28 qtile cmd-obj -o screen 0 -f info >"$out/screen-0" 2>&1 || true29 xrandr --query >"$out/outputs" 2>&1 || true30 ```31323. Classify the failure:33 - compile/check output means source, dependency, or generated-file drift;34 - service/journal output means startup or runtime failure;35 - IPC output means socket, process, or object-path failure;36 - clean diagnostics plus a wrong screenshot means a visual regression.374. For a visual regression, invoke `qtile-confirm`. It must take and inspect a38 screenshot; do not infer layout from widget configuration or coordinates.395. For a source failure, invoke `qtile-edit`; for a validated runtime change,40 invoke `qtile-reload`. Re-run the failing evidence after each change.4142## Isolated X11 reproduction4344Use a nested Xorg server when a visual or Emacs-frame bug could disturb the45active desktop. Requires `Xephyr`, Qtile's X11 backend, and `scrot` for visual46evidence. Follow `references/isolated-xorg.md` for the exact lifecycle:47481. Use an unused display, temporary state directory, and unique Emacs server.492. Start Xephyr and Qtile with `--no-spawn`, an explicit socket, and the50 isolated `DISPLAY`.513. Run every IPC/client/screenshot command with that same `DISPLAY` and socket.524. Inspect the nested screenshot with `qtile-confirm`, then stop only the53 recorded Qtile/Xephyr/Emacs PIDs.5455A nested session is test isolation, not proof by itself; retain only the56minimum screenshot and exact window geometry needed for the investigation.5758## Rules5960- Prefer the smallest reproducer and quote the exact failing command/output.61- Do not restart Qtile, delete caches, or rewrite generated files as a first62 response.63- Treat telemetry JSONL, journal output, screenshots, and window titles as64 potentially private. Redact before sharing and retain only the minimum needed.65- Do not declare a visual issue fixed without a fresh focused screenshot.