fix(libSceHmd2): report the PS VR2 runtime as unavailable again #7760
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7760"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by MontyMcK on 2026-10-19T06:29:24Z.
What
fixes a regression from my #7323. that PR made
sceHmd2Initializesucceed andsceHmd2Openreturn a handle, like a real PS5 with no headset plugged in. GT7 (PPSA01317) then thinks it can set up PS VR2, moves on tosceHmd2ReprojectionQueryBufferSizeAlign, which isn't implemented, and aborts a few seconds after launch. @frankea reported it in #6350 (comment).AnyPS5 doesn't support PS VR2 or PC VR headsets, so this puts
sceHmd2Initializeback to what it returned before #7323: libSceHmd'sUNSUPPORTED_FEATURE(0x81110016, the existingHmd::UnsupportedFeature) for any param. GT7 only checks that result for non-zero and skips its VR set-up, same as before.sceHmd2Openthen returnsNotInitialized(0x8a720002) from the check it already had. no new values: both codes were already in the code base.the code past the init check (open handle, device info, field of view, vibration) stays as it is. it just can't be reached until there's a real VR backend.
sceHmd2ReprojectionQueryBufferSizeAlign,sceHmd2ReprojectionQueryDisplayBufferSizeAlignandsceHmd2ReprojectionQuerySeeThroughBufferSizeAlignare not implemented here and still throw.test:
guest_hmd2drops the test of the initialized path, since init can't succeed anymore. it now checks that init returns0x81110016with and without a param, and thatsceHmd2Open,sceHmd2GetDeviceInformationandsceHmd2TerminatereturnNotInitializedafter it. the test aborts against main'sExport.cppand passes on this branch.debt: the Silent stubs entry in
docs/dev/debt/libSceHmd2.mdnow says init fails, and that this is restored from the behaviour before #7323, not measured on hardware: the firmware with the no-headset state i measured initializes and opens. it also says the three size queries stay unimplemented pending console measurements. the other entries stay, since they still describe the code past the init check.heads up: #7658 and #7690 implement the reprojection size queries. with init failing, GT7 won't reach them, which is the point for now. both also edit the same debt line, so whichever merges second gets a one-line conflict there.
@frankea could you check that GT7 gets past the
sceHmd2ReprojectionQueryBufferSizeAlignabort on this branch? it should get as far as your local0x81110016bypass did.Tested
Fedora 44, GCC 16.2.1, Release, RX 9070 XT (RADV).
ctest: 1543/1547 pass. the 4 that fail here (application_heap_lazy,agc_driver_image_table_vouched_lookups,agc_driver_bda_device,agc_driver_tessellation) don't load libSceHmd2 and none of their sources change in this PRInitialize,GetDeviceInformation,GetFieldOfViewWithoutHandleand thenReprojectionQueryBufferSizeAlign, and aborts about 6 s in. with this branch's it callssceHmd2Initializeand no other Hmd2 export, and doesn't abort there. a few seconds later it hits the null deref at +0x48 that #6350 is about, so i can't take it further on Linux/RADV, hence the ask abovelibMozaSDK.prx, which AnyPS5 doesn't have. i used an empty stand-in library to get it to load. it exports nothing and isn't part of this PRChecklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T06:36:40Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/tests/GuestHmd2.cppL10-11, L136docs/dev/debt/libSceHmd2.mdL5core/libs/tests/GuestHmd2.cppL136docs/dev/debt/libSceHmd2.mdL5docs/dev/debt/libSceHmd2.mdL5Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/tests/GuestHmd2.cppImported from boykopovar/AnyPS5. Originally posted by primesoul-web on 2026-10-19T07:00:00Z.
Thanks for the heads-up, and for digging out the #7323 regression trail from frankea's #6350 report.
The two changes are complementary from this side: #7658 does not touch
sceHmd2InitializeorsceHmd2Open— its Hmd2 surface is the reprojection session only (sceHmd2ReprojectionInitialize,SetTiming,EnableVrMode,QueryBufferSizeAlign). On a tree with both, GT7 checkssceHmd2Initializefirst, gets0x81110016, and skips the whole VR set-up, so it never walks into the reprojection session — exactly the "point for now" state you describe, with the session still in place for whenever a real VR backend exists. AndsceHmd2ReprojectionQueryBufferSizeAlignin #7658 answers the console-measured 0x100828 / 0x100 (T3cm0's retail FW 13.60 measurement), so a title that ever gets past init on a future backend allocates what the console asks for rather than 16 bytes; the other four size queries stay throwing for #7463, which keeps your "three size queries unimplemented" wording true on the merged tree apart from the one you call out.On the debt line: agreed, and the fixup is one line from this side too. Our branch rewords the reprojection section of
docs/dev/debt/libSceHmd2.md; if #7760 lands first, our merge keeps your restored-init wording and drops only the now-stale sentence — the same arrangement we took with #7690'sHmd2::SizeAlignblock. No dependency either way; happy with either merge order.