Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

โ€œInvest in yourself โ€” your confidence is always worth it.โ€

Explore Cosmetic Hospitals

Start your journey today โ€” compare options in one place.

MacOs – MacBook Pro Automatically Restarts After Shutdown: Complete Troubleshooting Guide

Introduction

Sometimes a MacBook Pro does something extremely annoying: you click Apple menu โ†’ Shut Down, the screen turns off for a moment, and then the Mac starts again by itself.

At first it feels like a normal restart, but actually it may be a wake/power-management issue. The Mac begins shutting down, but a hardware, network, USB-C, monitor, dock, Bluetooth, or macOS power event wakes it again.

In our real case, the logs showed the issue was coming from the Wi-Fi/network wake path, not from a normal app like Chrome, Slack, VS Code, or Docker. The key log lines showed airportd ... systemWokenByWiFi and repeated IOSkywalkLegacyEthernet ... en0, where en0 was the Wi-Fi interface.

Apple also notes that unexpected restarts can be caused by software or connected devices, so both macOS services and external hardware must be checked. (Apple Support)


Common Symptoms

You may see one or more of these:

  • You click Shut Down, but the Mac restarts immediately.
  • It happens only when an external monitor is connected.
  • It happens only with a USB-C dock or hub.
  • It happens only when charger is connected.
  • It happens even after disabling AutoBoot.
  • You see no clear app error.
  • pmset logs show terms like:
    • MAGICWAKE
    • DarkWake
    • Wake reason
    • airportd
    • en0
    • IOSkywalkNetworkBSDClient
    • systemWokenByWiFi

Why This Happens

Modern MacBook Pros, especially Apple Silicon models, do not instantly go into a full electrical โ€œdead offโ€ state the moment you click shutdown. macOS shuts down in stages:

  1. Apps close.
  2. User session ends.
  3. System services stop.
  4. Hardware controllers power down.
  5. Wi-Fi, Bluetooth, USB-C, Thunderbolt, power delivery, and network services may still be active briefly.

During this transition, a wake-capable service or device can send a signal. macOS may interpret that as:

โ€œSomething needs the Mac awake.โ€

So the flow becomes:

User clicks Shut Down
โ†“
macOS starts shutting down
โ†“
Wi-Fi / USB-C / dock / network wake event arrives
โ†“
Mac powers back on
โ†“
User thinks shutdown became restart

Appleโ€™s own Battery settings include Wake for network access, which allows the Mac to wake so shared resources can be accessed; Apple documents that this setting can be changed to Never if you do not want remote/network wake behavior. (Apple Support)


Real Case Diagnosis

In this case, this command was used:

log show --last 10m --style compact --predicate 'eventMessage CONTAINS[c] "MAGICWAKE" OR eventMessage CONTAINS[c] "Wake reason" OR eventMessage CONTAINS[c] "IOSkywalk" OR eventMessage CONTAINS[c] "Previous shutdown cause"' | tail -30
Code language: JavaScript (javascript)

The important output was:

airportd ... systemWokenByWiFi

This means the Apple Wi-Fi service was involved.

There were also repeated lines like:

IOSkywalkLegacyEthernet as no other controller was found for en0
Code language: JavaScript (javascript)

Earlier, networksetup -listallhardwareports confirmed:

Hardware Port: Wi-Fi
Device: en0

So the direct culprit was:

Wi-Fi en0 โ†’ airportd โ†’ IOSkywalk network stack โ†’ wake event

In simple language:

The Mac was being woken by the Wi-Fi/network subsystem during or shortly after shutdown.

The later pmset -g assertions output showed No kernel assertions, which means there was no persistent kernel-level blocker at that moment. That makes a normal app less likely and points more toward a temporary wake event during shutdown.


Step-by-Step Troubleshooting Guide

Step 1: Confirm Whether It Is a True Restart or Wake Event

After the Mac restarts automatically, immediately open Terminal and run:

pmset -g log | grep -i "Wake reason" | tail -20
Code language: JavaScript (javascript)

Also run:

log show --last 30m | grep -i "Previous shutdown cause"
Code language: JavaScript (javascript)

If you see Wake reason, DarkWake, MAGICWAKE, airportd, or en0, it is likely a wake event.

If you see panic, crash, or shutdown cause errors, it may be a crash/restart problem.


Step 2: Check Power Assertions

Run:

pmset -g assertions

Look for these:

PreventSystemSleep
PreventUserIdleSystemSleep
ExternalMedia
NetworkClientActive
Kernel Assertions

Example interpretation:

OutputMeaning
PreventSystemSleep 1Something is actively preventing sleep/shutdown behavior
NetworkClientActive 1Network service may be active
ExternalMedia 1External disk/device may be involved
MAGICWAKENetwork/wake event happened
No kernel assertionsNo persistent kernel-level blocker now

In our case, the later output showed:

No kernel assertions.

That was a good sign because it meant there was no ongoing kernel blocker after the restart.


Step 3: Find What en0 Means

If logs show en0, do not guess. Find the exact interface:

networksetup -listallhardwareports

Example output:

Hardware Port: Wi-Fi
Device: en0

or:

Hardware Port: USB 10/100/1000 LAN
Device: en0

Interpretation:

DeviceCulprit
en0 = Wi-FiWi-Fi network wake
en0 = USB LANUSB-C dock/monitor Ethernet
en0 = Thunderbolt EthernetThunderbolt dock/network adapter
en0 = BridgeThunderbolt bridge/network bridge

In this real case:

en0 = Wi-Fi

So the direct culprit was Wi-Fi wake.


Step 4: Disable Network Wake Features

Run:

sudo pmset -a tcpkeepalive 0
sudo pmset -a womp 0
sudo pmset -a powernap 0

Then verify:

pmset -g | egrep "tcpkeepalive|womp|powernap"
Code language: JavaScript (javascript)

Expected output:

powernap             0
tcpkeepalive         0
womp                 0

Meaning:

SettingMeaning
tcpkeepalive 0Disables TCP keep-alive while sleeping
womp 0Disables Wake on Magic Packet / Wake for network access behavior
powernap 0Disables background updates during sleep

Appleโ€™s Battery settings also expose related options such as Wake for network access and Power Nap, where available. Apple describes Power Nap as allowing checks for mail, calendar, and iCloud updates while sleeping, and Wake for network access as allowing the Mac to wake for shared resources. (Apple Support)


Step 5: Disable Wake for Network Access in macOS UI

Go to:

Apple menu โ†’ System Settings โ†’ Battery โ†’ Options

Change:

Wake for network access โ†’ Never

Also disable Power Nap if shown.

Appleโ€™s guide says Mac laptop users can go to Battery settings, open Options, and set Wake for network access to Never if they do not want the Mac waking for network access. (Apple Support)


Step 6: Test Shutdown Again

Now test normal shutdown:

Apple menu โ†’ Shut Down

Do not unplug anything yet.

If it shuts down properly, the issue was likely network wake.

If it still restarts, continue.


Step 7: Confirm Wi-Fi as the Culprit

Run this test:

networksetup -setairportpower en0 off
sudo shutdown -h now

If the Mac shuts down properly after Wi-Fi is disabled, then the cause is confirmed:

Wi-Fi wake / network stack

After turning the Mac on again, re-enable Wi-Fi:

networksetup -setairportpower en0 on

Step 8: Check External Monitor, Dock, and USB-C Hub

Even if logs show Wi-Fi, an external monitor or dock can still contribute indirectly.

Many USB-C monitors behave like multiple devices at the same time:

Monitor
+ Charger
+ USB hub
+ Ethernet adapter
+ Audio device
+ Power delivery controller

So a monitor may trigger wake indirectly through USB-C, power delivery, network, or hub behavior.

Check these scenarios:

ScenarioLikely Cause
Restart happens only when monitor connectedUSB-C display/dock wake
Restart happens only when charger connectedPower delivery wake
Restart happens only with dockDock firmware or USB hub
Restart happens only with Ethernet via dockDock LAN wake
Restart happens even without monitormacOS network/power setting

Try changing monitor settings:

  • Disable USB-C charging / Power Delivery if possible.
  • Disable monitor USB hub.
  • Disable monitor Ethernet.
  • Disable โ€œUSB always on.โ€
  • Disable โ€œAuto input switch.โ€
  • Disable โ€œWake on USB-C.โ€
  • Update monitor firmware.
  • Try HDMI instead of USB-C.
  • Try a different USB-C port.
  • Try direct cable instead of dock.

Step 9: Check Login Items and Apps

Most of the time, this issue is not caused by a normal app. But still check:

osascript -e 'tell application "System Events" to get the name of every login item'
Code language: JavaScript (javascript)

Also check:

System Settings โ†’ General โ†’ Login Items

Temporarily disable:

  • VPN clients
  • cloud sync tools
  • display managers
  • dock utilities
  • antivirus/security agents
  • keyboard/mouse tools
  • DisplayLink Manager
  • monitor control apps

Apps that manage hardware, networking, display, or VPN are more suspicious than normal apps like browser or editor.


Step 10: Safe Mode Test

Safe Mode helps check whether third-party login items, extensions, or drivers are involved.

For Apple Silicon Mac:

  1. Shut down the Mac.
  2. Press and hold the power button.
  3. Wait until Loading startup options appears.
  4. Select your startup disk.
  5. Hold Shift.
  6. Click Continue in Safe Mode.

Apple documents this Apple Silicon Safe Mode process in its Mac Help guide. (Apple Support)

After entering Safe Mode, try shutting down again.

Interpretation:

ResultMeaning
Shutdown works in Safe ModeThird-party software/driver likely involved
Shutdown still restartsHardware, firmware, USB-C, network, or macOS power setting likely involved

Step 11: Try Terminal Shutdown

Run:

sudo shutdown -h now

Interpretation:

ResultMeaning
Terminal shutdown worksmacOS UI/session/app issue possible
Terminal shutdown also restartsLower-level wake, hardware, firmware, network, dock, or power issue

Step 12: Check for Crash or Kernel Panic

Run:

log show --last 24h | grep -i "panic"
Code language: JavaScript (javascript)

Also:

log show --last 24h | grep -i "shutdown cause"
Code language: JavaScript (javascript)

If your Mac is crashing, that is different from wake-triggered restart.

Apple says unexpected restarts can be related to software or connected devices, and recommends checking both when the Mac restarts because of a problem. (Apple Support)


Step 13: Run Apple Diagnostics

If shutdown still fails after all network and monitor checks, run Apple Diagnostics.

For Apple Silicon:

  1. Shut down.
  2. Press and hold the power button.
  3. Wait for startup options.
  4. Press and hold Command + D.

For Intel:

  1. Turn on the Mac.
  2. Immediately press and hold D.

Apple documents Apple Diagnostics as a way to test Mac hardware, with different startup steps for Apple Silicon and Intel Macs. (Apple Support)


Command Cheat Sheet

Check wake reason

pmset -g log | grep -i "Wake reason" | tail -20
Code language: JavaScript (javascript)

Check shutdown reason

log show --last 30m | grep -i "Previous shutdown cause"
Code language: JavaScript (javascript)

Small focused wake log

log show --last 10m --style compact --predicate 'eventMessage CONTAINS[c] "MAGICWAKE" OR eventMessage CONTAINS[c] "Wake reason" OR eventMessage CONTAINS[c] "IOSkywalk" OR eventMessage CONTAINS[c] "Previous shutdown cause"' | tail -30
Code language: JavaScript (javascript)

Check power assertions

pmset -g assertions

Find network interfaces

networksetup -listallhardwareports

Disable network wake features

sudo pmset -a tcpkeepalive 0
sudo pmset -a womp 0
sudo pmset -a powernap 0

Verify settings

pmset -g | egrep "tcpkeepalive|womp|powernap"
Code language: JavaScript (javascript)

Turn Wi-Fi off for testing

networksetup -setairportpower en0 off

Turn Wi-Fi back on

networksetup -setairportpower en0 on

Force shutdown from Terminal

sudo shutdown -h now

How to Read Important Log Terms

Log TermMeaning
airportdApple Wi-Fi daemon
systemWokenByWiFiSystem wake related to Wi-Fi
en0Network interface, often Wi-Fi
IOSkywalkNetworkBSDClientApple low-level network stack
IOSkywalkLegacyEthernetLow-level network driver path
MAGICWAKEWake triggered by network/magic packet/wake event
DarkWakeMac wakes in background without full user session
Wake reasonHardware/software reason for wake
powerdmacOS power management daemon
WindowServerDisplay/session service
mds/mds_storesSpotlight indexing

In the real troubleshooting case, the repeated clues were airportd ... systemWokenByWiFi and IOSkywalkLegacyEthernet ... en0, which pointed to Wi-Fi/network wake rather than a user app.


Scenario-Based Diagnosis

Scenario 1: Mac restarts only with external monitor connected

Likely cause:

USB-C monitor / dock / power delivery wake

Fixes:

Disable monitor USB hub
Disable monitor Ethernet
Disable USB-C always-on
Try HDMI instead of USB-C
Update monitor firmware
Try another USB-C port
Code language: PHP (php)

Scenario 2: Mac restarts only with Wi-Fi on

Likely cause:

Wi-Fi wake / network keepalive

Fixes:

sudo pmset -a tcpkeepalive 0
sudo pmset -a womp 0
sudo pmset -a powernap 0

Also:

System Settings โ†’ Battery โ†’ Options โ†’ Wake for network access โ†’ Never

Scenario 3: Mac restarts even with Wi-Fi off

Likely cause:

USB-C dock, monitor, charger, Bluetooth, or firmware-level wake

Fixes:

Test without dock
Test with direct charger
Test with HDMI
Disable Bluetooth before shutdown
Run Safe Mode
Run Apple Diagnostics
Code language: JavaScript (javascript)

Scenario 4: Mac restarts and shows crash report

Likely cause:

Kernel panic / system crash

Fixes:

Check panic logs
Remove third-party drivers
Update macOS
Run Apple Diagnostics
Check external devices

Scenario 5: Mac restarts after shutdown only recently

Likely cause:

Recent macOS update, new dock, new monitor, new login item, VPN, display driver
Code language: JavaScript (javascript)

Fixes:

Remove recent login items
Update dock/monitor firmware
Update DisplayLink if installed
Test Safe Mode

Important Warning About tcpkeepalive

When you disable TCP keepalive:

sudo pmset -a tcpkeepalive 0

macOS may warn that some features like Find My Mac may not work properly while sleeping. That is expected.

So use this setting carefully.

If you depend heavily on Find My Mac or remote access, you may want to test:

sudo pmset -a tcpkeepalive 1

But if the restart problem returns, then TCP keepalive/network wake is probably involved.


Optional: AutoBoot Setting

Some users try:

sudo nvram AutoBoot=%00

This is meant to disable automatic boot behavior on some Mac models.

To restore:

sudo nvram AutoBoot=%03

But this does not fix every MacBook Pro. In our case, it did not solve the problem, which proved that the issue was not simply Apple Silicon AutoBoot. The logs later pointed more strongly to Wi-Fi/network wake.


Recommended Final Fix Order

Use this order to avoid wasting time:

  1. Disable Wake for network access from System Settings.
  2. Run:
sudo pmset -a tcpkeepalive 0
sudo pmset -a womp 0
sudo pmset -a powernap 0
  1. Verify:
pmset -g | egrep "tcpkeepalive|womp|powernap"
Code language: JavaScript (javascript)
  1. Test shutdown normally.
  2. If still failing, test:
networksetup -setairportpower en0 off
sudo shutdown -h now
  1. If shutdown works with Wi-Fi off, the issue is confirmed as Wi-Fi/network wake.
  2. If shutdown still fails, investigate monitor/dock/USB-C hardware.
  3. If still unresolved, boot Safe Mode and run Apple Diagnostics.

Final Conclusion

When a MacBook Pro restarts immediately after clicking Shut Down, do not assume it is a normal restart or a random macOS bug. It is often a wake event triggered during shutdown.

In this case, the evidence showed:

airportd โ†’ systemWokenByWiFi
en0 โ†’ Wi-Fi
IOSkywalk โ†’ Apple network stack

So the actual issue was:

Wi-Fi/network wake activity caused the Mac to power back on after shutdown.

The best practical fix is:

sudo pmset -a tcpkeepalive 0
sudo pmset -a womp 0
sudo pmset -a powernap 0

plus:

System Settings โ†’ Battery โ†’ Options โ†’ Wake for network access โ†’ Never

This gives users a clear, command-based way to identify the culprit instead of randomly unplugging monitors, guessing apps, or getting frustrated.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
Iโ€™m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at <a href="https://www.cotocus.com/">Cotocus</a>. I share tech blog at <a href="https://www.devopsschool.com/">DevOps School</a>, travel stories at <a href="https://www.holidaylandmark.com/">Holiday Landmark</a>, stock market tips at <a href="https://www.stocksmantra.in/">Stocks Mantra</a>, health and fitness guidance at <a href="https://www.mymedicplus.com/">My Medic Plus</a>, product reviews at <a href="https://www.truereviewnow.com/">TrueReviewNow</a> , and SEO strategies at <a href="https://www.wizbrand.com/">Wizbrand.</a> Do you want to learn <a href="https://www.quantumuting.com/">Quantum Computing</a>? <strong>Please find my social handles as below;</strong> <a href="https://www.rajeshkumar.xyz/">Rajesh Kumar Personal Website</a> <a href="https://www.youtube.com/TheDevOpsSchool">Rajesh Kumar at YOUTUBE</a> <a href="https://www.instagram.com/rajeshkumarin">Rajesh Kumar at INSTAGRAM</a> <a href="https://x.com/RajeshKumarIn">Rajesh Kumar at X</a> <a href="https://www.facebook.com/RajeshKumarLog">Rajesh Kumar at FACEBOOK</a> <a href="https://www.linkedin.com/in/rajeshkumarin/">Rajesh Kumar at LINKEDIN</a> <a href="https://www.wizbrand.com/rajeshkumar">Rajesh Kumar at WIZBRAND</a> <a href="https://www.rajeshkumar.xyz/dailylogs">Rajesh Kumar DailyLogs</a>

Related Posts

MacOS – Super Master Guide: Troubleshooting MacBook Auto-Reboot After Shutdown

This guide is for this exact problem: Your real case data shows: So your current strongest conclusion is: Your old panic strongly points to Apple GPU/display firmware:…

Read More

How DAST Helps Close the Gap Between Code Speed and Production Risk

Modern application teams ship through pipelines that move faster than traditional security review cycles. Feature branches can reach preview environments quickly. APIs may change several times in…

Read More

What Makes the Best Dark Web Monitoring Service

Data breaches are no longer rare. Stolen login credentials, leaked bank details, and exposed personal records show up on hidden parts of the internet frequently, targeting individuals…

Read More

Top 10 Domain Registration Platforms: Features, Pros, Cons & Comparison

Introduction Domain Registration Platforms are services that allow individuals and organizations to search, purchase, register, manage, and renew domain namesโ€”the foundation of any online presence. Whether itโ€™s…

Read More

Master Guide: How to Link GitHub Issues, Commits, Branches, and Pull Requests โ€” Same Repo and Cross-Repo Workflow

1. Introduction In many teams, GitHub Issues, commits, branches, and pull requests are created in the same repository. That is the simple case. But your setup is…

Read More

A Complete User Chromebook Guide: Features, Buying Advice, Models, Specs, Pros, Cons

Updated using Googleโ€™s current public Chromebook pages and Chromebook Help information available on May 14, 2026. Chromebooks are laptops powered by ChromeOS, designed around Google apps, web…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x