fix(libSceVideoOut): sceVideoOutVrrPegToFixedRate and sceVideoOutVrrUnpegFromFixedRate return VIDEO_OUT_ERROR_INVALID_HANDLE for handle -1 #18806

Merged
xXPBSXx merged 2 commits from upstream-pr/18806 into main 2026-11-13 01:54:02 +00:00
xXPBSXx commented 2026-11-12 10:57:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-11-12T10:57:46Z.


What

sceVideoOutVrrPegToFixedRate and sceVideoOutVrrUnpegFromFixedRate threw for the handle -1. On a PS5 (firmware 11.60, payload process) both return 0x8029000b for it, the peg with 0 and 0 as the other two arguments (cases 1.1 and 1.2, lines 4 and 5 of the raw output). This returns VIDEO_OUT_ERROR_INVALID_HANDLE for -1 from both, without looking at the other arguments. A handle that is not -1 and not open, and non-zero peg arguments, were not measured and still throw, as before.

For an open handle (the process opened the main bus itself) the console returned 0x8029001c in all seven cases tried: unpeg without a peg, peg, unpeg after it, peg twice, unpeg after two pegs and unpeg again (cases 3.1 to 3.7, lines 7, 9, 10, 12, 14, 15 and 16). The process printed System processes should use sceVideoOutSysSetDrrPeg() instead three times (lines 8, 11 and 13); the order of the output does not show which call printed it. That is the result of a payload process, which is not a title process, so it is not modelled and the calls still return 0 for an open handle. The entry for the two functions in docs/dev/debt/libSceVideoOut.md states both results. The test now checks both calls with -1. No title is shown to pass -1: PPSA05684 passes the handle to both calls and ignores the results, and what value it passes was not read here.

Tested

Measured on a PS5 with firmware 11.60 (kernel_get_fw_version 0x11600005), from a homebrew payload process (ps5-payload-sdk v0.45, elfldr), on 2026-11-12 at 07:55 UTC. A title process may differ. The cases are 1.1, 1.2 and 3.1 to 3.7, lines 4, 5, 7, 9, 10, 12, 14, 15 and 16 of the raw output in the first comment.

Call PS5, payload process, firmware 11.60 AnyPS5 main before here
sceVideoOutVrrPegToFixedRate(-1, 0, 0) 0x8029000b (line 4) throws 0x8029000b
sceVideoOutVrrUnpegFromFixedRate(-1) 0x8029000b (line 5) throws 0x8029000b
the same two with an open handle (seven cases) 0x8029001c each (lines 7, 9, 10, 12, 14, 15, 16) 0 0, unchanged
a handle that is not -1 and not open, non-zero peg arguments not measured throws throws

The test commit comes first and fails on its own, the fix commit second. The two new checks are in video_out_flip_controls of video_out_flip_tests. On Windows (WinLibs GCC, Release), each commit was built on main 3b7f31fa70 and the 28 video_out_flip* tests run once, with the libSceVideoOut.prx of that build: with only the test commit 27 of 28 pass and video_out_flip_controls fails, with the fix 28 of 28 pass. Both logs show Selected GPU name=NVIDIA GeForce RTX 4080 SUPER. tools/check_conventions.py --base upstream/main reports no error on the fix commit and one debt-length warning for the changed entry (1160 characters, up from 643). The probe source and its raw output are in the first comment. Not tested: Linux, macOS, the CI runner, a title process, any other firmware, and the cases listed above as not measured.

Overlap: the 22 other open pull requests that change Output.cpp, Flip.cpp (libSceVideoOut tests) or docs/dev/debt/libSceVideoOut.md (found by reading the changed files of all 1757 open pull requests) were checked on 2026-11-12 at about 10:00 UTC against main 3b7f31fa70; the branch merges into it without a conflict. 12 of them already conflict with main without this change and still conflict with it (#4040, #12315, #14106, #14212, #17259, #17347, #17596, #17597, #17625, #17910, #17914, #18308); the other 10 merge cleanly with and without it. None conflicts only with this change.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 4080 SUPER (vendor 0x10de, device 0x2702, from the Selected GPU line of the test log), Windows 10 Pro; the driver version is not in that log
  • AI-assisted: yes

AI-assisted (Claude Code).

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5276103481 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18806). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-11-12T10:57:46Z. --- ### What `sceVideoOutVrrPegToFixedRate` and `sceVideoOutVrrUnpegFromFixedRate` threw for the handle -1. On a PS5 (firmware 11.60, payload process) both return 0x8029000b for it, the peg with 0 and 0 as the other two arguments (cases 1.1 and 1.2, lines 4 and 5 of the raw output). This returns `VIDEO_OUT_ERROR_INVALID_HANDLE` for -1 from both, without looking at the other arguments. A handle that is not -1 and not open, and non-zero peg arguments, were not measured and still throw, as before. For an open handle (the process opened the main bus itself) the console returned 0x8029001c in all seven cases tried: unpeg without a peg, peg, unpeg after it, peg twice, unpeg after two pegs and unpeg again (cases 3.1 to 3.7, lines 7, 9, 10, 12, 14, 15 and 16). The process printed `System processes should use sceVideoOutSysSetDrrPeg() instead` three times (lines 8, 11 and 13); the order of the output does not show which call printed it. That is the result of a payload process, which is not a title process, so it is not modelled and the calls still return 0 for an open handle. The entry for the two functions in `docs/dev/debt/libSceVideoOut.md` states both results. The test now checks both calls with -1. No title is shown to pass -1: PPSA05684 passes the handle to both calls and ignores the results, and what value it passes was not read here. ### Tested Measured on a PS5 with firmware 11.60 (`kernel_get_fw_version` 0x11600005), from a homebrew payload process (ps5-payload-sdk v0.45, elfldr), on 2026-11-12 at 07:55 UTC. A title process may differ. The cases are 1.1, 1.2 and 3.1 to 3.7, lines 4, 5, 7, 9, 10, 12, 14, 15 and 16 of the raw output in the first comment. | Call | PS5, payload process, firmware 11.60 | AnyPS5 `main` before | here | |---|---|---|---| | `sceVideoOutVrrPegToFixedRate(-1, 0, 0)` | 0x8029000b (line 4) | throws | 0x8029000b | | `sceVideoOutVrrUnpegFromFixedRate(-1)` | 0x8029000b (line 5) | throws | 0x8029000b | | the same two with an open handle (seven cases) | 0x8029001c each (lines 7, 9, 10, 12, 14, 15, 16) | 0 | 0, unchanged | | a handle that is not -1 and not open, non-zero peg arguments | not measured | throws | throws | The test commit comes first and fails on its own, the fix commit second. The two new checks are in `video_out_flip_controls` of `video_out_flip_tests`. On Windows (WinLibs GCC, Release), each commit was built on `main` `3b7f31fa70` and the 28 `video_out_flip*` tests run once, with the `libSceVideoOut.prx` of that build: with only the test commit 27 of 28 pass and `video_out_flip_controls` fails, with the fix 28 of 28 pass. Both logs show `Selected GPU name=NVIDIA GeForce RTX 4080 SUPER`. `tools/check_conventions.py --base upstream/main` reports no error on the fix commit and one `debt-length` warning for the changed entry (1160 characters, up from 643). The probe source and its raw output are in the first comment. Not tested: Linux, macOS, the CI runner, a title process, any other firmware, and the cases listed above as not measured. Overlap: the 22 other open pull requests that change `Output.cpp`, `Flip.cpp` (libSceVideoOut tests) or `docs/dev/debt/libSceVideoOut.md` (found by reading the changed files of all 1757 open pull requests) were checked on 2026-11-12 at about 10:00 UTC against `main` `3b7f31fa70`; the branch merges into it without a conflict. 12 of them already conflict with `main` without this change and still conflict with it (#4040, #12315, #14106, #14212, #17259, #17347, #17596, #17597, #17625, #17910, #17914, #18308); the other 10 merge cleanly with and without it. None conflicts only with this change. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: NVIDIA GeForce RTX 4080 SUPER (vendor 0x10de, device 0x2702, from the `Selected GPU` line of the test log), Windows 10 Pro; the driver version is not in that log <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no --> AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!18806
No description provided.