Turn a Raspberry Pi into a wireless external display for your Mac. Stream your screen, extend your workspace, and reclaim some desk real estate without the expensive external display hardware.
Turn a Raspberry Pi into a wireless external display for your Mac. Stream your screen, extend your workspace, and reclaim some desk real estate without the expensive external display hardware.
Last few hours were messy but productive. I reworked the hardware setup and added a second monitor, which pushed me into building the driver in earnest once I discovered my MacBook only supports one external display. The core idea stayed the same: render a virtual screen on macOS and stream it to a Raspberry Pi so I can actually use two monitors. Video streaming works now, but the virtual display gave me grief — it kept mirroring the main display no matter what I tried. I burned through a bunch of approaches (like ~15 attempts) until I dug up CGVirtualDisplay (private API) and a helpful GitHub repo that finally got me an extended display that can be streamed.
Current pain points: the raspberrypi4 with 2GB RAM is a major limiter — most animations and the heavier UI stuff kill the Pi. The web dashboard was hammering the backend with requests, tanking performance, so I added a guard: check if the monitor is actually available, and only render/send data when it is. That trimmed a lot of wasted work and smoothed things out.
Networking is another bottleneck: video goes over the network right now and can be slow or flaky. I’m prototyping a hybrid transport (Wi‑Fi + USB) so we can fall back to the faster link when available. Other tweaks: reduce encoder bitrate selectively, debounce dashboard requests, and avoid rendering frames when nothing changed.
My wifi is cooked rn sorry
Log in to leave a comment
Last few hours was kinda painful. I made huge progress tbh, but I had a lot of problems during the development. So the main problem is that this raspberrypi4 only has 2gb of ram which isn’t enough for most of the animations, and this whole screen sharing, also the web dashboard used to nuke requests for the backend which significantly decreased the performance. Now I’m working on check if the monitor is actually available, and if yes only then will it render the infos out.
The video transfer now works only via network which can be really slow sometimes, so I’m working on a hybrid solution, which will use both wifi and usb.
Log in to leave a comment
Ooh, I didn’t know it was 7 hours, oopsie.
Over the last few days, I was a bit sick, so I had a lot of free time. I decided to update my setup, rearranged the hardware, and now my desk looks so much better. I did the cable management and set up two monitors. When I finished, I wanted to connect both screens to my laptop.
That’s when I realized my MacBook doesn’t support two external displays. So I decided to make a driver for myself to actually be able to use two displays. The idea is simple: software that renders a screen and sends the data to a Raspberry Pi, which then displays it on a monitor. Low latency, good colors.
I set everything up. The app works, video transfer works, but I had a lot of problems with the virtual screen. It always mirrored the main display. I tried around 15 different methods, but none of them worked.
That’s when I came across the CGVirtualDisplay private API. I had a few failed attempts with it, but then I found a GitHub repo that basically carried the whole project. Now I have a version where I can use an extended display that’s streamed to my Pi.
Log in to leave a comment