When I use metal to render, the application switch to the background resulting in metal rendering failure in iOS 15 sys. How can I do? Error: Execution of the command buffer was aborted due to an error during execution.Insufficient Permission (to submit GPU work from background) (00000006:kIOGPUCommandBufferCallbackErrorBackgroundExecutionNotPermitted)
kIOGPUCommandBufferCallbackErrorBackgroundExecutionNotPermitted
Can you clarify how you are hitting this error? Are you trying to render while your app is in the background? Or are you trying to render while your app is running in the foreground and you are hitting this error unexpectedly?
I also received this log,After testing, it is found that it only appears on ios15 devices, It seems that the app(metal) will be active after switching to the background in iOS15 (It used to freeze in a few seconds).
I got the same problem recently, on iOS 16. And it also occurred in the PIP use case.
I've sent the feedback with the id: FB11709596
I'll update here once I receive a reply.
Same problem with XCode 15 Betas (up to 5 15A5209g) and iPadOS 17 Betas (up to 21A5291h)
[update] My CDDisplayLink kept firing when Scene was inactive. Here is the workaround:
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
func sceneDidBecomeActive(_ scene: UIScene) {
NextFrame.shared.pause = false
}
func sceneWillResignActive(_ scene: UIScene) {
NextFrame.shared.pause = true
// ...
}
}
public class NextFrame {
public init() {
link = CADisplayLink(target: self, selector: #selector(nextFrames))
// ...
}
@objc func nextFrames() -> Bool {
guard !pause else { return false }
// ...
}
}