-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
version 255.4: suspend/resume breaks network connection #280
Comments
Hmmm... To fix the "Zombie-Process"-Issue (#275), I suspended/resumed many times, and NetworkManager never had any problem.
Unfortunately, upstream removed The default values of the config items upstream removed or have been added for elogind exclusively are now in Therefore, I have an additional config file on my laptop (See last line)
With this, I am always using deep mode. However, I do not recall having issues with NetworkManager when using s2idle but I did not test it with v255. |
Thanks. Editing the /etc/elogind/sleep.conf.d/10-elogind.conf (allowing the SuspendMode line and set it as SuspendMode=deep s2idle) puts the machine to sleep and also means that it resumes when I open the lid. So far so good. |
Dbus is enabled and running, right? In my
Can you see such lines in your system log, too? |
Yes, dbus is enabled and running, eg What I can see in the /var/log/messages file is that NetworkManager restarts after resume with elogind-252.23 but not with elogind-255.4. With 255.4, NetworkManager goes to sleep: but after resume, there's no mentioning of NetworkManager in /var/log/messages. Instead, there's the line |
I only have that, about NM, in /var/log/syslog when resuming : Also, dbus is running here as well
elogind: 255.4_r2 |
I think for some reason, elogind not send 'resume' signal to NetworkManager... |
Looks like there's something not going right in the dbus interface when resuming: elogind-252.23:
elogind-255.4_r2:
The "PrepareForSleep" signal with parameter "false" is not sent after resume, so applications subscribing to it to detect system resume are not notified correctly. |
I noticed a small difference in login-dbus.c in the function elogind_execute_shutdown_or_sleep() between v252.23 and v255.4-r2. In the new function only the child process calls https://github.com/elogind/elogind/blob/v255.4-r2/src/login/logind-dbus.c#L1863 I see the function flow after the fork() has been inverted, maybe this caused one of the calls to be removed accidentally? |
elogind not sending the wakeup seems to be the culprit here. When the sleeper is forked out, the main process must not send a signal; otherwise, it would send a "prepare-for-wakeup" message while the forked-out process is working on suspending the machine. It seems that sending the signal from the fork does not work. So, I either find out why or move sending the wakeup signal to the SIGCHLD handler. The latter seems to be more feasible to me. |
Hopefully some debug log can be useful: SLEEP
RESUME
I guess the |
I recently updated to 252.23.1-1 on Artix. Not sure if it is related but thought I'd share that after updating I experience similar faults on two machines, I have to manually restart NM for it to work. nm-applet just says "Networking disabled." |
To follow up on this, my friend gave me a cached archive of 252.23-1 and I have confirmed that after downgrading the issue is eliminated. So it is definitely something wrong with the latest version. |
Indeed, confirmed here as well |
bug appears only if resume start new session (user re-login), if user suspend-resume from cli and no re-login then everything works fine.
EDIT : There are major diffs from one release to other, something that might be the reason (?) is: The switch from simple PIDs to PidRef structures for tracking session leaders could cause inconsistencies in session management, potentially leading to a disconnect between system resources (like eth0) and their associated sessions. If the new session doesn't maintain the same references or associations, it might lead to eth0 being removed.
|
The switch to PidRef is going on since September 2023. See: Upstream c79ab77
I'll better check again whether everything is consistent, then. |
Also on Artix (using OpenRC with the When I try to enable any connection using
Running
|
The forked out sleeper process fails to send the wakeup signal, as it does not share the dbus connection with elogind. Therefore elogind sends the signal itself once the sleeper has messaged elogind that it is done via the SIGCHLD signal. Bug: #280 Signed-off-by: Sven Eden <sven@eden-worx.com>
With commit ce3616c I have NetworkManager reporting that a wakeup is requested again. Please check whether this commit fixes the issue for you, too. |
Slackware64-current, I rebuilded elogind as you suggested and polkit. Things for me looking good. |
Ditto. Rebuilt elogind with the changes from the commit and slackware's buildscript (and rebuilt polkit after upgrading elogind. |
Same here It works like a charm
Thanks |
Fixed for me too, also on slackware current. |
The forked out sleeper process fails to send the wakeup signal, as it does not share the dbus connection with elogind. Therefore elogind sends the signal itself once the sleeper has messaged elogind that it is done via the SIGCHLD signal. Bug: #280 Signed-off-by: Sven Eden <sven@eden-worx.com>
Thank you all very very much for your reports and your feedback! |
I'm also seeing this on Devuan ceres (Debian sid) as well. Suspend/resume works but NetworkManager is killed/disabled upon resume. |
I did have the NetworkManager problem as well, but now with
|
@hroemer This sounds like the issue mentioned above where you need to set the SuspendMode to deep since the default has changed: |
@af7567 thanks, this did the trick! |
Slackware-current 64 bit
Linux kernel 6.6.27
HP Elitebook 820 G1, Intel Haswell-ULT Integrated Graphics, Intel Wireless 7260 netwok device
After upgrading to 255.4, suspend no longer works properly. Most serious issue is that network connection breaks, NetworkManager becomes unresponsive and cannot be restarted except by rebooting.
With elogind-252, the machine's LED for wifi goes out during suspend and the on/off lead flashes.
After upgrade both LEDs are permanently on.
With elogind-252.23, closing/opening the laptop lid is sufficient for suspend/resume.
After upgrade, closing suspends but opening does not resume - I have to press power button to resume.
I never have had to touch the logind.conf or sleep.conf files earlier. I've now tried to edit them, enabling HandeLidSwitch=suspend (in logind.conf) and AllowSuspend=yes (in sleep.conf). No difference.
Recompiled elogind using the latest 255.4-r1 version: no difference
Recompiled elogind using the latest 255.4-r1 version and the change suggested here: #279 but still no difference.
Reverting to version 252.23 for now. Grateful for explanations, help, possible solutions...
The text was updated successfully, but these errors were encountered: