Subject: iMac 14,2 (Late 2013) Gold Standard Setup:
Fixing Menu Bar Icons, Wi-Fi Glitches, Local of Country Code, etc. on Sonoma 14.3.1
EDIT 2026-07-14
The /etc/rc.wakeup script has finally been perfected with the help of the AI Claude, partly because the Wi-Fi signal was behaving erratically.
Now, after coming out of sleep mode – whether it’s been a short or long period, or even two days – the icons on the menu bar always appear neat and tidy.
IMPORTANT! These instructions, although tested and working on my iMac, are purely indicative and intended exclusively for experienced and enthusiastic macOS users who fully understand what I'm writing and should use this report only to save themselves the effort I put into trying dozens of configurations before finding the perfect balance.
I assume no responsibility for data loss and/or errors or damage of any kind.
Hi everyone,
I wanted to share my definitive guide and "Gold Standard" setup for the
iMac 14,2 (i7, 32GB RAM, NVIDIA GTX 780M 4GB VRAM) running
macOS Sonoma 14.3.1, OCLP 3.0.0 Nightly (by June 2025) but the
Post Install Patch by OCLP 1.3.0. With this configuration, the machine is rock-solid, and graphics performance is outstanding (scoring 1145.98 @ 60fps on MotionMark 1.3.1 as in attached screenshot - Geekbench 6 CPU Benchmark Result Score: 1192 Single-Core and 4013 Multi-Core - 13578 GPU OpenCL).
If you are facing the dreaded invisible menu bar icons after deep sleep, a freezing/gray Wi-Fi icon in the Control Center, or your Country Code is stuck on "Unknown", here is how to fix everything structurally.
1. The Strategy: Stay on Sonoma 14.3.1
Do not update past 14.3.1 if you value raw Kepler performance and break-free Safari maps. macOS 14.4+ introduced heavy kernel rewrites and invasive wireless patches (IOSkywalkFamily) that add background overhead, break tracking maps on websites, and cause UI micro-stutters. 14.3.1 is the sweet spot.
2. Clean up your EFI Kexts (The Local: "Unknown" of Country Code in WiFi informations fix)
OpenCore Legacy Patcher tends to inject generic fallback kexts that clash with original Apple hardware. If your Wi-Fi Country Code shows Local "Unknown" or "US" instead of your actual region (e.g., IT/ETSI), you likely have Hackintosh-specific kexts interfering.
Using
ProperTree, perform an
OC Clean Snapshot (Cmd+Shift+R) and completely remove the following ghost kexts from your EFI/OC/Kexts folder and config.plist:
- AirportBrcmFixup.kext (Crucial: This causes the Country Code bug on native Apple Broadcom cards!)
- CatalinaIntelI210Ethernet.kext (Unnecessary for the native iMac Broadcom Ethernet)
- AutoPkgInstaller.kext
- USB-Map-Tahoe.kext
Keep only the essentials:
Lilu, AMFIPass, FeatureUnlock, IOSkywalkFamily, IO80211FamilyLegacy, RestrictEvents, KDKlessWorkaround, RSRHelper, and your main
USB-Map.kext.
Result: Your native Wi-Fi will immediately register your correct local region (e.g.: ETSI/IT) opening up full channel widths (e.g., 5GHz Channel 108 @ 80MHz) and stabilizing Tx rates.
3. Disable Deep Standby (pmset)
To prevent Kepler drivers and legacy wireless extensions from dropping power states incorrectly during long sleep sessions, force a responsive, standard sleep mode via Terminal:
Code:
sudo pmset -a standby 0 autopoweroff 0
4. Deploying SleepWatcher via Homebrew
To orchestrate the system events, we will use sleepwatcher.
Install it via Homebrew:
Code:
brew install sleepwatcher
To make sure it triggers globally across all states (including the LoginWindow), create the daemon configuration file under /Library/LaunchAgents/
homebrew.mxcl.sleepwatcher.plist and paste the following XML:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>homebrew.mxcl.sleepwatcher</string>
<key>LimitLoadToSessionType</key>
<array>
<string>Aqua</string>
<string>Background</string>
<string>LoginWindow</string>
<string>StandardIO</string>
<string>System</string>
</array>
<key>ProgramArguments</key>
<array>
<string>/usr/local/opt/sleepwatcher/sbin/sleepwatcher</string>
<string>-V</string>
<string>-s</string>
<string>/etc/rc.sleep</string>
<string>-w</string>
<string>/etc/rc.wakeup</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
Next, create the dummy sleep script at
/etc/rc.sleep:
5. The Ultimate Wakeup Script (/etc/rc.wakeup)
The order of execution is vital. Resetting the Wi-Fi hardware
at the very end ensures that when ControlCenter and SystemUIServer relaunch, they read a freshly initialized network state. This eliminates the glitchy, blinking, or gray Wi-Fi icon.
Create the script at
/etc/rc.wakeup (make sure both rc.sleep and rc.wakeup have chmod 755 permissions and root:wheel ownership):
Code:
#!/bin/bash
# /etc/rc.wakeup
# iMac 14,2 Late 2013 — Sonoma 14.3.1 + OCLP 3.0.0 Nightly
# Restore menu bar icons and Wi-Fi menu after sleep
# Last updated: July 10 2026
# Permissions: chmod 755 | Owner: root:wheel
AIRPORT="/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport"
LOG="/tmp/wakeup-wifi.log"
WIFI_IF="en1"
MAX_WAIT=25
COUNT=0
# ─────────────────────────────────────────────
# 1. WAITING FOR THE WI-FI CONNECTION TO BE ESTABLISHED
# ─────────────────────────────────────────────
while [ $COUNT -lt $MAX_WAIT ]; do
STATUS=$(/sbin/ifconfig "$WIFI_IF" | /usr/bin/grep "status: active")
if [ -n "$STATUS" ]; then
break
fi
/bin/sleep 1
COUNT=$((COUNT + 1))
done
echo "──────────────────────────────" >> "$LOG"
echo "$(date): Wi-Fi attivo dopo ${COUNT}s" >> "$LOG"
echo "── Stato driver al risveglio ──" >> "$LOG"
"$AIRPORT" -I >> "$LOG" 2>&1
# ─────────────────────────────────────────────
# 2. SHORT BREAK
# ─────────────────────────────────────────────
/bin/sleep 2
# ─────────────────────────────────────────────
# 3. RESET MAIN UI
# ─────────────────────────────────────────────
/usr/bin/killall ControlCenter 2>/dev/null
/usr/bin/killall TextInputMenuAgent 2>/dev/null
/usr/bin/killall Spotlight 2>/dev/null
/usr/bin/killall -KILL "BetterDisplay" 2>/dev/null
# ─────────────────────────────────────────────
# 4. BREAK IN PROCESS SEPARATION (8s)
# ─────────────────────────────────────────────
/bin/sleep 8
# ─────────────────────────────────────────────
# 5. SYSTEM MENULET RESTORE (e.g.: Eject icon)
# ─────────────────────────────────────────────
/usr/bin/killall SystemUIServer 2>/dev/null
# ─────────────────────────────────────────────
# 6. FINAL PAUSE (7s) + BETTERDISPLAY RELOAD
# ─────────────────────────────────────────────
/bin/sleep 7
echo "── Stato driver a fine script ──" >> "$LOG"
"$AIRPORT" -I >> "$LOG" 2>&1
/usr/bin/open -a "BetterDisplay" 2>/dev/null
exit 0
Conclusion
By offsetting the hardware cycle to the end of the script, clearing the Kext clutter, and enabling multi-session loading through the custom LaunchAgent, wake-from-sleep is now so instantaneous and invisible that you won't even notice the menu bar reloading. The Wi-Fi fan stays solid black, the toggle switch is fully functional, and the Tx rate remains rock-solid.
Hope this helps someone keeping their late 2013 27" iMac alive and kicking!
I should add that, at this time, I wouldn't replace my iMac until macOS 27 Golden Gate is official and I can purchase a Mac Mini M5 Pro with an Apple Studio Display.
Currently, in fact, with the perfect configuration achieved using BetterDisplay Pro (with difficulty for the many options to set perfectly), my 27-inch Mac's display has gone up to 2560x1440 HiDPI and beyond (but I use 1920x1080 HiDPI at 10-bit). So, when placed next to the Studio Display and zoomed in to its maximum (Accessibility -> Screen -> Zoom and CTRL+Wheel Mouse enabled), no blurring of text, icons, or images is noticeable and the two display are indistinguibles.
The Studio Display's brightness is obviously higher, but it's useless in my environment. But more importantly, however, the lower backlight power allows my display to pass Lagom.nl's extremely difficult white satutration test.
Lagom White Saturation Test and other Tests
So! My display can perceive the black checkerboard in test 254 and sees it in test 253, while the Studio Display "burns" the white so much that the underlying checkerboard is completely invisible in 253 and 254.
(Note: both display are by LG and the external HW structure is identical)
The purchase and use of Turbo Boost Switcher Pro also helped ensure consistent Mac performance, as the Turbo feature, by not intervening, prevents the CPU and GPU from suddenly and instantly reaching high temperatures that trigger the Trottling mechanism, which lowers the frequency to prevent damage. My Mac, instead, always remains perfectly steady at 3.5 GHz, ensuring, in addition to having exceptionally constant stability, that the fan almost never intervenes.
EDIT 2026-07-14
The /etc/rc.wakeup script has finally been perfected with the help of the AI Claude, partly because the Wi-Fi signal was behaving erratically.
Now, after coming out of sleep mode – whether it’s been a short or long period, or even two days – the icons on the menu bar always appear neat and tidy.
