Unity + linux: signal safety, direct-memory zeroing, AudioOut2 pacing, renderer and SaveData fixes #156

Closed
github-bot wants to merge 11 commits from gh-pr/156/head into gh-pr/156/base
Owner

@⁠StefanosCosta on GitHub · 2026-08-03 11:04 UTC · original
StefanosCosta:series/pr-rebuild → main · +1298 −114 · 26 files · 11 commits · closed without merging

Summary

Fixes deadlocks, stalls and correctness bugs found while getting FMOD-based titles to a playable
state. The two largest are in guest signal delivery and audio submission: a guest signal handler
could run while the emulator held its own locks and deadlock the process, and AudioOut2 was paced
against a modelled queue rather than the device, so the device ran dry 98% of the time.

These are platform-neutral changes in shared code, not Linux-only — Windows is affected and was not
run. See Platform impact for more details.

This PR has major fixes for Unity games.

What's included

Guest signals and condition variables

CondVar::SignalThread woke its targets while holding the waiter-registry mutex; waiters retire
through UnregisterCondWaiter, which needs that same mutex, so the waker deadlocked against
everything it was trying to wake. Collect, release, then wake.
Fixing that opened a use-after-free — a waiter can unregister and destroy its CondVar between
the collect and the wake. The registry now holds shared_ptr. Confirmed under ASan with the
defect reintroduced; tests added.
Defer guest signal delivery on non-guest frames and inside emulator critical sections.
sceKernelRaiseException only carries POSIX_SIGUSR1 in practice — IL2CPP's stop-the-world GC
handler, which blocks until collection ends; running it on a frame holding an emulator lock
hangs the process permanently.
Document MemoryOperationLock's member order, which is load-bearing: members destroy in reverse,
so the mutex must release before the critical section is left.

Audio

Pace AudioOut2ContextPush by the device instead of a wall-clock queue model — it fed at exactly
1x realtime with no cushion. Was 98% device underruns with the queue capped at two buffers; now
0.01% at the full 40 ms target.
Implement the sceKernelSyncOnAddress wait/wake pair. Both NIDs currently bind to one stub that
never compares the word, blocks or wakes, so FMOD's handshake never completes — Cat Quest III
hangs at its first flip (EndOfPipe count 1 over 45 s, reproduced twice; 4849 once implemented).
Adopt upstream's disassembly-derived AudioOut2ContextParam layout over the one this branch
carried. The guest's raw block reads 18/128/0/1/256/1, which only upstream's fields explain —
and reading it correctly is what exposed the underrun above, since the guest asks for
queue_depth = 1.

Memory

Zero freshly allocated direct memory — allocations returned the previous owner's bytes. FMOD
reads a buffer before writing it, and stale NaN bytes propagate through FMA chains without
raising an FP exception, poisoning the DSP state for the rest of the process. Zeroed at
allocation, not at map time, so map/unmap/remap still preserves contents. Same gap in the
pool-expansion path.
Evidence: same binary one env var apart, 248 s clean versus NaN at 61.3 s, on two titles with
different audible symptoms.
This re-proposes work not taken from #147. Without the signal and audio fixes here, titles do
not reach the in-game state where the stale allocation is read, so it may not have reproduced in
isolation.

Renderer

Fix four sources of invalid draws: null-image keying in the texture cache, depth-compare state
applied to a colour surface, colour-write-enable left set for depth-only passes, and a render
area wider than its attachment.

RenderDoc

Pass the Vulkan dispatch key rather than the VkInstance handle — RenderDoc defines it as the
first pointer inside the dispatchable object, so passing the handle makes StartFrameCapture
silently do nothing.
Adopt an already-open capture instead of resetting to Idle; nothing then called
EndFrameCapture, so the capture stayed open and no file was written.
Linux only, in an #else branch: X11 sessions were misreported as Wayland and capture refused
outright, because the source-tree SDL_config.h shadows the generated one.

SaveData, filesystem and loader

Persist sceSaveDataSetParam's arguments, which were discarded — saves enumerate as damaged
Mount /devlog used by Unity games; fix a lock leak on the lseek path
Remove a debug dump in the access-violation handler keyed to a hardcoded guest address

Diagnostics

Add an opt-in HLE call trace behind KYTY_ENABLE_HLE_TRACE, off by default and a no-op when
disabled

Platform impact

Not platform-guarded. Every change except the RenderDoc X11 branch is in shared code and
affects Windows.
Windows was not run — no Windows machine here. The CondVar/HleCriticalSection and signal
deferral work is what most deserves a Windows eye, since it interacts with host thread
suspension.
macOS rides the Linux/POSIX paths; nothing here is Darwin-specific.

Testing

Built and run on Linux (Clang, Ninja). Every commit builds standalone; ctest 6/6;
-DKYTY_ENABLE_HLE_TRACE=ON builds.

Boot health as EndOfPipe Signal count over a 45 s run (1 = hung): PowerWash Simulator 3906,
Cat Quest III 4740, Subnautica 2764.

Audio verified by ear — Subnautica, PowerWash Simulator, Cult of the lamb menu and in-game, Superliminal menu. No
clicking or dropouts, and audio survives sustained in-game movement, which previously killed it
permanently. Not machine-checked: the glitch counter gave 31.9/s and 87.6/s for the same binary.

AI was used for investigation, bisection and drafting; every claim above is backed by a measurement
or by my own listening test.

The following titles were either not playable before these changes:

  1. Subnautica
  2. Powerwash Simulator
  3. Cult Of the Lamb
  4. Cat Quest 3

Subliminal did not boot to the menu as well.

Fixes have been confirmed to be universal and not game-specific, and as such were pushed for review.

Proof of Errors and Working In-Game footage can be found here:

https://drive.google.com/drive/folders/1tpYUxadOKHL7QwwBMez_lWwphPQ7adYB?usp=sharing

Note on commit bb75992: its subject mentions implementing the address-wait pair, but that half is no longer in the branch.
Upstream's 00a5dd3 landed a fuller sceKernelSyncOnAddressWait/Wake (32/64-bit variants, dedicated src/kernel/syncOnAddress.cpp, its own tests), so the merge of upstream/main resolved in favour of upstream's implementation. All that remains from that commit is the AudioOut2 device-paced submission.

**@⁠StefanosCosta** on GitHub · 2026-08-03 11:04 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/156) `StefanosCosta:series/pr-rebuild` → `main` · +1298 −114 · 26 files · 11 commits · closed without merging # Summary Fixes deadlocks, stalls and correctness bugs found while getting FMOD-based titles to a playable state. The two largest are in guest signal delivery and audio submission: a guest signal handler could run while the emulator held its own locks and deadlock the process, and AudioOut2 was paced against a modelled queue rather than the device, so the device ran dry 98% of the time. These are platform-neutral changes in shared code, not Linux-only — Windows is affected and was not run. See Platform impact for more details. This PR has major fixes for Unity games. ## What's included Guest signals and condition variables CondVar::SignalThread woke its targets while holding the waiter-registry mutex; waiters retire through UnregisterCondWaiter, which needs that same mutex, so the waker deadlocked against everything it was trying to wake. Collect, release, then wake. Fixing that opened a use-after-free — a waiter can unregister and destroy its CondVar between the collect and the wake. The registry now holds shared_ptr. Confirmed under ASan with the defect reintroduced; tests added. Defer guest signal delivery on non-guest frames and inside emulator critical sections. sceKernelRaiseException only carries POSIX_SIGUSR1 in practice — IL2CPP's stop-the-world GC handler, which blocks until collection ends; running it on a frame holding an emulator lock hangs the process permanently. Document MemoryOperationLock's member order, which is load-bearing: members destroy in reverse, so the mutex must release before the critical section is left. Audio Pace AudioOut2ContextPush by the device instead of a wall-clock queue model — it fed at exactly 1x realtime with no cushion. Was 98% device underruns with the queue capped at two buffers; now 0.01% at the full 40 ms target. Implement the sceKernelSyncOnAddress wait/wake pair. Both NIDs currently bind to one stub that never compares the word, blocks or wakes, so FMOD's handshake never completes — Cat Quest III hangs at its first flip (EndOfPipe count 1 over 45 s, reproduced twice; 4849 once implemented). Adopt upstream's disassembly-derived AudioOut2ContextParam layout over the one this branch carried. The guest's raw block reads 18/128/0/1/256/1, which only upstream's fields explain — and reading it correctly is what exposed the underrun above, since the guest asks for queue_depth = 1. Memory Zero freshly allocated direct memory — allocations returned the previous owner's bytes. FMOD reads a buffer before writing it, and stale NaN bytes propagate through FMA chains without raising an FP exception, poisoning the DSP state for the rest of the process. Zeroed at allocation, not at map time, so map/unmap/remap still preserves contents. Same gap in the pool-expansion path. Evidence: same binary one env var apart, 248 s clean versus NaN at 61.3 s, on two titles with different audible symptoms. This re-proposes work not taken from #147. Without the signal and audio fixes here, titles do not reach the in-game state where the stale allocation is read, so it may not have reproduced in isolation. Renderer Fix four sources of invalid draws: null-image keying in the texture cache, depth-compare state applied to a colour surface, colour-write-enable left set for depth-only passes, and a render area wider than its attachment. RenderDoc Pass the Vulkan dispatch key rather than the VkInstance handle — RenderDoc defines it as the first pointer inside the dispatchable object, so passing the handle makes StartFrameCapture silently do nothing. Adopt an already-open capture instead of resetting to Idle; nothing then called EndFrameCapture, so the capture stayed open and no file was written. Linux only, in an #else branch: X11 sessions were misreported as Wayland and capture refused outright, because the source-tree SDL_config.h shadows the generated one. SaveData, filesystem and loader Persist sceSaveDataSetParam's arguments, which were discarded — saves enumerate as damaged Mount /devlog used by Unity games; fix a lock leak on the lseek path Remove a debug dump in the access-violation handler keyed to a hardcoded guest address Diagnostics Add an opt-in HLE call trace behind KYTY_ENABLE_HLE_TRACE, off by default and a no-op when disabled ## Platform impact Not platform-guarded. Every change except the RenderDoc X11 branch is in shared code and affects Windows. Windows was not run — no Windows machine here. The CondVar/HleCriticalSection and signal deferral work is what most deserves a Windows eye, since it interacts with host thread suspension. macOS rides the Linux/POSIX paths; nothing here is Darwin-specific. ## Testing Built and run on Linux (Clang, Ninja). Every commit builds standalone; ctest 6/6; -DKYTY_ENABLE_HLE_TRACE=ON builds. Boot health as EndOfPipe Signal count over a 45 s run (1 = hung): PowerWash Simulator 3906, Cat Quest III 4740, Subnautica 2764. Audio verified by ear — Subnautica, PowerWash Simulator, Cult of the lamb menu and in-game, Superliminal menu. No clicking or dropouts, and audio survives sustained in-game movement, which previously killed it permanently. Not machine-checked: the glitch counter gave 31.9/s and 87.6/s for the same binary. AI was used for investigation, bisection and drafting; every claim above is backed by a measurement or by my own listening test. The following titles were either not playable before these changes: 1. Subnautica 2. Powerwash Simulator 3. Cult Of the Lamb 4. Cat Quest 3 Subliminal did not boot to the menu as well. Fixes have been confirmed to be universal and not game-specific, and as such were pushed for review. Proof of Errors and Working In-Game footage can be found here: https://drive.google.com/drive/folders/1tpYUxadOKHL7QwwBMez_lWwphPQ7adYB?usp=sharing Note on commit bb75992: its subject mentions implementing the address-wait pair, but that half is no longer in the branch. Upstream's 00a5dd3 landed a fuller sceKernelSyncOnAddressWait/Wake (32/64-bit variants, dedicated src/kernel/syncOnAddress.cpp, its own tests), so the merge of upstream/main resolved in favour of upstream's implementation. All that remains from that commit is the AudioOut2 device-paced submission.
SignalThread woke its targets while holding the waiter-registry mutex. Waking is
not guaranteed non-blocking -- a broadcast can block until the waiters it is
retiring have left the variable, and they leave through UnregisterCondWaiter,
which needs that same mutex -- so the waker deadlocked against every waiter it
was trying to wake. Collect the targets under the lock and wake with it
released, as Signal() and SignalAll() already do.

HleCriticalSection marks a scope holding an emulator-global lock. A guest
exception handler can block for an unbounded time -- IL2CPP's collector parks
every managed thread in one until the collection finishes -- so pending-signal
dispatch refuses to run a handler inside one and leaves the signal queued.
Diagnostic instrument for locating guest stalls: a breadcrumb is recorded on
entry to and exit from each HLE function carrying PRINT_NAME(), and a watchdog
thread periodically writes a per-thread snapshot distinguishing a thread parked
inside a call from one churning through calls.

Compiled in only when KYTY_ENABLE_HLE_TRACE is ON. In a normal build every entry
point is either absent from the translation unit or an empty inline no-op, so
neither the Windows nor the Linux release build changes. TRACE_NAME() covers the
functions deliberately left out of PRINT_NAME() because they are too hot to log.

Breadcrumbs in each subsystem land with that subsystem's own commit.
Running a guest signal handler inside a host wait deadlocked the emulator. The
handler runs nested inside the wait, and one that blocks -- IL2CPP's GC suspend
handler waits on an event flag until the collection ends -- never lets the wait
unwind. That strands the state the wait holds: glibc keeps a group reference on
a condition variable for the whole of pthread_cond_wait, and a stranded one
makes every later broadcast on that variable block forever, freezing every
thread using it.

The host signal handler leaves the signal queued when it interrupted host code
or while this thread holds an emulator-global lock, and
KernelDispatchPendingSignalForCurrentThread delivers it once the frame has
unwound. The 33 g_memory_operation_mutex sites and the GPU submission lock
declare themselves as critical sections.

PthreadHasAnyPendingSignal keeps the dispatcher's common no-signal path to a
single atomic load rather than one read-modify-write per signal number.
sceKernelAllocateDirectMemory handed back physical ranges without clearing
them, so a new allocation could read the previous owner's bytes. FlexibleMemory
already zeroes at map time for exactly this reason; PhysicalMemory never got the
equivalent, and that asymmetry is the bug.

It presents as audio failure because FMOD reads a buffer before writing it.
Stale bytes are frequently NaN-shaped, and a NaN loaded from memory propagates
through FMA chains without raising any exception -- invalid, denormal,
divide-by-zero and overflow all unmasked stayed silent. Once it lands in
persistent DSP state every later block is NaN * x and the mix is dead for the
rest of the process. It is intermittent because it needs an allocation to land
on a previously-used range whose contents happen to be NaN-shaped.

Zeroing at allocation rather than map time leaves the documented aliasing
behaviour intact: map/unmap/remap of an already-allocated range still preserves
its contents. The pool-expansion path had the same gap.

Also logs unresolved imports with the module they came from, which is what
identified the faulting path here.
Two fixes, both in the AudioOut2 path.

AudioOut2ContextPush gated submission on a queue it models on wall clock, which
pins the guest to exactly 1x realtime so no cushion can ever form. Titles ask for
queue_depth = 1, leaving a single grain of slack: measured at 98% device underruns
with the SDL queue never exceeding two buffers, which is what the clicking was.
AudioOutOutputs already blocks on the real device queue and targets ~40 ms, so
where a port has a device that is the correct clock and the modelled queue is a
second, stricter rate limiter fighting it -- the same fault that was fixed by
dropping the wall-clock sleep from AudioOutOutputs. Where the context has a real
device, let the device pace it; ports without one keep the gate, since nothing
else would pace the guest there. The guest's requested queue_depth is not
overridden, and GetQueueLevel still reports a truthful count. Measured after:
0.01% underruns, queue reaching the full 40 ms target.

sceKernelSyncOnAddressWait and ...Wake are a futex pair, but both NIDs were bound
to a single stub that took an invented six-argument signature, never compared the
word, never blocked, never woke anything and always returned success -- so a
waiter was told its condition had been satisfied when it had not. Unity's audio
engine builds its mixer thread on this handshake; with the stub in place Cat
Quest III does not reach its first flip at all. Waiters now use bounded slices and
re-read the word each time, so a wake that races block registration costs at most
one slice: the condition, not the notification, is the source of truth.
Null image keying. GetNullImage keyed its cache on pixel format alone and always
built a 2D single-layer image, so a null bound through an array view got an image
that view cannot describe. Key on format, image type and layer count.

Depth-comparison sampling of a colour surface. A shader may depth-compare a
texture while the guest has a colour surface bound. RDNA 2 allows it -- the
hardware compares against the first component of whatever is bound -- but Vulkan
requires the sampled format to advertise SAMPLED_IMAGE_DEPTH_COMPARISON, so the
draw is invalid and the driver may fault. Bind a depth-comparable stand-in of the
same view shape; a genuine shadow map resolves to a depth image and is untouched.

Colour write enable. The pipeline declares eColorWriteEnableEXT dynamic
unconditionally, so the state must be set for every draw, including a depth-only
pass with no colour attachments. The command requires attachmentCount > 0, so
submit one disabled attachment there.

Render area. The area was clamped to the guest extent only. Where a render target
is a mip of a larger surface the two disagree for odd sizes -- the guest rounds a
level up, Vulkan defines it as max(1, size >> level) -- leaving a render area a
pixel wider than its own attachment, which is invalid.
Three faults, each of which alone stopped a capture file being written: the
window-system check treated an X11 session as Wayland, so no native window handle
was produced; the device pointer needs the Vulkan dispatch key rather than the raw
VkInstance; and an already-open capture was reset to idle instead of adopted.
sceSaveDataSetParam discarded its arguments, and GetParam and DirNameSearch
returned zeroed parameters, so every save enumerated with a blank title and
detail -- which a title reports to the player as a damaged save. Parameters now
persist alongside the save and are read back on mount, and the Mtime and
UserParam sort keys DirNameSearch accepts are honoured rather than ignored;
descending order reverses names and parameters together, since reversing one
without the other hands the title each save's metadata against the wrong
directory.

Two unrelated fixes in the same area. /devlog is mounted: Unity titles write
their player log to /devlog/app/debug.log, and with nothing mounted there the
open fails and every managed-side message is silently discarded, including the
exceptions a title logs when its own subsystems fail to start. And KernelLseek
returned EINVAL on a negative offset while still holding the file mutex, leaking
it for the lifetime of the descriptor.
The handler dumped two extra guest qwords when the faulting address matched one
specific literal, left over from tracing a decoder fault in a single title. It is
dead for every other address and hardcodes a guest address into a generic path.
SignalThread collects its targets under the waiter-registry lock and wakes them
with it released, because waking while holding it deadlocks the waker against
every waiter it is retiring. That leaves a gap: between the collect and the wake
a waiter can return, unregister, and have its owning CondVar destroyed, so the
wake touches freed memory. The registry now holds a strong reference, which
keeps the private object alive across the gap.

signal_safety_tests covers both that and the deadlock it came from. The
use-after-free case is a stress loop whose oracle is ASan -- built with
-fsanitize=address it reports a heap-use-after-free in WakeCondVar reached from
SignalThread, on memory freed by ~CondVar, and is clean with the fix. In a normal
build it stands as a no-crash smoke test. A regression in the deadlock hangs
TestSignalThreadWakesAWaiter rather than failing it, which is the honest shape
for a deadlock.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:12:36 +00:00
github-bot closed this pull request 2026-11-26 09:12:37 +00:00
Author
Owner

@⁠StefanosCosta on GitHub · 2026-08-03 11:12 UTC · original

Hey @⁠Nmzik . Did my best to make it easy for you to cherry-pick whatever you want. Both clicking and audio cut-off issues from previous PR are fixed in this PR.

**@⁠StefanosCosta** on GitHub · 2026-08-03 11:12 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/156#issuecomment-5165595414) Hey @⁠Nmzik . Did my best to make it easy for you to cherry-pick whatever you want. Both clicking and audio cut-off issues from previous PR are fixed in this PR.
Author
Owner

@⁠StefanosCosta on GitHub · 2026-08-04 23:06 UTC · original

Hey @⁠Nmzik. I realize that many of the changes in this branch are obsolete given the latest changes merged in main, and probably not welcome as a relatively large PR. It is not my intent to make things difficult or inconvenient. I separated the remaining valid commits into 6 other branches which should make it easier for you to review, and excluded the changes that are now obsolete. However, I don't want to cut you off if you already started cherry-picking any commits, so I will close this PR and open the rest of them only after receiving your OK. Thanks again for your amazing work

**@⁠StefanosCosta** on GitHub · 2026-08-04 23:06 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/156#issuecomment-5185588297) Hey @⁠Nmzik. I realize that many of the changes in this branch are obsolete given the latest changes merged in main, and probably not welcome as a relatively large PR. It is not my intent to make things difficult or inconvenient. I separated the remaining valid commits into 6 other branches which should make it easier for you to review, and excluded the changes that are now obsolete. However, I don't want to cut you off if you already started cherry-picking any commits, so I will close this PR and open the rest of them only after receiving your OK. Thanks again for your amazing work
Author
Owner

@⁠Nmzik on GitHub · 2026-08-04 23:24 UTC · original

@⁠StefanosCosta Just so you know, I’m actively reviewing your PRs - not ignoring them. However, please dont expect me to merge them immediately, as Im also working on other things.
I also dont want to merge hacks into the main codebase. If you’ve discovered an actual bug, thats fine, and I’ll credit you for finding it. However, some of the changes look more like workarounds/hacks than proper implementations that will work across all games. Thanks for understanding. Not trying to be mean

**@⁠Nmzik** on GitHub · 2026-08-04 23:24 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/156#issuecomment-5185711057) @⁠StefanosCosta Just so you know, I’m actively reviewing your PRs - not ignoring them. However, please dont expect me to merge them immediately, as Im also working on other things. I also dont want to merge hacks into the main codebase. If you’ve discovered an actual bug, thats fine, and I’ll credit you for finding it. However, some of the changes look more like workarounds/hacks than proper implementations that will work across all games. Thanks for understanding. Not trying to be mean
Author
Owner

@⁠StefanosCosta on GitHub · 2026-08-04 23:28 UTC · original

@⁠Nmzik Of course. You're right. That's what I realized, that's why I want to change it. I'm not pushing or complaining about it. I'm mostly ashamed because I didn't actually give you something worth working with and honestly if I was in your position I would have rejected it. I just wanted to make sure I didn't interrupt you if you actually did start looking through it.

**@⁠StefanosCosta** on GitHub · 2026-08-04 23:28 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/156#issuecomment-5185735524) @⁠Nmzik Of course. You're right. That's what I realized, that's why I want to change it. I'm not pushing or complaining about it. I'm mostly ashamed because I didn't actually give you something worth working with and honestly if I was in your position I would have rejected it. I just wanted to make sure I didn't interrupt you if you actually did start looking through it.
Author
Owner

@⁠Nmzik on GitHub · 2026-08-04 23:32 UTC · original

@⁠StefanosCosta It’s all good - don’t close this PR, as some parts of it still need further investigation. However, if you find other unrelated bugs in the future, please submit them as separate, smaller PRs, even if each fix only helps games progress a little further. You can reference related PRs in each other so that I can understand the changes more easily.

**@⁠Nmzik** on GitHub · 2026-08-04 23:32 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/156#issuecomment-5185762702) @⁠StefanosCosta It’s all good - don’t close this PR, as some parts of it still need further investigation. However, if you find other unrelated bugs in the future, please submit them as separate, smaller PRs, even if each fix only helps games progress a little further. You can reference related PRs in each other so that I can understand the changes more easily.
Author
Owner

@⁠StefanosCosta on GitHub · 2026-08-04 23:37 UTC · original

@⁠Nmzik Thank you. I will stick to that practice from now on

**@⁠StefanosCosta** on GitHub · 2026-08-04 23:37 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/156#issuecomment-5185800526) @⁠Nmzik Thank you. I will stick to that practice from now on
Author
Owner

@⁠gandalfthewhite19890404 on GitHub · 2026-08-08 06:47 UTC · original

Why not mergin this?
Or cherry pick some commits from PR - save fixes, i.e.
For what big PRs, why not separate to small - it easier for testing and merge can be completed faster

**@⁠gandalfthewhite19890404** on GitHub · 2026-08-08 06:47 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/156#issuecomment-5224987072) Why not mergin this? Or cherry pick some commits from PR - save fixes, i.e. For what big PRs, why not separate to small - it easier for testing and merge can be completed faster
Author
Owner

@⁠StefanosCosta on GitHub · 2026-08-08 06:52 UTC · original

@⁠gandalfthewhite19890404 As you can read from the previous comments some of these fixes are hacks. The file save fixes and others have already been committed in separate commits by the maintainer. I was going to split it into smaller PRs but since they already started investigating we concluded to leave this as is and make smaller PRs from now on. At least that's how I understood it

**@⁠StefanosCosta** on GitHub · 2026-08-08 06:52 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/156#issuecomment-5225003444) @⁠gandalfthewhite19890404 As you can read from the previous comments some of these fixes are hacks. The file save fixes and others have already been committed in separate commits by the maintainer. I was going to split it into smaller PRs but since they already started investigating we concluded to leave this as is and make smaller PRs from now on. At least that's how I understood it
Author
Owner

@⁠Nmzik on GitHub · 2026-08-08 16:52 UTC · original

Persist sceSaveDataSetParam's arguments, which were discarded — saves enumerate as damaged

I understand that this is a real bug. Is there any game that actually checks or relies on this behavior? I don’t know of any game that really depends on it.

**@⁠Nmzik** on GitHub · 2026-08-08 16:52 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/156#issuecomment-5227094523) `Persist sceSaveDataSetParam's arguments, which were discarded — saves enumerate as damaged ` I understand that this is a real bug. Is there any game that actually checks or relies on this behavior? I don’t know of any game that really depends on it.
Author
Owner

@⁠Nmzik on GitHub · 2026-08-08 16:54 UTC · original

Fix four sources of invalid draws: null-image keying in the texture cache, depth-compare state applied to a colour surface, colour-write-enable left set for depth-only passes, and a render area wider than its attachment.

Which game caused this change?

**@⁠Nmzik** on GitHub · 2026-08-08 16:54 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/156#issuecomment-5227102473) `Fix four sources of invalid draws: null-image keying in the texture cache, depth-compare state applied to a colour surface, colour-write-enable left set for depth-only passes, and a render area wider than its attachment.` Which game caused this change?
Author
Owner

@⁠StefanosCosta on GitHub · 2026-08-08 16:59 UTC · original

Hi @⁠Nmzik ! Both issues that you just mentioned were identified in subnautica. With main changes a couple days ago, I was able to replicate only 2 of the 4 sources of invalid draws. Both showed up I believe in both subnautica and powerwash simulator. I believe the save issue also exists both in subnautica and cat quest 3.

**@⁠StefanosCosta** on GitHub · 2026-08-08 16:59 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/156#issuecomment-5227123457) Hi @⁠Nmzik ! Both issues that you just mentioned were identified in subnautica. With main changes a couple days ago, I was able to replicate only 2 of the 4 sources of invalid draws. Both showed up I believe in both subnautica and powerwash simulator. I believe the save issue also exists both in subnautica and cat quest 3.
Author
Owner

@⁠Nmzik on GitHub · 2026-08-08 17:00 UTC · original

@⁠StefanosCosta Could you please confirm whether the following games are working on Linux with the latest main branch?

  • Subnautica
  • PowerWash Simulator
  • Cult of the Lamb
  • Cat Quest III
  • Subliminal
**@⁠Nmzik** on GitHub · 2026-08-08 17:00 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/156#issuecomment-5227128991) @⁠StefanosCosta Could you please confirm whether the following games are working on Linux with the latest main branch? * Subnautica * PowerWash Simulator * Cult of the Lamb * Cat Quest III * Subliminal
Author
Owner

@⁠Nmzik on GitHub · 2026-08-08 17:02 UTC · original

Hi @⁠Nmzik ! Both issues that you just mentioned were identified in subnautica. With main changes a couple days ago, I was able to replicate only 2 of the 4 sources of invalid draws. Both showed up I believe in both subnautica and powerwash simulator. I believe the save issue also exists both in subnautica and cat quest 3.

Definitely not "cat quest 3". It does save

**@⁠Nmzik** on GitHub · 2026-08-08 17:02 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/156#issuecomment-5227137576) > Hi @⁠Nmzik ! Both issues that you just mentioned were identified in subnautica. With main changes a couple days ago, I was able to replicate only 2 of the 4 sources of invalid draws. Both showed up I believe in both subnautica and powerwash simulator. I believe the save issue also exists both in subnautica and cat quest 3. Definitely not "cat quest 3". It does save
Author
Owner

@⁠StefanosCosta on GitHub · 2026-08-08 17:06 UTC · original

The issue was i believe corrupted save files, so it wouldn't boot after saving. Checking now

**@⁠StefanosCosta** on GitHub · 2026-08-08 17:06 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/156#issuecomment-5227155036) The issue was i believe corrupted save files, so it wouldn't boot after saving. Checking now
Author
Owner

@⁠Nmzik on GitHub · 2026-08-08 17:12 UTC · original

The issue was i believe corrupted save files, so it wouldn't boot after saving. Checking now

Yeap, that was the issue but it was fixed

**@⁠Nmzik** on GitHub · 2026-08-08 17:12 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/156#issuecomment-5227186294) > The issue was i believe corrupted save files, so it wouldn't boot after saving. Checking now > > Yeap, that was the issue but it was fixed
Author
Owner

@⁠StefanosCosta on GitHub · 2026-08-08 17:40 UTC · original · edited 2026-08-08 17:42 UTC

Hey @⁠Nmzik . In current main, none of the titles go in-game. Subnautica goes in menu but never goes in-game. I believe the changes in this branch solved that issue, though I don't remember which ones. The same was true for powerwash simulator, and cult_of_the_lamb (they don't reach the menu, but superliminal does). I went into my branch that this PR is from and they run fine there. Would you like me to isolate the changes that make them run?

**@⁠StefanosCosta** on GitHub · 2026-08-08 17:40 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/156#issuecomment-5227321928) · edited 2026-08-08 17:42 UTC Hey @⁠Nmzik . In current main, none of the titles go in-game. Subnautica goes in menu but never goes in-game. I believe the changes in this branch solved that issue, though I don't remember which ones. The same was true for powerwash simulator, and cult_of_the_lamb (they don't reach the menu, but superliminal does). I went into my branch that this PR is from and they run fine there. Would you like me to isolate the changes that make them run?
Author
Owner

@⁠StefanosCosta on GitHub · 2026-08-08 18:41 UTC · original

@⁠Nmzik Forgot to mention cat quest 3 works fine. My bad. Rest of them still have an issue though

**@⁠StefanosCosta** on GitHub · 2026-08-08 18:41 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/156#issuecomment-5227556557) @⁠Nmzik Forgot to mention cat quest 3 works fine. My bad. Rest of them still have an issue though
Author
Owner

@⁠StefanosCosta on GitHub · 2026-08-08 18:53 UTC · original · edited 2026-08-08 19:02 UTC

@⁠Nmzik Sorry for the constant pinging. I just checked my notes because I kept a backlog. Commits 12f71e0 + 1d25e35 made subnautica reach in-game instead of hanging forever. After that If i remember correctly the rest of the games also reached not only the menu but also in-game. I'm starting a test branch and cherry-picking them in there to test and confirm for the other titles, but consider it true for Subnautica. Regarding the save files, subnautica also had corrupted game files, so I'm not sure if it's affected by what you mentioned previously

**@⁠StefanosCosta** on GitHub · 2026-08-08 18:53 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/156#issuecomment-5227602397) · edited 2026-08-08 19:02 UTC @⁠Nmzik Sorry for the constant pinging. I just checked my notes because I kept a backlog. Commits 12f71e0 + 1d25e35 made subnautica reach in-game instead of hanging forever. After that If i remember correctly the rest of the games also reached not only the menu but also in-game. I'm starting a test branch and cherry-picking them in there to test and confirm for the other titles, but consider it true for Subnautica. Regarding the save files, subnautica also had corrupted game files, so I'm not sure if it's affected by what you mentioned previously
Author
Owner

@⁠StefanosCosta on GitHub · 2026-08-08 19:37 UTC · original

Commits that made the games Cult of the lamb, powerwash simulator and Subnautica run and reach in-game were separated and submitted in #215.

**@⁠StefanosCosta** on GitHub · 2026-08-08 19:37 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/156#issuecomment-5227775215) Commits that made the games Cult of the lamb, powerwash simulator and Subnautica run and reach in-game were separated and submitted in #215.
Author
Owner

@⁠Nmzik on GitHub · 2026-09-07 09:05 UTC · original

Cult of the lamb, powerwash simulator and Subnautica seems to be working now on Linux Feel free to open the issue

**@⁠Nmzik** on GitHub · 2026-09-07 09:05 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/156#issuecomment-5568178432) Cult of the lamb, powerwash simulator and Subnautica seems to be working now on Linux Feel free to open the issue

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.