Claiming hardware

display-operator, audio-operator, and bluetooth-operator let a pod claim one monitor output, one speaker, or one game controller, without a privileged container. The operating system publishes whole pieces of hardware as devices, such as a sound card, a GPU, or a Bluetooth radio, as Devices describes. A pod usually needs one output of a card, not the whole card. So each operator claims the hardware for its own pod, and publishes each output as a device that a pod can claim.

For example, a pod that plays a film can claim one monitor output at 1280x720 and one Bluetooth speaker with the aptx codec. The pod isn’t privileged. Its container gets WAYLAND_DISPLAY for the monitor and PIPEWIRE_REMOTE for the speaker, and draws and plays through those sockets.

Each operator is a DRA driver, with its own ResourceSlice on each node, separate from the operating system’s driver, liken.sh. A claim can carry settings for the device in an opaque config block, such as a monitor’s mode or a speaker’s codec. The operator reads the block when it prepares the claim, and sets the device up that way before the pod starts. A DeviceClass can carry the same block as cluster policy, and the claim’s own block wins.

The operators

display-operator runs the Weston compositor on each machine and publishes each monitor output as a device of the driver display.liken.sh. A claim can set the output’s mode, brightness, and power. A Layout puts programs from several namespaces on one monitor, each in its own rectangle, and a Display reports the state of each monitor.

audio-operator runs PipeWire on each machine and publishes each physical audio output as a device of the driver audio.liken.sh: the speakers of a monitor, the analog jack, a USB sound card, and each paired Bluetooth speaker. A claim on a Bluetooth speaker can set its codec. A Sink and a Source hold the volume and mute state of each output and input, and you can change them without a claim and without interrupting a pod that is playing.

bluetooth-operator runs BlueZ on each machine that has a Bluetooth radio, pairs controllers through a PairingRequest, and publishes each paired controller as a device of the driver bluetooth.liken.sh. A claim’s inputs choose which kinds of input from the controller reach the container, and its axes tune the sticks.

What they depend on

Each device operator claims devices that the operating system publishes, through a DeviceClass that it ships for its own pod:

Some machines need a kernel module before the operating system publishes the hardware. Load the drivers a machine needs gives the steps.

display-operator builds on the project’s weston image, and its capture image builds on the ffmpeg image.

Extension points