Mac mini M1 ethernet doesn't work after waking from sleep

When I wake my Mac mini M1 (Big Sur 11.1) up, the ethernet connection doesn't work.

It appears to be online (shows the previously assigned DHCP address, and has a green dot next to it in the system preferences), but doesn't work.

Tried turning it off and on again - shows an amber dot with 'self assigned IP'.

Wifi works as usual.

Tried pulling the cable out and plug it back in - does not connect.

I tried to connect another device using the same cable, to make sure it's not my ethernet switch or connection that is faulty - works.

Restarting fixes the issue.

Anyway to resolve it? I'd really just want to wake the mini up and continue working...


Posted on Jan 8, 2021 12:51 AM

Reply
Question marked as Top-ranking reply

Posted on Apr 10, 2021 11:32 AM

I may have identified what causes this, I had Norton 360 running, removed it and the problem went away. I reinstalled it to test and the problem came back. A google on Norton suggested that the Norton firewall may be causing the problem. So I reinstalled Norton 360 and followed the Norton article, unfortunately the article didn’t fix it so I had to remove it again.

I say I may have identified the issue with caution because I originally set up my new Mac from a backup. I was preparing to send it back so reset to factory settings and reinstalled BigSur.

I gave it one last chance and signed in, no problems. So I reinstalled my apps and when I reinstalled Norton 360 the problem started again.

All I can say is that with Norton 360 network connections are dropped and I have to restart frequently. Without Norton 360 the Mac mini M1 with Big Sur fully patched up works trouble free. Not sure if this help, I know how frustrating it was - I very nearly returned the Mac Mini. I’m actually loving it now but this issue made it unusable. I can now drag and drop any file from the network to any other location without an issue. I’ve not raised with Norton yet but will - I’d prefer to have that extra layer of protection.

Similar questions

67 replies
Question marked as Top-ranking reply

Apr 10, 2021 11:32 AM in response to konjelly

I may have identified what causes this, I had Norton 360 running, removed it and the problem went away. I reinstalled it to test and the problem came back. A google on Norton suggested that the Norton firewall may be causing the problem. So I reinstalled Norton 360 and followed the Norton article, unfortunately the article didn’t fix it so I had to remove it again.

I say I may have identified the issue with caution because I originally set up my new Mac from a backup. I was preparing to send it back so reset to factory settings and reinstalled BigSur.

I gave it one last chance and signed in, no problems. So I reinstalled my apps and when I reinstalled Norton 360 the problem started again.

All I can say is that with Norton 360 network connections are dropped and I have to restart frequently. Without Norton 360 the Mac mini M1 with Big Sur fully patched up works trouble free. Not sure if this help, I know how frustrating it was - I very nearly returned the Mac Mini. I’m actually loving it now but this issue made it unusable. I can now drag and drop any file from the network to any other location without an issue. I’ve not raised with Norton yet but will - I’d prefer to have that extra layer of protection.

Mar 10, 2021 1:10 AM in response to Moshe Gottlieb

Like others have mentioned, I've noticed this happening while the computer is running and even while the NIC is active (during a large download), so it seems to have nothing to do with power management.

For now, I've written a small C program to restart the NIC if needed.

It's a C program and not a bash script because it needs to be run as root, and shell script no longer respect the sticky bit for security reasons.

You'd need a C compiler to compile it, the easiest way to install the Xcode command line tools is to just type:

gcc in the terminal.

If you don't have it installed, the system should prompt you to install the command line tools.

Once you have a working C compiler (no system is truly whole without one!), do the following in a terminal:

mkdir -p ~/bin # I'm using ~/bin for my local user binaries, feel free to change
cc keep_nic_alive.c -o keep_nic_alive
sudo chown root keep_nic_alive # Make it owned by root
sudo chmod +s keep_nic_alive # Apply the sticky bit, so it would run as root as the euid
sudo mv keep_nic_alive ~/bin/ # Move it to my bin directory

Edit your crontab file:

crontab -e

and add:

* * * * * ~/bin/keep_nic_alive 192.168.0.1 >> ~/keep_nic_alive.log

!!!Change the address to your router's address!!!

The file keep_nic_alive.log in your home directory will log restart attempts.

And finally - here's the code for keep_nic_alive.c:


//
//  keep_nic_alive.c
//  keep_nic_alive
//  Simple program that either receives the current router address or tries to figure it out by itself, ping it and restart en0 if needed.
//  See https://discussions.apple.com/thread/252283789 for more info.
//  Created by Moshe Gottlieb on 10-Mar-21.
//

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>

// Ugly hack!
static char buffer[4096];

/**
 Calls a system command, and sets the output to the static buffer variable
 Yep, nothing you'd see in a real program.
 @param cmd The command to execute
 @return Command status code
 */
int _system(const char* cmd){
    FILE* f = popen(cmd, "r");
    if (!f){
        perror("Could not execute shell command");
        exit(1);
    }
    size_t len = fread(buffer,1,sizeof(buffer)-1,f);
    if (len && buffer[len-1] == '\n') --len; // trim the last \n that is added for some reason
    buffer[len] = '\0'; // Null terminate
    return pclose(f); // status code is returned from pclose
}

int main(int argc, const char * argv[]) {
    if (geteuid() != 0){
        fprintf(stderr,"This program is meant to be run as root\n");
        return 1;
    }
    char router_address[16]; // ipv4 address + dots is 15 characters max
    router_address[15] = 0;
    if (argc == 2){
        strncpy(router_address,argv[1],sizeof(router_address)-1);
    } else {
        _system("/usr/sbin/netstat -r -n | grep default | /usr/bin/head -n1 | tr -s \" \" | /usr/bin/cut -f2 -d \" \"");
        strncpy(router_address,buffer,sizeof(router_address)-1);
    }
    char cmd[512];
    snprintf(cmd, sizeof(cmd), "/sbin/ping -t1 -c1 %s",router_address);
    cmd[sizeof(cmd)-1] = 0; // just in case
    if (_system(cmd) != 0){ // Houston, we have a problem
        printf("Restarting interface en0\n");
        setruid(0);
        system("/sbin/ifconfig en0 down");
        return system("/sbin/ifconfig en0 up");
    } else {
        return 0;
    }
}

Sep 28, 2021 10:24 PM in response to schultemn

Ok so I'm back and on osx mac mini 11.6 16g ram, and I just experienced a "drop*", I might have found a way to fix the connection after the drop (without rebooting, unplugging any cables etc), but this is not a preventative to the drop itself.. but I wanted to share how I did this in case it helps someone


(What do I mean by my drop* event)

  • This dropped happened to me while I was viewing my m1 mac through a splashtop session / (similar to rdp/vnc), just an immediate connection cut off
  • Outbound pings to google.com fail
  • I also notice outbound UDP also stops (I've been spamming a remote cloud server for testing, confirmed it stops)
  • any kind of tcp outbound requiring dns resolution just fails (like navigating to google with safari etc)
  • interface en0 is still online, wifi is still online
  • I run splashtop streamer on this and my m1 host shows offline


(So heres whats strange, and what I did)

  • file sharing appears to still be working, I assume this is because of established connections between my mbp and mac mini, or bonjour broadcast etc (though it was very likely it would eventually fail soon, I browsed some folders to make sure it wasn't just some cached finder session)
  • well what if the interface rebooted and came back online ?
  • to test that, I sshed into the mac mini from my mbp and it SUCCEEDS.. odd I thought the interface dropped and was unresponsive ?
  • OK, did my m1 run out of file descriptors ? ( well sudo lsof | wc -l never completes, I didnt want to wait longer than 3 minutes so I cannot confirm this, but I can assume something possibly may have hung/defunct/zombie fd)
  • checked dmesg, looked fine..
  • /var/log/system.logs, nothing really odd off the bat
  • still confused, so I then ran a ping test outbound to google.com (this works on my other machines but not the m1)
  • checked en0 for status:
  • OK now I suspect either nslookup/dhcp problems, so I'll try to resolve these one at a time starting with DHCP first:
  • DHCP manually reassign command = ipconfig set en0 DHCP
  • oh.. that fixed it


I still don't have enough information but.. If anyone gets another drop* one day and you have physical/or/ssh access to your m1 machine try to fix dhcp with "sudo ipconfig set en0 DHCP" and see if your connection comes back and maybe post here too if that worked for you (also replace en0 with your interface id, check that with "ifconfig", you should see your ipv4 somewhere in there and most likely it is that interface)


I still have no idea how the interface "dropped*".. but I hope this info helps someone out there






Mar 6, 2021 7:37 AM in response to Moshe Gottlieb

Well one thing for sure, hcsital didn't add much to the conversation, sorry you had to deal with that Moshe.


I got an m1 mac mini and same thing, wifi works - ethernet didn't.

I was able to get ethernet working (able to go online) by not only assigning manual ip settings but also had to manually assign the DNS servers in advanced settings. (Bottom right)


(If you don't know your DNS servers you can locate your them by logging into your modem and seeing what the 2 [usually 2] DNS servers are)


After that it worked well, until sleep like some of y'all said. It then seemed to fail, but it was actually just incredibly slow! I was still getting network capability but it was spotty and about 300 BITS/SEC (not mb or kb straight up bits!) when it did work.


Just updated to Big Sur 11.2.2 and will test to see if that fixes it. Otherwise I'm going to also try a usb-c -> ethernet adapter I have. I am running this little guy as a server for multiple operations so wifi-only isn't really an option.

Apr 29, 2021 10:44 PM in response to eamonn146

Thank you! eamonn146. I just got my M1 Mac mini today. My internet was not working neither with ethernet cable nor wifi. My old Mac mini (2018) was working perfectly well with wifi next to it. I deleted the Norton Security app and restarted but still no internet. Then I noticed in the Network preference, under ethernet, Norton Security which I don't remember ever seeing it in my previous Mac mini Network preference. It had the green dot. I deleted clicking on the minus sign below, restarted the computer and bingo! I hope it will be a stable solution.

Jul 29, 2021 5:13 AM in response to Moshe Gottlieb

Same here. It is not related to "prevent computer from sleeping" feature (I have disabled this feature and the problem persists). For me, it occurs randomly even after macos 11.5.1 update. Yesterday during a zoom videocall, it occurred multiple times (I had to use wifi instead)

The only workaround so far:

sudo ifconfig en0 down 

sudo ifconfig en0 up


In this thread, someone proposed to execute a script written in C to automatically restart the interface with the aforementioned commands. However, it is far from being a solution for everyday users.


I do not have any security software installed such as Norton

Sep 17, 2021 10:57 PM in response to konjelly

Sorry I should have updated my post.. I've had some very high suspicions that perhaps my M1 8g ram didn't have enough ram, turns out after returning it for a 16g ram M1 mini all of the issues I was having with the ethernet have completely disappeared.. I'm also running the ethernet with default settings as well, so far uptime of 29 days w/ zero eth drops..

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Mac mini M1 ethernet doesn't work after waking from sleep

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.