Add --noblank, and fix install.sh exiting early when no relogin is needed

Wall displays must never blank. --noblank applies two layers: an Xorg
ServerFlags snippet with all four timeouts at 0 (covers the DM greeter, and
survives reboots) and an xset line in the i3 autostart (a session or DM can
re-enable the screensaver after X starts). Either alone is insufficient.

Documents the trap that cost time here: `sudo xset ...` targets root's X
connection and silently does nothing, so a `sudo bash noblank.sh` wrapper looks
like it worked while blanking stays fully armed.

Also fixes a latent bug: `[ "$relogin" = yes ] && echo ...` as the final
statement made install.sh exit non-zero under `set -e` -- and skip the closing
instructions -- whenever a relogin was not required.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
jasonwitty
2026-08-10 00:47:36 -07:00
parent 9a47fd47a7
commit c5b8d04b84
3 changed files with 91 additions and 2 deletions
+34
View File
@@ -62,6 +62,7 @@ fresh session.
| *(none)* | Build/install lisgd, install the three scripts and the default config |
| `--xignore` | Also tell X to ignore the touch panel (see below — usually wanted) |
| `--i3` | Also add i3 autostart lines, with a backup and `i3 -C` validation |
| `--noblank` | Also stop the screen blanking / DPMS power-down (wall displays) |
Re-running is safe: an existing config file is never overwritten, and the i3
edit is skipped if already present.
@@ -121,6 +122,39 @@ device exclusively, so two instances make every swipe fire twice.
`socktop-gestures` enforces this: it exits non-zero if one is already running,
unless given `--replace`.
## Stopping the screen blanking
A wall display must never blank. `./install.sh --noblank` applies two layers:
1. An Xorg `ServerFlags` snippet with all four timeouts at `0`, so it covers
every X session including the display-manager greeter, and survives reboots.
2. An `xset s off s noblank -dpms` line in the i3 autostart, because a session
or DM can re-enable the screensaver after X has started.
Both are needed. `xset` alone does not survive a reboot, and — the trap worth
knowing — **`xset` must run as the session user**. Running `sudo xset ...`, or a
`sudo bash noblank.sh` wrapper, targets root's X connection and silently does
nothing while appearing to succeed. Check the real state with:
```sh
xset q | grep -A1 -E 'Screen Saver|DPMS'
```
You want `timeout: 0`, `prefer blanking: no`, and `DPMS is Disabled`.
### Related: does the display come back by itself?
Blanking is only half of unattended operation. If the display manager has no
autologin configured, a reboot leaves the panel at a login prompt and nothing
autostarts. Check with:
```sh
grep -E '^autologin-(user|session)' /etc/lightdm/lightdm.conf
```
No output means no autologin. Configuring it is out of scope here — it weakens
the machine's security posture and is a deliberate choice, not a default.
## Uninstall
```sh