Sophia

Sophia is a modern, transaction-driven display server and compositor that applies the Unix Philosophy to the graphical desktop.

Traditional compositors are monolithic. They force window layouts, graphics composition, input event routing, and panel rendering into a single, complex process. If one part falters—if your status bar freezes or your tiling window manager crashes—your entire session goes down with it, taking your open applications with it.

Sophia changes this by decomposing the desktop into a modular, cooperative pipeline. It divides authority among small, specialized programs that each do one thing well, coordinating them over clean, versioned boundaries.


The Visual Pipeline

                  [ sandboxed clients ]
                            │
                            ▼ (classic X11 socket)
                  ┌───────────────────┐
                  │ X SERVER FRONTEND │ ◄── [ protocol translation ]
                  └─────────┬─────────┘
                            │
                            ▼ (anonymous transactions)
                  ┌───────────────────┐
                  │   SOPHIA ENGINE   │ ◄── [ visual kernel / KMS / DRM ]
                  └──────┬─────┬──────┘
                         │     ▲
     [ sophia_wm_v1 ]    │     │      [ sophia_shell_v1 ]
    opaque layout nodes  ▼     ▼      descriptors & reservations
                  ┌───────┐   ┌───────┐
                  │ CODES │   │ CODES │ ◄── [ decoupled policy edges ]
                  │  WM   │   │ SHELL │
                  └───────┘   └───────┘

Instead of one giant process holding all the cards, Sophia divides authority among four distinct, focused actors:

1. The Visual Kernel (Sophia Engine)

The unopinionated center of gravity. The Engine owns the physical hardware, schedules frame updates, and drives KMS/DRM presentation. It has no interest in application protocols like X11 or Wayland, nor does it care how your windows are tiled. It simply enforces visual and input authority on abstract, anonymous surfaces, committing updates atomically to prevent tearing.

2. The X11 Protocol Translator (X Server Frontend)

A lightweight, secure X11 translator written from scratch in Rust (sophia-x-authority). It listens on standard X11 sockets, manages window IDs, and translates X11 draw-calls and window allocations into clean, anonymous transactions for the Engine. It has no access to physical display devices or layout policies.

3. The Layout Legislator (Sophia WM)

An external process (like our reference implementation, Hagia) communicating over the sophia_wm_v1 wire. It receives anonymous spatial coordinates and abstract window nodes, then returns layout and focus proposals. It operates completely blind to window titles, process IDs, and clipboard contents.

4. The Human Interface Coordinator (Sophia Shell)

A confined client (like our reference shell, Narthex) communicating over the sophia_shell_v1 wire. The Shell specifies where panels, workspace switchers, and status bars go. It reserves edge spans for your work area and emits high-level UI descriptors, which the Engine renders securely inside a sandboxed domain.


Strict Confinement with XNamespaces

Standard X11 is a security nightmare: any running application can sniff your clipboard, record your keystrokes, or inject fake inputs into other windows. There is no sandboxing.

Sophia ends this by pairing its modular architecture with XNamespaces and Portals:


Protocol-Neutrality: Pluggable Frontends

A display server should not be bound to the quirks of a single graphics protocol.

Traditional compositors are tightly coupled to their client protocols—X11 servers are hardcoded around X11 concepts, and Wayland compositors are written around Wayland-specific surface states.

Sophia is different. The Engine is entirely protocol-neutral. It has no understanding of X11 resource trees, nor does it speak Wayland. It manages only abstract, anonymous visual transactions (buffers, damages, and layout epochs).

This decoupling establishes a highly modular Protocol Authority Layer:


Engineered System Benefits

By building the display engine from scratch around a compositor-first architecture, Sophia delivers concrete system-level guarantees that traditional display servers cannot match:


Recent News

Documentation