Compare commits

...
Author SHA1 Message Date
spoopyghosty0 7a40e47e67 FramePort 0.11.0 2026-10-06 00:21:37 -04:00
spoopyghosty0 9401b7fc87 Accounting+ works (owner-verified 2026-10-06: the motion warning continues with the click emulation); catalog entry needs FramePort 0.10.1 2026-10-06 00:18:20 -04:00
spoopyghosty0 e510ea88f0 ovrpshim: log ovrp_GetNodePresent for Unity's built-in XR input and report a hand node present while its Touch controller is connected (BattleSisters: Unity's XR controller devices, which its buttons are read from, never appeared) 2026-10-06 00:17:25 -04:00
spoopyghosty0 4c2b6c9dee Start-up recursion (GitHub #58): library.load() refreshes recipes from the catalog, and the catalog's first load read its auto-update setting through library.load(), which refreshed recipes again before the catalog was cached (~140 nested loads: a long blank window, or a crash in the Windows bundle). The setting is read as stored (library.peek_setting) and the catalog step can't re-enter itself 2026-10-06 00:17:14 -04:00
spoopyghosty0 cb689c576a ovrpshim: Touch trigger or A/B/X/Y presses count as Unity mouse clicks (GetMouseButtonDown icall replaced): Accounting+'s motion warning waits for a click Lepton never delivers; input probe logs trigger/grip values 2026-10-06 00:06:18 -04:00
spoopyghosty0 bd2e1a8410 unity_oculus_check revision 3: Unity's built-in Oculus input creates Touch controllers only on device model 'Oculus Quest'; Lepton's Android is 'Valve Lepton', so the compared string is repointed in place (BattleSisters: hands tracked, buttons dead although OVRPlugin reported every press) 2026-10-05 23:39:53 -04:00
spoopyghosty0 608fac9d68 unity_oculus_check: the input probe can be switched on for a diagnostic build (FRAMEPORT_INPUT_PROBE=1) 2026-10-05 23:18:14 -04:00
spoopyghosty0 919c0e291e focus_hold on by default with 5 s (the Frame's wear sensor flickers "HMD off" for 0.5-2 s while worn and Quest games pause each time; Lucky's Tale); Unity 2019 games on the built-in VR loop (no Oculus XR Plugin) get the ovrpshim frame wait (BattleSisters flooded 'outside of frame bounds' and hung the GPU); frame.ovr_trace: opt-in Meta Platform SDK request tracer (native/ovrtrace) for games stuck waiting (Vader Immortal, GitHub #49); catalog: I Am Cat pose_consistency, Lucky's Tale haptic_fix, The Room VR (all owner-verified) 2026-10-05 22:02:06 -04:00
spoopyghosty0 23f4192cfd Game page offers a newer catalog config for recipes the user edited (GitHub #10: a saved Game settings dialog stopped catalog fixes; saving without a change no longer marks the recipe as the user's); launch tests fail when frames stop while the process lives on (frames-stopped) and on Unity render-thread crashes in the GL driver (unity-render-crash) 2026-10-05 21:03:02 -04:00
spoopyghosty0 3391a981b8 Unity fixes from the 2026-10-05 headset round: unity_runtime_msaa_off also no-ops QualitySettings.set_antiAliasing; frame.unity_no_overlay_copy (The Room VR: OVROverlay's fade copy crashed Zink; works now); unity_oculus_check also for Unity 2019 without the frame-wait shim (BattleSisters starts VR; then a GPU lockup); frame.unity_gl_shim + gl_hide_msrtt (GL shim reads every settings source); xrshim converts haptic amplitude envelopes before OVRPort's dispatcher (haptic_fix; GitHub #9, found by Klownicle); FrameBridge pose_consistency (GitHub #8, proposed by Klownicle) 2026-10-05 20:55:36 -04:00
43 changed files with 2151 additions and 99 deletions

No files matched your search

+25 -1
View File
@@ -413,7 +413,7 @@ GPU. Learned in the headset: quads can't be a background (the Frame draws quad l
whatever the order: hid 4XVR's balcony/controllers), and the Frame doesn't reproject a projection layer from its own
pose (images drawn only after head turns, or ahead from xrWaitFrame and sometimes late, wobbled);
`equirect_flip/face/res/fps/stereo`), `stable_local`, `focus_hold` (only after 3 s FOCUSED, dips <600 ms),
`aim_pitch/aim_yaw/aim_forward`, `refresh_rate`, `layer_debug` (diagnostics). 4XVR re-creates LOCAL spaces every 2–4 s
`aim_pitch/aim_yaw/aim_forward`, `refresh_rate`, `layer_debug` (diagnostics); focus_hold is default-on since 2026-10-05. 4XVR re-creates LOCAL spaces every 2–4 s
(menu recentring suspect); its theatres are baked 7680×3840 equirect2 images (`assets/100.png` …). Test 360° videos
(NASA, public domain) are in the Frame's ~/Videos; copies in `~/Downloads/frameport-360`. 4XVR's "Internal Storage"
lists its own `/sdcard/4XPlayer`, not Movies: agent v25 `link_media` hard-links sent files into an app's own top-level
@@ -535,6 +535,30 @@ Steam placeholder set (no Steam art at all) → fixed in artwork/steam.py.
**Start activity / QuestCraft / ITR2 pop-in (2026-10-05):** WiiCompiled's VR part (`QuestActivity`, SDL, process `:game`) stays behind Lepton's flat window when the launcher is shown (`device.text_input_window`). `frame.start_activity` (opt-in; analysis `extra.vr_activity` = the original APK's activity with Meta's VR category when it isn't the launcher) gives that activity's filter LAUNCHER and every other LAUNCHER becomes INFO, per element (`axml.set_start_activity`); Lepton's own `apk-info-extractor --print-activity-name` (on the Frame under Lepton/liblepton/apk_extractor) then answers QuestActivity. **OVRPort gives every MAIN activity LAUNCHER + VR categories**, so the VR activity must come from the original APK's analysis, not the converted manifest. Lepton has no activity override (`APP_ACTIVITY` is reset when app_metadata.sh is sourced). QuestCraft reaches Minecraft 1.21.5 (Fabric, Vivecraft, Sodium; LTW "Large Thin Wrapper" GL 3.0 on the Frame's Zink) and stops at `OpenGL error 1282` in `WindowFramebuffer` createTexture (Minecraft's crash report in `files/instances/1.21.5/crash-reports/`, Pojlib's `files/latestlog.txt`); the vrclient SIGSEGV / "pthread_mutex_lock called on a destroyed mutex" afterwards is only the shutdown (Unity's render thread still in vrclient while the instance is destroyed). ITR2 "models popping in and out" in game: Unreal reads user config from **internal** storage (`lepton-data/internal/<pkg>/files/UnrealGame/<Project>/<Project>/Saved/Config/Android/Engine.ini`, not external); `r.AllowOcclusionQueries=0` there broke its menus (removed again). Vulkan shim `vk_query_slots` (two slots per occlusion query) never saw ITR2 create an occlusion query pool, and the run with it crashed (Unreal RenderThread SIGSEGV, caught by sentry-native: no tombstone; the backtrace is in `cache/sentry/*/.sentry-native/*.run/*.envelope` with module offsets) - left off. Next suspect: Unreal 5 mobile HZB occlusion reading depth stored with Valve's FDM injection layer; test = launcher `VK_INSTANCE_LAYERS=''` (Lepton then loads neither VALVE_rpo nor VALVE_fdm_injection, Fossilize still). QuestCraft: LTW overrides glGetError and returns 0 with `LIBGL_NOERROR` set; Lepton passes `LEPTON_ENV_<NAME>` to the app as `<NAME>`, so catalog `lepton_env: {LEPTON_ENV_LIBGL_NOERROR: '1'}` gets Minecraft past the GL error 1282; then black picture (see the catalog entry). FrameBridge logs `new layer` once per layer type per process and projection views only for the first frames, so a second session in the same process (Vivecraft after Unity) needs `layer_debug=1`.
**Vulkan validation / ITR2 solved (2026-10-05):** Khronos' validation layer can't come from Lepton (its layer dir is in the read-only guest image; the Linux copies on the Frame are glibc) and a global `debug.vulkan.layers` property (via the LEPTON_GFXRECON_FP_PROPS trick) kills the container at boot. Working recipe: bundle `libVkLayer_khronos_validation.so` (Khronos android-binaries release, arm64-v8a, stored uncompressed) into a test APK re-signed with the game's key (`apk.sign.sign`), install with `frameport install <pkg> --apk`, and set the Vulkan shim's `vk_validation=1` (it adds the layer at vkCreateInstance; findings under the logcat tag VALIDATION in launch.log, each message ID capped at 10). ITR2's flicker + windows behind models = Unreal's Qualcomm shader-resolve subpasses with a depth resolve of a single-sampled depth attachment (VUID-04908/-03179); `vk_spec_fixes=1` drops that resolve (its TRANSFER_DST half never applies to ITR2: the main depth is transient). Valve's VALVE_rpo layer removed ITR2's fog (catalog `lepton_env: VK_INSTANCE_LAYERS: VK_LAYER_VALVE_fdm_injection`). `r.ViewDistanceScale=2` in the internal Saved/Config/Android/Engine.ini only exists on the owner's Frame (the catalog can't write internal storage yet). Launch tests: Lepton prints a transient "is not a running context" on the first start after an APK change (agent v54 `not_started` waits 30 s for "Boot complete!").
**GitHub #38/#39 (2026-10-05):** PowerWash Simulator stuck at "Waiting.." on a reporter's Frame = Unity sized the right-eye image rect past its swapchain (rect 268+1656 on a 1920-wide swapchain; the runtime's recommended size differs per Frame) and SteamVR rejected every frame (`xrEndFrame failed -25`, XR_ERROR_SWAPCHAIN_RECT_INVALID), after which the game stopped calling xrEndFrame. FrameBridge `rect_clamp` (default on; sizes noted in xrCreateSwapchain; clamped layers count as swapped) keeps projection/quad rects inside their swapchain; triage `swapchain-rect-invalid`. Not reproducible on the dev Frame with `scale` (Unity's eye sizing isn't just the recommended width); no regression there (72 fps). The adapter's revision was NOT bumped (that would mark every installed game outdated): affected users rebuild. The Room VR (#38) = Unity's render thread SIGSEGV in libgallium_dri.so ~30 ms after the game recreates its eye swapchain with samples=4 (FrameBridge retries samples=1); the game's own code turns MSAA on (not OVRManager); candidate fix: hide GL_EXT_multisampled_render_to_texture (GL shim) - needs the APK to test. The launch test passed both (render thread dead / no frames): triage gap.
**Headset round 2026-10-05 (evening):** I Am Cat's judder = repeated xrLocateViews of one display time returning
slightly different poses → FrameBridge `pose_consistency` (owner-verified, works). Lucky's Tale freeze on touching a
save slot = OVRPort's OpenXR dispatcher converting XR_FB_haptic_amplitude_envelope with ns read as s (GitHub #9) →
xrshim `haptic_fix` (owner-verified); its remaining short pauses were the wear sensor ("HMD off/on" 0.5-1 s in
`logs/eyetracking.txt`, not vrserver.txt) → **`focus_hold` is on by default with 5 s** (owner's choice; C defaults
too). The Room VR works (`unity_no_overlay_copy`). BattleSisters (Unity 2019.4 built-in VR, no libOculusXRPlugin.so)
flooded "outside of frame bounds" ~2400/s and hung the GPU (kernel hangcheck, zink DEVICE LOST) → the ovrpshim frame
wait now also applies to Unity 2019 without the Oculus XR Plugin (`UnityOculusCheck.legacy_loop`). Vader Immortal
(UE4, stuck on the loading image after the intro, GitHub #49): VRP repacks carry a Frida gadget (`libfrda.so`,
config `hijack_responses`), but OVRPort's `patch_clean_up_frida` removes its loadLibrary call, so it never runs on
the Frame; `frame.ovr_trace` (opt-in, `native/ovrtrace`: 1138 exported ovr_* stubs → real loader functions, logcat
tag `fp_ovrtrace`: calls, PopMessage answers, unanswered requests every 10 s) is the next diagnostic.
**Unity built-in VR input (2026-10-05):** probe builds (`FRAMEPORT_INPUT_PROBE=1 frameport build …`; it logs
trigger/grip crossings too) showed OVRPlugin returns the full Touch state for every controller mask (also Go masks);
presses reach the games' OVRInput. Accounting+ (Il2CppDumper v6.7.46 reads its Unity 2017 metadata v24, run on Windows)
passes stance selection (NewtonVR grip/trigger) but its motion warning waits for `Input.GetMouseButtonDown(0/1)`,
which Lepton never delivers (no focused Android window) → ovrpshim registers its own
`UnityEngine.Input::GetMouseButtonDown(System.Int32)` icall (il2cpp_add_internal_call, after Unity's: resolve first)
that adds a click in the frame a Touch trigger or A/B/X/Y is newly pressed (`unity_oculus_check` revision 3).
BattleSisters (Unity 2019 InputSystem/XR InputDevices; libunity polls only Go masks 0x8000000/0x1000000/0x2000000;
device model "Oculus Quest" vs Lepton's "Valve Lepton", ovrp_GetSystemProductName (already "Oculus Quest"),
ovrp_GetNodePresent (hands present after ~2 s, logged by the shim) and missing ovrp_GetControllerState exports were
all ruled out in the headset): buttons still dead; next = find what makes libunity's Oculus input poll only Go
controllers. Accounting+ works (owner, 2026-10-06).
**Lepton storage (2026-09-30):** each app's /sdcard (= /storage/emulated/0 → `<base>/lepton-data/external`) has `Movies`/`Download`/`Documents` symlinked to the Frame's `~/Videos`/`~/Downloads`/`~/Documents` (liblepton/mounting.sh, only if they exist at start); agent v24 `storage_targets` reads that mapping. Android's MediaProvider canonicalises paths to /home/steamos/... and rejects every file ("doesn't appear under [/system/media...]"), `sm list-volumes` is empty: the media index never works, apps must browse folders. Lepton installs with `adb install -g` (runtime permissions granted, MANAGE_EXTERNAL_STORAGE too). Files: `install/files.py`, `frameport frame send|storage`, GUI Files tab (formerly Frame → Send files).
**SteamVR per-app settings (2026-09-30):** editing steamvr.vrsettings while SteamVR runs is lost; the web API (127.0.0.1:27062 /app/setsettings) needs `x-steamvr-secret`. `native/vrsettings` = `fp_vrsettings.exe` (freestanding, OpenVR `FnTable:IVRSettings_003` as a Utility app, loads SteamVR's bin/win64/openvr_api.dll) sets them live and SteamVR persists them: section `steam.app.<shortcut appid>`, keys `preferredRefreshRate` (float) and `motionSmoothingOverride` (0 global, 1 on, 2 off, 3 always). Steam Link (vrlink) lists the Frame's rates 72/80/90/96/108/120/144 in vrserver.txt and follows the per-app preference ("host preferred N Hz"; whether the key is honoured is unverified in-headset yet). Judder metric: vrcompositor.txt session summary dropped + "Timed out. N total" (Stormland: 0 dropped but 313 timeouts in 2 min); fpsVR (`%LOCALAPPDATA%\fpsVR\*.json`, 0.1 ms histograms) gives p99 CPU/GPU ms. `pcvr.steamvr_tuning` (default on, PC only) applies on Play: highest rate whose budget ≥ p99×1.05, at least one step down, smoothing on.
+6 -5
View File
@@ -1,13 +1,14 @@
48a3ecad77ec0f3215b29070e994590eb9579e04d3c88a47f37f306f9aeb01d9 ./arm64-v8a/libfp_langpack.so
a5b03bb7ae5d953d7ded2bf117b0a19c57fae604f16f54310847f8e89593dde6 ./arm64-v8a/libfp_ovrp.so
4724254982fa854de2134b15b936cfbd6bd244d51e5d72d5b51b85c60ef67321 ./arm64-v8a/libfp_ovrp.so
40defdaddcda53bd2649eb48076fae1622bfc2bfc88e9e03c94fc8b45af2a4f2 ./arm64-v8a/libfp_ovrtrace.so
b5949e9e90e4c51e2733b9f6cd3c857a447552ac7291aec340407c27b034b600 ./arm64-v8a/libfp_vk.so
383054f8b3b41dde76d062c71856cd3163655e50009c08454bc1793f393ead65 ./arm64-v8a/libfpg.so
8e00552d1ab90f82749db3caad4f773351fa8a28edcc5ea5cbd1b31c434ff32a ./arm64-v8a/libframe_xrshim.so
3dfcb0f2bec47857bcecc7261c58e076d872d4649718c40850f29e10c75477dd ./arm64-v8a/libglshim.so
0780f29b4844bcf5070929d8118cfcc2e7da2f16dd0dbfe1eaf12be7f5567401 ./arm64-v8a/libopenxr_loader_generic.so
424d8e5cb15608ad627f9415df4c4665efd9358fed3447a5d3765279dc652f6b ./arm64-v8a/libframe_xrshim.so
3bfd1261688ed766c0adb9172f44dd7d41cc6459f26205ce3069f536a52e4ab9 ./arm64-v8a/libglshim.so
899b76382e6d10fe2b594b40fed369d03808a1f3ec7a18ccc05f420c11056aeb ./arm64-v8a/libopenxr_loader_generic.so
1feaeafad467c4cafdf2b018a4d84b0bee200c3f711697b4ce97e66a3ba256ca ./arm64-v8a/libovrplatformcompat.so
32525cd0a9ee3d9993d8871cd6905bdcf22cde4f4ba28f5db6434ce7d6554758 ./arm64-v8a/libvrapi.so
9c82f4ff57395e220329a22d0f0f47ce88b77132bed4dfb7b57809077fd0d6c4 ./armeabi-v7a/libopenxr_loader_generic.so
79955f386b4e8d43b36b052f9f838e85310c4234403c31e1b2b3f2e914aa4627 ./armeabi-v7a/libopenxr_loader_generic.so
1871eae093432d277da4bc751bf5f3269dfcf11f9168260b0c3caadb0dedb19d ./dex/oculusos-stubs.dex
1aa733117cf57ccff7cf23f0425dbfd73b0332a3ef1c905ceeca0ccd0449c4e0 ./linux-arm64/XR_APILAYER_FRAMEPORT_timefix.json
28c2430a02bbd8902c5bfb9562c6fd0e318654f9e05c095bfeb94b0450ab1b07 ./linux-arm64/libxr_frameport_timefix.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,25 @@
package: com.FireproofStudios.TheRoomVR
title: The Room VR
status: works
notes: Plays normally (it used to stay on a grey screen).
details: Unity 2018.4 with built-in Oculus support. It started VR only with frame.unity_oculus_check, then Unity's
render thread crashed in the GL driver (Zink) when OVROverlay copied a 4x4 fade texture into its overlay layer;
frame.unity_no_overlay_copy skips that copy (the fade still works). frame.unity_runtime_msaa_off keeps the eye buffer
at one sample (also GitHub issue 38).
tested_version: '1.02'
engine: Unity
xr: VrApi
frame:
- frame.unity_no_msaa
- frame.unity_oculus_check
- frame.unity_text_input
- frame.unity_runtime_msaa_off
- frame.unity_no_overlay_copy
device:
- device.text_input_window
verified:
date: '2026-10-05'
issue: 38
updated: '2026-10-05'
min_app: 0.11.0
source_hint: The Room VR
+10 -6
View File
@@ -1,13 +1,14 @@
package: com.NewFolderGames.IAmCat
title: I Am Cat
status: issues
notes: The view vibrates slightly, even when holding still.
status: works
notes: Steady view with pose_consistency (the judder is gone).
details: Unity 2022.3 with the Oculus XR Plugin falls back to GLES (Zink) on the Frame, where its single-pass
(multiview) rendering drew the right eye wrong (GitHub issue 8); frame.unity_multipass renders each eye in its own
pass (OculusSettings.GetStereoRenderingMode + its inlined read in OculusLoader.Initialize). Poses and frame times
are consistent, but every frame reaches the runtime one display period late (two passes on Zink) and the game
clamps its physics step to 10 ms, so the view judders; scale 0.8 didn't change it. Possible next steps are fixing the
multiview path instead or the game's fixed timestep.
clamps its physics step to 10 ms. The judder came from the game locating its views about three times per frame and
getting slightly different poses each time; FrameBridge pose_consistency returns the same views for repeated
queries of one display time (proposed in GitHub issue 8). The grey right eye on the loading screen is still open.
tested_version: 1.4.0.0
engine: Unity
xr: OpenXR
@@ -16,8 +17,11 @@ frame:
- frame.unity_multipass
device:
- device.text_input_window
adapter:
pose_consistency: 1
verified:
date: '2026-10-03'
date: '2026-10-05'
issue: 8
updated: '2026-10-04'
updated: '2026-10-05'
min_app: 0.11.0
source_hint: I Am Cat
@@ -1,17 +1,18 @@
package: com.crowscrowscrows.AccountingPlus
title: Accounting+
status: issues
notes: Starts in VR, but doesn't get past its "press any button" screen.
status: works
notes: Plays normally, including the "press any button" screen after choosing to sit or stand.
details: Unity 2017.4 built-in Oculus support. frame.unity_oculus_check gets VR started (Meta's system-app check and
the frame wait its legacy loop never makes, libfp_ovrp.so), ~72 fps. Controller input reaches the game's OVRInput
cleanly (both Touch controllers connected, individual button bits, input focus 1 while focused) but the screen
doesn't continue; Cpp2IL can't read this Unity version to see what it waits for.
the frame wait its legacy loop never makes, libfp_ovrp.so), ~72 fps. The motion warning after the stance selection
waits for a mouse click (Input.GetMouseButtonDown), which a Quest delivers for the controller press and Lepton never
does; the same library now counts a newly pressed trigger or A/B/X/Y as that click.
tested_version: 1.24.35
engine: Unity
xr: VrApi
frame:
- frame.unity_oculus_check
verified:
date: '2026-10-04'
updated: '2026-10-04'
date: '2026-10-06'
updated: '2026-10-06'
min_app: 0.11.0
source_hint: Accounting+
+12 -8
View File
@@ -1,11 +1,12 @@
package: com.playful.LuckysTale
title: Lucky's Tale
status: issues
notes: Runs out of memory within a few minutes and freezes the Frame until the game is killed.
details: Unity's asset loading thread (Loading.PreloadManager) grows the game's native heap by about 1 GB/s
shortly after start (10+ GB plus all swap, then the kernel kills it; perf page-fault profile, 2026-10-04). The text
window and the MSAA patch aren't the cause (same with the window off); the OBB is byte-identical to the original.
The earlier "headset restarted in a menu" reports (GitHub issue 9) were most likely this. No fix yet.
status: works
notes: Plays normally; touching a save slot no longer freezes the Frame (haptic_fix).
details: Touching a save slot vibrates the controller through XR_FB_haptic_amplitude_envelope; OVRPort's OpenXR
loader converts that envelope with the duration in nanoseconds read as seconds and allocates an enormous buffer, so
the Frame ran out of memory and froze (found by the GitHub issue 9 reporter). FrameBridge's extension shim turns the
envelope into a plain vibration before OVRPort's loader sees it (haptic_fix). Brief pauses came from the headset's
wear sensor flickering, now hidden by focus_hold (on by default).
tested_version: 1.0.55
engine: Unity
xr: VrApi
@@ -14,8 +15,11 @@ frame:
- frame.unity_runtime_msaa_off
device:
- device.text_input_window
adapter:
haptic_fix: 1
verified:
date: '2026-10-03'
date: '2026-10-05'
issue: 9
updated: '2026-10-04'
updated: '2026-10-05'
min_app: 0.11.0
source_hint: Luckys Tale
+6 -1
View File
@@ -13,10 +13,15 @@ signatures:
severity: fatal
diagnosis: 32-bit-only APK. The Steam Frame has no AArch32; this cannot run. Use the PC (Rift) version via Revive.
suggest: []
- id: unity-render-crash
pattern: 'CRASH\s*:.*#\d+\s+pc [0-9a-f]+\s+\S*libgallium_dri\.so'
severity: fatal
diagnosis: Unity's render thread crashed inside the Frame's GL driver (Mesa/Zink); the picture freezes or stays grey. Known triggers - an OVROverlay copy (try "Unity - skip OVROverlay layers", e.g. The Room VR), MSAA switched on at runtime, a GPU hang (zink DEVICE LOST).
suggest: [frame.unity_no_overlay_copy, frame.unity_runtime_msaa_off]
- id: swapchain-rect-invalid
pattern: 'xrEndFrame failed -25\b'
severity: fatal
diagnosis: The runtime rejects the game's frames because an image rect reaches past its swapchain (by a few pixels on some Frames); the game stops drawing (e.g. stuck at a "Waiting" box). FrameBridge from FramePort 0.10.1 clamps the rects - rebuild and reinstall the game.
diagnosis: The runtime rejects the game's frames because an image rect reaches past its swapchain (by a few pixels on some Frames); the game stops drawing (e.g. stuck at a "Waiting" box). FrameBridge from FramePort 0.11.0 clamps the rects - rebuild and reinstall the game.
suggest: [frame.adapter]
- id: missing-ovr-symbol
pattern: '(UnsatisfiedLinkError|cannot locate symbol) .*"?(ovr_[A-Za-z0-9_]+|ovrMessageType_ToString)'
+4 -3
View File
@@ -7,6 +7,7 @@ Generated from [catalog/games](../catalog/games) by `scripts/compat_list.py`.
| Game | Platform | Status | Notes |
|---|---|---|---|
| 4XVR Video Player | Quest | ✅ Works | |
| Accounting+ | Quest | ✅ Works | |
| AllInOneSports | Quest | ✅ Works | |
| Asgard's Wrath 2 | Quest | ✅ Works | |
| BAM | Quest | ✅ Works | |
@@ -23,12 +24,14 @@ Generated from [catalog/games](../catalog/games) by `scripts/compat_list.py`.
| Espire 2 | Quest | ✅ Works | |
| Genotype | Quest | ✅ Works | |
| H.U.N.T | Quest | ✅ Works | |
| I Am Cat | Quest | ✅ Works | |
| I Am Monkey | Quest | ✅ Works | |
| In Death: Unchained | Quest | ✅ Works | |
| Into The Radius 2 | Quest | ✅ Works | |
| Job Simulator | Quest | ✅ Works | |
| Keep Talking and Nobody Explodes | Quest | ✅ Works | |
| LEGO® Bricktales | Quest | ✅ Works | |
| Lucky's Tale | Quest | ✅ Works | |
| Marvel's Deadpool VR | Quest | ✅ Works | |
| Marvel's Iron Man VR | Quest | ✅ Works | |
| Medieval Dynasty New Settlement | Quest | ✅ Works | |
@@ -50,17 +53,15 @@ Generated from [catalog/games](../catalog/games) by `scripts/compat_list.py`.
| SUPERHOT VR | Quest | ✅ Works | |
| TetrisEffect | Quest | ✅ Works | |
| The Climb 2 | Quest | ✅ Works | |
| The Room VR | Quest | ✅ Works | |
| Toy Master | Quest | ✅ Works | |
| Under Cover | Quest | ✅ Works | |
| VR4 | Quest | ✅ Works | |
| Wallace & Gromit in The Grand Getaway | Quest | ✅ Works | |
| Waltz of the Wizard: Extended Edition | Quest | ✅ Works | |
| Wander | Quest | ✅ Works | |
| Accounting+ | Quest | ⚠️ Works with issues | Starts in VR, but doesn't get past its "press any button" screen. |
| Arcsmith | Quest | ⚠️ Works with issues | Right eye distorts during movement (unresolved; swap, tracking, Valve layers, depth and pacing ruled out). |
| Assassin's Creed Nexus | Quest | ⚠️ Works with issues | Some launch warning text is still upside down; the rest of the UI is fixed by flip emulation. |
| I Am Cat | Quest | ⚠️ Works with issues | The view vibrates slightly, even when holding still. |
| Lucky's Tale | Quest | ⚠️ Works with issues | Runs out of memory within a few minutes and freezes the Frame until the game is killed. |
| Myst | Quest | ⚠️ Works with issues | Minor graphical glitches on some objects. |
| Phantom: Covert Ops | Quest | ⚠️ Works with issues | DLC/store button crashes (no Meta store). |
| Silhouette | Quest | ⚠️ Works with issues | Hand-tracking game; the Frame synthesizes hands from controllers, so it is janky. |
+4 -2
View File
@@ -56,9 +56,11 @@ version is `catalog/triage.yaml` (used by `frameport test` / the Job screen); ke
| Quest app keeps recentering / snapping the view when you turn your head; log shows session state 5→4→3→4→5 within a second | the Frame briefly takes focus; the app recenters on focus changes | unfixed: hiding the dips (debounce) made AC Nexus stay black, so it was removed |
| Video player / app finds no local videos; MediaProvider "Requested path /home/steamos/... doesn't appear under ..." | Lepton's /sdcard is a symlink to a host path, so Android's media index rejects every file | upload in the Files tab (Videos = /sdcard/Movies) and browse folders in the app |
| Batman: Arkham Shadow closes during smoke-bomb effects; later input-tree corruption | Meta XR Audio Wwise deletes queued metadata still referenced by the current audio frame, then writes through the stale pointer | FrameBridge automatically retires metadata after current-frame references disappear, for the verified AArch64 SDK build only; see [AUDIO_METADATA.md](AUDIO_METADATA.md) |
| Game stays on a loading or "Waiting" box although it reached FOCUSED; log `FrameBridge: xrEndFrame failed -25` then no more `pacing:` lines (e.g. PowerWash Simulator on some Frames, GitHub #39) | The eye image rect ends a few pixels past its swapchain (Unity rounds the swapchain width, the runtime's recommended size differs per Frame); SteamVR rejects every frame with XR_ERROR_SWAPCHAIN_RECT_INVALID | FrameBridge clamps every projection/quad image rect to its swapchain (`rect_clamp`, default on since 0.10.1; log `rect_clamp: view N image rect clamped`): rebuild + reinstall the game |
| Game stays on a loading or "Waiting" box although it reached FOCUSED; log `FrameBridge: xrEndFrame failed -25` then no more `pacing:` lines (e.g. PowerWash Simulator on some Frames, GitHub #39) | The eye image rect ends a few pixels past its swapchain (Unity rounds the swapchain width, the runtime's recommended size differs per Frame); SteamVR rejects every frame with XR_ERROR_SWAPCHAIN_RECT_INVALID | FrameBridge clamps every projection/quad image rect to its swapchain (`rect_clamp`, default on since 0.11.0; log `rect_clamp: view N image rect clamped`): rebuild + reinstall the game |
| Game (Unity, GLES) freezes, `zink: DEVICE LOST` | multisampled render-to-texture hangs the GPU | `frame.unity_no_msaa`; if it persists: unfixable → PC version |
| Only the Android home screen shows; the log has Unity's VR device as `None` (e.g. Accounting+, Unity 2017) | Unity 2017–2018 built-in Oculus support starts VR only when `com.oculus.systemactivities` is installed; Lepton has no Meta system apps, so Unity falls back to non-VR | `frame.unity_oculus_check`: that package name in libunity.so → `android`, plus `native/ovrpshim` (libfp_ovrp.so): Unity 2017's legacy frame loop (`ovrp_Update2`/`ovrp_BeginFrame`) never calls `ovrp_WaitToBeginFrame`, so without the shim no `xrWaitFrame` happens, `CompositorOpenXR::Update … outside of frame bounds` floods the log and the dashboard freezes. With it: log `ovrp frame loop shim: waited for frame N`, ~71 fps. Accounting+ then stops at "press any button" although its OVRInput gets clean input (`INPUT_PROBE` in the patch logs connected controllers/buttons/input focus per call) — unresolved |
| Black flat window, then a GPU hang: kernel `hangcheck detected gpu lockup` (offending task the game), `zink: DEVICE LOST`, Unity render-thread crash; `outside of frame bounds` thousands of times a second (e.g. BattleSisters, Unity 2019.4) | Unity 2019 on its built-in VR (no `libOculusXRPlugin.so`) uses the same legacy frame loop as Unity 2017: no `xrWaitFrame`, the render thread floods the GPU | `frame.unity_oculus_check` adds the ovrpshim frame wait for these too (revision 2) |
| Unreal game stuck on a loading image after the intro, frames keep coming (72 fps), no crash (e.g. Vader Immortal) | suspect: a Meta Platform SDK request no message ever answers | diagnostics: `frame.ovr_trace` (opt-in) logs every `ovr_*` call, the answers `ovr_PopMessage` returns and every 10 s the unanswered requests (`fp_ovrtrace` in launch.log). Never fake an entitlement answer |
| Own-engine game crashes in `libVkLayer_fossilize.so` (Fossilize's recording thread, e.g. Roblox) | same as Deadpool VR: uninitialised pointers in what Fossilize records | `frame.vk_sanitize` now also covers own-engine libraries that load `libvulkan.so` by name |
| Crash right after the game gets focus, in `vrclient.so … UpdateActionStateInternal` / `sxr_xrSyncActions` (e.g. Myst) | a race in the Frame runtime's input code on the first sync after focus (not every launch) | adapter `sync_guard` (input syncs one at a time with event polling, paused 250 ms after FOCUSED) |
| View jumps sideways / game pauses or freezes for a moment every few seconds (e.g. Blade & Sorcery, BattleGlide) | the Frame drops focus for ~0.5 s (FOCUSED→VISIBLE→SYNCHRONIZED); games pause or re-align the player (`OnVRPresence … Teleport`) | adapter `focus_hold` |
@@ -87,7 +89,7 @@ version is `catalog/triage.yaml` (used by `frameport test` / the Job screen); ke
| Eye distortion while moving (Arcsmith, Time Stall) | unknown (not eye swap, tracking, Valve layers, depth or pacing) | unresolved |
| One eye grey / only effects (I Am Cat, Unity Oculus XR Plugin on GLES) | the game's multiview pass draws array slice 1 wrong on Zink | `frame.unity_multipass` (also rewrites the getter's inlined read in `OculusLoader.Initialize`; check for two `array=1` eye swapchains) |
| View vibrates even when holding still after `frame.unity_multipass` (I Am Cat) | poses/times are consistent, but two passes on Zink make every frame one period late, and the game clamps its physics step to 10 ms | not fixed (scale 0.8 didn't help); next ideas: fix multiview instead, or the game's fixed timestep |
| Game freezes / pauses for 1-2 s now and then, no flicker; only some games (Blade & Sorcery) | the headset's wear sensor flickers off while worn (SteamVR vrserver.txt `HMD off, stopping eye tracking` … `HMD on`), the Frame turns it into a focus loss and Quest games that pause on focus loss pause | adapter `focus_hold=1` + `focus_hold_ms=2500` per game; native games don't react, so it's per game |
| Game freezes / pauses for 0.5-2 s now and then, no flicker (e.g. Blade & Sorcery, Lucky's Tale) | the headset's wear sensor flickers off while worn (`logs/eyetracking.txt` `HMD off, stopping eye tracking` … `HMD on`), the Frame turns it into a focus loss and Quest games that pause on focus loss pause | adapter `focus_hold` (on by default since 2026-10-05, dips up to `focus_hold_ms` = 5000 ms are hidden; longer ones still pause) |
| Minor glitches on some objects (Myst, Unreal Vulkan) | unknown; not application space warp (turning it off changed nothing and ran worse) | unresolved |
| Graphics crash in vkCreateInstance with pc == fault address, from the game's own Vulkan hooks (BONELAB `libSLZQuestNative`) | a pointer into memory freed with OVRPlugin's pre-init OpenXR instance; not the runtime (vrclient.so) or Fossilize being unloaded (keeping both loaded with RTLD_NODELETE didn't help) | unresolved |
| Own-engine game crashes in `je_free` from its own library on the first frames (Roblox) | the game frees memory it doesn't own; not the Vulkan shim or the format fallback | unsupported |
+63 -3
View File
@@ -88,7 +88,8 @@ static int foveation_fix = 1;
static int hide_space_warp = 0;
static int controller_fix = 1;
static int swapchain_fix = 1;
static int rect_clamp = 1; // clamp submitted image rects to their swapchain (SteamVR rejects a 1 px overrun)
static int rect_clamp = 1;
static int pose_consistency = 0; // repeat xrLocateViews queries for one display time get the same poses (GitHub #8) // clamp submitted image rects to their swapchain (SteamVR rejects a 1 px overrun)
static int layer_fix = 1;
static int mutable_fix = 0;
static int swap_eyes = 0;
@@ -113,8 +114,8 @@ static int sync_guard; // xrSyncActions one at a time with xrPollEvent, pa
static int profile_remap = 1; // Meta's newer controller profiles (rejected by the Frame) -> oculus/touch_controller
static int layer_debug; // diagnostics: layers, swapchains, session states, spaces, aim/grip, refresh rates
static int stable_local; // keep every LOCAL space the app creates on the session-start origin
static int focus_hold; // hide brief focus dips once the session has been focused for a while
static float focus_hold_ms = 1000; // longest focus dip focus_hold hides
static int focus_hold = 1; // hide brief focus dips once the session has been focused for a while
static float focus_hold_ms = 5000; // longest focus dip focus_hold hides
static float aim_pitch, aim_yaw, aim_forward; // aim pose correction (degrees, degrees, metres)
static float refresh_rate; // requested display refresh rate (Hz), 0 = the app's choice
static int equirect_emul; // show 360 layers as cube faces (GLES)
@@ -138,6 +139,7 @@ static void read_settings(const char *path) {
if (sscanf(line, "controller_fix=%f", &value) == 1) controller_fix = value != 0;
if (sscanf(line, "swapchain_fix=%f", &value) == 1) swapchain_fix = value != 0;
if (sscanf(line, "rect_clamp=%f", &value) == 1) rect_clamp = value != 0;
if (sscanf(line, "pose_consistency=%f", &value) == 1) pose_consistency = value != 0;
if (sscanf(line, "layer_fix=%f", &value) == 1) layer_fix = value != 0;
if (sscanf(line, "mutable_fix=%f", &value) == 1) mutable_fix = value != 0;
if (sscanf(line, "swap_eyes=%f", &value) == 1) swap_eyes = value != 0;
@@ -912,11 +914,69 @@ XRAPI_ATTR XrResult XRAPI_CALL xrWaitFrame(XrSession session, const XrFrameWaitI
return result;
}
// pose_consistency (GitHub #8, proposed by Klownicle for I Am Cat): the game asks xrLocateViews ~3 times per frame
// for the same display time and got slightly different poses each time (tenths of a degree), so parts of its pipeline
// rendered with different heads: judder. The first fully tracked answer for (session, space, view configuration,
// display time) is kept and repeated; a new display time, another space or a failed/untracked answer is never cached.
#define POSE_CACHE 8
static struct {
XrSession session; XrSpace space; XrViewConfigurationType config; XrTime time;
XrViewStateFlags flags; uint32_t count; XrPosef pose[2]; XrFovf fov[2];
} pose_cache[POSE_CACHE];
static int pose_cache_next, pose_cache_hits;
static pthread_mutex_t pose_cache_lock = PTHREAD_MUTEX_INITIALIZER;
#define POSE_TRACKED (XR_VIEW_STATE_ORIENTATION_VALID_BIT | XR_VIEW_STATE_POSITION_VALID_BIT | \
XR_VIEW_STATE_ORIENTATION_TRACKED_BIT | XR_VIEW_STATE_POSITION_TRACKED_BIT)
static int pose_cache_lookup(XrSession session, const XrViewLocateInfo *info, XrViewState *state, uint32_t capacity,
uint32_t *count, XrView *views) {
int hit = 0;
pthread_mutex_lock(&pose_cache_lock);
for (int i = 0; i < POSE_CACHE && !hit; ++i) {
if (pose_cache[i].session != session || pose_cache[i].space != info->space ||
pose_cache[i].config != info->viewConfigurationType || pose_cache[i].time != info->displayTime ||
!pose_cache[i].count || capacity < pose_cache[i].count)
continue;
state->viewStateFlags = pose_cache[i].flags;
*count = pose_cache[i].count;
for (uint32_t v = 0; v < pose_cache[i].count; ++v) { // only the values: the caller's type/next stay
views[v].pose = pose_cache[i].pose[v];
views[v].fov = pose_cache[i].fov[v];
}
hit = 1;
}
if (hit && pose_cache_hits++ == 0) LOG("pose_consistency: repeated query answered with the frame's first poses");
pthread_mutex_unlock(&pose_cache_lock);
return hit;
}
static void pose_cache_store(XrSession session, const XrViewLocateInfo *info, const XrViewState *state,
uint32_t count, const XrView *views) {
if (count == 0 || count > 2 || (state->viewStateFlags & POSE_TRACKED) != POSE_TRACKED) return;
pthread_mutex_lock(&pose_cache_lock);
int slot = pose_cache_next;
pose_cache_next = (pose_cache_next + 1) % POSE_CACHE;
pose_cache[slot].session = session;
pose_cache[slot].space = info->space;
pose_cache[slot].config = info->viewConfigurationType;
pose_cache[slot].time = info->displayTime;
pose_cache[slot].flags = state->viewStateFlags;
pose_cache[slot].count = count;
for (uint32_t v = 0; v < count; ++v) {
pose_cache[slot].pose[v] = views[v].pose;
pose_cache[slot].fov[v] = views[v].fov;
}
pthread_mutex_unlock(&pose_cache_lock);
}
XRAPI_ATTR XrResult XRAPI_CALL xrLocateViews(XrSession session, const XrViewLocateInfo *info, XrViewState *state,
uint32_t capacity, uint32_t *count, XrView *views) {
PFN_xrLocateViews fn = (PFN_xrLocateViews)lookup(active_instance, "xrLocateViews");
if (!fn) return XR_ERROR_FUNCTION_UNSUPPORTED;
int cacheable = pose_consistency && info && state && count && views && capacity > 0;
if (cacheable && pose_cache_lookup(session, info, state, capacity, count, views)) return XR_SUCCESS;
XrResult result = fn(session, info, state, capacity, count, views);
if (cacheable && result == XR_SUCCESS) pose_cache_store(session, info, state, *count, views);
if (equirect_emul && XR_SUCCEEDED(result) && info && count && views && state &&
(state->viewStateFlags & XR_VIEW_STATE_ORIENTATION_VALID_BIT))
emul_on_locate_views(info->space, info->displayTime, *count < capacity ? *count : capacity, views);
+1 -1
View File
@@ -140,7 +140,7 @@ static XRAPI_ATTR XrResult XRAPI_CALL hook_xrGetActionStateBoolean(XrSession ses
// ---------------------------------------------------------------- focus_hold
#define FOCUS_HOLD_MIN_FOCUSED_NS 1000000000ll // only after this long in FOCUSED (start-up transitions untouched;
// 3 s let a 27 ms dip through in Blade & Sorcery)
// dips longer than focus_hold_ms (setting, default 1000) are delivered (late, in order): taking the headset off or the
// dips longer than focus_hold_ms (setting, default 5000) are delivered (late, in order): taking the headset off or the
// system menu must still pause the game. A longer limit is for headsets whose wear sensor flickers ("HMD off" for
// 0.5-2 s while worn; Blade & Sorcery pauses on each)
#define FOCUS_HOLD_MAX_DIP_NS ((int64_t)(focus_hold_ms * 1000000.0f))
+12 -4
View File
@@ -10,7 +10,7 @@ timefix OpenXR layer for Proton games (linux-arm64, glibc; the NDK's clang build
OculusHMDConnected helper for Rift games under Proton (win-x64 PE; the NDK's clang + lld-link, no Windows SDK), and
rewrites artifacts/SHA256SUMS. Run `frameport parity` afterwards to see which games change.
python native/build.py [--only adapter,bridge,compat,langpack,glshim,eglfmt,dex,xrlayer,oculushmd,xrshim,vkshim,ovrpshim,vrsettings] [--ndk PATH]
python native/build.py [--only adapter,bridge,compat,langpack,glshim,eglfmt,ovrtrace,dex,xrlayer,oculushmd,xrshim,vkshim,ovrpshim,vrsettings] [--ndk PATH]
"""
from __future__ import annotations
@@ -249,6 +249,14 @@ def build_eglfmt(tc: Path):
"-Wl,--no-as-needed", "-lEGL", "-Wl,--as-needed", "-ldl", "-llog", "-o", ART / "arm64-v8a/libfpg.so"], cwd=src)
def build_ovrtrace(tc: Path):
"""Meta Platform SDK tracer (see ovrtrace/ovrtrace.c): diagnostics, the game's engine library loads it first."""
src = HERE / "ovrtrace"
run([exe(tc, "aarch64-linux-android29-clang"), "-shared", "-fPIC", "-O2", "-Wall", "-Wextra", "-Werror",
"-Wl,-soname,libfp_ovrtrace.so", "-Wl,-z,max-page-size=16384", "ovrtrace.c", "-ldl", "-llog",
"-o", ART / "arm64-v8a/libfp_ovrtrace.so"], cwd=src)
def build_xrshim(tc: Path):
"""FrameBridge extension shim (see xrshim/xrshim.c): DT_NEEDED-injected in front of overport's libopenxr_loader.so."""
src = HERE / "xrshim"
@@ -318,7 +326,7 @@ def write_sums():
def main():
ap = argparse.ArgumentParser()
ap.add_argument("--only", default="adapter,bridge,compat,langpack,glshim,eglfmt,dex,xrlayer,oculushmd,xrshim,vkshim,ovrpshim,vrsettings")
ap.add_argument("--only", default="adapter,bridge,compat,langpack,glshim,eglfmt,ovrtrace,dex,xrlayer,oculushmd,xrshim,vkshim,ovrpshim,vrsettings")
ap.add_argument("--ndk")
args = ap.parse_args()
parts = set(args.only.split(","))
@@ -327,11 +335,11 @@ def main():
tc = clang_dir(ndk(args.ndk)) if parts - {"dex"} else None
steps = {"adapter": lambda: build_adapter(tc), "bridge": lambda: build_bridge(tc), "compat": lambda: build_compat(tc),
"langpack": lambda: build_langpack(tc),
"glshim": lambda: build_glshim(tc), "eglfmt": lambda: build_eglfmt(tc), "xrshim": lambda: build_xrshim(tc), "dex": build_dex, "xrlayer": lambda: build_xrlayer(tc),
"glshim": lambda: build_glshim(tc), "eglfmt": lambda: build_eglfmt(tc), "ovrtrace": lambda: build_ovrtrace(tc), "xrshim": lambda: build_xrshim(tc), "dex": build_dex, "xrlayer": lambda: build_xrlayer(tc),
"oculushmd": lambda: build_oculushmd(tc), "vkshim": lambda: build_vkshim(tc),
"ovrpshim": lambda: build_ovrpshim(tc),
"vrsettings": lambda: build_vrsettings(tc)}
for name in ("adapter", "bridge", "compat", "langpack", "glshim", "eglfmt", "xrshim", "vkshim", "ovrpshim", "dex", "xrlayer", "oculushmd", "vrsettings"):
for name in ("adapter", "bridge", "compat", "langpack", "glshim", "eglfmt", "ovrtrace", "xrshim", "vkshim", "ovrpshim", "dex", "xrlayer", "oculushmd", "vrsettings"):
if name in parts:
log(f"build {name}")
steps[name]()
+54 -17
View File
@@ -13,9 +13,14 @@
#define LOG(...) __android_log_print(ANDROID_LOG_INFO, "GLShim", __VA_ARGS__)
static const char *const hidden[] = {
static const char *const hidden_multiview[] = {
"GL_OVR_multiview", "GL_OVR_multiview2", "GL_OVR_multiview_multisampled_render_to_texture",
};
// multisampled render-to-texture: Unity renders a runtime MSAA eye buffer through it, which crashes Zink (SIGSEGV in
// libgallium_dri.so, e.g. The Room VR); hidden, Unity uses an ordinary MSAA renderbuffer + resolve
static const char *const hidden_msrtt[] = {
"GL_EXT_multisampled_render_to_texture", "GL_EXT_multisampled_render_to_texture2",
"GL_OVR_multiview_multisampled_render_to_texture",
};
static void *gles;
@@ -25,23 +30,47 @@ static void (*real_glGetIntegerv)(GLenum, GLint *);
static __eglMustCastToProperFunctionPointerType (*real_eglGetProcAddress)(const char *);
static pthread_once_t once = PTHREAD_ONCE_INIT;
static int hide_multiview = 1;
static int hide_multiview = -1; // -1: not set (Unity keeps multiview, everything else hides it)
static int hide_msrtt = 1;
static void read_conf(void) {
char pkg[256] = {0}, path[512];
FILE *f = fopen("/proc/self/cmdline", "r");
static void read_conf_file(const char *path) {
FILE *f = fopen(path, "r");
if (!f) return;
size_t n = fread(pkg, 1, sizeof(pkg) - 1, f);
char line[256];
while (fgets(line, sizeof(line), f)) {
if (!strncmp(line, "gl_hide_multiview=", 18)) hide_multiview = atoi(line + 18);
if (!strncmp(line, "gl_hide_msrtt=", 14)) hide_msrtt = atoi(line + 14);
}
fclose(f);
pkg[n] = 0;
}
// The same settings sources as FrameBridge, later ones winning: the build's libframe_settings.so (next to this
// library), the game's framebridge.conf, then FRAMEBRIDGE_CONFIG (Lepton's per-game settings.conf).
static void read_conf(void) {
Dl_info info;
char path[600];
if (dladdr((void *)read_conf, &info) && info.dli_fname) {
const char *slash = strrchr(info.dli_fname, '/');
if (slash && slash - info.dli_fname < 500) {
snprintf(path, sizeof(path), "%.*s/libframe_settings.so", (int)(slash - info.dli_fname), info.dli_fname);
read_conf_file(path);
}
}
char pkg[256] = {0};
FILE *f = fopen("/proc/self/cmdline", "r");
if (f) {
size_t n = fread(pkg, 1, sizeof(pkg) - 1, f);
fclose(f);
pkg[n] = 0;
}
char *colon = strchr(pkg, ':');
if (colon) *colon = 0;
snprintf(path, sizeof(path), "/sdcard/Android/data/%s/files/framebridge.conf", pkg);
if (!(f = fopen(path, "r"))) return;
char line[128];
while (fgets(line, sizeof(line), f))
if (!strncmp(line, "gl_hide_multiview=", 18)) hide_multiview = atoi(line + 18);
fclose(f);
if (*pkg && !strchr(pkg, '/')) {
snprintf(path, sizeof(path), "/sdcard/Android/data/%s/files/framebridge.conf", pkg);
read_conf_file(path);
}
const char *env = getenv("FRAMEBRIDGE_CONFIG");
if (env && *env) read_conf_file(env);
}
// Logging wrappers for the framebuffer calls engines use for eye buffers.
@@ -306,13 +335,21 @@ static void init(void) {
real_glGetStringi = gles ? dlsym(gles, "glGetStringi") : NULL;
real_glGetIntegerv = gles ? dlsym(gles, "glGetIntegerv") : NULL;
real_eglGetProcAddress = egl ? dlsym(egl, "eglGetProcAddress") : NULL;
LOG("GL shim active: hide_multiview=%d", hide_multiview);
if (hide_multiview < 0) { // Unity renders multiview itself and only needs MSRTT hidden
void *unity = dlopen("libunity.so", RTLD_NOW | RTLD_NOLOAD);
hide_multiview = unity ? 0 : 1;
if (unity) dlclose(unity);
}
LOG("GL shim active: hide_multiview=%d hide_msrtt=%d", hide_multiview, hide_msrtt);
}
static int is_hidden(const char *name) {
if (!hide_multiview) return 0;
for (size_t i = 0; i < sizeof(hidden) / sizeof(hidden[0]); ++i)
if (!strcmp(name, hidden[i])) return 1;
if (hide_multiview)
for (size_t i = 0; i < sizeof(hidden_multiview) / sizeof(hidden_multiview[0]); ++i)
if (!strcmp(name, hidden_multiview[i])) return 1;
if (hide_msrtt)
for (size_t i = 0; i < sizeof(hidden_msrtt) / sizeof(hidden_msrtt[0]); ++i)
if (!strcmp(name, hidden_msrtt[i])) return 1;
return 0;
}
+101 -1
View File
@@ -38,6 +38,8 @@ static void init(void) {
#define STEP_RENDER (-1) // ovrpStep_Render
static void mouse_click_frame(void); // below: controller presses as Unity mouse clicks
EXPORT int fpov_Update2(int step, int frame_index, double prediction_seconds) {
pthread_once(&once, init);
static int last_waited = -1, logged;
@@ -45,6 +47,7 @@ EXPORT int fpov_Update2(int step, int frame_index, double prediction_seconds) {
last_waited = frame_index;
int r = real_wait(frame_index);
if (logged++ < 3) LOG("ovrp frame loop shim: waited for frame %d: %d", frame_index, r);
mouse_click_frame();
}
return real_update2 ? real_update2(step, frame_index, prediction_seconds) : -1000; // ovrpFailure
}
@@ -116,7 +119,7 @@ static void note_state(const char *which, unsigned int mask, const State *s) {
while (i < 8 && masks[i].seen && masks[i].mask != mask) i++;
if (i == 8) return;
if (!masks[i].seen || masks[i].buttons != s->words[1] || masks[i].connected != s->words[0]) {
if (changes++ < 120)
if (changes++ < 400)
LOG("ovrp input: %s(mask 0x%x): connected 0x%x buttons 0x%x touches 0x%x%s", which, mask, s->words[0],
s->words[1], s->words[2], masks[i].seen ? "" : " (first call with this mask)");
masks[i].seen = 1;
@@ -140,6 +143,22 @@ EXPORT int fpov_GetControllerState4(unsigned int mask, State *state) {
pthread_once(&input_once, input_init);
int r = real_state4 ? real_state4(mask, state) : -1000;
if (state) {
// ovrpControllerState4 continues with 4 floats after the 4 masks: L/R IndexTrigger, L/R HandTrigger. OVRInput
// turns them into the trigger/grip buttons at 0.5; log each time one crosses it (per requested mask)
const float *axis = (const float *)((const char *)state + 16);
static struct { unsigned int mask, bits; } seen[8];
static int axis_logs;
unsigned int bits = 0;
for (int k = 0; k < 4; ++k) bits |= (axis[k] >= 0.5f) << k;
int i = 0;
while (i < 8 && seen[i].mask && seen[i].mask != mask) i++;
if (i < 8 && (!seen[i].mask || seen[i].bits != bits)) {
if (seen[i].mask && axis_logs++ < 200)
LOG("ovrp input: State4(mask 0x%x) triggers L %.2f R %.2f grips L %.2f R %.2f", mask, axis[0], axis[1],
axis[2], axis[3]);
seen[i].mask = mask;
seen[i].bits = bits;
}
note_state("State4", mask, state);
state->words[1] = unstick(state->words[1]);
}
@@ -193,3 +212,84 @@ EXPORT int fpov_GetAppHasInputFocus(int *has_focus) {
if (has_focus) *has_focus = 1;
return 0; // ovrpSuccess
}
// ---------------------------------------------------------------- controller presses as mouse clicks
// Unity 2017-2019 games made for Go/Gear VR-era input wait for Input.GetMouseButtonDown(0/1), which a Quest delivers
// for the controller's primary press (Accounting+'s "press any button" motion warning checks only that). Lepton runs
// VR apps without a focused Android window, so no touch/mouse event ever arrives. IL2CPP looks engine functions up by
// name (il2cpp_resolve_icall) on first use: this registers a replacement for UnityEngine.Input::GetMouseButtonDown
// that returns Unity's answer, or true in the frame a Touch trigger (>= 0.5) or A/B/X/Y is newly pressed.
#define MOUSE_ICALL "UnityEngine.Input::GetMouseButtonDown(System.Int32)"
typedef void (*PFN_AddICall)(const char *name, const void *fn);
typedef const void *(*PFN_ResolveICall)(const char *name);
typedef int (*PFN_MouseDown)(int button);
static PFN_MouseDown real_mouse_down;
static volatile int click_now; // set for the frame in which a press began
static int fp_mouse_down(int button) {
int real = real_mouse_down ? real_mouse_down(button) : 0;
return real || ((button == 0 || button == 1) && click_now);
}
static void mouse_install(void) {
static int tries;
if (real_mouse_down || tries > 600) return; // ~10 s of frames
tries++;
PFN_AddICall add = (PFN_AddICall)dlsym(RTLD_DEFAULT, "il2cpp_add_internal_call");
PFN_ResolveICall resolve = (PFN_ResolveICall)dlsym(RTLD_DEFAULT, "il2cpp_resolve_icall");
if (!add || !resolve) {
void *il2cpp = dlopen("libil2cpp.so", RTLD_NOW | RTLD_NOLOAD);
if (il2cpp) {
add = (PFN_AddICall)dlsym(il2cpp, "il2cpp_add_internal_call");
resolve = (PFN_ResolveICall)dlsym(il2cpp, "il2cpp_resolve_icall");
}
}
if (!add || !resolve) return;
const void *current = resolve(MOUSE_ICALL);
if (!current) return; // Unity hasn't registered its own yet: try again next frame
real_mouse_down = (PFN_MouseDown)current;
add(MOUSE_ICALL, (const void *)fp_mouse_down);
LOG("controller presses count as mouse clicks (%s %s)", MOUSE_ICALL,
resolve(MOUSE_ICALL) == (const void *)fp_mouse_down ? "replaced" : "NOT replaced");
}
static void mouse_click_frame(void) {
mouse_install();
pthread_once(&input_once, input_init);
static int was_pressed;
unsigned char raw[512] __attribute__((aligned(16))) = {0}; // ovrpControllerState4 (+ room for newer layouts)
int pressed = 0;
if (real_state4 && real_state4(0x3, (State *)raw) >= 0) {
const unsigned int *w = (const unsigned int *)raw;
const float *axis = (const float *)(raw + 16); // L/R IndexTrigger, L/R HandTrigger
pressed = (w[1] & 0x303u) != 0 || axis[0] >= 0.5f || axis[1] >= 0.5f; // A, B, X, Y or a trigger
}
click_now = pressed && !was_pressed;
was_pressed = pressed;
}
// ---------------------------------------------------------------- hand nodes
// Unity's built-in Oculus XR input creates its left/right controller devices (InputDevices.GetDeviceAtXRNode, the
// Touch buttons and triggers games read through CommonUsages) for the hand nodes OVRPlugin reports as present
// (ovrp_GetNodePresent). Logged per node; a hand node whose Touch controller is connected counts as present.
typedef int (*PFN_NodePresent)(int node);
#define NODE_HAND_LEFT 3
#define NODE_HAND_RIGHT 4
EXPORT int fpov_GetNodePresent(int node) {
static PFN_NodePresent real;
static int logged[16];
pthread_once(&input_once, input_init);
if (!real) {
void *ovrp = dlopen("libOVRPlugin.so", RTLD_NOW | RTLD_NOLOAD);
if (ovrp) real = (PFN_NodePresent)dlsym(ovrp, "ovrp_GetNodePresent");
}
int present = real ? real(node) : 0, answer = present;
if (!present && (node == NODE_HAND_LEFT || node == NODE_HAND_RIGHT) && real_connected)
answer = (real_connected() & (node == NODE_HAND_LEFT ? 0x1u : 0x2u)) != 0; // LTouch / RTouch
if (node >= 0 && node < 16 && logged[node] != (answer ? 2 : 1)) {
logged[node] = answer ? 2 : 1;
LOG("ovrp node %d present: OVRPlugin %d -> Unity %d", node, present, answer);
}
return answer;
}
File diff suppressed because it is too large. Load diff
+203
View File
@@ -0,0 +1,203 @@
// SPDX-License-Identifier: GPL-3.0-only
// FramePort Meta Platform SDK tracer (diagnostics, patch frame.ovr_trace): logs the game's ovr_* calls and the
// messages that answer them, to find a request that never gets an answer (a game waiting forever, e.g. Vader
// Immortal after its intro). Nothing is answered or changed here: every call goes to the real function.
//
// Wiring: this library is the first DT_NEEDED of the game's engine library, so the engine's ovr_* imports resolve to
// the exports below. Each export is a tiny assembly stub that saves the argument registers (x0-x8, d0-d7), asks
// trace_before() for the real function (dlsym on the platform loader's handle, which also finds the language-pack
// library's functions when frame.langpacks is on), calls it with the original registers, then reports the result to
// trace_after(). Signatures don't matter (functions with more than 8 integer arguments would; the Platform SDK has
// none). Logcat tag fp_ovrtrace.
//
// What is logged: the first calls of every function (argument 0 and the result), every message ovr_PopMessage
// returns (type, request id, error flag), and every 10 s the request ids no message has answered yet with the
// function that made them ("request" = a function whose name says it starts one: the result is kept when it looks
// like a request id and the function isn't an accessor).
#define _GNU_SOURCE
#include <android/log.h>
#include <dlfcn.h>
#include <pthread.h>
#include <stdint.h>
#include <string.h>
#include <time.h>
#define TAG "fp_ovrtrace"
#define LOG(...) __android_log_print(ANDROID_LOG_INFO, TAG, __VA_ARGS__)
static const char *const NAMES[] = {
#define N(name) #name,
#include "names.inc"
#undef N
};
#define COUNT (sizeof(NAMES) / sizeof(NAMES[0]))
static void *real_fn[COUNT];
static int calls[COUNT];
static int is_pop[COUNT], is_request[COUNT];
static void *loader;
static pthread_once_t once = PTHREAD_ONCE_INIT;
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
typedef uint32_t (*get_type_t)(const void *);
typedef uint64_t (*get_id_t)(const void *);
typedef _Bool (*is_error_t)(const void *);
static get_type_t msg_type;
static get_id_t msg_id;
static is_error_t msg_error;
#define PENDING 256
static struct { uint64_t id; int fn; double t; } pending[PENDING];
static double last_report;
static double now(void) {
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return ts.tv_sec + ts.tv_nsec * 1e-9;
}
// accessors read data out of handles; everything else that returns a 64-bit id starts a request
static int looks_like_request(const char *n) {
static const char *const accessors[] = {"ovr_Message_", "Array_", "_Get", "_Is", "_Has", "_Create", "_Destroy",
"_Set", "_Free", "ovr_PopMessage", "ovr_Platform", "ovr_GetLoggedInUser",
"ovr_Error_", "Options_", "ovr_Voip_", "ovr_Net_", "ovr_Microphone_"};
for (size_t i = 0; i < sizeof(accessors) / sizeof(accessors[0]); ++i)
if (strstr(n, accessors[i])) return 0;
return 1;
}
static void init(void) {
loader = dlopen("libovrplatformloader.so", RTLD_NOW | RTLD_NOLOAD);
if (!loader) loader = dlopen("libovrplatformloader.so", RTLD_NOW);
for (size_t i = 0; i < COUNT; ++i) {
is_pop[i] = !strcmp(NAMES[i], "ovr_PopMessage");
is_request[i] = looks_like_request(NAMES[i]);
// "requests" whose names start with Get (e.g. ovr_User_GetLoggedInUser): Area_GetX with an upper-case X
const char *u = strchr(NAMES[i] + 4, '_');
if (u && !strncmp(u, "_Get", 4) && strncmp(NAMES[i], "ovr_Message_", 12) && !strstr(NAMES[i], "Array_"))
is_request[i] = 2; // maybe: kept only when the result looks like a request id
}
if (loader) {
msg_type = (get_type_t)dlsym(loader, "ovr_Message_GetType");
msg_id = (get_id_t)dlsym(loader, "ovr_Message_GetRequestID");
msg_error = (is_error_t)dlsym(loader, "ovr_Message_IsError");
}
LOG("tracer active: %zu functions, platform loader %s", COUNT, loader ? "OK" : "MISSING");
last_report = now();
}
void *fp_trace_before(uint64_t idx, uint64_t arg0) __attribute__((visibility("hidden")));
void *fp_trace_before(uint64_t idx, uint64_t arg0) {
pthread_once(&once, init);
if (idx >= COUNT) return NULL;
if (!real_fn[idx] && loader) real_fn[idx] = dlsym(loader, NAMES[idx]);
int n = __atomic_add_fetch(&calls[idx], 1, __ATOMIC_RELAXED);
if (n <= 3 && !is_pop[idx]) LOG("call %s(0x%llx)%s", NAMES[idx], (unsigned long long)arg0,
real_fn[idx] ? "" : " - not in the loader: returns 0");
return real_fn[idx];
}
static void report_pending(double t) {
int shown = 0;
for (int i = 0; i < PENDING; ++i) {
if (!pending[i].id) continue;
if (shown++ < 12)
LOG("unanswered after %.0f s: request %llu from %s", t - pending[i].t, (unsigned long long)pending[i].id,
NAMES[pending[i].fn]);
}
if (shown) LOG("%d request(s) without an answer", shown);
}
uint64_t fp_trace_after(uint64_t idx, uint64_t ret) __attribute__((visibility("hidden")));
uint64_t fp_trace_after(uint64_t idx, uint64_t ret) {
if (idx >= COUNT) return ret;
double t = now();
pthread_mutex_lock(&lock);
if (is_pop[idx]) {
if (ret && msg_type && msg_id) {
const void *m = (const void *)(uintptr_t)ret;
uint64_t id = msg_id(m);
int answered = -1;
for (int i = 0; i < PENDING; ++i)
if (pending[i].id && pending[i].id == id) { answered = pending[i].fn; pending[i].id = 0; break; }
LOG("message type=0x%08x request=%llu error=%d%s%s", msg_type(m), (unsigned long long)id,
msg_error ? msg_error(m) : -1, answered >= 0 ? " answers " : "", answered >= 0 ? NAMES[answered] : "");
}
} else {
int n = calls[idx];
if (n <= 3) LOG(" %s -> 0x%llx", NAMES[idx], (unsigned long long)ret);
// request ids are small positive counters; pointers (handles) are large
if (is_request[idx] && ret && ret < (1ull << 40)) {
for (int i = 0; i < PENDING; ++i)
if (!pending[i].id) { pending[i].id = ret; pending[i].fn = (int)idx; pending[i].t = t; break; }
if (n <= 20) LOG("request %llu <- %s", (unsigned long long)ret, NAMES[idx]);
}
}
if (t - last_report >= 10.0) {
last_report = t;
report_pending(t);
}
pthread_mutex_unlock(&lock);
return ret;
}
// The shared stub: x16 = function index. Saves the argument registers, gets the real function, calls it with them,
// reports the result. x8 (indirect result) and d0-d7 (float/HFA arguments) are preserved, x0/x1/d0-d3 returned.
__asm__(
".text\n"
".p2align 2\n"
"fp_trace_common:\n"
" stp x29, x30, [sp, #-224]!\n"
" mov x29, sp\n"
" stp x0, x1, [sp, #16]\n"
" stp x2, x3, [sp, #32]\n"
" stp x4, x5, [sp, #48]\n"
" stp x6, x7, [sp, #64]\n"
" stp d0, d1, [sp, #80]\n"
" stp d2, d3, [sp, #96]\n"
" stp d4, d5, [sp, #112]\n"
" stp d6, d7, [sp, #128]\n"
" stp x8, x16, [sp, #144]\n"
" mov x0, x16\n"
" ldr x1, [sp, #16]\n"
" bl fp_trace_before\n"
" str x0, [sp, #160]\n"
" ldp x0, x1, [sp, #16]\n"
" ldp x2, x3, [sp, #32]\n"
" ldp x4, x5, [sp, #48]\n"
" ldp x6, x7, [sp, #64]\n"
" ldp d0, d1, [sp, #80]\n"
" ldp d2, d3, [sp, #96]\n"
" ldp d4, d5, [sp, #112]\n"
" ldp d6, d7, [sp, #128]\n"
" ldr x8, [sp, #144]\n"
" ldr x17, [sp, #160]\n"
" cbz x17, 1f\n"
" blr x17\n"
" b 2f\n"
"1:\n"
" mov x0, #0\n"
" mov x1, #0\n"
" movi d0, #0\n"
"2:\n"
" stp x0, x1, [sp, #16]\n"
" stp d0, d1, [sp, #80]\n"
" stp d2, d3, [sp, #96]\n"
" ldr x0, [sp, #152]\n"
" ldr x1, [sp, #16]\n"
" bl fp_trace_after\n"
" ldp x0, x1, [sp, #16]\n"
" ldp d0, d1, [sp, #80]\n"
" ldp d2, d3, [sp, #96]\n"
" ldp x29, x30, [sp], #224\n"
" ret\n");
// one exported stub per name: x16 = its index
#define STR2(x) #x
#define STR(x) STR2(x)
static const int dummy_index_base __attribute__((unused)) = 0;
#define N(name) \
__asm__(".text\n.p2align 2\n.globl " #name "\n.type " #name ", %function\n" #name ":\n" \
" mov x16, #" STR(__COUNTER__) "\n b fp_trace_common\n");
#include "names.inc"
#undef N
+36
View File
@@ -7,11 +7,18 @@
// Meta's OVRPlugin finds xrGetInstanceProcAddr with dlopen("libopenxr_loader.so") + dlsym, so FramePort points that
// string in libOVRPlugin.so at this library instead (patches/frame/adapter.py). Names the adapter emulates are served
// by the adapter (framebridge_extension_proc); everything else goes to overport's xrGetInstanceProcAddr unchanged.
//
// Haptics (GitHub #9, found by Klownicle in Lucky's Tale): overport's dispatcher converts an
// XrHapticAmplitudeEnvelopeVibrationFB with its nanosecond duration taken as seconds, so one vibration allocates an
// enormous sample buffer and the Frame runs out of memory and freezes. The shim hands OVRPlugin its own
// xrApplyHapticFeedback, which turns such an envelope into a plain XrHapticVibration (same duration, its peak
// amplitude) before the dispatcher sees it. Everything else passes through unchanged.
#include <openxr/openxr.h>
#include <android/log.h>
#include <dlfcn.h>
#include <pthread.h>
#include <stddef.h>
#include <string.h>
#define TAG "FrameBridge"
#define EXPORT __attribute__((visibility("default")))
@@ -40,9 +47,38 @@ static PFN_xrVoidFunction adapter_proc(const char *name) {
return fn(name);
}
static PFN_xrApplyHapticFeedback overport_haptics;
static int haptics_logged;
static XRAPI_ATTR XrResult XRAPI_CALL apply_haptic_feedback(XrSession session, const XrHapticActionInfo *info,
const XrHapticBaseHeader *feedback) {
if (feedback && feedback->type == XR_TYPE_HAPTIC_AMPLITUDE_ENVELOPE_VIBRATION_FB) {
const XrHapticAmplitudeEnvelopeVibrationFB *env = (const XrHapticAmplitudeEnvelopeVibrationFB *)feedback;
float peak = 0.0f;
for (uint32_t i = 0; env->amplitudes && i < env->amplitudeCount; ++i)
if (env->amplitudes[i] > peak) peak = env->amplitudes[i];
XrHapticVibration plain = {XR_TYPE_HAPTIC_VIBRATION, NULL, env->duration, XR_FREQUENCY_UNSPECIFIED,
peak > 1.0f ? 1.0f : peak};
if (haptics_logged++ < 3)
__android_log_print(ANDROID_LOG_INFO, TAG, "extension shim: haptic envelope (%u samples, %lld ns) -> "
"vibration %.2f", env->amplitudeCount, (long long)env->duration, plain.amplitude);
return overport_haptics(session, info, (const XrHapticBaseHeader *)&plain);
}
return overport_haptics(session, info, feedback);
}
EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrGetInstanceProcAddr(XrInstance instance, const char *name,
PFN_xrVoidFunction *function) {
pthread_once(&once, resolve_overport);
if (name && function && instance != XR_NULL_HANDLE && overport_gipa && !strcmp(name, "xrApplyHapticFeedback")) {
PFN_xrVoidFunction real = NULL;
XrResult r = overport_gipa(instance, name, &real);
if (XR_SUCCEEDED(r) && real) {
overport_haptics = (PFN_xrApplyHapticFeedback)real;
*function = (PFN_xrVoidFunction)apply_haptic_feedback;
}
return r;
}
if (name && function && instance != XR_NULL_HANDLE) {
PFN_xrVoidFunction emulated = adapter_proc(name);
if (emulated) {
+1 -1
View File
@@ -1,2 +1,2 @@
# The FramePort version: the single source (pyproject reads it via hatch; CI checks a release tag matches it).
__version__ = "0.10.0"
__version__ = "0.11.0"
+39 -2
View File
@@ -22,17 +22,40 @@ def _path() -> Path:
return user_data_dir() / "library.json"
_updating = threading.local() # set while load() runs the migrations/catalog step (see load)
def load() -> dict:
with _lock:
try:
data = json.loads(_path().read_text(encoding="utf-8"))
except (OSError, ValueError):
return {"games": {}, "settings": {}}
if _migrate(data) | _follow_catalog(data):
# The catalog step loads the catalog, whose first load reads a setting: that nested load() must not run the
# step again (GitHub #58: ~140 nested loads and a 30 s blank window, or a crash at start-up)
if getattr(_updating, "active", False):
return data
_updating.active = True
try:
changed = _migrate(data) | _follow_catalog(data)
finally:
_updating.active = False
if changed:
save(data)
return data
def peek_setting(key: str, default=None):
"""A setting as stored, without migrations or the catalog step (for code that load() itself runs)."""
with _lock:
try:
data = json.loads(_path().read_text(encoding="utf-8"))
except (OSError, ValueError):
return default
settings = data.get("settings") if isinstance(data, dict) else None
return settings.get(key, default) if isinstance(settings, dict) else default
@contextmanager
def edit() -> Iterator[dict]:
"""A read-modify-write of the whole library as one step: `with edit() as data: ...` (saved on exit)."""
@@ -62,8 +85,22 @@ def _follow_catalog(data: dict) -> bool:
continue
if app_updated and isinstance(a, dict):
changed |= _refresh_data_fields(g, a)
if not isinstance(r, dict) or not isinstance(a, dict) or r.get("source") == "user":
if not isinstance(r, dict) or not isinstance(a, dict):
continue
if r.get("source") == "user":
# the user's own recipe isn't replaced, but a changed catalog entry is offered on the game page (GitHub
# #10: a VR4 fix never reached a recipe whose Game settings had been saved once)
entry = catalog.lookup(pkg)
offer = entry.rev() if entry is not None and r.get("catalog_rev") not in (None, entry.rev()) else None
if g.get("catalog_update") != offer:
if offer:
g["catalog_update"] = offer
else:
g.pop("catalog_update", None)
changed = True
continue
if g.pop("catalog_update", None) is not None: # no longer the user's recipe (reset): nothing to offer
changed = True
entry = catalog.lookup(pkg)
if not app_updated and (entry is None or r.get("catalog_rev") == entry.rev()):
continue
+24 -4
View File
@@ -60,6 +60,7 @@
"A Meta Quest game (APK). It's rebuilt for the Frame and runs in Lepton, Valve's Android container.": "",
"A native Linux program built for arm64 (aarch64), like the Frame's own CPU. It's installed unchanged and runs directly on SteamOS (no Android container, no Proton), started from the Frame's Steam library. VR apps use the Frame's OpenXR runtime.": "",
"A new FramePort version is ready to install": "",
"A newer known-good config for this game is available (you changed this game's settings, so it wasn't applied by itself).": "",
"A recipe is the list of patches FramePort applies to a game before installing it. Known-good recipes were tested on a Frame; the others are suggested from the game's engine and VR API. Hover a patch for why it's there.": "",
"A VR app made for another Android headset. OpenXR apps are translated like Quest games; apps built on a headset maker's own SDK (Pico, HTC Wave) can't run on the Frame.": "",
"A Windows game without VR, added with \"Add one game folder…\". On the Frame, Proton runs it as a window (like Steam's own Windows games); it's in the Frame's Steam library.": "",
@@ -344,6 +345,7 @@
"firewalld is active. Allow the setup port until the next restart with: sudo firewall-cmd --add-port={port}/tcp": "",
"First-time setup": "",
"Fix depth flicker (Unreal Vulkan)": "",
"Fix freezes when controllers vibrate": "",
"Fix launcher icon entry": "",
"Fix minimal Android SDK": "",
"Fix UE4 crash with Unity stub": "",
@@ -360,12 +362,15 @@
"Folder with VR games (Android APKs or PC VR games)": "",
"For apps that only know Quest 3/Pro controllers: without it they get no buttons.": "",
"For games that crash right after you return to them (e.g. after the Steam menu).": "",
"For games that freeze the Frame when a controller vibrates (e.g. Lucky's Tale). Needs a rebuild.": "",
"For games that judder or shimmer while you hold your head still (e.g. I Am Cat).": "",
"For games that pause or recenter when the headset briefly loses focus.": "",
"For games that show the headset's own controllers. Takes effect after a reinstall.": "",
"For games whose menus or screens jump to wherever you look.": "",
"For heavy games that use application space warp: it causes artifacts or hangs on non-Quest runtimes (e.g. Asgard's Wrath 2, Batman: Arkham Shadow).": "",
"For mixed-reality-only games. On the Frame, passthrough is emulated by the FrameBridge adapter (greyscale cameras).": "",
"For one eye looking wrong (e.g. a jittering right eye): logs each eye's submitted pose against a fresh one, the eye-to-eye relation and when each eye's image was released, also into framebridge.log in the game's storage (some games stop Android's log early). No effect on the game.": "",
"For troubleshooting: records the game's requests to Meta's platform services and which ones never get an answer.": "",
"For Unreal games that close themselves right after starting (e.g. Phantom: Covert Ops). Also disables the in-game Quit.": "",
"For Unreal games whose models flicker or show through walls and windows on the Frame (e.g. Into The Radius 2). Needs a rebuild.": "",
"For Vulkan games whose models flicker or vanish while you look at them (e.g. Into The Radius 2). Needs a rebuild.": "",
@@ -433,7 +438,10 @@
"GiB": "",
"Gives older Quest games a newer version of Meta's VR plugin that can be converted.": "",
"GL shim (Mesa GLSL compatibility)": "",
"GL shim for Unity (no multisampled render-to-texture)": "",
"GL shim only: hide GL_EXT_multisampled_render_to_texture(2) (Zink crashes rendering Unity's runtime MSAA eye buffer through it, e.g. The Room VR).": "",
"GL shim only: hide GL_OVR_multiview so all passes use single-view shaders. For GLES games whose multiview shaders fail on single-view render targets (e.g. Path of the Warrior).": "",
"GL shim: hide multisampled render-to-texture": "",
"GL shim: hide multiview": "",
"GL wrapper: OpenGL ES depth formats (Minecraft)": "",
"Go to my library": "",
@@ -445,7 +453,7 @@
"Hide Quest foveation": "",
"Hides Android's back/home/recents buttons, which cover the app's own buttons.": "",
"Hides Quest foveation extensions the Frame runtime lacks.": "",
"Hides the Frame's brief focus dips (up to a second) once the game has been focused for a second. For games that recentre or pause every time focus returns.": "",
"Hides the Frame's brief focus dips (up to focus_hold_ms) once the game has been focused for a second. On by default: the Frame's wear sensor flickers \"HMD off\" for 0.5-2 s while worn, and many games pause or recentre every time (e.g. Blade & Sorcery, Lucky's Tale).": "",
"Hides XR_FB_space_warp, so the game renders every frame itself instead of half of them plus motion vectors (Application SpaceWarp). For games whose picture flickers or smears on the Frame (e.g. Unreal Engine 5 games such as Into The Radius 2).": "",
"High": "",
"Higher is sharper but needs more power.": "",
@@ -558,9 +566,11 @@
"Loading…": "",
"Loads FramePort's OpenXR layer under Proton on the Frame. The Frame's SteamVR runtime only accepts OpenXR 1.0 apps, but Proton's VR helper asks for 1.1, so without the layer VR never starts (the game shows as a flat window, or Revive fails with 'Unable to load LibOVRRT DLL'); the layer retries as 1.0. It also emulates xrConvertTimespecTimeToTimeKHR if a runtime refuses it. Ignored on this PC.": "",
"Loads libglshim.so ahead of libEGL in every engine library that fetches GL through eglGetProcAddress. Fixes Quest-only leniency that Mesa/Zink rejects: #pragma before #extension, implicit int/float conversions (enables GL_EXT_shader_implicit_conversions), and multiview shaders used on single-view framebuffers (hides GL_OVR_multiview; gl_hide_multiview=0 turns that off). Logs every failed shader with its source lines (logcat tag GLShim). Symptom: black screen with working audio in a GLES game.": "",
"Loads the GL shim into a Unity GLES game and hides GL_EXT_multisampled_render_to_texture (and the multiview variant). Some Unity games switch their eye buffer to 4x MSAA at runtime; the Frame only gives single-sampled swapchains, Unity then renders through multisampled render-to-texture and Mesa/Zink crashes (SIGSEGV in libgallium_dri.so on the render thread: grey or frozen screen, e.g. The Room VR). Hidden, Unity uses an ordinary MSAA buffer and resolves it. Unity's multiview stays on (gl_hide_multiview defaults to 0 here).": "",
"Locations": "",
"Logo": "",
"Logs details for debugging: composition layers and swapchains, focus changes, play-space creation, pointer vs grip poses, refresh rates. No effect on the game.": "",
"Logs every Meta Platform SDK request the game makes (user, entitlement, cloud saves, ...) and the messages that answer them, and every 10 s the requests that never got an answer (logcat tag fp_ovrtrace, in launch.log). For games that wait forever on a loading screen (e.g. Vader Immortal after its intro). Changes nothing: every call goes to the real function.": "",
"Longer for headsets that briefly think they're off your head.": "",
"Looking for Frames on your network…": "",
"Looking for the Frame on a USB cable (Developer Mode on, USB-C port connected to this computer).": "",
@@ -583,7 +593,8 @@
"Menus and screens": "",
"Meta Quest": "",
"Meta XR Audio: skip Quest telemetry class": "",
"Meta's OVRManager switches Unity to the headset's recommended MSAA level (4x) while the game runs, whatever its quality settings say (log: \"Switching to the recommended level\"). Multisampled render-to-texture on GLES can hang the Frame's GPU, up to a restart of the whole headset (e.g. Lucky's Tale in a menu). Rewrites OVRDisplay.recommendedMSAALevel -> 0 in libil2cpp.so (found with Cpp2IL), so MSAA stays off.": "",
"Meta's OVRManager switches Unity to the headset's recommended MSAA level (4x) while the game runs, whatever its quality settings say (log: \"Switching to the recommended level\"). Multisampled render-to-texture on GLES can hang the Frame's GPU, up to a restart of the whole headset (e.g. Lucky's Tale in a menu) or a crash of its GL driver (e.g. The Room VR, whose own code sets 4x). Rewrites OVRDisplay.recommendedMSAALevel -> 0 and makes QualitySettings.antiAliasing's setter do nothing in libil2cpp.so (found with Cpp2IL), so MSAA stays off.": "",
"Meta's OVROverlay copies a texture into its own compositor layer every frame. For some games (e.g. The Room VR's screen fade, a 4x4 overlay) that copy crashes the Frame's GL driver: SIGSEGV in libgallium_dri.so on Unity's render thread right after a tiny xrCreateSwapchain, grey or frozen screen. Rewrites OVROverlay.PopulateLayer -> false in libil2cpp.so (found with Cpp2IL): overlays are skipped (fades become instant cuts, overlay splash screens don't show). Only for games with this crash: menus drawn as overlays would disappear too.": "",
"MiB": "",
"Minecraft asks for desktop OpenGL's GL_DEPTH_COMPONENT32 depth textures. Some builds of LTW, the OpenGL-to-OpenGL ES wrapper in Minecraft launchers such as QuestCraft, pass that on unchanged; Quest's driver accepts it, the Frame's Mesa rejects it (GL_INVALID_OPERATION in glTexImage2D), so the depth buffer never exists and the picture stays black. LTW then loads OpenGL ES through a small shim that asks for GL_DEPTH_COMPONENT32F (or 24-bit) instead.": "",
"Mirrored": "",
@@ -601,6 +612,7 @@
"Needs Windows (or WSL on Windows)": "",
"Neutralises Meta XR Audio's Quest-only calls (Unity/Wwise).": "",
"never": "",
"New config applied: use Update on Frame to install it": "",
"New folder": "",
"New folder…": "",
"New Frame? Run one command on it and FramePort does the rest. Did this once already? Your Frame appears under step 2.": "",
@@ -803,6 +815,7 @@
"Rename": "",
"Rename {name}": "",
"Rename…": "",
"Repeat xrLocateViews queries for the same display time get the first, fully tracked answer again. Games that ask several times per frame got slightly different poses and rendered parts of the frame with different heads: judder (e.g. I Am Cat; proposed by Klownicle, GitHub #8).": "",
"Replace application label and icon": "",
"Replaces libvrapi.so with a VrApi→OpenXR bridge (Android-XR-Bridge/OVRPort fork, GPL-3.0, patched for the Frame: GLES sessions, cylinder→quad layers, sRGB format fallback, 30 s VR-mode deadline, emulated time conversion). Needed when the engine calls VrApi itself instead of through OVRPlugin (e.g. The Climb 2, Path of the Warrior); OVRPort cannot translate those.": "",
"Report a problem": "",
@@ -832,6 +845,7 @@
"Room height": "",
"Room width": "",
"Rotate quads 180°": "",
"Routes OVRPlugin through FramePort's extension shim, which turns Meta's amplitude-envelope vibrations into plain ones: OVRPort's loader reads their nanosecond duration as seconds and allocates gigabytes, freezing the Frame when the game vibrates a controller (e.g. Lucky's Tale's save slots, GitHub #9). Needs a rebuild.": "",
"Runs directly — no Revive needed": "",
"Runs natively on SteamOS, started from the Frame's Steam library": "",
"Runs Oculus PC games on OpenXR": "",
@@ -935,6 +949,7 @@
"Starts the game with options, e.g. to choose SteamVR or OpenXR.": "",
"Starts the game with the launcher that came with your copy.": "",
"Status": "",
"Steadier head tracking": "",
"Steady controller input after focus": "",
"Steam": "",
"Steam for Windows not found": "",
@@ -948,6 +963,8 @@
"Stop": "",
"Stop objects popping in and out": "",
"Stopped: {why}": "",
"Stops a grey or frozen screen in Unity games that turn on anti-aliasing while running (e.g. The Room VR).": "",
"Stops a grey screen crash in some Unity games by skipping their overlay layers (e.g. The Room VR's screen fades).": "",
"Stops Meta's audio library from reporting to Meta (only matters on PC emulators).": "",
"Stops some Unreal games from closing themselves right after starting.": "",
"Stops strict debugging checks that make some games quit.": "",
@@ -1037,6 +1054,7 @@
"Today": "",
"Tools": "",
"Tools are up to date": "",
"Trace Meta platform requests (diagnostics)": "",
"Translator for games built on Meta's oldest VR interface.": "",
"transparent PNG": "",
"Treat newer Quest controllers as Touch": "",
@@ -1075,12 +1093,13 @@
"Uninstall. ": "",
"Uninstalled {title}": "",
"Uninstalled {title} and deleted its files on this PC ({size})": "",
"Unity 2017: start VR without Meta's system apps": "",
"Unity's older built-in Oculus support (Unity 2017–2018) only starts VR when Android has Meta's com.oculus.systemactivities package; without it the game runs as a hidden 2D app (you see the Android home screen, e.g. Accounting+). Points that package name in libunity.so at \"android\", which always exists, and adds the frame wait its legacy frame loop never makes (libfp_ovrp.so calls ovrp_WaitToBeginFrame before ovrp_Update2; without it no frame starts and the dashboard freezes).": "",
"Unity's built-in Oculus support (Unity 2017–2019) only starts VR when Android has Meta's com.oculus.systemactivities package; without it the game runs as a 2D app (the Android home screen or a black window, e.g. Accounting+, BattleSisters). Points that package name in libunity.so at \"android\", which always exists. Games on Unity's built-in VR (2017–2018, and 2019 without the Oculus XR Plugin) also get the frame wait their legacy frame loop never makes (libfp_ovrp.so calls ovrp_WaitToBeginFrame before ovrp_Update2; without it no frame starts, the dashboard freezes or the GPU hangs). The shim also counts a newly pressed trigger or A/B/X/Y as a mouse click (Input.GetMouseButtonDown), which Go-era screens wait for (e.g. Accounting+'s motion warning) and which Lepton never delivers.": "",
"Unity's TMP_InputField / InputField wait for Android's on-screen keyboard and close themselves a frame later when there is none (Lepton has no on-screen keyboard; Meta's system keyboard does this on a Quest), so a selected text field only flashes a caret. Rewrites TouchScreenKeyboardShouldBeUsed -> false and isKeyboardUsingEvents (TMP) / InPlaceEditing (uGUI) -> true in libil2cpp.so, found per game with Cpp2IL (downloaded on first use), so fields stay selected and take key presses: Steam's keyboard (with \"Show the app window\") or Type on Frame from the PC.": "",
"Unity: disable MSAA": "",
"Unity: keep MSAA off at runtime (OVRManager)": "",
"Unity: render each eye separately (no multiview)": "",
"Unity: skip OVROverlay layers (fades, splash screens)": "",
"Unity: start VR without Meta's system apps": "",
"Unknown date": "",
"Unreal builds of Meta XR Audio abort ('ClassNotFoundException com.oculus.os.AnalyticsEvent') on non-Quest devices. Patches that one JNI FindClass call so the library continues (e.g. NOPE Challenge).": "",
"Unreal games start CrashReportClient when they crash, which leaves a crash dialog instead of simply closing. This passes -nocrashreports to the game and, on the Frame, renames the game's copy of CrashReportClient.exe so it can't start (your game files on this PC aren't changed).": "",
@@ -1116,6 +1135,7 @@
"Upside down and mirrored": "",
"Use controllers": "",
"Use tags to group and filter your library": "",
"Use the new config": "",
"Use the repack's launcher (bundled Revive)": "",
"Use this computer's keyboard on the Frame": "",
"Use this program": "",
+2 -1
View File
@@ -68,7 +68,8 @@ def needs_xrshim(recipe_patches: dict) -> bool:
"""Adapter features whose functions OVRPort's dispatcher doesn't forward (it only knows a fixed table)."""
from ..settings import adapter_settings
return bool(adapter_settings(recipe_patches).get("controller_models"))
s = adapter_settings(recipe_patches)
return bool(s.get("controller_models") or s.get("haptic_fix"))
def add_xrshim(ctx: ApkContext) -> bool:
+65
View File
@@ -0,0 +1,65 @@
"""Meta Platform SDK tracer (diagnostics): logs the game's ovr_* calls and their answers (native/ovrtrace)."""
from __future__ import annotations
from ...analysis import elf
from ..base import ApkContext, Patch, register
from . import artifact
LIB = "libfp_ovrtrace.so"
SKIP = ("libovrplatformloader", "libfp_", "libframe", "libopenxr", "libOVRPlugin", "libvrapi", "libc++")
def ovr_importers(ws) -> list[str]:
"""The game's libraries that call Meta Platform SDK functions (ovr_* imports)."""
out = []
for lib in ws.libs():
if lib.startswith(SKIP):
continue
data = ws.read_lib(lib)
if elf.is_elf(data) and any(s.startswith("ovr_") for s in elf.dyn_symbols(data, False)):
out.append(lib)
return out
class OvrTrace(Patch):
id = "frame.ovr_trace"
title = "Trace Meta platform requests (diagnostics)"
description = ("Logs every Meta Platform SDK request the game makes (user, entitlement, cloud saves, ...) and the "
"messages that answer them, and every 10 s the requests that never got an answer (logcat tag "
"fp_ovrtrace, in launch.log). For games that wait forever on a loading screen (e.g. Vader "
"Immortal after its intro). Changes nothing: every call goes to the real function.")
order = 95
needs_vr = False
experimental = True
def applies(self, a):
return "arm64-v8a" in a.abis and "libovrplatformloader.so" in a.libs
def detect(self, a):
return None # diagnostics only, on request
def apply(self, ctx: ApkContext) -> bool:
ws = ctx.ws
if ws.abi != "arm64-v8a":
return False
libs = ovr_importers(ws)
for lib in libs:
data = ws.read_lib(lib)
if LIB not in elf.needed(data):
ws.put(ws.lib(lib), elf.add_needed(data, LIB))
if libs:
ws.put(ws.lib(LIB), artifact(ws.abi, LIB))
ctx.notes.append(f"Meta platform calls traced in {', '.join(libs)}")
return bool(libs)
def validate(self, ctx: ApkContext):
ws = ctx.ws
traced = []
for lib in ws.libs():
data = b"" if lib.startswith(SKIP) else ws.read_lib(lib)
if elf.is_elf(data) and LIB in elf.needed(data):
traced.append(lib)
return [("Platform tracer loaded", bool(traced) and ws.has(ws.lib(LIB)), ", ".join(traced))] if traced else []
register(OvrTrace)
@@ -5,6 +5,8 @@ Android home screen, e.g. Accounting+, Unity 2017.4). The package name in libuni
installed): a same-length, in-place string edit; everything else about the check stays as it is."""
from __future__ import annotations
import os
from ...analysis import elf
from ..base import ApkContext, Patch, Suggestion, register
from . import artifact
@@ -14,10 +16,12 @@ ALWAYS_THERE = "android"
# Unity's legacy frame loop never calls ovrp_WaitToBeginFrame: its ovrp_Update2 lookup goes to native/ovrpshim
SHIM = "libfp_ovrp.so"
UPDATE, SHIM_UPDATE = "ovrp_Update2", "fpov_Update2"
# Unity creates its XR controller devices for the hand nodes OVRPlugin reports present (logged/fixed by the shim)
NODE, SHIM_NODE = "ovrp_GetNodePresent", "fpov_GetNodePresent"
# input diagnostics (off): the C# P/Invoke names in libil2cpp.so pointed at the shim's wrappers, which log what they
# return, report input focus as true and release buttons held > 2 s. Accounting+ still didn't pass "press any button"
# with them (input reached the game cleanly), so they stay off; switch on to investigate another game.
INPUT_PROBE = False
INPUT_PROBE = os.environ.get("FRAMEPORT_INPUT_PROBE") == "1" # diagnostic builds only
INPUT_CALLS = ("ovrp_GetConnectedControllers", "ovrp_GetControllerState4", "ovrp_GetControllerState2",
"ovrp_GetAppHasInputFocus")
UNITY_INPUT_CALLS = ("ovrp_GetControllerState", "ovrp_GetControllerState2")
@@ -25,27 +29,41 @@ UNITY_INPUT_CALLS = ("ovrp_GetControllerState", "ovrp_GetControllerState2")
class UnityOculusCheck(Patch):
id = "frame.unity_oculus_check"
title = "Unity 2017: start VR without Meta's system apps"
description = ("Unity's older built-in Oculus support (Unity 2017–2018) only starts VR when Android has Meta's "
"com.oculus.systemactivities package; without it the game runs as a hidden 2D app (you see the "
"Android home screen, e.g. Accounting+). Points that package name in libunity.so at \"android\", "
"which always exists, and adds the frame wait its legacy frame loop never makes (libfp_ovrp.so "
"calls ovrp_WaitToBeginFrame before ovrp_Update2; without it no frame starts and the dashboard "
"freezes).")
title = "Unity: start VR without Meta's system apps"
description = ("Unity's built-in Oculus support (Unity 2017–2019) only starts VR when Android has Meta's "
"com.oculus.systemactivities package; without it the game runs as a 2D app (the Android home "
"screen or a black window, e.g. Accounting+, BattleSisters). Points that package name in "
"libunity.so at \"android\", which always exists. Games on Unity's built-in VR (2017–2018, and 2019 "
"without the Oculus XR Plugin) also get the frame wait their legacy frame loop never makes "
"(libfp_ovrp.so calls ovrp_WaitToBeginFrame before ovrp_Update2; without it no frame starts, the "
"dashboard freezes or the GPU hangs). The shim also counts a newly pressed trigger or A/B/X/Y as a "
"mouse click (Input.GetMouseButtonDown), which Go-era screens wait for (e.g. Accounting+'s motion "
"warning) and which Lepton never delivers.")
order = 45
# 2: frame wait also for Unity 2019 without the Oculus XR Plugin; 3: controller presses as mouse clicks (ovrpshim)
revision = 3
@staticmethod
def _major(a) -> int:
return int(str((a.extra or {}).get("unity_version") or "0").split(".")[0] or 0)
@classmethod
def legacy_loop(cls, a) -> bool:
"""Unity's built-in Oculus VR drives OVRPlugin without waiting for frames: Unity 2017-2018, and 2019 games
without the Oculus XR Plugin (BattleSisters flooded "outside of frame bounds" and hung the GPU). With
libOculusXRPlugin.so (XR Plugin Management, e.g. Lucky's Tale) the plugin waits itself."""
major = cls._major(a)
return 0 < major < 2019 or (major == 2019 and "libOculusXRPlugin.so" not in a.libs)
def applies(self, a):
x = a.extra or {}
major = int(str(x.get("unity_version") or "0").split(".")[0] or 0)
# Unity 2019+ games run without it (e.g. Lucky's Tale 2019.4): their builds stay as they are
return a.engine == "Unity" and "libOVRPlugin.so" in a.libs and bool(x.get("unity_oculus_check")) \
and 0 < major < 2019
# any Unity with built-in Oculus support whose libunity.so has the check (BattleSisters, Unity 2019.4, stayed
# a 2D app without it); Lucky's Tale (2019.4) runs either way
return a.engine == "Unity" and "libOVRPlugin.so" in a.libs and bool((a.extra or {}).get("unity_oculus_check"))
def detect(self, a):
if self.applies(a):
return Suggestion(True, "Older Unity with built-in Oculus support: it checks for Meta's system apps "
"before starting VR, and its frame loop never waits for the next frame "
"(e.g. Accounting+).")
return Suggestion(True, "Unity with built-in Oculus support: it checks for Meta's system apps before "
"starting VR, else it runs as a 2D app (e.g. Accounting+, BattleSisters).")
return None
def apply(self, ctx: ApkContext) -> bool:
@@ -56,7 +74,12 @@ class UnityOculusCheck(Patch):
data, count = elf.replace_rodata_string(ws.read(name), PACKAGE, ALWAYS_THERE)
if not count:
return False
data, loops = elf.replace_rodata_string(data, UPDATE, SHIM_UPDATE)
data, loops = elf.replace_rodata_string(data, UPDATE, SHIM_UPDATE) if self.legacy_loop(ctx.analysis) \
else (data, 0)
if loops:
data, nodes = elf.replace_rodata_string(data, NODE, SHIM_NODE)
if nodes:
ctx.notes.append(f"libunity.so: {NODE} -> {SHIM_NODE}")
plugin = ws.lib("libOVRPlugin.so")
if loops and ws.abi == "arm64-v8a" and ws.has(plugin):
ovrp = ws.read(plugin)
+30 -3
View File
@@ -23,11 +23,16 @@ class UnityRuntimeMsaa(Il2cppReturnPatch):
description = ("Meta's OVRManager switches Unity to the headset's recommended MSAA level (4x) while the game runs, "
"whatever its quality settings say (log: \"Switching to the recommended level\"). Multisampled "
"render-to-texture on GLES can hang the Frame's GPU, up to a restart of the whole headset (e.g. "
"Lucky's Tale in a menu). Rewrites OVRDisplay.recommendedMSAALevel -> 0 in libil2cpp.so (found with "
"Cpp2IL), so MSAA stays off.")
"Lucky's Tale in a menu) or a crash of its GL driver (e.g. The Room VR, whose own code sets 4x). "
"Rewrites OVRDisplay.recommendedMSAALevel -> 0 and makes QualitySettings.antiAliasing's setter do "
"nothing in libil2cpp.so (found with Cpp2IL), so MSAA stays off.")
order = 47
targets = {"Oculus.VR/OVRDisplay.cs": {"get_recommendedMSAALevel": RET_ZERO},
"Assembly-CSharp/OVRDisplay.cs": {"get_recommendedMSAALevel": RET_ZERO}} # older Oculus Integration
"Assembly-CSharp/OVRDisplay.cs": {"get_recommendedMSAALevel": RET_ZERO}, # older Oculus Integration
# the game's own code can raise MSAA too (The Room VR: QualitySettingsManager.SetMSAA with its
# platform's default 4): Unity's setter does nothing, the quality settings' 0 stays
"UnityEngine.CoreModule/UnityEngine/QualitySettings.cs": {"set_antiAliasing": RET_ZERO}}
revision = 2 # 0.11.0: also QualitySettings.set_antiAliasing (the game's own runtime MSAA crashed Zink)
check_name = "Unity MSAA"
def applies(self, a):
@@ -65,5 +70,27 @@ class UnityMultiPass(Il2cppReturnPatch):
return None # only for a game that shows the symptom (catalog recipe or the user's choice)
class UnityNoOverlayCopy(Il2cppReturnPatch):
id = "frame.unity_no_overlay_copy"
title = "Unity: skip OVROverlay layers (fades, splash screens)"
description = ("Meta's OVROverlay copies a texture into its own compositor layer every frame. For some games "
"(e.g. The Room VR's screen fade, a 4x4 overlay) that copy crashes the Frame's GL driver: SIGSEGV "
"in libgallium_dri.so on Unity's render thread right after a tiny xrCreateSwapchain, grey or frozen "
"screen. Rewrites OVROverlay.PopulateLayer -> false in libil2cpp.so (found with Cpp2IL): overlays "
"are skipped (fades become instant cuts, overlay splash screens don't show). Only for games with "
"this crash: menus drawn as overlays would disappear too.")
order = 49
targets = {"Oculus.VR/OVROverlay.cs": {"PopulateLayer": RET_ZERO},
"Assembly-CSharp/OVROverlay.cs": {"PopulateLayer": RET_ZERO}} # older Oculus Integration
check_name = "Unity overlays"
def applies(self, a):
return a.engine == "Unity" and "libil2cpp.so" in a.libs and not a.only_32bit and "GLES" in a.graphics
def detect(self, a):
return None # only for a game that shows the crash (catalog recipe or the user's choice)
register(UnityRuntimeMsaa)
register(UnityMultiPass)
register(UnityNoOverlayCopy)
@@ -84,5 +84,29 @@ class GlShim(Patch):
return True
class UnityGlShim(GlShim):
id = "frame.unity_gl_shim"
title = "GL shim for Unity (no multisampled render-to-texture)"
description = (
"Loads the GL shim into a Unity GLES game and hides GL_EXT_multisampled_render_to_texture (and the multiview "
"variant). Some Unity games switch their eye buffer to 4x MSAA at runtime; the Frame only gives single-sampled "
"swapchains, Unity then renders through multisampled render-to-texture and Mesa/Zink crashes (SIGSEGV in "
"libgallium_dri.so on the render thread: grey or frozen screen, e.g. The Room VR). Hidden, Unity uses an "
"ordinary MSAA buffer and resolves it. Unity's multiview stays on (gl_hide_multiview defaults to 0 here).")
order = 62
requires = ()
experimental = False
def detect(self, a):
if self.applies(a) and ((a.extra or {}).get("ovr_runtime_msaa") or a.unity_msaa_levels):
return Suggestion(True, "Unity GLES game that may switch to MSAA at runtime: hide multisampled "
"render-to-texture, which crashes the Frame's GL driver (e.g. The Room VR).")
return None
def applies(self, a):
return a.engine == "Unity" and "GLES" in a.graphics and "arm64-v8a" in a.abis
register(VrApiBridge)
register(GlShim)
register(UnityGlShim)
+27 -6
View File
@@ -61,10 +61,11 @@ SETTINGS = [
("stable_local", "int", 0, "Keep the play space still",
"Every 'local' play space the game creates lines up with the one at the start. For games whose menus or screens "
"jump to where you look on the Frame."),
("focus_hold", "int", 0, "Ignore brief focus dips",
"Hides the Frame's brief focus dips (up to a second) once the game has been focused for a second. For "
"games that recentre or pause every time focus returns."),
("focus_hold_ms", "float", 1000.0, "Longest focus dip to ignore (ms)",
("focus_hold", "int", 1, "Ignore brief focus dips",
"Hides the Frame's brief focus dips (up to focus_hold_ms) once the game has been focused for a second. On by "
"default: the Frame's wear sensor flickers \"HMD off\" for 0.5-2 s while worn, and many games pause or recentre "
"every time (e.g. Blade & Sorcery, Lucky's Tale)."),
("focus_hold_ms", "float", 5000.0, "Longest focus dip to ignore (ms)",
"focus_hold hides focus dips up to this long (100-5000). Longer for a headset whose wear sensor flickers "
"(\"HMD off\" for 0.5-2 s while worn, e.g. Blade & Sorcery pausing); taking the headset off or the system menu "
"pauses the game only after this long."),
@@ -108,6 +109,14 @@ SETTINGS = [
"Override the guardian width (0 = use guardian, min 1.5 m)."),
("scene_depth", "float", 0.0, "Emulated room depth (m)",
"Override the guardian depth (0 = use guardian, min 1.5 m)."),
("pose_consistency", "int", 0, "Consistent head poses per frame",
"Repeat xrLocateViews queries for the same display time get the first, fully tracked answer again. Games that "
"ask several times per frame got slightly different poses and rendered parts of the frame with different heads: "
"judder (e.g. I Am Cat; proposed by Klownicle, GitHub #8)."),
("haptic_fix", "int", 0, "Fix controller vibration freezes",
"Routes OVRPlugin through FramePort's extension shim, which turns Meta's amplitude-envelope vibrations into "
"plain ones: OVRPort's loader reads their nanosecond duration as seconds and allocates gigabytes, freezing the "
"Frame when the game vibrates a controller (e.g. Lucky's Tale's save slots, GitHub #9). Needs a rebuild."),
("rect_clamp", "int", 1, "Clamp image rects",
"Keeps every submitted image rect inside its swapchain. Unity can size the eye area a few pixels past the image "
"on some Frames; SteamVR then rejects every frame (xrEndFrame -25, XR_ERROR_SWAPCHAIN_RECT_INVALID) and the game "
@@ -135,6 +144,9 @@ SETTINGS = [
("vk_validation", "int", 0, "Vulkan shim: validation layer",
"Diagnostics: the Vulkan shim (frame.vk_sanitize) adds Khronos' validation layer to the game's instance; its "
"findings go to launch.log. The layer library (libVkLayer_khronos_validation.so) must be in the APK."),
("gl_hide_msrtt", "int", 1, "GL shim: hide multisampled render-to-texture",
"GL shim only: hide GL_EXT_multisampled_render_to_texture(2) (Zink crashes rendering Unity's runtime MSAA eye "
"buffer through it, e.g. The Room VR)."),
("gl_hide_multiview", "int", 1, "GL shim: hide multiview",
"GL shim only: hide GL_OVR_multiview so all passes use single-view shaders. For GLES games whose multiview "
"shaders fail on single-view render targets (e.g. Path of the Warrior)."),
@@ -143,7 +155,7 @@ SETTINGS = [
# settings that need a new build, not only new settings files: the Vulkan shim learned vk_shader_fix in 0.6.4 and
# vk_query_slots and vk_spec_fixes in 0.10.0
REVISIONS = {"vk_shader_fix": 2, "vk_query_slots": 3, "vk_spec_fixes": 2}
REVISIONS = {"vk_shader_fix": 2, "vk_query_slots": 3, "vk_spec_fixes": 2, "haptic_fix": 2, "pose_consistency": 2}
# How the "Game settings" dialog shows each setting to non-technical users: group, level (common settings are always
# shown; advanced ones only under "Show advanced settings"), a plain label and one-line help, the control, and the
@@ -164,6 +176,13 @@ UI: dict[str, dict] = {
"focus_hold_ms": dict(group="screens", level="advanced", label="Ignore focus dips up to", depends="focus_hold",
help="Longer for headsets that briefly think they're off your head.",
control=("slider", 500.0, 3000.0, 100.0, "{:.0f} ms")),
"pose_consistency": dict(group="picture", level="advanced", label="Steadier head tracking",
help="For games that judder or shimmer while you hold your head still (e.g. I Am Cat).",
control=("switch",)),
"haptic_fix": dict(group="controllers", level="advanced", label="Fix freezes when controllers vibrate",
help="For games that freeze the Frame when a controller vibrates (e.g. Lucky's Tale). Needs a "
"rebuild.",
control=("switch",)),
"vk_spec_fixes": dict(group="troubleshooting", level="advanced", label="Fix depth flicker (Unreal Vulkan)",
help="For Unreal games whose models flicker or show through walls and windows on the Frame "
"(e.g. Into The Radius 2). Needs a rebuild.",
@@ -236,7 +255,7 @@ UI: dict[str, dict] = {
control=("choice", [(0, "As the game sends it"), (2, "Flat")])),
**{key: dict(group="troubleshooting", level="advanced", control=("switch",)) for key in (
"foveation_fix", "hide_space_warp", "swapchain_fix", "layer_fix", "gl_hide_multiview", "mutable_fix",
"flip_quads", "swap_eyes", "vk_validation", "rect_clamp",
"flip_quads", "swap_eyes", "vk_validation", "rect_clamp", "gl_hide_msrtt",
"strip_depth", "respace_kick", "layer_debug", "eye_debug", "release_wait")},
}
@@ -291,9 +310,11 @@ class AdapterSetting(Patch):
"mutable_fix": ap.is_vulkan,
"swapchain_fix": ap.is_gles,
"gl_hide_multiview": lambda a: a.direct_vrapi and ap.is_gles(a),
"gl_hide_msrtt": ap.is_gles,
"vk_shader_fix": lambda a: a.engine == "Unreal", # read by the Vulkan shim, which only Unreal games get
"vk_query_slots": lambda a: a.engine == "Unreal" and ap.is_vulkan(a),
"vk_validation": lambda a: a.engine == "Unreal",
"haptic_fix": lambda a: "libOVRPlugin.so" in a.libs,
"vk_spec_fixes": lambda a: a.engine == "Unreal" and ap.is_vulkan(a),
"controller_models": ap.may_use_render_models,
**{k: ap.is_gles for k in ("equirect_emul", "equirect_face", "equirect_res", "equirect_flip",
+6
View File
@@ -42,12 +42,18 @@ SUMMARIES = {
"launcher, e.g. to import new content).",
"frame.ltw_depth": "Fixes the black picture in Minecraft launchers (e.g. QuestCraft): uses depth formats the "
"Frame's graphics driver accepts.",
"frame.unity_gl_shim": "Stops a grey or frozen screen in Unity games that turn on anti-aliasing while running "
"(e.g. The Room VR).",
"frame.unity_no_overlay_copy": "Stops a grey screen crash in some Unity games by skipping their overlay "
"layers (e.g. The Room VR's screen fades).",
"frame.nodebug": "Stops strict debugging checks that make some games quit.",
"frame.meta_permissions": "Declares Meta's permissions some mixed-reality games ask for, so they don't stop.",
"frame.ovrplatformcompat": "Adds a small piece of Meta's platform library that some games need to start.",
"frame.ovrstubs": "Provides stand-ins for Meta store functions the game expects, so it doesn't crash at start.",
"frame.langpacks": "Lets the game find language files (like de.lang) that are already in its data, instead of "
"waiting for a download that never comes.",
"frame.ovr_trace": "For troubleshooting: records the game's requests to Meta's platform services and which ones "
"never get an answer.",
"frame.unity_no_msaa": "Turns off a smoothing setting that crashes some older Unity games on the Frame.",
"frame.unity_runtime_msaa_off": "Keeps a smoothing setting off that the game turns on itself and that can freeze "
"the Frame.",
+17
View File
@@ -403,6 +403,23 @@ def reset_recipe(package: str) -> Recipe:
return recipe
def apply_catalog_update(package: str) -> Recipe:
"""Take the newer catalog recipe for a game whose recipe the user edited (the game page's "newer known-good
config" offer): derived again from the catalog, keeping the user's FrameBridge settings the catalog doesn't set."""
entry = library.game(package)
old = library.recipe_from_dict(entry["recipe"])
recipe = engine.suggest(library.analysis_from_dict(entry["analysis"]))
for pid, params in old.patches.items():
if pid.startswith("adapter.") and pid not in recipe.patches:
recipe.patches[pid] = params
if pid in old.reasons:
recipe.reasons[pid] = old.reasons[pid]
set_recipe(package, recipe)
with library.edit() as data:
data["games"].get(package, {}).pop("catalog_update", None)
return recipe
def prepare_rift(package: str, reporter: Reporter) -> dict:
"""Rift games aren't rebuilt: check the folder still matches the analysis and make sure Revive is available."""
from .build import sha256
+2 -1
View File
@@ -119,7 +119,8 @@ def remote_enabled() -> bool:
if os.environ.get("FRAMEPORT_NO_CATALOG_UPDATE"):
return False
try:
return bool(library.setting("catalog.auto_update", True))
# never library.setting(): load() refreshes recipes from the catalog, which would load the catalog again
return bool(library.peek_setting("catalog.auto_update", True))
except Exception: # noqa: BLE001 - no library yet
return True
+4
View File
@@ -53,6 +53,7 @@ def save_to_recipe(package: str, values: dict) -> None:
"""Adapter patches = the settings that differ from their defaults (BASE_SETTINGS are written anyway)."""
g = library.game(package)
r = library.recipe_from_dict(g["recipe"])
before = {pid: dict(v or {}) for pid, v in r.patches.items() if pid.startswith("adapter.")}
for key in SPECS:
pid = f"adapter.{key}"
v = _num(key, values.get(key, default(key)))
@@ -63,6 +64,9 @@ def save_to_recipe(package: str, values: dict) -> None:
if (r.patches.get(pid) or {}).get("value") != v:
r.reasons[pid] = tr("Set by you.")
r.patches[pid] = {"value": v}
after = {pid: dict(v or {}) for pid, v in r.patches.items() if pid.startswith("adapter.")}
if after == before: # saved without a change: the recipe keeps following FramePort's catalog (GitHub #10)
return
r.source = "user"
pipeline.set_recipe(package, r)
+12
View File
@@ -252,6 +252,18 @@ class GameView:
C.ghost(tr("Not now"), on_click=dismiss),
], spacing=T.S2, run_spacing=T.S2, wrap=True),
], spacing=T.S2), "info", ft.Icons.VOLUNTEER_ACTIVISM_OUTLINED))
if g.get("catalog_update") and recipe.source == "user":
def take_update(e):
from ... import pipeline
pipeline.apply_catalog_update(pkg)
self.app.toast(tr("New config applied: use Update on Frame to install it"))
self.app.render()
out.append(C.callout(ft.Row([
C.body(tr("A newer known-good config for this game is available (you changed this game's settings, "
"so it wasn't applied by itself)."), T.TEXT, expand=True),
C.secondary(tr("Use the new config"), ft.Icons.AUTO_FIX_HIGH_OUTLINED, take_update)],
vertical_alignment=ft.CrossAxisAlignment.CENTER), "info", ft.Icons.NEW_RELEASES_OUTLINED))
if g.get("steam_art_stale") and installed:
out.append(C.callout(ft.Row([
C.body(tr("The Frame's Steam library still shows the old artwork."), T.TEXT, expand=True),
+32
View File
@@ -109,4 +109,36 @@ def triage(log: str, state: str = "UNKNOWN", package: str | None = None, crash:
fps = re.findall(r"pacing: ([0-9.]+) fps", text)
if fps:
res.fps = float(fps[-1])
stopped = frames_stopped(lines)
if stopped and state == "RUNNING" and not any(f.severity == "fatal" for f in res.findings):
res.findings.append(Finding(
"frames-stopped", "fatal",
f"The game stopped sending frames {stopped:.0f} s before the test ended although its process kept "
"running (a crashed or stuck render thread: a frozen picture in the headset).", [],
"last FrameBridge pacing line"))
return res
LOGCAT_TIME = re.compile(r"^\d\d-\d\d (\d\d):(\d\d):(\d\d)\.(\d{3})")
def frames_stopped(lines: list[str], gap: float = 20.0) -> float | None:
"""Seconds between FrameBridge's last pacing line and the end of the log when that is over `gap` (the frame loop
died while the process lived on, e.g. The Room VR's render thread crash, PowerWash Simulator's rejected frames)."""
def secs(line):
m = LOGCAT_TIME.match(line)
return int(m[1]) * 3600 + int(m[2]) * 60 + int(m[3]) + int(m[4]) / 1000 if m else None
last_pacing = last = None
for ln in lines: # logcat lines aren't strictly in time order: the latest time counts, not the last line
t = secs(ln)
if t is None:
continue
if last is not None and t < last - 43200: # past midnight
t += 86400
last = t if last is None else max(last, t)
if "FrameBridge: pacing:" in ln:
last_pacing = t
if last_pacing is None or last is None:
return None
delta = last - last_pacing
return delta if delta > gap else None
+5 -3
View File
@@ -1323,10 +1323,11 @@ def test_devkit_appid_from_steams_console_log(monkeypatch, tmp_path):
logs = Path(a.STEAM) / "logs"
logs.mkdir(parents=True, exist_ok=True)
exe = f"{a.DEVKIT_GAMES}/I_Am_Cat/launch.sh"
why = "reason: k_unAppIdInvalid"
(logs / "console_log.txt").write_text(
f'[2026-10-05 14:45:37] sanitize shortcut app id "{exe}": replacing 0 with 3849978641, reason: k_unAppIdInvalid\n'
f'[2026-10-05 14:45:37] sanitize shortcut app id "{exe}": replacing 0 with 3849978641, {why}\n'
f'[2026-10-05 14:45:38] sanitize shortcut app id "{a.DEVKIT_GAMES}/Other/launch.sh": replacing 0 with 5\n'
f'[2026-10-05 15:29:14] sanitize shortcut app id "{exe}": replacing 0 with 3849978642, reason: k_unAppIdInvalid\n')
f'[2026-10-05 15:29:14] sanitize shortcut app id "{exe}": replacing 0 with 3849978642, {why}\n')
assert a.devkit_appid("I_Am_Cat") == 3849978642 # nothing in shortcuts.vdf: the newest log line
assert a.devkit_appid("Missing") is None
@@ -1343,7 +1344,8 @@ def test_devkit_appid_ignores_the_previous_steam_session(monkeypatch, tmp_path):
def test_launch_registers_a_lost_devkit_entry_again(monkeypatch, tmp_path):
"""After a Steam restart Steam forgot the (never saved) devkit entry: Play gets AppError_9 and registers it again."""
"""After a Steam restart Steam forgot the (never saved) devkit entry: Play gets AppError_9 and registers it
again."""
a = load_agent(monkeypatch, tmp_path)
monkeypatch.setattr(a, "check_pkg", lambda p: p)
monkeypatch.setattr(a, "deployment", lambda p: {"appid": 111, "title": "Batman"})
+23
View File
@@ -71,3 +71,26 @@ def test_turned_off(github, monkeypatch):
assert catalog.refresh_remote(force=True) == 0
assert "com.x.good" not in catalog.load(refresh=True)
assert json.dumps(catalog.remote_status()) # still reports (never checked)
def test_library_load_with_a_cold_catalog_does_not_recurse(monkeypatch):
"""GitHub #58: library.load() refreshes recipes from the catalog; the catalog's first load read a setting through
library.load(), which refreshed recipes again before the catalog was cached (~140 nested loads, blank window or a
crash at start-up)."""
from frameport.core import library
monkeypatch.delenv("FRAMEPORT_NO_CATALOG_UPDATE", raising=False) # remote_enabled() must read the setting
monkeypatch.setattr(library, "REFRESH_ON_UPDATE", True)
library.save({"games": {"com.x.mine": {"recipe": {"source": "user", "patches": {}}, "analysis": {"package": "x"}}},
"settings": {"catalog.auto_update": False}})
catalog._cache = None
loads = []
real = library.load
def counting():
loads.append(1)
assert len(loads) < 10, "library.load() recursed"
return real()
monkeypatch.setattr(library, "load", counting)
library.load()
assert catalog.remote_enabled() is False and len(loads) <= 2
+42
View File
@@ -0,0 +1,42 @@
"""Meta Platform SDK tracer (native/ovrtrace + patch frame.ovr_trace)."""
from __future__ import annotations
import re
from pathlib import Path
from frameport.analysis import elf
from frameport.core.models import Analysis
from frameport.patches import base
from frameport.patches.frame import ovr_trace
ROOT = Path(__file__).resolve().parents[1]
def _names():
return re.findall(r"^N\((ovr_\w+)\)$", (ROOT / "native/ovrtrace/names.inc").read_text(), re.M)
def test_artifact_exports_every_traced_name():
names = _names()
assert len(names) == len(set(names)) > 1000
lib = (ROOT / "artifacts/arm64-v8a" / ovr_trace.LIB).read_bytes()
exported = elf.dyn_symbols(lib, True)
assert set(names) <= exported
assert "ovr_PopMessage" in names and "ovr_Message_GetRequestID" in names
def _a(abis, libs):
return Analysis(package="x", version="1.0", label="X", abis=abis, engine="Unreal", xr="VrApi", graphics="GLES",
direct_vrapi=False, libs=libs, launcher_activity=None, has_info_category=True, meta_permissions=[],
uses_glad_gl=False, unity_msaa_levels=0, oculus_os_classes=False, is_overport_output=False,
debuggable=False, extra={})
def test_applies_only_to_arm64_games_with_the_platform_loader():
base.load_all()
p = base.REGISTRY["frame.ovr_trace"]
assert p.applies(_a(["arm64-v8a"], ["libUE4.so", "libovrplatformloader.so"]))
assert not p.applies(_a(["arm64-v8a"], ["libUE4.so"]))
assert not p.applies(_a(["armeabi-v7a"], ["libovrplatformloader.so"]))
assert p.detect(_a(["arm64-v8a"], ["libovrplatformloader.so"])) is None
assert p.experimental and not p.default_on
+14
View File
@@ -83,3 +83,17 @@ def test_swapchain_rect_invalid_is_recognised():
log = "10-05 08:13:02.100 1149 1312 I FrameBridge: xrEndFrame failed -25\n"
assert "swapchain-rect-invalid" in [f.id for f in triage.triage(log).findings]
def test_frames_stopped_and_unity_render_crash():
"""The Room VR passed its launch test although Unity's render thread had crashed in libgallium (GitHub #38)."""
from frameport.validate import triage
log = ("10-05 23:16:30.000 1 2 I FrameBridge: pacing: 59.0 fps\n"
"10-05 23:16:33.137 1 3 E CRASH : \t#01 pc 0000000000c3fe18 /vendor/lib64/libgallium_dri.so ()\n"
"10-05 23:16:59.000 1 4 I OvrAudio: ovrAudio_Enable\n")
r = triage.triage(log, "RUNNING")
assert [f.id for f in r.findings] == ["unity-render-crash"] and r.verdict == "fail"
alone = triage.triage(log.replace("libgallium_dri", "libother"), "RUNNING")
assert "frames-stopped" in [f.id for f in alone.findings]
assert triage.frames_stopped(["10-05 23:16:30.000 x FrameBridge: pacing: 72 fps", "10-05 23:16:40.000 y"]) is None
+33 -2
View File
@@ -143,7 +143,7 @@ def test_packaged_app_shows_artwork_by_file_path(tmp_path, monkeypatch):
thumbs.use_file_paths(False)
def test_unity_oculus_check_only_for_old_unity_with_the_check():
def test_unity_oculus_check_for_unity_with_the_check():
base.load_all()
p = base.get("frame.unity_oculus_check")
old = _analysis(libs=["libunity.so", "libOVRPlugin.so"],
@@ -151,7 +151,15 @@ def test_unity_oculus_check_only_for_old_unity_with_the_check():
assert p.applies(old) and p.detect(old).recommended
new = _analysis(libs=["libunity.so", "libOVRPlugin.so"],
extra={"unity_version": "2019.4.35f1", "unity_oculus_check": True})
assert not p.applies(new) and p.detect(new) is None # 2019+ runs without it: builds stay byte-identical
# 2019 too (BattleSisters, Unity 2019.4, stayed a 2D app without it)
assert p.applies(new) and p.detect(new).recommended
# the frame-wait shim: Unity's built-in VR loop (2017-2018, 2019 without the Oculus XR Plugin), not XR Plugin games
assert p.legacy_loop(old) and p.legacy_loop(new)
assert not p.legacy_loop(_analysis(libs=["libunity.so", "libOVRPlugin.so", "libOculusXRPlugin.so"],
extra={"unity_version": "2019.4.35f1"}))
assert not p.legacy_loop(_analysis(libs=["libunity.so"], extra={"unity_version": "2022.3.19f1"}))
none = _analysis(libs=["libunity.so", "libOVRPlugin.so"], extra={"unity_version": "2019.4.35f1"})
assert not p.applies(none) and p.detect(none) is None # no check in libunity.so: nothing to change
log = "10-04 15:08:01.000 1213 1235 I Unity : [NewtonVR] Critical Error: Oculus / SteamVR not setup properly"
assert "frame.unity_oculus_check" in {s for f in triage(log, "RUNNING", None).findings for s in f.suggest}
@@ -242,3 +250,26 @@ def test_scan_finds_games_in_download_manager_layouts(tmp_path, monkeypatch):
found = {g.apk.name: g for g in quest_dump.scan(root)}
assert set(found) == {"stray.app.apk", "com.a.game.apk", "com.b.game.apk"}
assert found["com.a.game.apk"].data_dir == root / "Manager/Game A v1/com.a.game"
def test_user_recipes_get_a_catalog_update_offer(tmp_path, monkeypatch):
"""GitHub #10: a recipe whose Game settings were saved once ("user") never followed a catalog fix again; now
the game is flagged, and taking the offer re-derives it keeping the user's own FrameBridge settings."""
from frameport import pipeline
from frameport.core import library
from frameport.recommend import catalog
monkeypatch.setattr(library, "_path", lambda: tmp_path / "library.json")
entry = catalog.CatalogEntry(package="com.x.vr4", title="VR4", adapter={"vk_shader_fix": "1:2:3:4"})
monkeypatch.setattr(catalog, "lookup", lambda pkg: entry if pkg == "com.x.vr4" else None)
an = {"package": "com.x.vr4", "engine": "Unreal", "libs": ["libUE4.so"], "abis": ["arm64-v8a"]}
recipe = {"package": "com.x.vr4", "patches": {"adapter.scale": {"value": 0.9}}, "source": "user",
"catalog_rev": "old"}
(tmp_path / "library.json").write_text(__import__("json").dumps(
{"games": {"com.x.vr4": {"package": "com.x.vr4", "analysis": an, "recipe": recipe}}, "settings": {}}))
assert library.game("com.x.vr4")["catalog_update"] == entry.rev()
pipeline.apply_catalog_update("com.x.vr4")
g = library.game("com.x.vr4")
assert "catalog_update" not in g and g["recipe"]["patches"]["adapter.scale"] == {"value": 0.9}
assert g["recipe"].get("source") != "user" and "adapter.vk_shader_fix" in g["recipe"]["patches"]