You are not logged in.

#1 2025-04-05 16:56:56

DVD_-DAVIDE
Member
Registered: 2025-04-05
Posts: 10

Run scheduled shutdown while suspended

My machine suspends after a 2-hour timeout (using hypridle).
I sometimes use `shutdown 03:00` (or another time) to schedule a shutdown.
As it often happens, this time is past the 2-hour timeout and hypridle suspends it as intended.
Because of that, systemd does not execute the shutdown I had scheduled.

Is there a way to make it shut down anyways?

Maybe wake the machine 1 minute before the shutdown, or something like that.

Offline

#2 2025-04-06 04:04:13

nesk
Member
Registered: 2011-03-31
Posts: 182

Re: Run scheduled shutdown while suspended

You can write a script using rtcwake.
Why do you want to shut it down instead of letting it stay in suspend anyway?

Offline

#3 2025-04-06 04:17:06

DVD_-DAVIDE
Member
Registered: 2025-04-05
Posts: 10

Re: Run scheduled shutdown while suspended

nesk wrote:

You can write a script using rtcwake.
Why do you want to shut it down instead of letting it stay in suspend anyway?

Yes, I want to shut it down.
I checked out rtcwake, and it seems to be what I'm looking for.

Do you suggest using a regex with shutdown -c to find out the time, or something else?

Offline

#4 2025-04-06 13:48:50

seth
Member
Registered: 2012-09-03
Posts: 62,747

Re: Run scheduled shutdown while suspended

nesk wrote:

Why do you want to shut it down instead of letting it stay in suspend anyway?

Yes, I want to shut it down.

does not answer this

I'll take a guess: https://wiki.archlinux.org/title/Power_ … _hibernate
Use a hybrid sleep instead?

using a regex with shutdown -c to find out the time

What?
rtcwake can schedule a wakeup, you'd have to invoke that instead of hypridle in case a shutdown has been scheduled "somehow", you'd likely want to parse the output of "shutdown --show" but I'd challenge your entire approach, this has all the hallmarks of an https://en.wikipedia.org/wiki/XY_problem

Offline

#5 2025-04-06 21:55:17

DVD_-DAVIDE
Member
Registered: 2025-04-05
Posts: 10

Re: Run scheduled shutdown while suspended

seth wrote:
nesk wrote:

Why do you want to shut it down instead of letting it stay in suspend anyway?

Yes, I want to shut it down.

does not answer this

I'll take a guess: https://wiki.archlinux.org/title/Power_ … _hibernate
Use a hybrid sleep instead?

using a regex with shutdown -c to find out the time

What?
rtcwake can schedule a wakeup, you'd have to invoke that instead of hypridle in case a shutdown has been scheduled "somehow", you'd likely want to parse the output of "shutdown --show" but I'd challenge your entire approach, this has all the hallmarks of an https://en.wikipedia.org/wiki/XY_problem

You're right, I didn't read it correctly.
First of all, when I said shutdown, I meant whatever the shutdown command does (I believe it should be 'systemctl poweroff').
Second, as for my reasons to completely shut down the system, I don't really have one, I guess it's just a habit (and saving on electricity bills, I guess).

Finally, let me explain what I meant with the last part.
Hypridle does not suspend the machine itself; it only adds listeners that execute a command after a certain amount of time has passed from the last action by the user. Currently, it is configured to run 'systemctl suspend' after 7200 seconds, or 2 hours.
I was planning to change the command from 'systemctl suspend' to a script which would do the following:
- Get the output of 'shutdown --show' to check if there is a shutdown scheduled
- If there is none, run 'systemctl suspend' normally
- If there is, somehow parse it and use rtcwake to make the system wake 1 minute (or 30s) before it is to shut down

This was my intended approach, considering my current situation, but I could change it if something more convenient was proposed.

Offline

#6 2025-04-07 14:03:25

seth
Member
Registered: 2012-09-03
Posts: 62,747

Re: Run scheduled shutdown while suspended

my reasons to completely shut down the system, I don't really have one, I guess it's just a habit (and saving on electricity bills, I guess).

switch to suspend-then-hibernate.
The system will suspend and after a configurable amount of time wake up and hibernate (which is equivalent to shutting down except the memory gets stored into a file and you resume the session with the next boot) - unless you wake it out of the suspension before.
You'll have to setup hibernation (resume hook etc, it's detailed in the wiki)

Otherwise you'll have to write a script that indeed checks "shutdown --show" for scheduled shutdowns and *instead* of "systemctl suspend" issue the "rtcwake -m" command.

Offline

#7 2025-04-07 23:28:57

DVD_-DAVIDE
Member
Registered: 2025-04-05
Posts: 10

Re: Run scheduled shutdown while suspended

seth wrote:

switch to suspend-then-hibernate.
The system will suspend and after a configurable amount of time wake up and hibernate (which is equivalent to shutting down except the memory gets stored into a file and you resume the session with the next boot) - unless you wake it out of the suspension before.
You'll have to setup hibernation (resume hook etc, it's detailed in the wiki)

Otherwise you'll have to write a script that indeed checks "shutdown --show" for scheduled shutdowns and *instead* of "systemctl suspend" issue the "rtcwake -m" command.

I have looked a bit more into it, and hibernation gives me a few issues, mainly with my ethernet connection.
I have tried to switch from NetworkManager to systemd-networkd with systemd-resolved, but neither option works.
Although  it may show as connected, there is no actual connection to the internet, and that is something I would rather avoid.
I am sometimes able to fix it by restarting the services, but it doesn't always work.

P.S. I looked at the man page systemd-sleep.conf(5), but it says here that suspend-then-hibernate is just a suspend that hibernates when the battery is about to die, not a hibernate after timeout. I mean, it says here that it's either on a low battery level or after a certain timespan has passed, but I cannot find a setting for said timespan, so...

suspend-then-hibernate
           A low power state where the system is initially suspended (the state is stored in RAM). When battery level is too low (less than 5%) or a certain timespan has passed, whichever first, the system is automatically woken up and then hibernated. This establishes a between speed and safety.

           If the system has no battery, it would be hibernated after HibernateDelaySec= has passed. If set, then defaults to "2h".

           If the system has battery and HibernateDelaySec= is not set, low-battery alarms (ACPI _BTP) are tried first for detecting battery percentage and wake up the system for hibernation. If available, or HibernateDelaySec= is set, the system would regularly wake up to check the and detect the battery percentage/discharging rate. The rate is used to schedule the detection. If that is also not available, SuspendEstimationSec= is used as last resort.

Last edited by DVD_-DAVIDE (2025-04-07 23:29:42)

Offline

#8 2025-04-08 06:37:25

seth
Member
Registered: 2012-09-03
Posts: 62,747

Re: Run scheduled shutdown while suspended

man systemd-sleep.conf wrote:

HibernateDelaySec=

The amount of time the system spends in suspend mode before the system is automatically put into hibernate mode. Only used by systemd-suspend-then-hibernate.service(8). Refer to suspend-then-hibernate for details on how this option interacts with other options/system battery state.
Added in version 239.
HibernateOnACPower=

Whether to allow hibernation when the system has AC power. Only used by systemd-suspend-then-hibernate.service(8) when HibernateDelaySec= is set.
If this option is disabled, the countdown of HibernateDelaySec= starts only after AC power is disconnected, keeping the system in the suspend state otherwise.

This option is only effective on systems with a battery.

Added in version 257.

But if it does indeed not work to your liking, you'll can/have to handcraft the solution using mmanual rtcwake and in doubt even trigger a shutdown from the wake (along a dialog or so to allow you to abort that)

About the ethernet, please post your complete system journal for such boot:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

but unless the cause is a parallel (and also hibernating, because it does not shut down by default even if it says so) windows (3rd link below…) or concurrent network managing services, that sounds like some rather peculiar behavior of your router and you'd employ a networkmanager dispatcher hook to take down the NIC when suspending the system (what would likewise be prone to cause this)

Offline

#9 2025-04-08 22:58:30

DVD_-DAVIDE
Member
Registered: 2025-04-05
Posts: 10

Re: Run scheduled shutdown while suspended

https://0x0.st/8_Ui.txt
This is the system journal. I had to store it in a file first, then reboot and upload it b/c the internet was down (I didn't think about that). I tried to ping google.com before and after the hibernation.

Also it shouldn't have anything to do with Windows, although I have a Windows installation on this machine, it is on another disk (physically) and I believe it's not even listed among grub's boot options. Haven't used it in forever.
Please tell me if the log tells you anything. Otherwise, I guess I'll just go with a hacky workaround with rtcwake.

Offline

#10 2025-04-09 06:12:04

seth
Member
Registered: 2012-09-03
Posts: 62,747

Re: Run scheduled shutdown while suspended

I have a Windows installation on this machine, it is on another disk (physically)

Irrelevant, the problem isn't any disk or bootloader option.
3rd link below. Mandatory.
Disable it (it's NOT the BIOS setting!) and reboot windows and linux twice for voodo reasons.


Apr 08 18:48:34 arcolinux kernel: PM: hibernation: hibernation exit
Apr 08 18:48:34 arcolinux systemd-resolved[375]: Clock change detected. Flushing caches.
Apr 08 18:48:34 arcolinux systemd-networkd[393]: enp2s0: Lost carrier
Apr 08 18:48:34 arcolinux systemd-networkd[393]: enp2s0: DHCP lease lost
Apr 08 18:48:34 arcolinux avahi-daemon[518]: Withdrawing address record for 192.168.4.126 on enp2s0.
Apr 08 18:48:34 arcolinux systemd-sleep[1627]: System returned from sleep operation 'hibernate'.
Apr 08 18:48:34 arcolinux avahi-daemon[518]: Leaving mDNS multicast group on interface enp2s0.IPv4 with address 192.168.4.126.
Apr 08 18:48:34 arcolinux systemd[1]: systemd-hibernate.service: Deactivated successfully.
Apr 08 18:48:34 arcolinux avahi-daemon[518]: Interface enp2s0.IPv4 no longer relevant for mDNS.
Apr 08 18:48:34 arcolinux systemd[1]: Finished System Hibernate.
Apr 08 18:48:34 arcolinux avahi-daemon[518]: Withdrawing address record for fd24:a79a:5fcc:1:eea8:6bff:fe6c:85d2 on enp2s0.
Apr 08 18:48:34 arcolinux avahi-daemon[518]: Leaving mDNS multicast group on interface enp2s0.IPv6 with address fd24:a79a:5fcc:1:eea8:6bff:fe6c:85d2.
Apr 08 18:48:34 arcolinux avahi-daemon[518]: Joining mDNS multicast group on interface enp2s0.IPv6 with address fe80::eea8:6bff:fe6c:85d2.
Apr 08 18:48:34 arcolinux systemd[1]: Reached target System Hibernation.
Apr 08 18:48:34 arcolinux avahi-daemon[518]: Registering new address record for fe80::eea8:6bff:fe6c:85d2 on enp2s0.*.
Apr 08 18:48:34 arcolinux systemd[1]: Stopped target Sleep.
Apr 08 18:48:34 arcolinux systemd[1]: Stopped target System Hibernation.
Apr 08 18:48:34 arcolinux systemd-logind[521]: Operation 'hibernate' finished.
Apr 08 18:48:34 arcolinux systemd-resolved[375]: Closing all remaining TCP connections.
Apr 08 18:48:34 arcolinux systemd-resolved[375]: Resetting learnt feature levels on all servers.
Apr 08 18:48:34 arcolinux systemd-networkd[393]: enp2s0: Reconfiguring with /etc/systemd/network/20-ethernet.network.
Apr 08 18:48:36 arcolinux systemd-networkd[393]: enp2s0: Gained carrier
Apr 08 18:48:36 arcolinux kernel: r8169 0000:02:00.0 enp2s0: Link is Up - 1Gbps/Full - flow control rx/tx
Apr 08 18:49:21 arcolinux sudo[2355]:   davide : TTY=pts/0 ; PWD=/home/davide ; USER=root ; COMMAND=/usr/bin/journalctl -

You're losing carrier and lease and while the carrier returns ("cable detected") at least systemd-networkd doesn't make any effort to obtain a new lease.

NM will also log when it starts to ask for a lease (so whether the router simply doesn't respond) but it's already rather likely to be the windows condition.

also https://bbs.archlinux.org/misc.php?action=rules

Offline

#11 2025-04-09 16:28:56

DVD_-DAVIDE
Member
Registered: 2025-04-05
Posts: 10

Re: Run scheduled shutdown while suspended

This is the same thing after disabling systemd-resolved and networkd and enabling NetworkManager, if it can help.
http://0x0.st/8_FY.txt

Also, I know it's not really arch, but this seemed like my most reliable option. And apparently, the Arcolinux forum is no more.

Offline

#12 2025-04-09 20:16:51

seth
Member
Registered: 2012-09-03
Posts: 62,747

Re: Run scheduled shutdown while suspended

Apr 09 12:19:12 arcolinux NetworkManager[2730]: <warn>  [1744215552.4698] settings: (enp2s0) couldn't create default wired connection: failure adding connection: error writing to file '/run/NetworkManager/system-connections/Wired connection 1.nmconnection': failed to create file /run/NetworkManager/system-connections/Wired connection 1.nmconnection.CCZJ42: Permission denied

You seem to be running into various permission problems, but

Apr 09 12:18:21 arcolinux NetworkManager[498]: <info>  [1744215501.8842] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)

goes unresolved you just end up w/

Apr 09 12:19:12 arcolinux NetworkManager[2730]: <info>  [1744215552.4671] dhcp: init: Using DHCP client 'internal'

instead of any failure/success of the request.

Did you fix the windows situation?
If you can also reboot the router and check

sudo ls -lR /var/lib/NetworkManager/NetworkManager.state /run/NetworkManager

before and after the boot because of the permission errors.

Offline

#13 2025-04-09 21:29:05

DVD_-DAVIDE
Member
Registered: 2025-04-05
Posts: 10

Re: Run scheduled shutdown while suspended

I disabled hibernation and fastboot on windows.
tried again, but still doesn't work.
permissions for the NM files were the same, but I also saw no error in syslog this time.
new logs: http://0x0.st/8Lzp.txt

Offline

#14 2025-04-10 06:03:19

seth
Member
Registered: 2012-09-03
Posts: 62,747

Re: Run scheduled shutdown while suspended

Did you also reboot windows and linux twice (that's not really a joke besides the voodoo part) and - if you can - the router?

Apr 09 17:11:04 arcolinux NetworkManager[500]: <info>  [1744233064.0525] dhcp: init: Using DHCP client 'internal'
Apr 09 17:11:06 arcolinux NetworkManager[500]: <info>  [1744233066.5438] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 09 17:11:09 arcolinux NetworkManager[500]: <info>  [1744233069.6723] dhcp4 (enp2s0): state changed new lease, address=192.168.4.106, acd pending
Apr 09 17:11:09 arcolinux NetworkManager[500]: <info>  [1744233069.8397] dhcp4 (enp2s0): state changed new lease, address=192.168.4.106
Apr 09 17:16:00 arcolinux systemd-logind[505]: The system will hibernate now!
Apr 09 17:16:01 arcolinux NetworkManager[500]: <info>  [1744233361.0413] dhcp4 (enp2s0): canceled DHCP transaction
Apr 09 17:16:01 arcolinux NetworkManager[500]: <info>  [1744233361.0413] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 09 17:16:01 arcolinux NetworkManager[500]: <info>  [1744233361.0414] dhcp4 (enp2s0): state changed no lease
Apr 09 17:16:01 arcolinux systemd[1]: Starting System Hibernate...
Apr 09 17:16:01 arcolinux systemd-sleep[3534]: in suspend-then-hibernate operations or setups with encrypted home directories.
Apr 09 17:16:01 arcolinux systemd-sleep[3534]: Performing sleep operation 'hibernate'...
Apr 09 17:20:59 arcolinux systemd-sleep[3534]: System returned from sleep operation 'hibernate'.
Apr 09 17:20:59 arcolinux systemd[1]: systemd-hibernate.service: Deactivated successfully.
Apr 09 17:20:59 arcolinux systemd[1]: Finished System Hibernate.
Apr 09 17:20:59 arcolinux systemd-logind[505]: Operation 'hibernate' finished.
Apr 09 17:21:02 arcolinux NetworkManager[500]: <info>  [1744233662.3435] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 09 17:21:47 arcolinux NetworkManager[500]: <info>  [1744233707.2066] device (enp2s0): state change: ip-config -> failed (reason 'ip-config-unavailable', managed-type: 'full')
Apr 09 17:21:47 arcolinux NetworkManager[500]: <info>  [1744233707.2070] manager: NetworkManager state is now DISCONNECTED
Apr 09 17:21:47 arcolinux NetworkManager[500]: <warn>  [1744233707.2073] device (enp2s0): Activation: failed for connection 'ethernet'
Apr 09 17:21:47 arcolinux NetworkManager[500]: <info>  [1744233707.2076] device (enp2s0): state change: failed -> disconnected (reason 'none', managed-type: 'full')
Apr 09 17:21:47 arcolinux NetworkManager[500]: <info>  [1744233707.2163] dhcp4 (enp2s0): canceled DHCP transaction
Apr 09 17:21:47 arcolinux NetworkManager[500]: <info>  [1744233707.2163] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 09 17:21:47 arcolinux NetworkManager[500]: <info>  [1744233707.2163] dhcp4 (enp2s0): state changed no lease
Apr 09 17:21:47 arcolinux NetworkManager[500]: <info>  [1744233707.2946] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
…
Apr 09 17:22:11 arcolinux systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.

journal ends before a possible timeout (17:22:32) of the second dhcp request, but follows the same pattern.
Try to disconnect and later reconnect around the hibernation using https://wiki.archlinux.org/title/Power_ … stem-sleep

Alternatively https://wiki.archlinux.org/title/Networ … HCP_client & https://wiki.archlinux.org/title/Dhcpcd#Client_ID
Use dhcpcd w/ the clientid identification to the dhcp server (your router)

Offline

#15 2025-04-11 23:11:06

DVD_-DAVIDE
Member
Registered: 2025-04-05
Posts: 10

Re: Run scheduled shutdown while suspended

I rebooted everything a few times, at least 2 for sure.
Tried again, but I can't find anything after it's supposed to timeout in the logs.
Tried to restart NM, with no success, same issues as earlier.
New log: https://0x0.st/8pMv.txt

Also, I am not too familiar with NM's way of handling connections. Should I put 'nmcli connection up/down' or 'nmcli device connect/disconnect' in the sleep hooks?

Offline

#16 2025-04-12 07:16:13

seth
Member
Registered: 2012-09-03
Posts: 62,747

Re: Run scheduled shutdown while suspended

Apr 11 14:58:30 arcolinux NetworkManager[508]: <info>  [1744397910.8320] dhcp: init: Using DHCP client 'internal'
Apr 11 18:52:49 arcolinux NetworkManager[431764]: <info>  [1744411969.4940] dhcp: init: Using DHCP client 'internal'

You did not configure NM to use it.


Apr 11 14:58:30 arcolinux NetworkManager[508]: <info>  [1744397910.8320] dhcp: init: Using DHCP client 'internal'
Apr 11 14:58:33 arcolinux NetworkManager[508]: <info>  [1744397913.4607] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 11 14:58:36 arcolinux NetworkManager[508]: <info>  [1744397916.5138] dhcp4 (enp2s0): state changed new lease, address=192.168.4.106, acd pending
Apr 11 14:58:36 arcolinux NetworkManager[508]: <info>  [1744397916.6678] dhcp4 (enp2s0): state changed new lease, address=192.168.4.106
Apr 11 16:58:35 arcolinux NetworkManager[508]: <info>  [1744405115.6516] dhcp4 (enp2s0): state changed new lease, address=192.168.4.106
Apr 11 18:24:55 arcolinux NetworkManager[508]: <info>  [1744410295.5504] dhcp4 (enp2s0): canceled DHCP transaction
Apr 11 18:24:55 arcolinux NetworkManager[508]: <info>  [1744410295.5504] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 11 18:24:55 arcolinux NetworkManager[508]: <info>  [1744410295.5505] dhcp4 (enp2s0): state changed no lease
Apr 11 18:24:55 arcolinux systemd-sleep[420231]: in suspend-then-hibernate operations or setups with encrypted home directories.
Apr 11 18:35:09 arcolinux NetworkManager[508]: <info>  [1744410909.5792] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 11 18:35:14 arcolinux NetworkManager[508]: <info>  [1744410914.9378] dhcp4 (enp2s0): state changed new lease, address=192.168.4.106, acd pending
Apr 11 18:35:15 arcolinux NetworkManager[508]: <info>  [1744410915.1211] dhcp4 (enp2s0): state changed new lease, address=192.168.4.106
Apr 11 18:36:23 arcolinux sudo[422527]:   davide : TTY=pts/0 ; PWD=/home/davide ; USER=root ; COMMAND=/usr/bin/pacman --color auto -Ss dhcpd
Apr 11 18:36:33 arcolinux sudo[422832]:   davide : TTY=pts/0 ; PWD=/home/davide ; USER=root ; COMMAND=/usr/bin/pacman --color auto -Ss dhcpcd
Apr 11 18:36:47 arcolinux sudo[423187]:   davide : TTY=pts/0 ; PWD=/home/davide ; USER=root ; COMMAND=/usr/bin/pacman --color auto -S dhcpcd
Apr 11 18:38:06 arcolinux sudo[425007]:   davide : TTY=pts/0 ; PWD=/home/davide ; USER=root ; COMMAND=/usr/bin/vim /etc/dhcpcd.conf
Apr 11 18:41:03 arcolinux NetworkManager[508]: <info>  [1744411263.7981] dhcp4 (enp2s0): canceled DHCP transaction
Apr 11 18:41:03 arcolinux NetworkManager[508]: <info>  [1744411263.7982] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 11 18:41:03 arcolinux NetworkManager[508]: <info>  [1744411263.7982] dhcp4 (enp2s0): state changed no lease
Apr 11 18:41:17 arcolinux NetworkManager[508]: <info>  [1744411277.1238] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 11 18:42:02 arcolinux NetworkManager[508]: <info>  [1744411322.3210] dhcp4 (enp2s0): canceled DHCP transaction
Apr 11 18:42:02 arcolinux NetworkManager[508]: <info>  [1744411322.3211] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 11 18:42:02 arcolinux NetworkManager[508]: <info>  [1744411322.3211] dhcp4 (enp2s0): state changed no lease
Apr 11 18:42:02 arcolinux NetworkManager[508]: <info>  [1744411322.4211] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 11 18:42:36 arcolinux NetworkManager[508]: <info>  [1744411356.2843] dhcp4 (enp2s0): state changed new lease, address=192.168.4.106, acd pending
Apr 11 18:42:36 arcolinux NetworkManager[508]: <info>  [1744411356.4477] dhcp4 (enp2s0): state changed new lease, address=192.168.4.106
Apr 11 18:43:08 arcolinux systemd-logind[513]: The system will hibernate now!
Apr 11 18:43:09 arcolinux NetworkManager[508]: <info>  [1744411389.0762] dhcp4 (enp2s0): canceled DHCP transaction
Apr 11 18:43:09 arcolinux NetworkManager[508]: <info>  [1744411389.0762] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 11 18:43:09 arcolinux NetworkManager[508]: <info>  [1744411389.0762] dhcp4 (enp2s0): state changed no lease
Apr 11 18:43:09 arcolinux systemd[1]: Starting System Hibernate...
Apr 11 18:43:09 arcolinux systemd-sleep[427865]: in suspend-then-hibernate operations or setups with encrypted home directories.
Apr 11 18:43:09 arcolinux systemd-sleep[427865]: Performing sleep operation 'hibernate'...
Apr 11 18:45:32 arcolinux systemd-sleep[427865]: System returned from sleep operation 'hibernate'.
Apr 11 18:45:32 arcolinux systemd[1]: systemd-hibernate.service: Deactivated successfully.
Apr 11 18:45:32 arcolinux systemd[1]: Finished System Hibernate.
Apr 11 18:45:32 arcolinux systemd[1]: systemd-hibernate.service: Consumed 1.795s CPU time, 1.7M memory peak.
Apr 11 18:45:32 arcolinux systemd-logind[513]: Operation 'hibernate' finished.
Apr 11 18:45:35 arcolinux NetworkManager[508]: <info>  [1744411535.0004] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 11 18:52:48 arcolinux NetworkManager[508]: <info>  [1744411968.9558] dhcp4 (enp2s0): canceled DHCP transaction
Apr 11 18:52:48 arcolinux NetworkManager[508]: <info>  [1744411968.9559] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 11 18:52:48 arcolinux NetworkManager[508]: <info>  [1744411968.9559] dhcp4 (enp2s0): state changed no lease
Apr 11 18:52:49 arcolinux NetworkManager[431764]: <info>  [1744411969.4940] dhcp: init: Using DHCP client 'internal'
Apr 11 18:52:49 arcolinux NetworkManager[431764]: <info>  [1744411969.5127] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 11 18:53:35 arcolinux NetworkManager[431764]: <info>  [1744412015.2925] dhcp4 (enp2s0): canceled DHCP transaction
Apr 11 18:53:35 arcolinux NetworkManager[431764]: <info>  [1744412015.2926] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 11 18:53:35 arcolinux NetworkManager[431764]: <info>  [1744412015.2926] dhcp4 (enp2s0): state changed no lease
Apr 11 18:53:35 arcolinux NetworkManager[431764]: <info>  [1744412015.3611] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 11 18:54:20 arcolinux NetworkManager[431764]: <info>  [1744412060.2158] dhcp4 (enp2s0): canceled DHCP transaction
Apr 11 18:54:20 arcolinux NetworkManager[431764]: <info>  [1744412060.2159] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 11 18:54:20 arcolinux NetworkManager[431764]: <info>  [1744412060.2159] dhcp4 (enp2s0): state changed no lease
Apr 11 18:54:20 arcolinux NetworkManager[431764]: <info>  [1744412060.2854] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)

There's struggle to get a new lease before the hibernation but afterwards it completely fails.


Also, I am not too familiar with NM's way of handling connections.

For a simple test you can just manually disconnect via whatever GUI you use before you hibernate and then manually reconnect - we just want to know whether this will make the dhcp server happy.

Offline

#17 2025-04-12 18:14:32

DVD_-DAVIDE
Member
Registered: 2025-04-05
Posts: 10

Re: Run scheduled shutdown while suspended

You are right, I completely forgot to.
This is the new log that actually uses dhcpcd.
http://0x0.st/8pvq.txt

This seemed to kinda work, but it really didn't (after a while, I could ping google.com and get something back, but stuff like pacman wasn't working at all)

This is by disconnecting before and reconnecting after.
http://0x0.st/8pvw.txt

Offline

#18 2025-04-12 19:24:58

seth
Member
Registered: 2012-09-03
Posts: 62,747

Re: Run scheduled shutdown while suspended

First case you're renewing the lease but there seems no WAN connection

Apr 12 13:44:49 arcolinux systemd-logind[517]: Operation 'hibernate' finished.
Apr 12 13:44:54 arcolinux dhcpcd[1941]: enp2s0: rebinding lease of 192.168.4.117
Apr 12 13:44:59 arcolinux dhcpcd[1941]: enp2s0: leased 192.168.4.117 for 13433 seconds
Apr 12 13:44:59 arcolinux NetworkManager[512]: <info>  [1744479899.5404] dhcp4 (enp2s0): state changed new lease, address=192.168.4.117
Apr 12 13:47:48 arcolinux systemd-timesyncd[379]: Timed out waiting for reply from 23.111.186.186:123 (2.arch.pool.ntp.org).
Apr 12 13:47:58 arcolinux systemd-timesyncd[379]: Timed out waiting for reply from 216.229.4.66:123 (2.arch.pool.ntp.org).
Apr 12 13:48:09 arcolinux systemd-timesyncd[379]: Timed out waiting for reply from 107.191.55.233:123 (2.arch.pool.ntp.org).
Apr 12 13:48:19 arcolinux systemd-timesyncd[379]: Timed out waiting for reply from 69.30.247.121:123 (2.arch.pool.ntp.org).

Second case the router simply ignores the dhcp requests.

Apr 12 14:00:53 arcolinux dhcpcd[780]: received SIGTERM, stopping
Apr 12 14:00:53 arcolinux dhcpcd[780]: enp2s0: removing interface
Apr 12 14:00:54 arcolinux NetworkManager[505]: <warn>  [1744480854.0503] dhcp-listener: dhcp-event: (pid 779) unhandled DHCP event for interface enp2s0
Apr 12 14:00:54 arcolinux NetworkManager[505]: <warn>  [1744480854.0552] dhcp-listener: dhcp-event: (pid 779) unhandled DHCP event for interface enp2s0
Apr 12 14:00:54 arcolinux dhcpcd[780]: dhcpcd exited
Apr 12 14:01:12 arcolinux systemd-logind[510]: The system will hibernate now!
Apr 12 14:01:13 arcolinux systemd[1]: Starting System Hibernate...
Apr 12 14:01:13 arcolinux systemd-sleep[4497]: in suspend-then-hibernate operations or setups with encrypted home directories.
Apr 12 14:01:13 arcolinux systemd-sleep[4497]: Performing sleep operation 'hibernate'...
Apr 12 14:05:23 arcolinux systemd-sleep[4497]: System returned from sleep operation 'hibernate'.
Apr 12 14:05:23 arcolinux systemd[1]: systemd-hibernate.service: Deactivated successfully.
Apr 12 14:05:23 arcolinux systemd[1]: Finished System Hibernate.
Apr 12 14:05:23 arcolinux systemd-logind[510]: Operation 'hibernate' finished.
Apr 12 14:05:55 arcolinux NetworkManager[505]: <info>  [1744481155.5771] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 12 14:05:55 arcolinux NetworkManager[505]: <info>  [1744481155.5786] dhcp4 (enp2s0): dhcpcd started with pid 5392
Apr 12 14:05:55 arcolinux dhcpcd[5392]: dhcpcd-10.2.2 starting
Apr 12 14:05:55 arcolinux dhcpcd[5393]: enp2s0: rebinding lease of 192.168.4.117
Apr 12 14:06:00 arcolinux dhcpcd[5393]: enp2s0: DHCP lease expired
Apr 12 14:06:00 arcolinux NetworkManager[505]: <info>  [1744481160.9943] dhcp4 (enp2s0): state changed no lease
Apr 12 14:06:00 arcolinux dhcpcd[5393]: enp2s0: soliciting a DHCP lease
Apr 12 14:06:41 arcolinux NetworkManager[505]: <info>  [1744481201.2817] dhcp4 (enp2s0): canceled DHCP transaction, DHCP client pid 5392
Apr 12 14:06:41 arcolinux NetworkManager[505]: <info>  [1744481201.2817] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 12 14:06:41 arcolinux NetworkManager[505]: <info>  [1744481201.2817] dhcp4 (enp2s0): state changed no lease
Apr 12 14:06:41 arcolinux dhcpcd[5393]: received SIGTERM, stopping

This is super-weird, can you actually stop and renew the connection w/o hibernating (and/or when only suspending to RAM)?

Either way, w/ the bitchy router you're probably SOL when it comes to hibernation and will have to shutdown and when you want to shutdown out of an S3 sleep you'll have to use rtcwake *instead* of systemctl suspend.

Offline

#19 2025-04-13 22:03:46

DVD_-DAVIDE
Member
Registered: 2025-04-05
Posts: 10

Re: Run scheduled shutdown while suspended

Suspending to RAM works fine, I use it regularly with no issues.

seth wrote:

This is super-weird, can you actually stop and renew the connection w/o hibernating (and/or when only suspending to RAM)?

If by that you mean disconnecting and then reconnecting (what I did before and after hibernation), it usually gives me no issues. (btw, I do so with the disconnect button in 'nm-applet', not sure if it's relevant)

I'll try to figure out a workaround with rtcwake then.

Offline

#20 Today 08:40:49

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,528

Re: Run scheduled shutdown while suspended

Moderator Note:

This thread was reported as not being about archlinux.
I looked into this, found arcolinux developer  is discontinuing arcolinux completely and provides instructions to switch to archlinux.

Moderators will discuss how to deal with ex-arcolinux users, but I see no reason to close or delete this thread.

Lone_Wolf


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB