Warning code: 00000006 will affect background survival

Our APP has integrated 3D function, in order to reduce the memory occupation of the APP in the background, we will uninstall the 3D after the APP enters the background. However, the uninstall also causes problems. When the uninstall process is executed in the background, the app will briefly trigger the background GPU rendering error warning with the error warning code: OGPUMetalError: Insufficient Permission (to submit GPU work from background) (00000006:kIOGPUCommandBufferCallbackErrorBackgroundExecutionNotPermitted) Execution of the command buffer was aborted due to an error during execution. Insufficient Permission (to submit GPU Work from background) (00000006: kIOGPUCommandBufferCallbackErrorBackgroundExecutionNotPermitted) excuse me this warning system will tighten APP permissions background?​ For example, limit or shorten the background survival time of the APP. In addition, will the background refresh function fail, resulting in the failure of Bluetooth Ibeacon activation?

Answered by DTS Engineer in 855972022

Hello,

This error occurs when your app lacks permission to submit work to the GPU when it's in the background.

For more information how to submit GPU work in the background check out the Background GPU Access entitlement and the Background Tasks framework.

This particular case doesn't seem to require background GPU access and receiving kIOGPUCommandBufferCallbackErrorBackgroundExecutionNotPermitted means that the submitted GPU work was discarded and considered successfully completed. No harm, no foul.

All that said, aim to stop submitting GPU work "immediately" when your app receives notification that it will enter the background.

You can also use volatile resources so that the OS can reclaim memory when your app is in the background.

You need to throttle 3D rendering as soon as the scene phase changes. Try killing whatever timer is supporting your rendering loop as soon as the app is no longer active, don't try to manipulate the scene in any way, it needs to happen immediately.

I've seen this specific error occur in SceneKit on iOS and it causes shader issues, like models rendered entirely in green until the app is killed and restarted. It is caused by the app sending frames to the GPU while inactive or suspended, it shouldn't affect other background tasks like scanning for Bluetooth beacons. It's Apple's way of aggressively protecting the device battery life.

Hello,

This error occurs when your app lacks permission to submit work to the GPU when it's in the background.

For more information how to submit GPU work in the background check out the Background GPU Access entitlement and the Background Tasks framework.

This particular case doesn't seem to require background GPU access and receiving kIOGPUCommandBufferCallbackErrorBackgroundExecutionNotPermitted means that the submitted GPU work was discarded and considered successfully completed. No harm, no foul.

All that said, aim to stop submitting GPU work "immediately" when your app receives notification that it will enter the background.

You can also use volatile resources so that the OS can reclaim memory when your app is in the background.

Warning code: 00000006 will affect background survival
 
 
Q