Skip to content

macOS 15 Sequoia breaks the exit(0) workaround, causing massive orphaned VRAM leak #32

Description

@armdn

Hello Monroe!

I am using your Matrix screensaver on macOS 15 Sequoia with a discrete AMD Radeon Pro W5700 GPU. Earlier you implemented a workaround where the plugin listens for the stop notification and calls exit(0) to terminate the legacy process.

However, it appears that macOS 15 Sequoia has completely broken this workaround. Due to hardened sandbox/security restrictions in Sequoia, the system likely blocks the exit(0) call or forcefully kills the container before the plugin can finish execution.

I ran deep ioreg diagnostics on my system while the leak was happening, and the output explicitly shows that the VRAM is trapped in orphanedReusableVidMemoryBytes (holding around 6 GB of textures in the AMD driver kernel space). This means the Metal resources are losing their owner process before they can be properly deallocated by the OS.

Since Apple's legacyScreenSaver behavior has changed in Sequoia, the exit(0) workaround no longer prevents the leak.

Is it possible to update the screensaver to explicitly release all Metal textures, buffers, and the MTLCommandQueue (setting them to nil and draining the autorelease pool) inside the - (void)stopAnimation method before attempting the process exit? Alternatively, migrating the project from a legacy .saver plugin to a modern App-based Screensaver Extension seems to be the only permanent solution to bypass this Apple architecture bug in modern macOS.

Thank you for your amazing work on this screensaver!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions