Frame – the first Linux Assembly X server
Frame: A Minimalist Assembly-Based X Server for Linux
In a personal pursuit of total software sovereignty, Geir identified a critical point of friction: the X server. As the primary graphics engine responsible for rendering pixels, the standard X11 is a monolithic "beast" comprising roughly 4 million lines of code—a complexity that few individuals can truly grasp.
To solve this, Geir created Frame.
The Scale of Reduction
Unlike its predecessor, frame is written in Assembly and is remarkably lean. While it is still in its infancy, it already supports a full desktop environment, including heavyweights like Firefox and GIMP.
| Feature | X11 (Standard) | Frame (Custom) |
|---|---|---|
| Code Volume | lines | lines |
| Language | C / Various | Assembly |
| Complexity | Extremely High | Manageable / Lean |
Despite its size, there is still work to be done regarding the X protocol:
- Complete remaining X protocol implementations
- Further optimize GPU handoffs
- Expand event watcher efficiency
The Software Architecture
The current system architecture has been stripped down to the essentials. Geir has replaced the bloated standard stack (gdm, X11, i3, conky, wezterm, zsh) with a streamlined alternative that is over 50 times smaller.
Component Breakdown:
frame: The core X server.tile: The window manager/environment.glass: The terminal emulator residing withintile.bare: The shell residing withinglass.Bolt: The greeter (which successfully replacedgdm).
Performance and Efficiency
When idling on battery power, the wattage draw for frame is nearly identical to Xorg, as the hardware (Wi-Fi and display panel) dictates the baseline power consumption. However, the CPU efficiency tells a different story:
- CPU Usage:
Xorgconsumes nearly three times the CPU cycles thatframerequires to remain idle. - Responsiveness: During a three-minute observation window,
tileandglassutilized0msof CPU time.
The Broader Ecosystem
Beyond the display server, Geir utilizes a suite of Rust-based tools known as . This suite has replaced almost every other utility on the system. The result is a collection of terminal interfaces with unified keybindings, characterized by a tiny footprint and minimal electrical demand.
To maintain and expand this system, Geir collaborates with an AI assistant, Claude. This partnership has served as a pedagogical tool, providing deep insights into:
Hardware abstraction layersCursor painting techniquesGPU handoffsEvent watchers
; Conceptual example of the lean approach
mov eax, 1 ; system call for exit
xor ebx, ebx ; return 0
int 0x80 ; call kernel
Extension to Mobile and Philosophy
This philosophy of extreme minimalism extends to the smartphone. Geir developed a custom launcher, a personalized daily news aggregator, and a set of applications designed for a target audience of exactly one person.
All of these creations are released into the Public Domain. This stems from a core belief regarding software design:
"Software designed for a large audience fits everyone a little."
By owning the code and tailoring it to specific needs, Geir has created a stable, daily-driver environment where the only occasional downside is the occasional frustration of a bug.
Reference: Original Post
#Geekery #Technology