mirror of
https://github.com/DeeJanuz/frametop.git
synced 2026-10-06 01:00:06 +02:00
Session: AT-SPI watcher checks its buses every 5 seconds
Each check starts two gdbus processes (about 5.5 ms of CPU each on the Frame), so checking once a second cost about 1% of a core for as long as the desktop ran. On SteamOS 0.3.0 native activation fails, so the watcher always runs. A registry left behind now goes within 5 seconds instead of 1. design.md also says where the watcher matters: started from the VR launcher, the desktop runs in steam.service, which doesn't stop with it, so keep-apps.sh and the unit's stop don't clean up there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5e3323c188
commit
6df6f97937
2 files changed
+3
-2
No files matched your search
+1
-1
@@ -179,7 +179,7 @@ The session drops an inherited `AT_SPI_BUS_ADDRESS`, so apps cannot accidentally
|
||||
|
||||
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 once a second, and terminates and reaps only the child it started when either bus disappears or the watcher is stopped. `keep-apps.sh` keeps the watcher in the desktop unit. 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.
|
||||
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.
|
||||
|
||||
|
||||
+2
-1
@@ -40,7 +40,8 @@ def run_registry(address, session):
|
||||
call(address, DBUS, DBUS_PATH, DBUS + ".GetId")
|
||||
except subprocess.SubprocessError:
|
||||
break # Normal session shutdown or loss of its accessibility bus.
|
||||
time.sleep(1)
|
||||
# Each check starts two gdbus processes, and SteamVR needs the CPU.
|
||||
time.sleep(5)
|
||||
finally:
|
||||
stop(registry)
|
||||
|
||||
|
||||
Reference in new issue
Block a user