LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   WiFi loss upon resume? (https://www.linuxquestions.org/questions/slackware-14/wifi-loss-upon-resume-4175700040/)

_peter 09-05-2021 08:20 AM

thanks for the workaround.
similar behavior and improvement here using the setting "dhcp=internal" in /etc/NetworkManager/conf.d/00-dhcp-client.conf.
but network connection is not as stable as it used to be upon suspend (loginctl suspend) then resume.

Similarly the network manager applet, nm-applet, under fluxbox with an X11 session is not working as well as it used to be :
- mouse click on the nm-applet tray's icon or connection status are often off on my machine.

Code:

03:00.0 Network controller: Intel Corporation Wireless 7265 (rev 59)
        Subsystem: Intel Corporation Dual Band Wireless-AC 7265
        Flags: bus master, fast devsel, latency 0, IRQ 48
        Memory at f1000000 (64-bit, non-prefetchable) [size=8K]
        Capabilities: [c8] Power Management version 3
        Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [40] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [14c] Latency Tolerance Reporting
        Capabilities: [154] L1 PM Substates
        Kernel driver in use: iwlwifi
        Kernel modules: iwlwifi

expecting updates will address it on the network manager release side ?

Code:

NetworkManager-1.32.10-x86_64-1.txz
network-manager-applet-1.24.0-x86_64-1.txz
networkmanager-qt-5.85.0-x86_64-1.txz


andygoth 09-05-2021 09:42 AM

Quote:

Originally Posted by pghvlaans (Post 6280587)
I assume the addition of the new user was done for a reason

I've noticed the boot-time warning about there being no dhcpcd user/group and (at first) was glad to see that it was added, but now I'm not so sure. This is turning into a support problem for me as I keep having to help my dad every time he resumes his laptop. I was first going to try the internal DHCP, but someone reported in this thread that it has some stability problem, so I think I'll just remove the user/group.

I couldn't find any report or discussion of the dhcpcd user/group warning here on the forum, so perhaps the report was directly emailed to Pat.

I spent a few minutes digging through the dhcpcd and NetworkManager sources but couldn't find any references to a user or group. (Admittedly, I didn't search very hard.) This leaves me wondering what was responsible for printing that warning in the first place. Removing the user and group should help me to flush out an answer to that question.

ctrlaltca 09-06-2021 02:32 AM

Recent dhcpcd releases introduce the concept of privilege separation.

From https://roy.marples.name/git/dhcpcd/...4e202281cb8ef9

Code:

Requires a user added to the system - default _dhcpcd

Several processes will be spawned off the main state engine:
a privileged actioneer and a generic network proxy.
Only the privileged actioneer process will retain root permissions.

In Slackware that user didn't exist, so dhcpcd always ran as root and wrote on the system log that it failed to drop privileges because the user was missing.
I guess somebody reported the error message and reported it to Pat (the changelog mentions Paul Blazejowski), so the dhcpcd user got added to Slackware.
This fixed the error message and now dhcpcd is correctly using priviledge separation.
Unfortunately this is now causing this new problem.

kgha 09-06-2021 03:01 AM

The dhcp=internal workaround worked for me as well. Haven't experienced the instability issues mentioned by _peter (at least not yet).

ppr:kut 09-06-2021 07:52 AM

This is the pull request that added support for dhcpcd-9.x to networkmanager: https://gitlab.freedesktop.org/Netwo...ests/668/diffs

Notably, it mentions this in the code:
Quote:

/* dhcpcd-9.x features privilege separation.
* It's not our job to track all these processes so we rely on dhcpcd
* to always cleanup after itself.
* Because it also re-parents itself to PID 1, the process cannot be
* reaped or waited for.
* As such, just send the correct signal.
*/

LuckyCyborg 09-06-2021 08:17 AM

Quote:

Originally Posted by ppr:kut (Post 6282076)
This is the pull request that added support for dhcpcd-9.x to networkmanager: https://gitlab.freedesktop.org/Netwo...ests/668/diffs

Notably, it mentions this in the code:
Code:

/* dhcpcd-9.x features privilege separation.
* It's not our job to track all these processes so we rely on dhcpcd
* to always cleanup after itself.
* Because it also re-parents itself to PID 1, the process cannot be
* reaped or waited for.
* As such, just send the correct signal.
*/


So, the dhcpcd-9.x is broken?

ppr:kut 09-06-2021 09:29 AM

Quote:

Originally Posted by LuckyCyborg (Post 6282084)
So, the dhcpcd-9.x is broken?

I don't have a lot of insight into what's happening on suspend. But conceptually, if NM relies on dhcpcd processes to completely disappear on suspend, and they do not, I would assume the problem to be more likely be located with dhcpcd than NM, based on that comment.

Francexi 09-06-2021 04:47 PM

just to say, is not somethiung only wifi-related, but current connected network related:

I usually connect via ethernet with my laptop. After suspending, the ethernet stops working, but if i enable the wifi, it works correctly. Just saying if it helps in any way

LuckyCyborg 09-06-2021 08:04 PM

Quote:

Originally Posted by Francexi (Post 6282214)
just to say, is not somethiung only wifi-related, but current connected network related:

I usually connect via ethernet with my laptop. After suspending, the ethernet stops working, but if i enable the wifi, it works correctly. Just saying if it helps in any way

Yep, I confirm that the Ethernet itself goes nuts and and several USB WiFi cards may or may not work...

Quote:

Originally Posted by ppr:kut (Post 6282106)
I don't have a lot of insight into what's happening on suspend. But conceptually, if NM relies on dhcpcd processes to completely disappear on suspend, and they do not, I would assume the problem to be more likely be located with dhcpcd than NM, based on that comment.

Man, I really hope that the Slackware team is aware of the DISASTER on networking after last updates on this stack. You put it down like a wounded horse, people!

And no, is not Firefox or Chromium. I've got "network unreachable" on ping, while being well connected to router. Theoretically.

At my limited knowledge I fail to understand for what those changes was really needed, BUT at least be gentle to put the default to "internal" on that config file of NetworkManager.

Is the single configuration which still works more or less - I have some WiFi cards unable to connect to router anymore even with this "internal" option. Isn't even needed a hibernation resume. Just straight from boot.

And a humble question: you are sure 100% that that latest DHCP, or whatever on this networking stack of today, does not suppose that it should runs from a systemd unit, just like the PipeWire daemons? Just asking...

marav 09-07-2021 03:08 AM

Quote:

Originally Posted by ppr:kut (Post 6282106)
I don't have a lot of insight into what's happening on suspend. But conceptually, if NM relies on dhcpcd processes to completely disappear on suspend, and they do not, I would assume the problem to be more likely be located with dhcpcd than NM, based on that comment.

Not really sure about that

Because dhcpcd is only a broadcast daemon that interact with NM. I think it's more a problem related to both,
and how NM handles suspend/resume with an external DHCP daemon ( which I have absolutely no idea how it behaves) - and it doesn't seem to be their problem, cf. @ppr:kut post #20
rather than a problem related only to one or the other

That's why I completely agree with LuckyCyborg, for now the best for us is to adopt dhcp=internal. Which works well in any case

pghvlaans 09-07-2021 03:45 AM

I suppose the other option would be to revert the changes from the last etc upgrade, but that's probably more disruptive. dhcp=internal hasn't given me any issues.

marav 09-07-2021 03:50 AM

Quote:

Originally Posted by pghvlaans (Post 6282310)
I suppose the other option would be to revert the changes from the last etc upgrade, but that's probably more disruptive. dhcp=internal hasn't given me any issues.

yes, but if you want to downgrade dhcpcd, you need to revert to NM 1.28
because since NM v1.30, dhcpcd >= 9.3.3 is requiered

And, I for one, that's not what I want

pghvlaans 09-07-2021 04:05 AM

Agreed. I meant keep the dhcpcd package as-is, but remove the user and group.

burdi01 09-07-2021 04:10 AM

I run with "dhcp=internal" for about a year now without problems until some weeks (?) ago resuming from suspend started to show the symptoms this thread is about.
:D

_peter 09-07-2021 02:07 PM

a couple of days of good stability with "dhcp=internal" and then a sporadic re-connection upon suspend/resume with the following messages that is beyond my understanding.
will let it be for now. not worried about it as a wired connection via rc.inet1 - ie: not network-manager - is stable, as always.

Also ISP modem providing the dhcp server are notoriously poorly designed when working w/ address reservation over wifi. Mine needs a reboot every month, more or less.

Quote:

Sep 7 20:36:19 mybox dhcpcd[3677]: eth0: IAID 57:76:07:63
Sep 7 20:36:21 nd dhcpcd[3677]: eth0: rebinding lease of 192.168.1.32
Sep 7 20:36:22 nd ModemManager[1106]: <info> [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:19
Sep 7 20:36:22 nd ModemManager[1106]: <info> [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:1c
Sep 6 23:27:46 nd kernel: e1000e 0000:00:19.0 eth0: NIC Link is Up 10 Mbps Full Duplex, Flow Control: Rx/Tx
Sep 6 23:27:46 nd kernel: e1000e 0000:00:19.0 eth0: 10/100 speed: disabling TSO
Sep 6 23:27:46 nd kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Sep 7 20:36:22 nd NetworkManager[17811]: <info> [1631039782.7336] device (eth0): carrier: link connected
Sep 7 20:36:22 nd NetworkManager[17811]: <info> [1631039782.7339] device (eth0): state change: unavailable -> disconnected (reaso
Sep 7 20:36:22 nd NetworkManager[17811]: <info> [1631039782.7355] policy: auto-activating connection 'Wired connection 1' (f0a1cd
Sep 7 20:36:22 nd NetworkManager[17811]: <info> [1631039782.7363] device (eth0): Activation: starting connection 'Wired connectio
Sep 7 20:36:22 nd NetworkManager[17811]: <info> [1631039782.7364] device (eth0): state change: disconnected -> prepare (reason 'n
Sep 7 20:36:22 nd NetworkManager[17811]: <info> [1631039782.7366] manager: NetworkManager state is now CONNECTING
Sep 7 20:36:22 nd NetworkManager[17811]: <info> [1631039782.7369] device (eth0): state change: prepare -> config (reason 'none',
Sep 7 20:36:22 nd NetworkManager[17811]: <info> [1631039782.7376] device (eth0): state change: config -> ip-config (reason 'none'
Sep 7 20:36:22 nd NetworkManager[17811]: <info> [1631039782.7381] dhcp4 (eth0): activation: beginning transaction (timeout in 45
Sep 7 20:36:26 nd dhcpcd[3677]: eth0: soliciting a DHCP lease
Sep 7 20:36:40 nd acpid: client 8998[0:0] has disconnected
the end for me.


All times are GMT -5. The time now is 04:35 PM.