Prevent network to disconnect in sleep mode

Hi !

I noticed that my network is shutting down when my computer go in sleep mode. However, sometimes there is remaining activities that I would like to go on while in sleep mode. For example, if I'm downloading some big files, it stops because of this.
Is there a way to prevent network to shut down in sleep mode ?

I dont use WiFi, its a cable network.

Thanks !

*-network
description: Ethernet interface
produit: NetXtreme BCM57766 Gigabit Ethernet PCIe
fabricant: Broadcom Inc. and subsidiaries
identifiant matériel: 0
information bus: pci@0000:04:00.0
nom logique: enp4s0f0
version: 01
numéro de série: 68:5b:35:93:e6:72
taille: 1Gbit/s
capacité: 1Gbit/s
bits: 64 bits
horloge: 33MHz
fonctionnalités: pm vpd msi msix pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration : autonegotiation=on broadcast=yes driver=tg3 driverversion=6.1.12-060112-generic duplex=full firmware=57766a-v1.15 ip=192.168.2.10 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
ressources : irq:19 mémoire:b1b00000-b1b0ffff mémoire:b1b10000-b1b1ffff

1 Like

On Settings > Energy there's an option to disable WI-FI to save energy but not sure if works for cable network and when standing-by :person_shrugging:, see if disabling it the network stays on. Also, you should be able to check your plugged router/modem settings about automatic device switch off. An alternative is setting that when lid is closed (for laptops) or when idle for a certain time the pc doesn't stand-by, it just loads a black screen so that option on Energy maybe doesn't activate to stop your network.

1 Like

So far, like you said the only solution is to disable the sleep mode.

I've tried the WiFi thing, but it does nothing since it's not the same interface.

I will wait, maybe someone else have a solution.

Thanks !

2 Likes

sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

Change to a value of 2 to disable the powersave. It should look like

[connection]
wifi.powersave = 2

Tap ctrl+x to exit the editor, then the y key to say yes to save, the enter key to save current configuration.

3 Likes

yes the solution is to disable the sleep mode, but instead of doing that manually, it will be better to be automatically, when downloading running disable sleep mode ,when no downloaing running run sleep mode.
the solution for that is to do it by script, or by using download manger apps have those features.
for example:fdm(free download manger) app has that features:

You would have to write a bash or python script that would run as a service, polling for network traffic at a certain rate, or software that is contacting the web. While not to difficult, since a Downloader has that feature, use that Downloader. I'm not sure if browsers include this feature or not. Writing a script for this would put unnecessary load on your computer. Disable sleep, turn off network adapter power saver or use the Downloader/ Browser.

Thanks for all your answers/solutions.

I will do as you say, and use software to download that prevents sleeping mode while active. OR disable sleep mode, and just close the screen.

Another option is prevent sleep occurring, by installing and running Caffeine that fools the machine that the mouse is active.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.