mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
controller: leave a usable terminal when stopping the desktop
Stopping the display manager left the Pi's monitor black with only a blinking cursor. The console VT is already in the foreground with a getty and a live shell on it (verified: /dev/vcs1 holds the login banner and prompt) — the display manager just hands the display back without the console being repainted, so nothing is visible. Activate the console VT, then bounce off another VT to force a modeset and redraw, and print a short message telling the user the Controller stopped the desktop and how to start it again. Best-effort throughout: skipped when no getty is on the console VT, a chvt or console-write failure never fails the stop, and being stranded on the repaint VT is reported rather than claimed as success. Verified on 10.0.0.8 hardware. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
ab5f416b3f
commit
a0fa03e6c5
6 changed files with 226 additions and 11 deletions
|
|
@ -169,7 +169,8 @@ class TestDesktopEndpoints:
|
|||
response = test_client.post(endpoint)
|
||||
assert response.status_code == 200
|
||||
assert response.json()["success"] is True
|
||||
mock_exec.assert_called_once_with(
|
||||
# Stopping also switches the display to a console VT, so assert the first call.
|
||||
assert mock_exec.call_args_list[0] == mock.call(
|
||||
"systemctl", systemctl_action, "display-manager.service",
|
||||
stdout=mock.ANY,
|
||||
stderr=mock.ANY,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue