adafruit-pitft.py: restore fbcp mirroring for RetroPie (PiGRRL, Cupcade) - #406
Merged
Merged
Conversation
--install-type mirror on a lite image (RetroPie, Pi OS Lite) exited successfully without installing anything: install_mirror() lost its only call site in adafruit#348 and the mirror branch became desktop-only. pitft-fbcp.py (PiGRRL Zero / Pocket PiGRRL / PiGRRL 2 / Cupcade guides) wraps that path, so those builds got a black PiTFT with no error. - Call install_mirror() for mirror installs on non-desktop images when the legacy VideoCore/DispmanX stack is present (Buster and earlier, e.g. RetroPie 4.8). On Bookworm+ Lite, where fbcp cannot work, bail with a message pointing at --install-type console instead of silently succeeding. The desktop/Wayland mirror path is unchanged. - Do not append ",drm" (or the touch overlay params) for the fbcp path: fbcp needs the fbtft framebuffer, and pre-Bookworm overlays reject the parameter ("Unknown dtparam 'drm'"). - Restore "fbcp" as a CLI alias for "mirror" (it fell through to the uninstall branch) and add "drivers" so the CLI matches the menu. - install_mirror(): fix the inverted systemd/sysvinit branch, fix the update_configtxt(rotation=) keyword (rotation_override), keep the HDMI rotate/unrotate dance desktop-only, comment out active vc4-kms-v3d, and install libraspberrypi-dev for the fbcp build. Tested on Pi Zero 2 W + RetroPie 4.8 (Buster, 5.10.103) + PiTFT 2.8" resistive via pitft-fbcp.py "PiGRRL 2": fbcp.service starts at boot and EmulationStation mirrors to the panel. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mikeysklar
marked this pull request as ready for review
August 24, 2026 02:24
Contributor
Author
ladyada
approved these changes
Aug 24, 2026
Member
|
@makermelissa want to take a look since this is your domain? |
Contributor
There was a problem hiding this comment.
Pull request overview
Restores rpi-fbcp-based mirroring for RetroPie/legacy (DispmanX) console images so PiGRRL/Cupcade-style installs don’t silently “succeed” while leaving the PiTFT black, while keeping the modern desktop/Wayland behavior intact.
Changes:
- Reintroduces the
install_mirror()call path for non-desktop--install-type mirror, and restores--install-type fbcpas an alias. - Adds legacy display stack detection and fails fast on Bookworm+ lite images with a clear error message (instead of exiting 0 without installing fbcp).
- Fixes the systemd/sysvinit branching for fbcp startup and corrects the
update_configtxt()rotation override keyword usage.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+727
to
+731
| # On console images the panel's own rotate= parameter is the orientation | ||
| # and display_rotate is left to the caller (pitft-fbcp.py sets it per | ||
| # project), so only the desktop needs the HDMI rotate/unrotate dance. | ||
| if not is_desktop: | ||
| return True |
Comment on lines
+1035
to
+1038
| shell.bail("""Mirroring on a console/lite image needs the legacy VideoCore display stack | ||
| (Raspberry Pi OS Buster or earlier, e.g. RetroPie 4.8), which this OS does not have. | ||
| Use --install-type console to show the console on the PiTFT, or install the | ||
| desktop version of Raspberry Pi OS to use the PiTFT as a second display.""") |
makermelissa
requested changes
Aug 24, 2026
makermelissa
left a comment
Contributor
There was a problem hiding this comment.
Overall, it looks good to me. Please address the copilot suggestions.
…mat bail message - On non-desktop mirror installs, remove any existing display_hdmi_rotate before the early return so a leftover value from a previous install cannot rotate the mirrored HDMI output unexpectedly. - Rewrite the unsupported-OS bail message as concatenated strings. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
Both suggestions addressed in b22539c:
left - Pi 3B + 2.8" PiTFT (Pi OS : Trixie)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

On RetroPie and other lite images
--install-type mirrorexits 0 but never installs fbcp, so the PiGRRL and Cupcade guides end with a black PiTFT.install_mirror()lost its call site in #348 andpitft-fbcp.pywraps that path.This restores the fbcp install on non-desktop images that have the legacy display stack (Buster, RetroPie 4.8), leaves out the
,drmoverlay param there, brings back--install-type fbcpas an alias for mirror (it was falling through to the uninstall path, and the Cupcade guide uses it), and fixes the inverted systemd branch plus a badupdate_configtxt()keyword insideinstall_mirror(). On Bookworm and later lite images it now fails with a clear message instead of silently succeeding. The desktop/Wayland path is unchanged.Tested with the branch cloned as in the guides: