Skip to content

XR hardware

The PICO 4's XR hardware under Linux, on Valve's kernel (kernel.md). The inventory comes from the stock image, kernel and device tree and from read-only observation of PICO OS; no vendor files are part of this repository.

TL;DR. Monado's pico4 driver runs inside SteamVR (driver_monado) and, for OpenXR tests, in monado-service (session.md). Each part runs on the headset. This page has the overview, the inventory, the driver, building and running; one page per part has the rest:

Document Contents
imu.md the head IMU on the sensor DSP
lenses.md lens distortion, lens centre, chromatic aberration; reading and setting the IPD
cameras.md the four tracking cameras, their frame sets and frame times
head-tracking.md PICO OS's tracker on the Compute DSP, its auto exposure, rooms, Basalt
room-view.md the colour room view on PICO OS's depth mesh
controllers.md the station, pairing, inputs, vibration, render models, controller tracking
Part How it works Code
Head IMU ICM-42688 on the sensor DSP (SLPI), read over QMI/QRTR; 1 kHz sm8250-hexagonrpc (hexagonrpcd), pico4_ssc.c, pico4-imu
Head 6DoF PICO OS's libSlam.so on the Compute DSP, in a bionic root, fed by pico4-slamd; Basalt selectable pico4-slamd, pico4_slam.c
Display, lenses, IPD 2 × 2160×2160 at 90 Hz; PICO OS's lens model; IPD from the lens motor's MCU, set by pico4-lens pico4_lens.c, pico4_ipd.c
Cameras 4 × OV7251 and the IMX471 RGB camera on V4L2/CAMSS, frame sync from the station pico4_cam.c, pico4-cam
Controllers station (nRF52832) on SPI for control, inputs and IMU through the sensor DSP; LED tracking reimplemented from PICO OS; PICO OS's render models; vibration pico4_station.c, pico4_controller.c, pico4_ctrack_*
Room view colour from the RGB camera on PICO OS's depth mesh, through SteamVR's private passthrough interface pico4_passthrough.c, pico4-roomview, vst.c
Rooms the tracker's maps kept on the data partition; each room is a SteamVR universe room.h, pico4-slamd.c

Packages: the driver in pico4-monado and its Monado recipe and patches in pico4-monado; the sensor daemons in sm8250-hexagonrpc; OpenXR test clients and tools in pico4-monado's tools.

Rules for this hardware

  • DSP recovery. remoteproc-boot starts a DSP only with remoteproc's crash recovery on: a crash then restarts only that DSP; with recovery off it would stay down.
  • No firmware commands. The station link (/dev/spidev0.0) also carries station and controller firmware updates (OTA), and the GD32 MCU (/dev/ttyHS1) also takes motor moves, calibration writes and firmware. The station modules, the IPD reader, pico4-lens and pico4-fan (cooling.md) build frames only from allowlists; keep it that way.
  • One owner for cameras and station. The OV7251s stream only while the station pulses FSIN, so every capture resets the station first. Stop pico4-monado.service (or Valve's session) before pico4-cam or pico4-station. The driver and pico4-station hold an exclusive flock on /dev/spidev0.0; a second owner is refused before it can reset the station, and a second runtime runs without controllers and cameras.

Inventory

The selected board overlay is kona MTP (dtbo index 7).

Function Hardware On PICO OS (kernel 4.19) Used on PICO OS by
Head IMU ICM-42688 (icm4x6xx: accel, gyro, temperature) and AK0991x magnetometer, on the SLPI Qualcomm Sensor Core (SSC), QMI over QRTR sscrpcd, sensors.qti, pvrtrackingservice
Tracking cameras 4 × OV7251 (640×480 mono global shutter) Spectra CSL (/dev/video0-3, no plain V4L2 capture) CamX + quickcamera HAL, pvrtrackingservice, pxrseethroughservice
Other cameras IMX471 RGB; OV680 bridge; eye-tracking nodes (Pro only) same Spectra stack see-through, MR services
Controllers nRF52832 radio ("station"), on SPI /dev/spidev0.0; /dev/stationdev (power, boot GPIO, sync IRQ) stationservice (libstationopticsservice.so)
Controller pose 20 IR LEDs per controller, seen by the tracking cameras cameras above pvrtrackingservice, libpico_controller_tracking
IPD motor GD32 MCU, also backlight and fan (cooling.md) /dev/ttyHS1 gd32ipdservice
Lens/display Sharp LS026B3SA ×2 msm_drm (graphics.md) pxrhmdservice

On this headset the DSP reports only the ICM-42688 and AK0991x, although the SSC registry also configures other boards' sensors.

Factory calibration

persist holds per-unit calibration:

  • pvr/mav0/cam0..cam4/sensor.yaml: EuRoC/Kalibr camera models (omni ξ + radtan, extrinsics T_BS to the body frame); pvr/mav0/imu0/sensor.yaml, pvr/gyroBias.txt (temperature table); the SSC registry's gyro and accelerometer calibration, which the DSP applies itself.
  • pvr/OpticalCalibrationData.json, pvr/lens/*, ipdcalidata.txt: display, lens and IPD data.
  • pvr/<serial>.txt: each paired controller's gyro bias table.

The image does not carry it: persist is mounted read-only at /mnt/vendor/persist at boot, and /usr/share/qcom/pico4/calibration/pvr and the sensor registry link there (userspace.md).

Monado driver

pico4-monado builds Monado 25.1.0 (pinned by commit) with only the pico4 driver and the simulated HMD. monado-pico4-driver.patch registers the driver and drops the storage usage from scratch images unless the compute path runs. The package makes Monado the active OpenXR runtime as a service (monado-service owns the hardware; clients are its IPC clients). The HMD (pico4_hmd.c):

  • Probing. Only where a remoteproc named slpi exists and the SNS service answers; sensor lookups are retried (five attempts of 3 s). Elsewhere Monado runs without the driver.
  • Time base. The arch counter is the QTimer (cntfrq_el0 = 19.2 MHz): the driver reads cntvct_el0 between two CLOCK_MONOTONIC readings (narrowest of 16 pairs) and maps samples into Monado's timeline, again every second (Frame times).
  • Axes. The IMU's +X is up, −Z forward, −Y right (from the factory camera extrinsics). Samples go into the OpenXR head frame (x right, y up, z back) as (−y, x, z).
  • 3DoF fusion. 1000 Hz (PICO4_IMU_RATE) into Monado's m_imu_3dof with gravity correction. It skips the first 100 accelerometer samples (about 2° off), starts level from the mean of the next 100, and learns the gyro bias over quiet 256-sample windows (std below 0.01 rad/s and 0.05 m/s², mean rate below 0.02 rad/s, |g| within 0.3 m/s²; later windows weigh 0.2).
  • Station. The HMD owns the controller radio: it power-cycles it once at start (the controllers reconnect, the camera sync starts). Without the station there are no controllers and no 6DoF.
  • Display. Two 2160×2160 views side by side at 90 Hz, opaque; field of view and distortion from the lens data, else a symmetric 104° without distortion.
  • Pose. While the head tracker tracks, the 6DoF pose (Head tracking); otherwise the 3DoF orientation.
  • Prediction. SteamVR asks for the present pose and extrapolates by the HMD's SecondsFromVsyncToPhotons (11 ms). The driver hands out the pose PICO4_PREDICT_MS (12 ms) plus the display's pacing lead later (the lead pico4-swapchain-usage writes to $XDG_RUNTIME_DIR/pico4-display-lead-us, 5 ms): a pose handed out just before the compositor takes one reaches the vblank 12 ms later. The latency probe (PICO4_LATENCY_PROBE_MS, headset lying still) turns the handed-out pose by 5° at known times, to read the delay off the scanned-out image. A 10 ms error is 2° at 200°/s.

pico4-openxr-pose [SECONDS] [INTERVAL_MS] (defaults 5 and 10) is the pose acceptance client: headless (XR_MND_headless), it locates VIEW and prints JSON (tracked counts, rotation, heading rate, tilt in STAGE, and with position tracking the path length and largest distance). Exit 0 means every location after the first second had a valid orientation.

Building it

PICO OS's files are the headset's own: the install takes them from its backup and writes them to the data partition (overpressure stock-files, installed-system.md); the DSP images come from its modem partition at boot. The same extraction, as folders, from the backup (building.md):

overpressure assets sensor-data stock-slam [--backup DIR]
sensor-data output Content (source partition)
firmware/slpi.mdt, slpi.bNN, slpi*.jsn sensor DSP image and protection-domain maps (modem)
sensors/config/*.json, sensors/sns_reg.conf sensor driver configuration and registry layout (vendor)
calibration/pxrconfig/SDK_Lens_ConfigFile.txt stock lens configuration with the chromatic aberration terms and the generic lens profile (system)
calibration/pxrconfig/SDK_Lens_Distortion_MatchConfigFile.txt PICO OS's table of lens batches, where the firmware has it (system)
calibration/controllers/led-models.json, aim-to-grip.json, lever-arm.json LED rings, grip transforms and lever arm from PICO OS's tracking libraries (system)
rendermodels/pico4_controller_*/ SteamVR render models from PICO OS's controller models (system)
manifest.json sources and SHA-256 of every file
stock-slam output Content (source partition)
firmware/cdsp.mdt, cdsp.bNN, cdspr.jsn the Compute DSP's image and protection-domain map (modem)
root/system/bin/bootstrap/linker64, root/system/lib64/bootstrap/ bionic's linker and C library (system)
root/system/lib64/ libSlam.so, the auto exposure, the depth mesh (libphotoid.so, SNPE) and what they link (system)
root/system/etc/pvr/config/ the tracker's configuration, lens-shading and gamma tables (system)
root/vendor/lib/rfsa/adsp/ the tracker's DSP modules (vendor)
root/vendor/dsp/cdsp/ the DSP's process shells (dsp)
root/vendor/bin/cdsprpcd, root/vendor/lib64/ the DSP's root listener (vendor)
manifest.json sources and SHA-256 of every file

The package pico4-slamd builds the tracker's programs and the stand-ins (build.sh) with clang and lld, atomics inline, after running its image-processing tests natively, against stand-ins of bionic's libc.so, libm.so and libdl.so (bionic-stubs.c); the binaries are the same as against PICO OS's own. The image's tracker root holds them and empty mount points for PICO OS's parts. The extracted data is proprietary: keep it private.

  • sm8250-hexagonrpc: hexagonrpcd from a pinned linux-msm commit plus this project's patches.
  • pico4-basalt: Basalt and its submodules at pinned commits.
  • pico4-monado: Monado plus the PICO 4 driver and its tools, beside the recipe; its build runs the driver's C tests (the userspace build uses --nocheck).

The host tests (python -m unittest) cover pico4-imu's encoding against a simulated DSP, the IMU acceptance limits, the orientation filter and the runner's validators.

Running it

OpenXR clients reach the driver through the Monado service, with Valve's session stopped (both own the same hardware). pico4-openxr-pose passes with orientation tracked and no invalid pose after the first second; pico4-openxr-display with frames at 95% of 90 Hz or better and at most 1% late. As root:

systemctl stop pico4-session.service
XDG_RUNTIME_DIR=/run/pico4-monado pico4-openxr-pose 10 10
XDG_RUNTIME_DIR=/run/pico4-monado pico4-openxr-display 10 [--projection-only] [--sky]
systemctl stop pico4-monado.service
systemctl start pico4-session.service

The driver reads its options from the environment of the process that runs it (monado-service or SteamVR's driver_monado), not the client's. For example, Basalt's trajectory as CSV from a headless session:

systemctl stop pico4-monado.service; mkdir -p /tmp/slam
systemctl set-environment PICO4_SLAM_BACKEND=basalt SLAM_WRITE_CSVS=1 SLAM_CSV_PATH=/tmp/slam/ XRT_COMPOSITOR_NULL=1
XDG_RUNTIME_DIR=/run/pico4-monado pico4-openxr-pose 30
systemctl stop pico4-monado.service
systemctl unset-environment PICO4_SLAM_BACKEND SLAM_WRITE_CSVS SLAM_CSV_PATH XRT_COMPOSITOR_NULL

Every variable the driver reads, with its default: driver settings.

Verified results

On the headset on Valve's kernel (kernel.md), lying still unless stated otherwise. The results of each part are on its page.

Check Result
OpenXR system Monado: PICO 4, runtime Monado(XRT) … v25.1.0; orientation and position tracking
Head pose, 3DoF, 60 s at 100 Hz none invalid after the first second; heading −0.0001°/s; tilt within 0.2° of the accelerometer
Latency, IMU sample to pose 0.94–1.16 ms
A Monado client while Valve's session runs refused the station before any reset, no cameras, the client fails in 3 s; Valve's session keeps controllers and tracker
Latency probe, compressed scanout, 89 flips/s pose handed out to the vblank that shows it 12–23 ms, 18 ms median; SteamVR extrapolates 10.6–12.1 ms
Head pose worn, standing still 0.035° RMS around its 200 ms average: the head's own motion (0.001° on a table)

Open work

See the issues.