Laptop - network connection and power save

On a laptop with Fedora 44, I’d like to understand how

  • wifi network connection
  • power saving features
  • applications that are constantly connected, for example Transmission

How do these interact? For example, when does the laptop drop a wifi connection and when does an application like Transmission continue to function in the background? When the screen does blank or when I close the lid? Is there some documentation I can read? Are there some settings I can adjust?

Everything shuts down when the laptop suspends.
This usually happens when the lid is closed, when the system has sat for 15 minutes idle, or when the user selects to suspend (and maybe other circumstances as well)

For the above, idle means no mouse or keyboard input.

Power saving may also turn off the wifi if not actively in use.

Thanks for the response.

But is there any way to adjust that, for example if the laptop is connected to mains and the lid is open, even if it sits idle for a long time it would just blank and lock the screen and not suspend?

Depends on your desktop environment, but probably. For example in KDE I can definitely achieve this part in the Power Management screen of the system settings.

even if it sits idle for a long time it would just blank and lock the screen and not suspend?

But I’m on a desktop, so I can’t see whether options around mains power and/or the lid being opened are available. I suspect they probably are

I’m using Gnome

With gnome (Workstation) there is an option in settings to do that.

You also can disable the suspend when closing the lid if you choose.

Strange. For some reason that window is missing the lower half of the options on my system

If you have the suspend options disabled by systemd those options are hidden since suspend will not be active. Is it possible you have disabled suspend by some other method than the gnome settings?

The image above was from a laptop with f44 recently installed and no changes made to sleep/suspend/hibernation.

I have found 2 ways to disable suspend globally

  1. Edit or create a file in /etc/systemd/sleep.conf.d/ and add 5 lines. The file name must end with.conf and you may need to create the sleep.conf.d directory
[Sleep]
AllowSuspend=no
AllowHibernation=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no
  1. Disable the services that control those actions with these commands.

sudo systemctl mask systemd-suspend.service
sudo systemctl mask systemd-suspend-then-hibernate.service
sudo systemctl mask systemd-hybrid-sleep.service
sudo systemctl mask systemd-hibernate.service

I use both methods since I want to 100% ensure that the system will never suspend or hibernate. I am using it as a media server which needs to provide 24/7 access from other devices in the house.

I don’t think suspend functionality is disabled on my laptop. I don’t have a /etc/systemd/sleep.conf.d/ directory. The laptop does suspend if I press the on/off button and the following is printed in system log

systemd-logind[1241]: Power key pressed short.
systemd-logind[1241]: The system will suspend now!
ModemManager[1306]: [sleep-monitor-systemd] system is about to suspend
ModemManager[1306]: [sleep-monitor-systemd] ready to sleep; dropping inhibitor

Attaching screenshot from settings

As far as I can tell, those options will be missing if GNOME thinks your system can’t suspend automatically.

Can you open a terminal and run the following command:
dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.CanSuspend

That should return the same information that the control centre uses when deciding to show those options

Thanks, that command returned

method return time=1782041694.511916 sender=:1.15 → destination=:1.495 serial=2297 reply_serial=2
string “yes”

Is there a way force those power saving options to always be present?

I’ll have to admit defeat on this one - if the login manager is saying your system can suspend then I don’t know why the options aren’t being shown. Time to file a GNOME bug, perhaps?

I just had a new look at the laptop (it isn’t currently in daily use) and now all the options are shown in power savings and they also work as expected! But I don’t know why, it hasn’t been touched since I tried the dbus-send command. One speculation would be that because this a fresh installation of Fedora 44 it needed something to trigger the realization that these should be shown. Thanks for all the effort