I've also seen this problem since the early Xcode 15 betas and I never understood why and when it happened. Today I've been investigating more in depth, trying to reproduce the problem.
After starting an iPhone simulator using iOS 17 (either by running an app or by triggering SwiftUI Previews), CPU consumption goes very high and does not come back to "background level" even after many minutes of wait.
Beside the SpringBoard
process we can see the following 5 other processes with high CPU consumption:
PhotosPosterProvider
ExtragalacticPoster
CollectionsPoster
- two instances of
diagnosticd
(background processes which are consuming the logs generated by the processes?)
Xcode Version 15.0 (15A240d)
Simulator running iPhone 14 using iOS 17.0 (21A328)
- Create a new iPhone simulator using iOS 17.
- Start it up (either from "Simulator") or by running an app.
- Wait and see... You will see that most of the processes consuming a lot of CPU, will come down after a few minutes. But
SpringBoard
will stay up.
- Start "Settings" app, go to "Language & Region" and add/switch to another Language, for example to "German".
- Poster processes will get restarted and SpringBoard will automatically start logging messages again.
Until now we have never tried to understand what those "Poster" processes are. The following steps will indicate clearly where the bug lies:
- With the Simulator running (with no CPU hog running) lock the iPhone by pressing CMD+L (or the side-button in the UI).
- Wake up the iPhone by touching the screen or tapping CMD.
- Tap and hold the screen to go to the FrontBoard configuration screen.
- Swipe to the left and select "Add new". The "Add New Wallpaper" screen will appear, starting to populate the prepared examples to select from.
==> SpringBoard will again start to log
I use the following workaround to remediate. In the end, it is always about killing the Poster
processes.
Restart the device and hope for the best... If after a few minutes the high CPU persists, restart the device again.
Use "Activity Monitor" to kill the "Poster" processes which consume CPU. Search for "Poster" check CPU consumption and stop the process.
Use the following shell command to kill all processes being part of "CoreSimulator" and having "Poster" in the name.
ps aux | grep -E '[C]oreSimulator.+Poster' | sort -r -k3 | awk '{if ($3>0.0) { print $2}}' | xargs kill -1