For an art project I'm helping out with, I set up a Raspberry Pi to drive a monochrome Nokia-style LCD screen, which turned out to be very straightforward with the CircuitPython module for it.

I was recently asked if I could mirror the display to the HDMI output, which was also fairly quick (I already had a buffer for the LCD display, so the work was replacing while True with a proper event loop), but did cause some trouble with automatic start on boot.

The first problem I ran into was that I'd set up a systemd unit service to start the script - however, I'd set it to target multi-user.target, when a graphical session isn't necessarily available. The correct solution here probably would've been to write a user service instead, but I wound up just adding it to the XDG autostart directory.

This, in turn, lead to a problem where the Pi reasonably expects to have an actual display before you have a graphical session, so if you start without a display attached, the autostart entries might not start either.

Forcing the Pi to output video regardless of whether a display is present with

hdmi_force_hotplug=1

in boot/config.txt seems to fix this.


You must log in to comment.