SchOS/docs/plan/xorg.md
Nexoniarz 4afaebf739 docs: the desktop is Xorg on the framebuffer
xorg.md replaces wayland.md as Gate 3's plan: what is built, and the
ports left in order. 1.0.md's foundations row is brought up to date.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1giNvrHTrPMPw7V6x1kQ4
2026-10-24 12:06:41 +02:00

2 KiB

Xorg

The desktop is X11, on the framebuffer. This replaces wayland.md as the plan for Gate 3 of 1.0.md; Wayland stays on file and is not being worked on.

Why X and not Wayland

Every Wayland compositor worth running -- labwc, and everything else built on wlroots -- needs DRM/KMS, libinput, udev and libseat. DRM/KMS is the largest of them by far: a kernel graphics subsystem, and in practice a great deal taken from Linux. Xorg runs on a plain framebuffer through its fbdev driver and reads input through evdev, both of which are interfaces SchOS already has. It is the shorter road to a desktop by a long way, and it brings the window managers with it: twm first, then Window Maker.

DRM/KMS is not planned. libinput, udev and libseat are worth having for their own sake and may come later; Xorg does not need them.

What is built

  • The kernel calls (b1323e1, checked by cmd/xready): evdev's queries, fbdev's mode-set to the current mode, KDSETMODE, KDSKBMODE, the VT_PROCESS switch handshake, and /sys/bus/pci/devices/*/{boot_vga, enable,graphics/fb0} for libpciaccess.
  • Dynamic linking and dlopen (4330576): Xorg loads its drivers as modules.
  • <linux/*.h> in the build sysroot, as ports/linux-headers.

What is left, in order

  1. The X client libraries. xorgproto, xtrans, libXau, libXdmcp, xcb-proto, libxcb, libX11, libXext, libXrender, libXfixes, libxkbfile, libfontenc, libXfont2, freetype, zlib, pixman, libpciaccess.
  2. Keyboard and fonts. xkbcomp and xkeyboard-config, the data X compiles keymaps from; a misc-fixed font.
  3. The server. xorg-server built with meson, GLX, glamor and DRI off; xf86-video-fbdev; xf86-input-evdev with libevdev and mtdev.
  4. The first picture. twm and xterm, started by hand from a VT.
  5. Window Maker, and an startx that works.

The kernel calls were written against what these programs are documented to do. Each step past it is expected to find a call that was not -- that is what running the real program is for.