diff options
| author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2025-01-29 14:22:44 +0100 |
|---|---|---|
| committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2025-02-13 15:37:02 +0100 |
| commit | c812190a921660c748be3324c3a34245b24354e9 (patch) | |
| tree | 5d9ef89a3ee536b968a6c7ce5f69069cc2c234e9 /src/corelib/thread/qfutureinterface.cpp | |
| parent | 5da95322bd0ed7bfb94028582a82689124646dbd (diff) | |
iOS: Pause display link when app moves out of active state
The applicationWillResignActive documentation describes that the app
should "use this method to pause ongoing tasks, disable timers, and
throttle down OpenGL ES frame rates". Similarly, the more modern
sceneWillResignActive describes that the app should "use this method
to quiet your interface and prepare it to stop interacting with the
user. Specifically, pause ongoing tasks, disable timers, and decrease
frame rates or stop updating your interface altogether."
In practice the application enters the inactive (as opposed to the
backgrounded) state when the user brings up the app switcher, or
enters split-view mode, as described by the "Adopting Multitasking
Enhancements on iPad" documentation.
We do propagate the inactive state as Qt::ApplicationInactive, but
it was up to the application itself to react to the state.
To adhere to the documented behavior, we now skip update request
delivery if the app is not active. Once it becomes active again
we re-try the update request delivery.
Relying on the exposed state of window was not an option, as the
window is still technically exposed, even if the app itself is
inactive.
This hopefully fixes a GPU crash observed (only) on A10 iPads
(iPad 7) with iOS 18, when the user entered split-view mode,
possibly due to changes in the system Metal-based OpenGL driver:
void IOGPUScheduler::signalHardwareError(eRestartRequest, int32_t)
void IOGPUScheduler::hardware_error_interrupt(IOInterruptEventSource *, int)
void IOGPUCommandQueue::retireCommandBuffer(IOGPUEventFence *)
Deny submissions/ignore app[openglwindow] with 2 GPURestarts in 31 submissions.
Execution of the command buffer was aborted due to an error during execution
Caused GPU Timeout Error (00000002:kIOGPUCommandBufferCallbackErrorTimeout)
GLDRendererMetal command buffer completion error
Error Domain=MTLCommandBufferErrorDomain Code=2
Execution of the command buffer was aborted due to an error during execution
Ignored (for causing prior/excessive GPU errors)
Terminating due to blacklisting by kernel driver
The back-trace always pointed to the display-link callback,
so the assumption is that the crash was triggered by the app
rendering when it shouldn't, during the split-view transition.
Fixes: QTBUG-132314
Pick-to: 6.9 6.8 6.5 5.15
Change-Id: Idf1f692daa9d437ee69f9436706777b220fbfbf4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/corelib/thread/qfutureinterface.cpp')
0 files changed, 0 insertions, 0 deletions
