fix: PRX symbol resolution and user ID aliasing #616

Open
github-bot wants to merge 8 commits from github-bot/gh-616 into main AGit
Owner

@⁠bipinkrish on GitHub · 2026-09-14 10:06 UTC · original
bipinkrish:fix-condvar-symbols-and-user-id → main · +290 −133 · 9 files · 8 commits · open

What Changed:

  • Threads & Kernel Synchronization:

    • Removed global condition variable waiter tracking (g_cond_waiters) and lock contention in threads.cpp.
    • Replaced CondVar::SignalThread with a no-op to eliminate glibc broadcast/cancellation deadlocks during signal delivery.
  • Dynamic Linker & Symbol Resolution:

    • Added support for 1-part (name) and 2-part (name#lib) ELF symbols in both CreateSymbolDatabase and RuntimeLinker::Resolve for PRX and middleware loading.
    • Optimized sceKernelDlsym (kernel_find_export_symbol) by validating Base64 NID charsets, fast-tracking direct NID lookups, and eliminating duplicate linear scans.
  • Controller & User Service:

    • Unified user ID validation via Config::IsPrimaryUserId, allowing standard dummy IDs (0, 1, 100) across both PadOpen and libUserService.
    • Added monotonic timestamp fallback (KernelGetProcessTime()) in pad_fill_data to prevent initial 0-timestamp glitches.

Nearly every bug fixed directly corresponds to how the Unity engine is architected on PlayStation 5, Identified these when i was testing Slit game (Silt 01.003.000 PPSA03306) after the fixes it went from Menu Screen to In Game running at 30FPS in Linux

output_10mb.webm


Summary by CodeRabbit

  • New Features

    • Added support for configuring the audio input device and AMD CPU features.
    • Improved support for primary user profiles, including reserved system user IDs.
    • Enhanced symbol resolution for library-qualified names, versions, and valid identifiers.
  • Bug Fixes

    • Improved controller and user-service behavior for supported user profiles.
    • Corrected handling of missing controller timestamps.
    • Improved fiber switching, signal handling, and condition-variable wake-ups.
    • Added broader support for AMD instruction emulation across platforms.
**@⁠bipinkrish** on GitHub · 2026-09-14 10:06 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/616) `bipinkrish:fix-condvar-symbols-and-user-id` → `main` · +290 −133 · 9 files · 8 commits · open ### What Changed: * **Threads & Kernel Synchronization**: * Removed global condition variable waiter tracking (`g_cond_waiters`) and lock contention in `threads.cpp`. * Replaced `CondVar::SignalThread` with a no-op to eliminate glibc broadcast/cancellation deadlocks during signal delivery. * **Dynamic Linker & Symbol Resolution**: * Added support for 1-part (`name`) and 2-part (`name#lib`) ELF symbols in both `CreateSymbolDatabase` and `RuntimeLinker::Resolve` for PRX and middleware loading. * Optimized `sceKernelDlsym` (`kernel_find_export_symbol`) by validating Base64 NID charsets, fast-tracking direct NID lookups, and eliminating duplicate linear scans. * **Controller & User Service**: * Unified user ID validation via `Config::IsPrimaryUserId`, allowing standard dummy IDs (`0`, `1`, `100`) across both `PadOpen` and `libUserService`. * Added monotonic timestamp fallback (`KernelGetProcessTime()`) in `pad_fill_data` to prevent initial 0-timestamp glitches. --- Nearly every bug fixed directly corresponds to how the Unity engine is architected on PlayStation 5, Identified these when i was testing Slit game (Silt 01.003.000 PPSA03306) after the fixes it went from Menu Screen to In Game running at 30FPS in Linux [output_10mb.webm](https://github.com/user-attachments/assets/5ac14aeb-433e-4797-8f1b-074e8d291e32) --- <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for configuring the audio input device and AMD CPU features. * Improved support for primary user profiles, including reserved system user IDs. * Enhanced symbol resolution for library-qualified names, versions, and valid identifiers. * **Bug Fixes** * Improved controller and user-service behavior for supported user profiles. * Corrected handling of missing controller timestamps. * Improved fiber switching, signal handling, and condition-variable wake-ups. * Added broader support for AMD instruction emulation across platforms. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:27:19 +00:00
This pull request has changes conflicting with the target branch.
  • src/common/emulatorConfig.h
  • src/common/threads.cpp
  • src/libs/controller.cpp
  • src/libs/libKernel.cpp
  • src/libs/libUserService.cpp
  • src/loader/runtimeLinker.cpp
  • src/loader/symbolDatabase.h
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/616/head:github-bot/gh-616'
git switch 'github-bot/gh-616'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-616'
git switch 'github-bot/gh-616'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-616'
git switch 'github-bot/gh-616'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-616'
git switch 'main'
git merge --squash 'github-bot/gh-616'
git switch 'main'
git merge --ff-only 'github-bot/gh-616'
git switch 'main'
git merge 'github-bot/gh-616'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.