Summary
Screen rotation (Settings → portrait/landscape) is a complete no-op on the Raspberry Pi 5. The display stays in its default orientation regardless of the rotation chosen in the web UI (and manual config.txt edits don't help either).
Reported on the forum: https://forums.screenly.io/t/6701 (related: https://forums.screenly.io/t/6557).
Root cause
Pi 5 runs the viewer under cage + Wayland. docker/Dockerfile.viewer.j2 sets QT_QPA_PLATFORM=wayland for board in ('x86', 'arm64', 'pi5'), and on those boards the compositor owns the transform, applied via wlr-randr in _apply_wlr_transform().
However, _is_wayland_board() in src/anthias_viewer/__init__.py only treats x86 as a Wayland board:
def _is_wayland_board() -> bool:
"""The x86 viewer runs under cage + wayland; everything else uses
linuxfb. Mirrors the docker/Dockerfile.viewer.j2 split."""
return os.environ.get('DEVICE_TYPE') == 'x86'
On Pi 5 (DEVICE_TYPE=pi5, QT_QPA_PLATFORM=wayland) this misfires twice:
_build_webview_env() does not take the Wayland early-return. It falls through, and because the QPA isn't eglfs, it appends wayland:rotation=N to QT_QPA_PLATFORM. The Qt wayland plugin doesn't understand the :rotation= option (that's a linuxfb-only option), so it is silently ignored.
_apply_wlr_transform() — the wlr-randr path that actually rotates on cage/wlroots — is gated behind _is_wayland_board(), so it is never called on Pi 5.
Net result: neither rotation path runs on Pi 5, so the rotation menu does nothing.
The codebase already hints at this gap. _wayland_socket_path() notes that WAYLAND_DISPLAY is set "on x86, arm64 AND pi5 alike, whereas _is_wayland_board() is x86-only".
Suggested fix
Make _is_wayland_board() recognize all cage/Wayland boards, not just x86 — for example detect QT_QPA_PLATFORM starting with wayland, or DEVICE_TYPE in {'x86', 'arm64', 'pi5'}, or the presence of WAYLAND_DISPLAY. That routes Pi 5 (and arm64) through _apply_wlr_transform(), the same wlr-randr path x86 already uses successfully. The generic arm64 cage build is very likely affected the same way and should be confirmed in the same change.
Affected / not affected
Summary
Screen rotation (Settings → portrait/landscape) is a complete no-op on the Raspberry Pi 5. The display stays in its default orientation regardless of the rotation chosen in the web UI (and manual
config.txtedits don't help either).Reported on the forum: https://forums.screenly.io/t/6701 (related: https://forums.screenly.io/t/6557).
Root cause
Pi 5 runs the viewer under cage + Wayland.
docker/Dockerfile.viewer.j2setsQT_QPA_PLATFORM=waylandforboard in ('x86', 'arm64', 'pi5'), and on those boards the compositor owns the transform, applied viawlr-randrin_apply_wlr_transform().However,
_is_wayland_board()insrc/anthias_viewer/__init__.pyonly treats x86 as a Wayland board:On Pi 5 (
DEVICE_TYPE=pi5,QT_QPA_PLATFORM=wayland) this misfires twice:_build_webview_env()does not take the Wayland early-return. It falls through, and because the QPA isn'teglfs, it appendswayland:rotation=NtoQT_QPA_PLATFORM. The Qt wayland plugin doesn't understand the:rotation=option (that's alinuxfb-only option), so it is silently ignored._apply_wlr_transform()— thewlr-randrpath that actually rotates on cage/wlroots — is gated behind_is_wayland_board(), so it is never called on Pi 5.Net result: neither rotation path runs on Pi 5, so the rotation menu does nothing.
The codebase already hints at this gap.
_wayland_socket_path()notes thatWAYLAND_DISPLAYis set "on x86, arm64 AND pi5 alike, whereas_is_wayland_board()is x86-only".Suggested fix
Make
_is_wayland_board()recognize all cage/Wayland boards, not just x86 — for example detectQT_QPA_PLATFORMstarting withwayland, orDEVICE_TYPE in {'x86', 'arm64', 'pi5'}, or the presence ofWAYLAND_DISPLAY. That routes Pi 5 (and arm64) through_apply_wlr_transform(), the samewlr-randrpath x86 already uses successfully. The generic arm64 cage build is very likely affected the same way and should be confirmed in the same change.Affected / not affected
QT_QPA_EGLFS_ROTATION, fixed in fix(viewer): rotate Pi 4 (eglfs) display via QT_QPA_EGLFS_ROTATION #2971/fix(viewer): emit 270° eglfs rotation as -90 so portrait-inverted isn't stretched #2973) and x86 (cage, viawlr-randr).