Part 1 of 2
A couple of things would be useful to establish first.
How many times has the iMac been restarted since upgrading to macOS 27?
Does this happen only after the iMac has been idle or gone to sleep, or can it also happen during normal use?
And have you tried starting it in Safe Mode?
If so, does the problem still occur there?
Apple notes that Safe Mode can help determine whether software loaded at startup is contributing to a problem.
When the problem occurs and the rest of the Mac is still usable, you can try restarting MenuBarAgent instead of restarting the whole computer.
Open Terminal with Command–Space and enter: killall -KILL MenuBarAgent
Press Return.
Some macOS 27 users have reported that this temporarily brings an unresponsive menu bar back. It is a user-reported workaround, rather than an Apple-documented fix.
If the problem comes back, note whether it happens again after the iMac has been idle or after waking from sleep.
That may help identify the circumstances under which it occurs.
If another application is also unresponsive, Option–Command–Esc opens Force Quit. Apple Support — How to force an app to quit on Mac
If the whole Mac becomes unresponsive and you cannot restart it normally,
Apple advises holding the power button for up to 10 seconds to turn it off, then pressing it again to start it. Any unsaved work may be lost. Apple Support — How to force an app to quit on Mac
It is also worth checking System Settings > General > Software Update for any available macOS update.
If the problem continues after restarting, testing Safe Mode and installing any available update, further troubleshooting would be appropriate rather than repeatedly restarting the iMac.
Part 2 of 2
To avoid a game of 20 questions
Download the Application Etrecheck ( External Link ) directly from the Developer.
This is a Diagnostic Tool that makes no changes to the computer.
It makes a coherent and readable inventory of both the Hardware and Software used on the computer
The application is free or paid for added features.
The Report will Not Reveal Any Personal Information.
Post back the Full Report - Share Report >> Copy , then paste >>>> using the Additional Text Icon <<<<
