How Luch works
Two parts: a service on the computer and a receiver app on the screen. The service takes the picture and the sound, encodes them and sends them over UDP, and the receiver decodes and shows them.
Show modes
| Mode | What it shows | Sender delay |
|---|---|---|
fast | the whole main monitor straight from the frame buffer (KMS), the cursor is drawn on top; HEVC or H.264, depending on the receiver | ≈ 5–6 ms |
monitor | a screen through the system portal (PipeWire, DMA-BUF, no copy) | ≈ 15–25 ms |
window | one window through the portal | as monitor |
virtual | a second screen that extends the desktop (GNOME creates a virtual monitor) | as monitor |
The figures are from the project's documentation. The sound (Opus, 5 ms frames) is taken from the main output in all modes.
Where the low delay comes from
| Capture and encoding | Network, one way | Decoding on the receiver | Total, without the display |
|---|---|---|---|
| ≈ 5.5 ms | ≈ 2 ms | ≈ 5.5 ms (HEVC) | ≈ 13 ms |
The tricks: not a single extra copy of the frame, one reference picture and no B-frames, an endless group of pictures with a key frame on request, a buffer of one frame, the fastest encoder mode. Packets leave the moment the encoder hands them over.
Measurement examples
| Device | Mode | Capture | Conversion | Encoding | Total on the sender |
|---|---|---|---|---|---|
| Steam Deck (AMD), 1280×800 frame, 60 frames/s | fast | ≈ 0.08 ms | ≈ 2.3 ms | ≈ 9.4 ms | ≈ 12 ms |
The data is from the log of the luch-kms helper during a show to a Google TV Streamer. Measurements from other devices will be added.
What it is made of
| Part | What it does |
|---|---|
luchd | the user service: finds receivers on the network (Avahi, _luch._tcp), keeps the control channels, takes and sends the picture and the sound, exposes the D-Bus API dev.luch.Luch1 |
luch-kms | a small helper for the lowest-delay mode: reads the frame buffer, converts it to NV12 on the GPU, encodes through VA-API. The only part with raised privileges (CAP_SYS_ADMIN) |
luchctl | the command-line tool: list, show, stop, statistics |
| the receiver | an Android app: shows the picture, plays the sound, counts the statistics |
What you need
The computer
Linux with a VA-API encoder and Mesa EGL. Intel and AMD graphics are fully supported. The portal modes need a GNOME session on Wayland. The fast mode works in any compositor that outputs the picture through KMS.
The receiver
A device on Android 5.0 or newer with the Luch app. It has to be on the same network as the computer: mDNS does not pass through routers.
The network
A local network, preferably 5 GHz Wi-Fi or a cable. The stream is bound to the network interface where the receiver was found, so a full-tunnel VPN does not carry it.