Close

No X server, no mouse — and the panel that made me earn it

A project log for Scottina

A pocket-sized front panel for the diagnostic tools you already use

scottskyScottsky 07/30/2026 at 17:120 Comments

Log 1 mentioned "render directly to the framebuffer" as one of six ground rules and moved on. It deserves its own post, because this is the decision that almost every other design choice in Scottina traces back to.

Why not just run Xorg like everybody else?

The obvious path for a touchscreen kiosk is a desktop stack: Xorg or Wayland, SDL or Qt, a browser or a toolkit on top. I tried variations on that and kept running into the same wall — anything that can lose the DRM device eventually does, and on a 3.5" panel wired over SPI, "eventually" shows up as a frozen or blank screen at the worst possible bench moment. The only approach that's proven reliable on this hardware is the boring one: own /dev/fb0 directly.

Scottina composes every frame with PIL + numpy and writes it straight to the ili9486drmfb framebuffer. Touch comes from the ADS7846 controller's evdev node, polled, not grabbed. No SDL, no Xorg, nothing else that can fight Scottina for the display.

The ILI9486 has its own opinions

Owning the framebuffer doesn't mean the panel behaves. A few things it took real bench time to work around:

Making an SPI panel feel fast

SPI is not a fast bus, so full-frame redraws at interactive rates were never going to happen. Every screen that ticks reports the boxes that actually changed; framebuffer.py merges those into row bands (bands within 8 rows of each other get fused — a seek costs more than a few extra rows) and writes only those, since the DRM fbdev layer derives its SPI damage from the byte range touched anyway. That's a 2–15× saving over a full blit, and it's what lets live screens like CAN Bus tick at ~20 Hz while everything idle sits at ~1 Hz without cooking the bus.

Next log: hotplug — how a screen's tile appears the instant its dongle is plugged in, and disappears the instant it isn't.

Discussions