You are not logged in.

#1 2025-08-06 12:46:04

phoenix324
Member
Registered: 2023-08-23
Posts: 90

.timer units activates after suspend resume and fails due to network

On my notebook i mostly cycle b/w suspend/resume. Most of the time, timer units runs when system resumes from suspend and .service units fails because network connection were still in process of being setup.

network-online.target
○ ├─archlinux-keyring-wkd-sync.service
○ ├─pacman-filesdb-refresh.service
× ├─pkgfile-update.service
× ├─pkgstats.service
○ └─reflector.service

From https://systemd.io/NETWORK_ONLINE/

Please note that network-online.target means that the network connectivity has been reached, not that it is currently available. By the very nature and design of the network, connectivity may briefly or permanently disappear, so for reasonable user experience, services need to handle temporary lack of connectivity.

What would be the best approach to solve the problem? Why is it not just the default in system?

1. modify `NetworkManger-wait-online.service` Exec parameter and remove argument `-s` and add `Conflict` key to sleep.target so that network-online.target and NetworkManager-wait-online.service gets pulled in freshwhen system resumes from suspend.  https://wiki.archlinux.org/title/Power_ … leep_hooks   https://man.archlinux.org/man/systemd-s … rvice.8.en
2. Add Restart=on-failure,  number of attempts , delay, values to each services triggered by timer.

Last edited by phoenix324 (2025-08-06 12:50:16)

Offline

Board footer

Powered by FluxBB