[BPI-R2] Solved: Fbcon only on HDMI framebuffer

Hi,

I’m trying to set up a BPI-R2 with frank-w Debian Bullseye image and frank-w Kernel bpi-r2.5.10. A TFT touch panel is connected to the SPI port which works fine (Adafruit, HX8357D, fbtbt).

Problem: A HDMI monitor is connected sometimes for maintenance purposes. If it is connected at boot time, it gets fb0 and the SPI display gets fb1. Always. Everything OK. If HDMI monitor is not connected at boot time, the SPI display gets fb0 and the console is writing to that display.

What I want is pygame to have exclusive access to the SPI display framebuffer and the console grab the HDMI monitor only if it’s connected. And if it’s not connected, I don’t want a local console at all (headless).

I already tried

  • to compile one or the other framebuffers as a module and tried to load that modules at apropriate time in boot progress.
  • different settings on the start line (fbcon:mode=1…)
  • assignments of framebuffers to devices in device tree

Nothing worked. Does anybody have an idea how to prevent the console from messing up my SPI display? Thanks for every hint.

Stephan

Maybe using udev to link the fb-device for use with spi…

As this works in userspace the bootup cannot be changed (till boot is finished you have either hdmi or spi display) then spi application/xserver maybe can use symlink created by udev for output

Afaik the drm-stuff is initialized before any peripheral (spi) which makes problems here…i have no idea how to change this behaviour…know a similar issue with i2c (hdmi also contains one afaik for cec which moves further controllers if monitor connected)

Maybe you can force hdmi active at boottime also without monitor by adding this to your cmdline (uboot)

video=HDMI-A-1:1280x1024-32@60D

Just use your preferred resolution

Thank you very much, frank-w! This parameter causes exact the behaviour I expected :+1: