Get the latest tech news
A Mini Monitor for a Pi
This post outlines how I used a small 2 inch display as a monitor for my pi. Where it can display tty terminals and X desktops and applications as if it was a normal screen connected over hdmi. My overall goal is to have a sort of handheld “console” that I can connect a keyboard to and use as a normal computer. This post implements the display functionality needed to fulfill part of the goal. I lay out the steps needed for interacting with the display over spi and the issues I encountered trying to use it like a monitor. The end result is a system service that runs on startup, consuming 2.5 mb of ram and ~2% of the CPU. It also respects the X display power management system (dpms) to save on battery life by going to sleep and turning the backlight off.
It also respects the X display power management system (dpms) to save on battery life by going to sleep and turning the backlight off. I bundled up the code for interacting with the monitor into a c api so that I could more easily write programs that used the display and encapsulates it’s state into a nice wrapper with some sanity checks. Unfortunately X uses a different default resolution and bit depth when there is no monitor plugged in, so one needs to add a manual config to X11 that forces the correct settings.
Or read this on Hacker News