fix(libSceSystemService): report no Remote Play or Share Play CPU budget as acquired #17090
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17090"
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 xXPBSXx on 2026-11-08T09:56:54Z.
What
sceShellCoreUtilIsRemotePlayCpuBudgetAcquiredandsceShellCoreUtilIsSharePlayCpuBudgetAcquiredthrew as unimplemented. On a PS5 the whole return register was0x80020000in all four calls, with no session running; its low byte is 0. Whether the functions return aboolor a status code is not established. They are now declaredintand return0x80020000, so a caller that reads aboolsees false (low byte 0) and a caller that reads the register sees the same value as on the console. No budget is ever acquired here, because the acquire and release calls still throw. What the queries return after an acquire or with a session running was not measured, and the debt entry says so. No title was checked for calls to these functions.Tested
Measured on a PS5 with firmware 11.60 (
kernel_get_fw_version0x11600005), from a homebrew payload process (ps5-payload-sdk v0.45, elfldr) with no Remote Play or Share Play session, on 2026-11-08 at 06:55 UTC; the console's own clock read about 1 h 41 min more (see the first comment). A title process may differ.mainbeforesceShellCoreUtilIsRemotePlayCpuBudgetAcquired()0x80020000(low byte 0x00)0x80020000sceShellCoreUtilIsSharePlayCpuBudgetAcquired()0x80020000(low byte 0x00)0x80020000The existing test
guest_system_servicenow expects0x80020000from both queries, with a low byte of 0, instead of a throw. On Ubuntu 24.04 under WSL2 with GCC 13.3.0 and an AddressSanitizer build, onmain57c159927cthe test commit alone aborts ("sceShellCoreUtilIsRemotePlayCpuBudgetAcquired not implemented"), and with the fix commits on the samemainit passes; the new test also aborts on the previous head60aaebc628, which returned false. All 40guest_system_service*tests pass with this change when leak detection is off; with it on,guest_system_service_usb_storagereports a leak that this change does not touch.tools/check_conventions.py --base upstream/mainpasses.Overlap: the 14 other open pull requests that change
docs/dev/debt/libSceSystemService.md,PendingExports.cpp,GuestSystemService.cpporSystemService.hppwere checked on 2026-11-08 between 18:05 UTC and 18:15 UTC againstmaindd7c8de5dewith the new commit on top of the head60aaebc628(the base of this change is the older57c159927c; it still merges without a conflict). Five already conflict withmainwithout this change (#15947, #14212 and #8651 in the debt file or code files this change touches, #12863 and #12315 in other files), and none conflicts only with this change. The other nine merge cleanly with and without it, among them #16787 and #16546, which edit other entries of the same files.Checklist
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)AI-assisted (Claude Code).
🤖 Generated with Claude Code
Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-08T16:42:29Z.
Review: COMMENTED
Windows run of head
60aaebc628, merged ontomain828e44310e. To save builds, this ran in one local tree together with 13 other open PRs that touch different files. All 14 merged cleanly. Setup: Windows 11, WinLibs GCC 15.2 (x86_64-ucrt-posix-seh), Release,BUILD_TESTING=ON.guest_system_servicewith--repeat until-fail:10: 10 / 10 pass.main'slibSceSystemService/PendingExports.cppand this PR's test: 5 / 5 runs fail. With the PR's file put back, it passes again.The return value. The description says the full return register was
0x80020000in all four console calls, and that it isn't known whether these return aboolor a status. Returningfalse(0) matches only the low byte. If a caller reads the whole register, it sees 0 here and0x80020000on the console. Declaring the two exportsintand returning0x80020000(SCE_KERNEL_ERROR_UNKNOWN-shaped) would match both readings: the low byte is still 0, so abooltest sees false. It would also not claim a value the console never gave.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T12:04:22Z.
Review: APPROVED
Reviewed — looks good
Nothing in the inspected change shows a concrete defect; the code returns the measured register value and documents the limits of that measurement.
What I ran
Reviewed head
529e30ca1c8de893a483e7ded4d31f5206cf89a9. I readdescription.md,commits.md,manifest.json,diff.patch, and all four changed files listed in the manifest. I usedrepo_read.pysearch/read tools to inspect the changed functions and declarations. No commands or tests were run by me; test results in the PR description are author-reported.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The console behavior beyond the reported no-session payload-process measurements, including behavior after acquisition or with a session, was not verified. No title call sites or automated checks were independently checked. No files were excluded by the manifest.
To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-02T04:28:37Z.
Review: COMMENTED
Actionable comments
6e7f3c1e-e248-43b6-9bd8-5a237e1045f3Reviewing files that changed from the base of the PR and between
68d65e6b14ande33836ee1d.core/libs/prx/libSceSystemService/PendingExports.cppcore/libs/prx/libSceSystemService/include/SystemService.hppcore/libs/tests/GuestSystemService.cppdocs/dev/debt/libSceSystemService.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-03T06:02:42Z.
Review: APPROVED
Reviewed — looks good
The reviewed change consistently returns the measured register value for both queries, and the changed declarations and tests match that behavior.
What I ran
Reviewed head
0782e2df935d59eff6e5540b7b2ac7dee9c40f9cusingrepo_read.pyand the prepared diff. No project tests, builds, or hardware checks were run; the description reports test and convention-check results, which I did not independently verify.Results
Negative control
Not applicable; no tests were run in this review.
Findings
Blocking
None.
Non-blocking
None.
Sources
The two query implementations return
0x80020000, their declarations returnint, and the test checks the full value and low byte: implementation, declarations, test.Not verified
The reported PS5 observation, test runs, and convention check were not independently reproduced. Read all files listed under
reviewedinfiles.json;excludedis empty.To get this to a good state
Nothing is required.