These sections were split out of design.md to keep it readable.
The session is modeled on SteamOS’s steamos-nested-desktop and runs beside it. It has its own runtime directory, config (~/.config/frametop), and state, so it never disturbs the stock desktop’s layout or panels. It runs on a private D-Bus from dbus-run-session, which has two consequences. KDE only launches apps in systemd scopes when systemd is on the session bus, so everything started in the desktop lands in its systemd unit, and stopping the unit would kill all of it; session/keep-apps.sh moves those programs out first. And tools that need the real user bus, like podman and distrobox-host-exec, have to be pointed at it explicitly. systemctl and systemd-run are pointed at it for you: the session links them to session/ft-userbus in its own bin folder, which runs them with the real runtime directory and bus, so systemctl --user works in a terminal there while the shell and its apps keep the desktop’s. Its own config folder also hides SteamVR’s path registry (~/.config/openvr/openvrpaths.vrpath) from everything started in it: OpenVR programs there fail with VRInitError_Init_PathRegistryNotFound, and vrpathreg adddriver writes a new registry under ~/.config/frametop/openvr that has no SteamVR in it and that SteamVR never reads. So Frametop’s scripts run SteamVR’s tools with XDG_CONFIG_HOME=~/.config.
The VR launcher starts the session from the Steam client, and the client’s environment came along: LD_LIBRARY_PATH pointing at Steam’s own runtime, whose libavcodec has no H.264 decoder, so VLC in the desktop couldn’t play most videos, plus the client’s overlay and launch settings. The session script drops the client’s variables before it starts anything. SteamOS’s global Mesa settings (/usr/share/deckard/mesavars.sh) stay, and the gamescope session’s Vulkan layer (ENABLE_GAMESCOPE_WSI) is only kept for the gamescope backend.
The session drops an inherited AT_SPI_BUS_ADDRESS, so apps cannot accidentally use the host desktop’s registry. It autostarts session/ft-atspi in Plasma phase 2, after KWin has set the nested display environment. The helper gets the live accessibility address from org.a11y.Bus on the private session bus, preserves any existing registry owner, updates the accessibility bus’s activation environment, and tries StartServiceByName first.
On SteamOS 0.3.0 with at-spi2-core 2.52.0, the native launcher can choose dbus-broker because its process belongs to a systemd user unit. Registry activation then fails: this desktop’s private session bus does not have a systemd activation manager. In that case the helper starts only at-spi2-registryd on the already-existing accessibility bus. The registry refuses duplicate ownership. Unlike native activation’s --use-gnome-session, the fallback does not try to register with GNOME’s session manager; that flag did not explain the observed native activation failure.
The fallback registry does not exit merely when its bus disconnects in the isolated SteamOS test. Its small watcher checks both private buses every 5 seconds, and terminates and reaps only the child it started when either bus disappears or the watcher is stopped. Each check runs gdbus twice; once a second, that cost about 1% of a core. keep-apps.sh keeps the watcher in the desktop unit when desktops.sh start runs the desktop as frametop-desktop. Started from the VR launcher, the desktop runs in steam.service, which doesn’t stop with it, so there the watcher is the only thing that stops the registry. There is no second accessibility bus, global systemd environment update, process-name kill, or host registry replacement. Missing accessibility files or bus errors are nonfatal; the desktop still starts. Toolkit-specific accessibility opt-ins and pointer snapping are separate work.
Run the isolated checks on the host with /usr/bin/python3 session/test/test_accessibility.py. They use private D-Bus buses, Xvfb and a GTK3 app, never the production display or input. Native activation uses a small org.a11y.Bus test provider pointing to a real private dbus-daemon with the installed registry service; the SteamOS fallback uses the installed bus launcher and broker. The tests check real app-tree discovery, existing owners, concurrent starts, session stop/restart, and teardown. They require test-only PyGObject (Gio and GTK3), Xvfb, and at-spi2-core; the runtime helper uses Python’s standard library and the existing host gdbus. Actual Plasma autostart and VR desktop restart still require an approved hardware test.
The private bus keeps the desktop’s notifications in it: apps notify Plasma, and Plasma’s popups appear on the desktop’s screens, whose panels may be hidden, or behind a VR game. Putting the desktop on the user bus instead would collide with the Steam session: Steam owns org.freedesktop.ScreenSaver there, the Steam session’s portals and accessibility bus are there, Plasma would start its parts as units of the user’s systemd and push its environment (DISPLAY, WAYLAND_DISPLAY, its runtime directory) into the bus’s and systemd’s activation environment, which programs started later in the Steam session would inherit.
session/ft-notifyfwd forwards instead. Taking org.freedesktop.Notifications from Plasma isn’t reliable: plasmashell, the bus’s “D-Bus master”, registers it with ReplaceExistingService and DontAllowReplacement (plasma-workspace’s libnotificationmanager/server_p.cpp), so another owner only keeps it by starting first, and loses it to a Plasma restart in between. Plasma 6.2.5 has a watcher API for this: org.kde.NotificationManager.RegisterWatcher on Plasma’s notification object, after which Plasma calls org.kde.NotificationWatcher.Notify (its own id first, then the spec’s arguments with the body as sent and the app’s hints, image data included) and CloseNotification on the watcher’s /NotificationWatcher, and InvokeAction(id, key), which makes Plasma emit ActionInvoked to the app. The app only accepts that signal from its notification server’s owner, which is why a click has to go back through Plasma. The helper copies each notification to the user bus’s server keeping the hints’ D-Bus types, maps the two servers’ ids (a replacement reuses Plasma’s), and maps that server’s ActionInvoked to InvokeAction. Its NotificationClosed with reason 2 (dismissed) closes the notification in Plasma, so the app sees it closed (as revoked, reason 3); an expired one stays in Plasma’s history. While it forwards, it holds an Inhibit on Plasma, which turns its popups off as Do not disturb does, and ends with the helper’s connection; watchers get every notification regardless. It follows both servers’ owners: it registers and inhibits again when Plasma restarts, and in auto mode checks GetServerInformation whenever the user bus’s server changes. SteamOS’s steam_notif_daemon reports itself as simple_notif_daemon; it passes notifications to ~/.steam/root/ubuntu12_32/steam with a steam://open_xdg_notification URL, an x86 program that can’t run on the Frame, and the Frame’s Steam client ignores that URL anyway, so forwarding there would lose them. The helper is event-driven (GLib’s main loop, PyGObject), so it costs nothing between notifications, and exits when the desktop’s bus closes.
Notifications sent through the notification portal (org.freedesktop.portal.Notification.AddNotification, as Flatpak apps do) reach the watchers too: xdg-desktop-portal-kde passes them to Plasma’s Notify. Plasma sends no activation token with InvokeAction, so KWin’s focus stealing prevention may keep a window that an action raises from coming to the front. KDE’s inline reply needs the inline-reply capability from the other server; without it, it’s an action like any other.
Run the isolated checks on the host with /usr/bin/python3 session/test/test_notifyfwd.py. Two private buses stand in for the desktop’s and the user bus, with a fake Plasma (the watcher API, Inhibit) on one and a fake notification server on the other. They check forwarding with the hints’ types, actions coming back, dismissed and expired notifications, replacements and closes mapping ids, auto skipping simple_notif_daemon until another server replaces it and giving Plasma its popups back when none is left, registering again after a Plasma restart, exiting with the desktop’s bus, and doing nothing outside the Frametop desktop.
Firefox and Chromium (and GTK apps) draw their own title bar, and they showed only a Close button in the desktop while showing minimize, maximize, and close when started from the SteamVR dashboard. Both take the buttons from GTK’s decoration layout (gtk-decoration-layout), and GTK reads it from a different place in each. From the dashboard, the app runs in gamescope as an X11 client; GTK reads XSETTINGS there, gamescope has no XSETTINGS manager, and GTK’s built-in default, menu:minimize,maximize,close, applies. In the desktop, the app is a Wayland client of KWin, and a Flatpak app reads the layout from the Settings portal, as org.gnome.desktop.wm.preferences button-layout. On Plasma, kde-gtk-config copies KWin’s button order there and xdg-desktop-portal-gtk serves it (kde-portals.conf asks for Settings from kde;gtk;). SteamOS ships neither, and the KDE backend doesn’t serve that key, so GTK fell back to GSettings in the sandbox and got GNOME’s default: appmenu:close in Freedesktop runtimes, menu:close in GNOME 51. Neither the menu nor the app menu is drawn there, which left Close.
session/ft-gtksettings is a Settings portal backend (org.freedesktop.impl.portal.Settings, version 1) that serves only that key. It makes the layout from kwinrc’s ButtonsOnLeft and ButtonsOnRight (KDecoration’s defaults MS and HIAX), mapping the letters as kde-gtk-config does (M icon, I minimize, A maximize, X close; the rest have no GTK button), watches kwinrc and emits SettingChanged when the result changes, and writes the same value to the desktop’s own GSettings (its dconf database is under ~/.config/frametop), which GTK apps outside Flatpak read. xdg-desktop-portal 1.18.4 reads backends from a single folder, XDG_DESKTOP_PORTAL_DIR or /usr/share/xdg-desktop-portal/portals, and, with the variable set, reads portals.conf from that folder only (the user config folders are skipped). So the session script builds one in its runtime folder: links to the system’s .portal files, frametop.portal, and a copy of kde-portals.conf with Settings from kde;frametop;. The portal merges ReadAll across backends and takes Read from the first that has the key, so KDE’s appearance settings come through unchanged. The helper’s D-Bus service file is in $XDG_RUNTIME_DIR/frametop/share/dbus-1/services, a folder the script puts on XDG_DATA_DIRS, so only the desktop’s bus can start it.
Run the isolated checks on the host with /usr/bin/python3 session/test/test_gtksettings.py: a private bus, a temporary kwinrc, and GSettings’ memory backend. They check the default and a configured order, the ReadAll filter, NotFound for other keys, the signal on a change and none on a save that changes nothing, the version property, and exiting with the bus.
Steam, not systemd, suspends the Frame: after system_idle_suspend_ac_sec (an hour by default) without input on AC power, it logs Switching to power state: k_ESystemPowerState_Sleep and suspends, even while charging. It’s a Steam setting (Settings → Power → When Plugged In and Idle → Sleep after), which the Stay awake while plugged in switch in Frametop Display Settings sets to Never. SteamVR’s standby, which turns the displays off when the headset comes off, is separate; see below.
Flatpak apps need XDG_DATA_DIRS to include Flatpak’s exports, or Plasma opens Discover instead of launching them, so the session sources /etc/profile.d/flatpak.sh.
The private runtime directory also moves the session’s document portal to $XDG_RUNTIME_DIR/frametop/doc, and that broke saving and uploading in Flatpak apps. The file picker (xdg-desktop-portal 1.18.4 on SteamOS) gives a sandboxed app the host path of the file it picked, /run/user/1000/frametop/doc/ID/NAME. Inside the sandbox the portal is at /run/flatpak/doc, and /run/user/1000 is a private per-app folder (.flatpak/APP/xdg-run in the runtime directory). So Brave created the missing folder there, “finished” the download into it, and the file vanished when the session cleaned up. The session script now links that path to /run/flatpak/doc in each installed app’s folder before Plasma starts. Upstream xdg-desktop-portal fixed this after 1.22.1 (commit 69ba5e1) by handing Flatpak apps /run/flatpak/doc paths, after which the links go unused.
A podman container’s monitor process (conmon) stays in the cgroup of whatever started the container, and distrobox enter starts it on demand. When a Frametop service happened to start the dev container, stopping that service stopped the container and everything in it, including the desktop’s compositor. scripts/container-up.sh starts the container in a systemd scope of its own before anything enters it. It then waits for distrobox-init to log container_setup_done, as distrobox enter does only for containers it starts itself. A new container’s first start takes a minute or more (it installs distrobox’s dependencies and sets up passwordless sudo), and an install that entered right away met a sudo password prompt with no terminal to answer it (#9).
KWin renders with OpenGL through zink on Turnip, Vulkan on the same GPU vrcompositor needs to hit its frame time, and on the Frame that costs CPU too. The nested session started with KWin’s defaults: blur and background contrast on (no [Plugins] group in its kwinrc) and animations at full length. Blur re-renders what’s behind every translucent panel and menu each time it changes, and every animated frame is one more frame for KWin and ft-screens to draw and send. They’re off by default in the Frametop desktop. The session script writes them before KWin starts, only where the desktop’s own config has no value, once: System Settings deletes a setting put back to KDE’s default rather than writing it, so without the marker in frametoprc a user who turned blur back on would lose it at the next start. The effect ids (blur, contrast) are the ones built into KWin 6.2.5 on SteamOS; KWin reads <id>Enabled from [Plugins].
The nested session also runs the system’s XDG autostart entries, being a KDE session. Discover’s update notifier started plasma-discover --mode update in it (520 to 620 MB resident and about 9% of a core, plus flatpak-system-helper and AppStream downloads), and IBus started a daemon, the kimpanel panel and its GTK extension that nothing can use: KWin hands text input to the one input method it starts (ft-textinput), and the session drops QT_IM_MODULE, GTK_IM_MODULE and XMODIFIERS. Steam’s entry (steam -silent, from steamdeck-kde-presets) reached the running Steam client as a command line it ran (ExecCommandLine in its console log), since the desktop starts from Steam; SteamOS 0.4 added -vrdisable -deckard to it, for Desktop Mode, where Plasma starts Steam itself. The session hides all three for this desktop only, with Hidden=true copies in its own autostart folder. The geoclue demo agent stays: it’s what answers apps’ location requests to Geoclue outside GNOME, and it costs nothing while idle. Orca’s entry only starts in GNOME-family desktops.
Plasma 6.2.5 keeps each panel on a screen number (lastScreen in plasma-org.kde.plasma.desktop-appletsrc), and the numbers rank the enabled outputs by priority, so 0 is the primary screen. A panel whose number is past the screen count gets no view, and Plasma never moves it: the remap it runs at every start only moves a panel whose number has no desktop, and this desktop keeps a desktop for every output it has seen, spares included. So the taskbar was lost when the number of screens went down, and once it was found saved on a spare output, number 8 of a desktop with three screens (#18). Before Plasma starts, the session runs session/fix-panels.py, which moves any panel numbered past the screen count, with its system tray’s containment, to screen 0, keeping its widgets and settings. A panel stays put when screen 0 already has one on that edge, and comes back by itself if the screens do. Before each repair the file is backed up to <file>.ft-bak.last. <file>.ft-bak keeps it as it was before the first repair and is never overwritten. The repair writes over a moved panel’s old screen number, so the backups are the only record of it, and .ft-bak.last also keeps everything changed since the first repair. Plasma’s scripting can’t do this while it runs (panel.screen is read-only in 6.2.5), so a lost taskbar comes back at the desktop’s next start. scripts/doctor.sh and scripts/report.sh list the panels and their screens.
Remote desktop is a chain (krdp, then FreeRDP inside Xvnc) because nothing on SteamOS serves KWin over VNC directly. Kept connected all the time, it cost about a core with nobody watching: krdpserver 55 to 78% (it encodes H.264 in software with openh264: VA-API finds no driver for the Frame’s GPU in the container), FreeRDP 16 to 27%, Xvnc 6 to 11%, and the bridge’s layout check every 5 seconds another 4%. krdp creates its screencast session per RDP connection and drops it when the connection closes (SessionController::onNewConnection in krdp 6.7), so an idle krdpserver costs nothing and can stay up; only the RDP connection has to go. The bridge connects FreeRDP when a VNC client appears and disconnects 45 seconds after the last one leaves. Xvnc has no hook for its clients, so the bridge counts established connections to its port with ss, woken early by Xvnc’s log output; looking with ss once a second cost about 0.9% of a core in bash, against about 0.1% this way. Xvnc -inetd from a systemd socket would start a server per connection and lose sharing between viewers. The layout check (ft-layout remote-view, which scans /proc for plasmashell and runs kscreen-doctor -j) now runs only while FreeRDP runs, and then only after kwinoutputconfig.json or frametop-layout.json changes, with one check a minute in case a change touched neither.
KWin 6.2.5 can crash while Plasma logs out (a SIGSEGV in its libei backend’s teardown, with a Deskflow client connected), and kwin_wayland_wrapper then starts a fresh KWin with no Plasma left to end it: a black desktop that never goes away. The session script watches for this. It finds Plasma’s session manager (ksmserver) once it has started, waits for it to exit with waitpid, and if the session’s KWin wrapper is still running 9 seconds later, ends it, which ends the session. Looking for ksmserver with pgrep every 3 seconds instead cost about 1.3% of a core (38 ms a look). scripts/update-check.py has a retest hint for KWin updates: if logout with Deskflow no longer crashes, the watcher can go.
Program names stay within 15 characters, because Linux truncates process names there and the scripts find programs with pgrep -x and pkill -x. That’s why the prefix is ft-.
SteamVR decides the headset is off from its proximity sensor, which the driver reads through the DSP, and turns the displays off 5 seconds later. On a display mount that covered the sensor, that never happened: SteamVR kept the headset in use all night (no entering standby for device 0 in vrserver.txt, and XRService’s user presence stayed at 1), and Steam didn’t sleep either, because its idle count treats a present user as active. The battery went from 100% to 12% overnight on a 5 V, 3 A charger, with the headset drawing about 17 W.
There’s no client call that puts the headset in standby. The cv driver’s teststandby debug request (IVRDebug::DriverDebugRequest) only answers “Standby unknown hmd” on the Frame. But what the driver does for the displays in standby is write /sys/class/backlight/ae94000.dsi.0/brightness (“cv: Set displays off” writes 0, “Set displays on” the old value), and the video group can write that file, from the container too. So ft-powerd goes by use instead of the sensor and turns the backlight off itself. Tracking and rendering keep running. Turning the backlight off moved the battery current by only about 75 mA (0.5 W), so they’re most of the load, but they’re also why the displays can wake the moment the headset moves.
Movement is judged within 10-second windows. On the mount, the head pose jittered within 0.5 mm and 0.1 degrees over 20 seconds, and its position drifted 1.7 mm (0.16 degrees) in 4 minutes. Compared with a fixed reference, that drift would count as movement sooner or later and keep the displays on; within 10 seconds it never reaches the 5 mm and 0.5 degree thresholds, and anyone wearing the headset passes them now and then.
Staying awake while charging uses Steam’s own setting rather than a logind sleep inhibitor. Steam suspends with dbus-send ... login1.Manager.Suspend boolean:true, and a block inhibitor does stop that (CanSuspend answers “challenge” while one is held), but it stops the power button too. system_idle_suspend_ac_sec is field 24004 of Steam’s CMsgClientSettings. In Steam’s SharedJSContext, reachable over CDP on port 8080 because Steam runs with -cef-enable-debugging, SteamClient.Settings.SetSetting takes a change as a base64 protobuf, the way Steam’s Power page sends it (0 is never), and settingsStore.clientSettings has the current values.
Hiding the screens during a game kept them out of view, but Frametop kept using the headset. Measured on 2026-10-02 with gaze mode off and no game running, in shares of one core: our eye tracker (ft-eyes) about 60%, ft-eyegrab, ft-gaze and ft-gazed about 3 to 4% each; remote desktop (krdpserver, FreeRDP, Xvnc) about 2 cores while it ran; KWin about 13%, ft-screens about 4%. The gaze service ran at full rate whether gaze mode was on or not; now it idles while the gaze isn’t used (gaze/README.md), and pausing stops it outright. Reading SteamVR’s eye tracking 90 times a second also made it restart every 10 to 13 seconds during Beat Saber, and each restart took input focus from the game, which paused it (PR #13; since then ft-gaze skips SteamVR’s gaze action during games, but our own tracker kept running). So pausing stops what costs the most and leaves windows where they are.
Data too big for buffer). They also sit in different cgroups (KWin under steam.service when the VR launcher starts it, ft-screens in the dev container’s), so no single freeze stops them together.steamvr/globalActionSetPriority) takes the buttons it binds from the game. vrserver’s web socket on 127.0.0.1:27062, which its controller binding page uses for the live view, reports every controller component whatever has focus, and reading it takes nothing. The game sees the clicks too, so the default is a gesture games hardly use: both thumbsticks, together, twice. “Together” means within 0.3 seconds of each other, so a stick held down to sprint while the other clicks doesn’t count. The stream is about 160 messages a second, nearly all capacitive sensing, so the reader parses only the few that mention a gesture’s button. A controller’s root path changes while the 3D mouse holds its hand role (/devices/cv/<serial> instead of /user/hand/right), so the reader looks the controllers up again (an HTTP request to vrserver): when the relay’s 3D mouse connects or lets go, when a message comes from a device it doesn’t know, and every 30 seconds. It used to be every 3 seconds.systemd-run --scope: started straight from the relay, it would join the relay’s cgroup and end with the next relay restart.On the Frame, SteamVR is part of the OS image (/opt/steamvr, the deckard-steamvr-rel package), next to KWin, gamescope, and the kernel, so every SteamOS update can bring a new SteamVR too. Frametop survives updates: it lives in the home folder and the dev container, the Bluetooth fixes are in /etc, which SteamOS keeps across updates, and nothing goes into /usr. What an update can break is what Frametop uses from the image. The public OpenVR API is versioned and stays put. The rest is less certain: IVRIPCResourceManagerClient, which is newer than the header SteamVR ships; the text vrcmd --overlays prints; the eye tracker’s shared memory layout; XRService’s camera buffers; KWin’s nested backend; and behavior Frametop works around, such as the SteamVR Settings page that ComputeOverlayIntersection can’t find or the scale KWin’s nested backend doesn’t undo.
scripts/update-check.py, which scripts/doctor.sh runs, checks what it can directly: that SteamVR still serves every OpenVR interface version the installed programs were built against (read from the binaries), that vrcmd’s format still parses, that the eye tracker’s shared memory still has a layout ft-gaze knows (SteamOS 0.3’s, or 0.4’s, with every field from the timestamp on 5 bytes later), by the same test ft-gaze uses to pick one, and the host files, services, sockets, and driver registration. Behavior can’t be checked without someone in the headset, so it records the versions of the packages that matter once things work (--mark-good), and after an update names what changed and what to try by hand.