How do I stop internet traffic while in sleep on iMac?

I have IMac (Mojave) and recently acquired M1 silicon (Sequoia) attached to same router via ethernet cables.


Both ports on the router say 1000Mbps.


When the IMac goes to sleep its ethernet port shows disconnected and the TX and RX numbers stop increasing.


When M1 goes to ‘sleep’? (that is when the screen goes to sleep) the router port is still connected but gone from 1000 Mbps to 100 Mbps.


Both the TX & RX bytes/packets keep increasing on the M1 port.


In System settings/Energy on the M1 I have all options deselected i.e.:

  • Prevent automatic sleeping when display is off;
  • Wake on network access; and
  • Start up automatically after power failure.


I would like to set up the M1 the same way as the IMac so that there is NO traffic in or out when in sleep.


I do not care whom the M1 is talking to or why I just want it to be invisible while in sleep mode.


I appreciate some people won’t think this is a concern but it is for me hence why I ask:


Other than disconnecting M1 either in the settings or physically removing the cable is there a way to set the M1 so its router port is ‘disconnected’ when in sleep, as happens with the Imac?


[Re-Titled by Moderator]

Original Title: Stopping internet traffic while in Sleep

iMac 24″, macOS 15.5

Posted on Aug 29, 2025 12:19 AM

Reply
17 replies

Sep 1, 2025 06:52 PM in response to Need_help_give_help

Solution – I have got the modem to disconnect, so no traffic, when M1 goes to sleep.


Use the terminal command:

Sudo pmset –a tcpkeepawake 0


The following warning is given:

This option disables TCP Keep Alive when system is sleeping. This will result in some critical features like ‘Find my Mac’ not to function.

 

Other “Critical features” are non-specific so I take it they are not important to the user otherwise we would be told.


Also from further reading, laptop owners have found it useful to conserve battery if tcpkeepawake is disabled.


Thanks for the people who contributed

Aug 30, 2025 03:33 PM in response to Need_help_give_help

Need_help_give_help (Author)

Perhaps you need to set up the newer hardware running its most current macOS

and not try to micromanage the computer; instead read and learn about what it

can do.. See system preference/settings and choose wisely.


And the newer Apple Silicon desktop computers have a battery on the board.

..Not used for same as a portable computer, but still there; and that Mac may

need a Diagnostic/repair performed by an Apple authorized service provider..


How to Set your Mac to Use Different Network Connections: Wi-Fi, Ethernet, etc.

https://macreports.com/how-to-set-your-mac-to-use-different-network-connections-wi-fi-ethernet-etc/


The newer model is What? You've not said which build year and model hardware

the device actually is; so that much without any illumination, in a void of details.

The setup for all internet sources and settings is in the system; no matter what.

However the newer model, settings are important. To only that hardware + OS.


An older Mojave system is fair & marginal; while technology moves to elsewhere.

Of my Macs, one runs High Sierra 10.13.6 with Firefox ESR + Brave browsers. It

could run Mojave 10.14.6; if not being a Server model with dual rotational HDDs

it might run Catalina 10.15.7 OK. Older style HDDs won't do with newer formats.


There's resources online, including manuals for macOS & some build year models.

Mac computers with Apple silicon - Apple Support

For the iMac, presumably its the modern hardware and Apple Silicon chip-set.

Integrated memory, cpu and the works, all inside a small segment, of main board.


For whichever one is Portable Mac, those require serviceable good battery inside.

If you see Service Recommended on your MacBook Air or MacBook Pro - Apple Support


Identify your Mac by Model Name and serial number helps widen understanding.

Find your Mac model name and serial number - Apple Support


To learn how to use the settings for best effect, see how to portion for

various Mac computers and/or devices are part of their manuals online.


The 'Help files' inside MacOS can be found from Main menu bar.

Find the 'Getting Started' guide for your Mac - Apple Support

//support.apple.com/guide/mac-help/about-your-mac-model-mchl..


Mac User Guide (Table of Contents) - Apple Support

//support.apple.com/guide/mac-help/toc


How To Setup/Sync Internet Account on macOS [Tutorial] - UMA Technology

https://umatechnology.org/how-to-setup-sync-internet-account-on-macos-tutorial/

..some step by step instructions: where has issues you face varied from the paths?


Sorry for not exactly being of specific help. Once you've organized your question

and figure how to narrow the focus on the issues within hardware & software..

~ You may do better if your questions start anew; ask for help again, differently.


Aug 30, 2025 06:38 PM in response to K Shaffer

Hi K Shaffer


As you say: Sorry for not exactly being of specific help.


So just in case you can be of assistance with the issue I want to solve, the computer in question is:


Apple M1 silicon Imac 21,1 with a 24” Retina display


The issue pure and simply is:


Other than disconnecting M1 either in the settings or physically removing the cable is there a way to set the M1 so its router port is ‘disconnected’ when in sleep, as happens with the Imac?

or

In another way:


Whenever it sleeps I want it to stop communicating with internet either downloading or uploading which the modem seems to indicate it does.

Aug 30, 2025 07:30 PM in response to Need_help_give_help

The port indication drops from GbE Gigabit Ethernet to 100 MbE Fast Ethernet? That seems weird. What sort of router (vendor and model) do you have? Current firmware loaded?


As for sleep, this is the expected and usual behavior. If you want it shut down, select shut down, not sleep.


Sleep can be awakened. I haven’t tried a magic packet (for Wake On LAN; WOL) on Apple silicon, but it wouldn’t surprise me that it the packet still works.


If you launch Terminal app and enter the following (benign) command, what is the output? (Post it here.)

pmset -g


Related: Schedule your Mac to turn on or off in Terminal - Apple Support


Aug 30, 2025 08:01 PM in response to Need_help_give_help

Need_help_give_help (Author)


Depending on the build model M1 iMac, one was equipped

w/ an Ethernet port, the other one, was not. Other identifier

tells how without starting those up, which one you have..

•Take a tour of iMac - Apple Support

//support.apple.com/guide/imac/take-a-tour-of...2054/2024/mac/15


Yours appears to be an older model, so this might not apply.

Gigabit Ethernet (RJ-45): "..The 24-inch iMac with four ports includes

a power adapter with Built-in Ethernet. The 24-inch iMac with two ports

comes standard with a power adapter, Without built-in Ethernet, but can

be configured with Ethernet ~ at the time of purchase."

"..If you didn’t upgrade to Ethernet, at the time of purchase, a USB to

Ethernet adapter may be required. To use Ethernet, connect a router or

modem to the Gigabit Ethernet port on the power adapter."


Ethernet has advantages in the overall configuration and

use in a local network, too. However my hardware mostly

does not use an Ethernet, & remains tilted to older S/W

and local Wi-Fi between macOS and iOS devices.


Many of the Apple product manuals info are back-linked

in several of their articles, to be sure to note in context.


Aug 31, 2025 04:05 AM in response to MrHoffman

Thanks MrHoffman


The modem/router was supplied by my ISP and is its brand but I don’t believe that is the problem as my Imac (19,2) works as I want.


I don’t have WLAN etc as I want the computers to sleep until I decide to wake them.


This is the output of terminal command pmset –g.



It shows bluetooth preventing sleep as I have a bluetooth keyboard but M1 talking to internet while asleep is the same with a wired keyboard.


To emphasise, with my Imac (19,2 Mojave) the modem connection is “disconnected” when it sleeps whereas the M1 the router/modem connection is still connected. (Makes no difference if I use the ethernet connection on the power brick or USB 10/100/1000 LAN via USBC port).


It is therefore unique to M1 and the one I wish to stop communicating to the internet while sleeping. Obviously Apple has changed what is ‘normal’ but I want to have the choice to stop it. I do not want either to disconnect the cable or shutdown the computer instead of sleep but hoping I can do with some setting I haven’t found or perhaps even terminal commends?


ps As per a previous thread I have written automator apps to set the times for power on/off the computer so again not the issue.


[Edited by Moderator]

Aug 31, 2025 10:57 AM in response to Need_help_give_help

Need_help_give_help wrote:

Having provided the output of pmset –g I was interested particularly with the line:

Networkoversleep 0

I have searched and cannot find what it is. Is it a possibility that setting it to 1 might be the solution to this thread?

To see what a particular command does and how it works, use man <command> in Terminal.

The manual page for pmset does not indicate what it does with any clarity, but it does note that it cannot be changed by the user:

networkoversleep - this setting affects how OS X networking presents shared network services during system sleep. This setting is not used by all platforms; changing its value is unsupported.

I don't think that has anything to do with connecting to the internet unless you've poked a hole in your router to access the Mac from outside your LAN and you have sharing services enabled.

Aug 31, 2025 04:32 PM in response to MrHoffman

MrHoffman


“that does what you want” to make it abundantly clear ‘no it does not’ as I have oft before said in several ways:


 “I do not want either to disconnect the cable or shutdown the computer instead of sleep”.


I am always hopeful that someone will provide a solution but if I find the answer in the mean time I shall post it so it helps others.

Sep 1, 2025 06:40 PM in response to MrHoffman

MrHoffman


Thanks for your suggestion about a networking gear and again as I don’t want to shutdown, a remote switch would be unnecessary.


I have previously said I tried with wired keyboard.


I don’t see a conflict for when my iMac 19,2 sleeps the modem is disconnected,  just the M1 does not disconnect.


As you have queried the drop in Gbs when in sleep I attach a couple screen shots for your information.





That all said I have discovered a simple solution and will post that separately.

How do I stop internet traffic while in sleep on iMac?

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