frametop

Reference: power, pausing, voice, gaze, hands and VNC

These sections were split out of reference.md to keep it readable.

Displays off and sleep

SteamVR turns the displays off a few seconds after the headset’s proximity sensor says it came off. A stand or display mount that covers the sensor makes the headset seem worn, so its displays stay on, and Steam, which then counts someone as present, never puts it to sleep either.

power/ft-powerd goes by use instead. It runs in the dev container as frametop-power.service and starts with SteamVR. Once the headset has gone unused for DISPLAY_OFF_MIN minutes (0, the default, is never), it turns the displays’ backlight off, and it turns it back on at the next use. Use is any of these:

While SteamVR has the headset in standby, SteamVR owns the displays and ft-powerd waits. The backlight is /sys/class/backlight/ae94000.dsi.0/brightness, the same file SteamVR’s driver writes for standby. With the backlight off, tracking and rendering keep running, which lets the displays wake the moment the headset moves, but the headset still uses most of its power. ft-powerd puts the backlight back when it stops, and if it was killed with the displays off, the next start does (the value is kept in ~/.cache/frametop/powerd-brightness meanwhile).

Stay awake while plugged in is Steam’s own setting, When Plugged In and Idle → Sleep after (system_idle_suspend_ac_sec), set to Never. Frametop Display Settings changes it the way Steam’s Settings → Power page does, through Steam’s UI on its debugging port (display-settings/steam_settings.py), and keeps the value from before in STEAM_SLEEP_AC_BEFORE to put back when the switch goes off. The power button still puts the Frame to sleep, and Steam’s battery setting still applies.

power/build.sh && power/run.sh install
power/run.sh status        # "ok on|off|away <seconds unused> <timeout seconds>"
power/run.sh off | on      # the displays off now, or back on
power/run.sh log

Pausing for VR games

Paused, Frametop leaves the headset’s CPU and GPU to a VR game. The input relay does it (input/game_pause.py), since it’s the one part that always runs:

Resuming starts again only what pausing stopped, and plays a second sound. The pointer helper and ft-powerd keep running: they cost little, the helper is what says a game started, and stopping it would leave its virtual controller connected with its last pose.

Ways to pause and resume:

input/ft-pause on | off | toggle   # pause or resume
input/ft-pause status              # the state as JSON (the relay's "pause ?")
input/vrws.py 10                   # the controllers' buttons from vrserver's web socket, for 10 s
input/test/pause-test.py           # the gesture and the automatic pause, offline
input/test/pause-buttons-test.py   # a click held into a pause comes up, offline

The state outlives a relay restart, in /run/user/UID/frametop-pause.json. A desktop that starts while paused (a restart, an update) is told so the first time it reports to the relay, so it hides too instead of showing with the 3D mouse off. A SteamVR restart while paused starts the gaze service with it, and the relay stops it again when the pointer helper comes back.

Voice dictation

Frametop Voice (voice/, voice/README.md) types what you say where you type, recognised on the headset; nothing leaves it. voice/ft-voiced runs in Frametop’s container as frametop-voice.service (installed by voice/run.sh install, which install.sh offers, yes by default), starting at login. It records with pw-record and transcribes English live with Moonshine on the CPU; frametop-voice-whisper.service (whisper.cpp on the GPU, voice/whisper-run loads the model the settings choose) runs only while something uses it: wake word commands, or a language other than English. Its models, about 320 MB, are downloaded on install into ~/.local/share/frametop/voice/models (voice/models.sh: fixed URLs, checked by sha256).

The input relay does the keyboard side. Dictation’s keys are key combinations with the actions dictate (a press starts or stops) and dictate_hold (records while held; a lone modifier held to talk is kept from the desktop until another key makes it a shortcut, which drops that recording with cancel keyboard quiet); with Frametop Voice installed, the default key combinations add a Right Ctrl tap ("97": "dictate", Right Ctrl alone: a right-hand modifier’s own code is that key’s tap only). Like every tap, it doesn’t count with another modifier held, or with a key, click or scroll in between. The relay sends toggle|start|stop|cancel <source> [quiet] to @frametop_voice, and dictation works while Frametop is paused. ft-voiced sends its text back as type TEXT on @frametop_relay; the relay types it, one key every 4 ms, to ft-screens on the desktop’s keyboard layout (~/.config/frametop/kxkbrc, through libxkbcommon) while typing goes to the desktop, otherwise on its virtual keyboard with a US layout for Steam and games, and holds a character back while a modifier is held. Both sockets take these only from their own user. Frame controller buttons (left d-pad down, held, by default) are read by ft-voiced itself from vrserver’s web socket (input/vrws.py), so games still get them.

Frametop Input Settings’ Voice page turns it on and off and sets whether the dictation keys are tapped or held, the controller buttons and their mode (hold or press to toggle), the language and whisper model (one not yet there is downloaded, voice/models.sh model NAME), typing as you talk, sounds, and the wake word (off by default) and its phrases, in ~/.config/frametop-voice.json; the keys are on its Keyboard page. Wake word commands that run a program, and advanced settings, are edited in that file by hand (voice/README.md).

voice/build.sh && voice/run.sh install
voice/run.sh status          # the services, and ft-voiced's state as JSON
voice/ft-voice toggle        # start or stop dictation; also start, stop, cancel, type TEXT, wake on|off, events
voice/run.sh log
voice/models.sh check        # every model's sha256
voice/test/test_daemon.py    # typing through a stand-in relay, push-to-talk, offline

Gaze pointer (experimental)

In gaze mode the 3D mouse’s pointer goes where you look, and the mouse or the keyboard does the last bit. It needs the gaze service, which install.sh offers (yes by default) and gaze/run.sh install installs on its own: it builds it and runs gaze/ft-gazed as frametop-gaze.service, which starts with SteamVR. The service idles while the gaze isn’t used: its eye tracker reader and our own eye tracker run only while gaze mode is on and someone wears the headset, while a check or the calibration runs, or while the Gaze page of Frametop Input Settings is open, and stop 30 seconds after (gaze/README.md). Turn gaze mode on with the Gaze page of Frametop Input Settings, gaze/ft-gazectl on, POINTER_GAZE=1, or a button or key combination mapped to Gaze pointer on/off.

gaze/README.md has the details, our own eye tracker, and the gaze probe, a development tool.

Hand tracking (experimental)

It costs a lot of the headset’s CPU. install.sh offers it (yes by default, --no-hands skips it, and it needs sudo for ft-camd’s file capabilities), and a release brings ft-camd and ft-hands built in its image. Installed, it runs while the Frametop desktop does (HANDS_MODE=frametop).

Your hands show over the screens: where a tracked hand is between an eye and a screen, ft-screens lets that eye see the room through the screen (a round hole per hand, HANDS_MATTE=circle; mesh and capsules are the older shapes). ft-handview (frametop-handview.service) draws your hands as a 3D hand model posed by the tracking: over games and the void with Room View off, and over the hole with it on (HANDS_VIEW_ROOMVIEW=1, the default). HANDS_VIEW_MODEL picks the model: asset (the default), babylon, mrtk3, godot, mrtk2, robot (a robot hand built in code from the tracked skeleton: light shells, dark joints, cyan accents), or capsules for the older tubes; HANDS_VIEW_STYLE=ghost|solid the look. The models, in screens/assets/hands with their licences: the WebXR Input Profiles’ generic hand (asset; MIT, Copyright (c) 2019 Amazon), Babylon.js’s hand meshes by Patrick Ryan (babylon; CC BY 4.0, https://github.com/BabylonJS/Assets), MRTK3’s OpenXR hand (mrtk3; BSD-3-Clause, Copyright (c) 2025, Mixed Reality Toolkit Contributors), Godot XR Tools’ hands by DigitalN8m4r3 (godot; CC0 1.0) and MRTK2’s rigged hand (mrtk2; MIT, Copyright (c) Microsoft Corporation). The same tracker detects pinches and grips, and with POINTER_HANDS=1 in ~/.config/frametop.conf they work the pointer. In gaze mode your eyes aim and your hands click, Vision Pro style: a pinch clicks where you were looking as it began, and the hand ray stays off (POINTER_GAZE_HAND_RAY=1 brings it back beside the gaze). Pinch, hold and move the hand a few centimetres to nudge the pointer slowly onto the target, then let go to click there; the correction teaches the gaze tracker, as the mouse’s do. Pinch and hold still for half a second to press and drag with the hand. A middle pinch right-clicks the same way. Hold a pinch with one hand and pinch with the other to hold both buttons, left and right, each until its pinch opens. Without gaze mode a pinch is a press like the mouse’s button, so a held pinch drags. A grip (closing the hand) presses and drags. To install it: hands/run.sh install. With POINTER_HANDS=1 and gaze mode off, a bare hand raised and pointing also shows a ray that drives the pointer like a controller’s laser (it comes up as the thumb nears the index or middle tip; a pinch clicks, a middle pinch right-clicks or scrolls, a three-finger pinch scrolls, reaching out and in pushes and pulls a carried panel), a controller used recently takes over its own hand only, and during a paused VR game hand tracking is parked rather than stopped, waking when the dashboard opens. Details: hands/README.md, “Pinches and grips in the pointer”. When tracking goes wrong, ft-handsctl flag [note] (or a voice command through frame-voice, “flag that”) saves the last 12 seconds of hand crops and what the tracker made of them for the offline tools: ft-hands keeps them in RAM (HANDS_FLAG_BUFFER=1, about 50 MB), the drawn hands pulse cyan when a flag is taken (HANDS_FLAG_FLASH, HANDS_FLAG_TONE), and flags go to HANDS_FLAG_DIR. See hands/README.md, “Flags”.

Details, options, and the recording and replay tools are in hands/README.md.

Stereo wallpaper (experimental)

A picture per eye behind the windows on the docked screens, so a stereo photo has depth. Frametop Display Settings’ Screens page has it under Stereo wallpaper: pick one side-by-side picture (the left eye’s half on the left) or a left and a right picture, then turn on Picture per eye (the desktop has to be running). The pictures are scaled down to 2560 pixels and cover each screen, cut evenly off the long sides.

KWin draws the wallpaper and the windows into one buffer per screen, so Frametop can’t swap the wallpaper out underneath. Turning it on sets Plasma’s wallpaper on every desktop to solid magenta (255, 0, 255), and ft-screens draws each eye’s picture wherever a screen has that colour, through the hand cutouts’ GPU pass (about 0.13 ms of GPU time per eye for each new frame of a 3440x1440 screen, by the remote displays’ measure, docs/remote-displays.md). If that pass can’t start (ft-screens’ log says hand cutouts unavailable), the screens show plain magenta: turn Picture per eye off. Magenta darkened by a window’s shadow gets the picture darkened the same, so shadows fall on it. Turning it off puts back each desktop’s old wallpaper (kept in ~/.local/share/frametop/wallpaper/plasma-before.json, next to the pictures, left.ppm and right.ppm).

Remote desktop over VNC

With REMOTE=1 in the config (desktops.sh remote on), the desktop’s primary screen (the one with the taskbar) is also served over VNC, at that screen’s resolution, for RealVNC Viewer or macOS Screen Sharing. desktops.sh remote info prints the address and password.

It listens on port 5900 on the Frame’s Tailscale address only, not the LAN, so it needs Tailscale on the Frame (deck-tailscale). VNC authentication has no encryption of its own, so viewers warn about it, but the tailnet encrypts the traffic. The password is in ~/.config/frametop-remote/vnc-password and VNC limits it to 8 characters. To change it, delete that folder and restart the desktop.

No VNC server can capture KWin on SteamOS directly: krfb needs xdg-desktop-portal-kde, which SteamOS doesn’t ship, and wayvnc only works with wlroots compositors. So session/remote-desktop.sh captures the desktop with KDE’s krdpserver --plasma on 127.0.0.1:3390, and session/vnc-bridge.sh runs TigerVNC’s Xvnc on display :20 with a FreeRDP client inside it and serves that. Both run in the dev container, and the extra hop adds a little latency. krdp streams every screen; the VNC screen is the primary’s size, and the FreeRDP window is shifted so the primary fills it (ft-layout remote-view gives the offset). krdp’s own --monitor would stream just one screen, but it maps the pointer as if that screen sat at 0,0, so clicks would miss. When the layout changes, the VNC screen resizes and FreeRDP reconnects within a few seconds.

FreeRDP runs only while a VNC viewer is connected, because while it’s connected krdp captures and encodes every redraw. With no viewer, krdp has no RDP connection and so captures nothing, and Xvnc shows a black screen. When a viewer connects, the bridge starts FreeRDP, and the desktop appears about 3 seconds later; FreeRDP stops 45 seconds after the last viewer leaves (VNC_IDLE_SEC in the bridge’s environment). The bridge looks for viewers with ss whenever Xvnc logs something, as it does for every connection, and every 5 seconds otherwise. While a viewer is connected, the bridge asks ft-screens to draw every screen at full rate (watch 15 on @ft_screens, renewed every 5 seconds), so screens you aren’t looking at in the headset, or a headset on a stand, don’t stream at a low rate. It reads the primary screen’s place again (ft-layout remote-view) only while FreeRDP runs, after ~/.config/frametop/kwinoutputconfig.json or ~/.config/frametop-layout.json changes, and once a minute.

With remote access on, the nested KWin runs with KWIN_WAYLAND_NO_PERMISSION_CHECKS=1 and KWIN_SCREENSHOT_NO_PERMISSION_CHECKS=1, so any app in the Frametop desktop could capture its screens or inject input. The second one lets scripts take screenshots through KWin’s org.kde.KWin.ScreenShot2 D-Bus interface. This applies only to that desktop, not the stock one. Port 3389 is SteamOS’s own xrdp, which starts a separate X11 session rather than showing the VR desktop.