Fix: Cast ratioNum/ratioDen to ints in init, and coerce final_ratio to Fraction before accessing .numerator/.denominator (snippets above).
Runtime mode: On Raspberry Pi OS Bookworm Lite (no desktop), Kivy runs reliably via SDL_VIDEODRIVER=kmsdrm to HDMI from a text console session.
Packaging: Prefer piwheels wheels for kivy==2.3.1 in a venv. System SDL2/Pango/GStreamer from apt work; no need for the Kivy deps bundle unless explicitly selected via KIVY_DEPS_ROOT/LD_LIBRARY_PATH.
Service: A simple systemd unit calling project start.sh with SDL_VIDEODRIVER=kmsdrm provides reliable autostart.