You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flutter-pi on Raspberry Pi 4B with 3.5" SPI TFT (fbdev) – how to make it work? #505
Hi, I’m new to Linux and embedded systems and I’m trying to run a Flutter app on a Raspberry Pi 4B (4GB RAM) using this 3.5" SPI display: https://www.lcdwiki.com/3.5inch_RPi_Display
However, as far as I understand, the display currently uses fbdev (framebuffer) and not KMS/DRM, which prevents flutter-pi from working out-of-the-box.
System Info
OS: Linux raspberrypi 6.12.47+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.47-1+rpt1 (2025-09-16) aarch64 GNU/Linux
Flutter (host Windows machine): 3.35.1
Flutter-pi build command (host Windows machine): flutterpi_tool build --arch=arm64 --cpu=pi4 --release
Symptoms / Errors
Running flutter-pi --release ~/app outputs:
window.c: Could not find a preferred output mode!
flutter-pi.c: Couldn't create KMS window.
In raspi-config:
I have no "GL Driver" under "Advanced Options"
But have added dtoverlay=vc4-fkms-v3d to /boot/config.txt
I have no "GPU Memory" under "Performance Options"
As you pointed out correctly, there's 2 ways to do this. The setup instructions you followed uses roughly this one:
You let the Raspberry Pi firmware fake a HDMI KMS/DRM display, and have a utility fbcp running in the background, that basically does a screencapture of the fake HDMI displays and copies it to the framebuffer, which is the actual display.
You can try running flutter-pi with the --videomode argument to manually select a fitting video mode. If it still doesn't work you can send me the output of drm_info (sudo apt install drm-info)
Load a real KMS driver and let flutter-pi render to it.
Less hacky and should be more performant, but I'm not sure flutter-pi will work with this automatically. normally the EGL implementation has some built-in logic to do the importing & exporting of buffers between GPU and display controller, not sure that logic works some really non-standard display "controller" such as your SPI display.
Maybe your hardware is not exactly a Pi Screen, but it loads the same driver. (/lib/modules/6.12.47+rpt-rpi-v8/kernel/drivers/gpu/drm/tiny/ili9486.ko.xz as you already found out)
Activity
ardera commentedon Nov 6, 2025
As you pointed out correctly, there's 2 ways to do this. The setup instructions you followed uses roughly this one:
fbcprunning in the background, that basically does a screencapture of the fake HDMI displays and copies it to the framebuffer, which is the actual display.You can try running flutter-pi with the
--videomodeargument to manually select a fitting video mode. If it still doesn't work you can send me the output ofdrm_info(sudo apt install drm-info)Less hacky and should be more performant, but I'm not sure flutter-pi will work with this automatically. normally the EGL implementation has some built-in logic to do the importing & exporting of buffers between GPU and display controller, not sure that logic works some really non-standard display "controller" such as your SPI display.
If you want to try anyway, you can try this overlay here: https://github.com/raspberrypi/linux/blob/rpi-6.12.y/arch/arm/boot/dts/overlays/piscreen-overlay.dts
Maybe your hardware is not exactly a Pi Screen, but it loads the same driver. (
/lib/modules/6.12.47+rpt-rpi-v8/kernel/drivers/gpu/drm/tiny/ili9486.ko.xzas you already found out)