You are not logged in.

#1 2020-11-15 01:13:33

maboleth
Member
Registered: 2020-01-03
Posts: 220

[solved] After restart sometimes no internet (KDE - dhcpcd, ethernet)

When I was on Gnome I used to experience this every now and then with its Network manager. I then uninstalled it and got dhcpcd instead. Never had that problem again.

Until I switched to KDE.

Now I have occasional no-network even with dhcpcd. I also uninstalled/disabled networkamanger in systemctl.

The only error I found in journal was

dhcpcd[555]: enp34s0: DHCP lease expired

Though I'm not sure that's the case of internet not working.

Since I'm a complete rookie when it comes to networks:

1. What can I check, logs?
2. Can I make DHCP lease permanent or automatically getting new one (whatever that means)?
3. How can I restart networks myself, rather than rebooting again? Simply stopping/restarting dhcpcd via systemctl is not doing it.

Thanks.

Last edited by maboleth (2020-12-21 13:14:25)

Offline

#2 2020-11-15 09:00:18

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: [solved] After restart sometimes no internet (KDE - dhcpcd, ethernet)

What's the output of

find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f

?

Also post the complete system journal "sudo journalctl -b | curl -F 'f:1=<-' ix.io" after you lost the network.

Last but not least, if you've a parallel windows installation, see the 3rd link in my signature…

Offline

#3 2020-11-15 10:25:10

maboleth
Member
Registered: 2020-01-03
Posts: 220

Re: [solved] After restart sometimes no internet (KDE - dhcpcd, ethernet)

The output:

dbus-org.freedesktop.timesync1.service   | system
dhcpcd.service                           | multi-user.target.wants
dirmngr.socket                           | sockets.target.wants
display-manager.service                  | system
fstrim.timer                             | timers.target.wants
getty@tty1.service                       | getty.target.wants
gpg-agent-browser.socket                 | sockets.target.wants
gpg-agent-extra.socket                   | sockets.target.wants
gpg-agent.socket                         | sockets.target.wants
gpg-agent-ssh.socket                     | sockets.target.wants
p11-kit-server.socket                    | sockets.target.wants
pipewire.socket                          | sockets.target.wants
pulseaudio.socket                        | sockets.target.wants
remote-fs.target                         | multi-user.target.wants
systemd-timesyncd.service                | sysinit.target.wants

Also post the complete system journal "sudo journalctl -b | curl -F 'f:1=<-' ix.io" after you lost the network.
Last but not least, if you've a parallel windows installation, see the 3rd link in my signature…


Also running that journal code produces this address with my journal content (never seen this, how cool!)

http://ix.io/2Eef - Though that log is from 2am, I think that's after I did a second restart to have my working network.

As for another partition - I don't use Windows or any other os except Arch.

Last edited by maboleth (2020-11-15 10:58:18)

Offline

#4 2020-11-15 10:42:38

rsmarples
Member
Registered: 2009-05-12
Posts: 287

Re: [solved] After restart sometimes no internet (KDE - dhcpcd, ethernet)

maboleth wrote:

1. What can I check, logs?
2. Can I make DHCP lease permanent or automatically getting new one (whatever that means)?
3. How can I restart networks myself, rather than rebooting again? Simply stopping/restarting dhcpcd via systemctl is not doing it.

1) dhcpcd logs stuff to syslog. You can get it to log more by adding `debug` to /etc/dhcpcd.conf
This probably won't help you though as it's quite technical and is there just to prove that dhcpcd is working normally.

2) You can't make a DHCP lease permament unless you control the server.
If the server sends a lease time of MAX_UINT32 then it is treated as infinite, hence a permament lease.
You *could* request a lease time of MAX_UINT32, but I don't know of any server which allows this by default.
dhcpcd will automatically try to obtain a new one via RENEW and then REBIND messages.
If you enable dhcpcd debug you would see messages like this in syslog:
eth0: renewing lease of 1.2.3.4

If it's a fixed host, you could set a static IP inside the network range but outside the DHCP allocation and use an INFORM message which dhcpcd supports.
This informs the DHCP server of the static IP address you're using and it will ACK with more network setup like DNS or refuse it.
This might be an option for you.

3) `dhcpcd -n` causes dhcpcd to rebind all interfaces
You could also do `ifconfig eth0 down; ifconfig eth0 up` or `ip link set dev eth0 down; ip link set dev eth0 up` to down and up the interface which dhcpcd will spot and cause a network reboot for the interface.
For some interfaces this may also trigger a firmware reload.

Good luck!

Offline

#5 2020-11-15 11:02:31

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: [solved] After restart sometimes no internet (KDE - dhcpcd, ethernet)

There're no conflicting NIC controlling services, but the journal also doesn't cover a lease expiration (you get 1h leases from your router) nor other issues.
You suspend ~2:05 and wake up ~11:00 and get a nw lease.

However, you're using the r8169 driver on a rtl8168 chip - you could try to install the "r8168" package and see whether that stabilizes the connection.

Offline

#6 2020-11-15 13:11:26

maboleth
Member
Registered: 2020-01-03
Posts: 220

Re: [solved] After restart sometimes no internet (KDE - dhcpcd, ethernet)

@rsmarples thank you on your thorough explanation! smile

Seth, I installed the new driver. I will test this further, if it goes well I will mark this as [solved]. If not, I will post new journal content with current findings.

Thanks a lot!

Offline

#7 2020-11-29 09:25:01

maboleth
Member
Registered: 2020-01-03
Posts: 220

Re: [solved] After restart sometimes no internet (KDE - dhcpcd, ethernet)

Sadly, it's not solved.

Here's what journal reported when network failed to reconnect after resuming from suspend.

нов 29 08:53:47 ivan-linux systemd-sleep[124999]: System resumed.
нов 29 08:53:47 ivan-linux rtkit-daemon[988]: Demoting known real-time threads.
нов 29 08:53:47 ivan-linux systemd[1]: systemd-suspend.service: Succeeded.
нов 29 08:53:47 ivan-linux rtkit-daemon[988]: Successfully demoted thread 88390 of process 63437.
нов 29 08:53:47 ivan-linux systemd[1]: Finished Suspend.
нов 29 08:53:47 ivan-linux rtkit-daemon[988]: Successfully demoted thread 81344 of process 81207.
нов 29 08:53:47 ivan-linux systemd[1]: Stopped target Sleep.
нов 29 08:53:47 ivan-linux rtkit-daemon[988]: Successfully demoted thread 77071 of process 883.
нов 29 08:53:47 ivan-linux systemd[1]: Reached target Suspend.
нов 29 08:53:47 ivan-linux rtkit-daemon[988]: Demoted 3 threads.
нов 29 08:53:47 ivan-linux systemd[1]: Stopped target Suspend.
нов 29 08:53:47 ivan-linux systemd-logind[547]: Operation 'sleep' finished.
нов 29 08:53:47 ivan-linux udisksd[843]: Applying configuration from /etc/udisks2/WDC-WD2003FZEX-00SRLA0-WD-WMC6N0P4Z008.conf t>
нов 29 08:53:47 ivan-linux upowerd[961]: treating change event as add on /sys/devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb1>
нов 29 08:53:47 ivan-linux kernel: usb 1-2.4.2: new high-speed USB device number 9 using xhci_hcd
нов 29 08:53:48 ivan-linux kernel: usb 1-2.4.2: New USB device found, idVendor=2717, idProduct=ff40, bcdDevice= 4.04
нов 29 08:53:48 ivan-linux kernel: usb 1-2.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
нов 29 08:53:48 ivan-linux kernel: usb 1-2.4.2: Product: SDM660-MTP _SN:82900420
нов 29 08:53:48 ivan-linux kernel: usb 1-2.4.2: Manufacturer: Xiaomi
нов 29 08:53:48 ivan-linux kernel: usb 1-2.4.2: SerialNumber: eb4c13a
нов 29 08:53:48 ivan-linux upowerd[961]: treating change event as add on /sys/devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb1>
нов 29 08:53:48 ivan-linux upowerd[961]: treating change event as add on /sys/devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb1>
нов 29 08:53:48 ivan-linux kded5[784]: Device added "/org/freedesktop/ColorManager/devices/sysfs_Xiaomi_SDM660_MTP__SN_82900420"
нов 29 08:53:48 ivan-linux kded5[784]: Device added "/org/freedesktop/ColorManager/devices/sysfs__null_"
нов 29 08:53:48 ivan-linux upowerd[961]: treating change event as add on /sys/devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb2>
нов 29 08:53:48 ivan-linux upowerd[961]: treating change event as add on /sys/devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb1>
нов 29 08:53:48 ivan-linux upowerd[961]: treating change event as add on /sys/devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb1>
нов 29 08:53:48 ivan-linux upowerd[961]: treating change event as add on /sys/devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb1>
нов 29 08:53:48 ivan-linux upowerd[961]: treating change event as add on /sys/devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb2>
нов 29 08:53:48 ivan-linux upowerd[961]: treating change event as add on /sys/devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb2>
нов 29 08:53:48 ivan-linux upowerd[961]: treating change event as add on /sys/devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb2>
нов 29 08:53:48 ivan-linux upowerd[961]: treating change event as add on /sys/devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb1>
нов 29 08:53:48 ivan-linux upowerd[961]: treating change event as add on /sys/devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb1>
нов 29 08:53:48 ivan-linux kernel: r8168: enp34s0: link up
нов 29 08:53:48 ivan-linux plasmashell[837]: file:///usr/lib/qt/qml/org/kde/plasma/extras/ExpandableListItem.qml:314: TypeError>
нов 29 08:53:49 ivan-linux dbus-daemon[545]: [system] Activating via systemd: service name='org.freedesktop.Avahi' unit='dbus-o>
нов 29 08:53:49 ivan-linux dbus-daemon[545]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.servic>
нов 29 08:53:51 ivan-linux dbus-daemon[545]: [system] Activating via systemd: service name='org.freedesktop.Avahi' unit='dbus-o>
нов 29 08:53:51 ivan-linux dbus-daemon[545]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.servic>
нов 29 08:53:54 ivan-linux kernel: ata6: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
нов 29 08:53:54 ivan-linux kernel: ata6.00: configured for UDMA/133
нов 29 08:53:54 ivan-linux udisksd[843]: Enabled Write-Cache on /dev/sda [WDC-WD2003FZEX-00SRLA0-WD-WMC6N0P4Z008]
нов 29 08:54:33 ivan-linux systemd-timesyncd[526]: Timed out waiting for reply from 92.60.224.24:123 (2.arch.pool.ntp.org).
нов 29 08:54:43 ivan-linux systemd-timesyncd[526]: Timed out waiting for reply from 109.245.222.66:123 (2.arch.pool.ntp.org).
нов 29 09:22:34 ivan-linux dhcpcd[550]: enp34s0: failed to renew DHCP, rebinding
нов 29 09:26:04 ivan-linux rtkit-daemon[988]: Supervising 0 threads of 0 processes of 0 users.
нов 29 09:26:04 ivan-linux rtkit-daemon[988]: Successfully made thread 128151 of process 883 owned by '1000' RT at priority 5.
нов 29 09:26:04 ivan-linux rtkit-daemon[988]: Supervising 1 threads of 1 processes of 1 users.
нов 29 09:26:04 ivan-linux plasmashell[837]: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_2a_00.4.analog>
нов 29 09:26:04 ivan-linux plasmashell[837]: qrc:/plasma/plasmoids/org.kde.plasma.volume/contents/ui/ListItemBase.qml:153: Type>
нов 29 09:26:04 ivan-linux plasmashell[837]: qrc:/plasma/plasmoids/org.kde.plasma.volume/contents/ui/ListItemBase.qml:153: Type>
нов 29 09:26:04 ivan-linux plasmashell[837]: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_2a_00.4.analog>
нов 29 09:26:04 ivan-linux plasmashell[837]: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_2a_00.4.analog>
нов 29 09:26:04 ivan-linux plasmashell[837]: qrc:/plasma/plasmoids/org.kde.plasma.volume/contents/ui/ListItemBase.qml:153: Type>
нов 29 09:26:04 ivan-linux plasmashell[837]: qrc:/plasma/plasmoids/org.kde.plasma.volume/contents/ui/ListItemBase.qml:153: Type>
нов 29 09:30:04 ivan-linux dhcpcd[550]: enp34s0: DHCP lease expired
нов 29 09:30:04 ivan-linux dhcpcd[550]: enp34s0: deleting route to 192.168.0.0/24
нов 29 09:30:04 ivan-linux dhcpcd[550]: enp34s0: deleting default route via 192.168.0.1
нов 29 09:30:04 ivan-linux dhcpcd[550]: enp34s0: soliciting a DHCP lease
нов 29 10:08:19 ivan-linux rtkit-daemon[988]: Supervising 0 threads of 0 processes of 0 users.
нов 29 10:08:19 ivan-linux rtkit-daemon[988]: Successfully made thread 131821 of process 883 owned by '1000' RT at priority 5.
нов 29 10:08:19 ivan-linux plasmashell[837]: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_2a_00.4.analog>
нов 29 10:08:19 ivan-linux rtkit-daemon[988]: Supervising 1 threads of 1 processes of 1 users.

Notice dhcpcd and enp34s0 threads.

It's with the new kernel driver, r8168.

I had to do several

sudo ip link set dev enp34s0 up/down

in order to get the network moving without restart.
Just to remind you, this only started after I moved from Gnome to KDE. In Gnome it was happening until I deleted networkmanager entirely and moved to dhcpcd. It was working 100% of time, every restart.
Sadly, I cannot do the same in KDE, as it has dependency on networkmanager for powerdevil. Not sure if that could help at all, since networkmanager isn't even started.

Last edited by maboleth (2020-11-29 10:07:36)

Offline

#8 2020-11-29 09:34:58

maboleth
Member
Registered: 2020-01-03
Posts: 220

Re: [solved] After restart sometimes no internet (KDE - dhcpcd, ethernet)

Here's also the latest journal after restart, where the PC booted without network, but regained it after 5-6sec.

So it was all good, but still please check something if you can figure it out from the log.

http://ix.io/2FTq

Offline

#9 2020-11-29 15:07:44

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: [solved] After restart sometimes no internet (KDE - dhcpcd, ethernet)

нов 29 08:53:47 ivan-linux systemd-logind[547]: Operation 'sleep' finished.

System wakes up

нов 29 08:53:48 ivan-linux kernel: r8168: enp34s0: link up

NIC gets up the next second

нов 29 08:54:33 ivan-linux systemd-timesyncd[526]: Timed out waiting for reply from 92.60.224.24:123 (2.arch.pool.ntp.org).
нов 29 08:54:43 ivan-linux systemd-timesyncd[526]: Timed out waiting for reply from 109.245.222.66:123 (2.arch.pool.ntp.org).

Failing attempts to update the system time ~1 minute later - suggesting the network is down at this time?

нов 29 09:22:34 ivan-linux dhcpcd[550]: enp34s0: failed to renew DHCP, rebinding

Almost half an hour later (or the system time jumped?) the lease renewal fails - https://forums.gentoo.org/viewtopic-t-9 … art-0.html

нов 29 09:30:04 ivan-linux dhcpcd[550]: enp34s0: DHCP lease expired
нов 29 09:30:04 ivan-linux dhcpcd[550]: enp34s0: deleting route to 192.168.0.0/24
нов 29 09:30:04 ivan-linux dhcpcd[550]: enp34s0: deleting default route via 192.168.0.1
нов 29 09:30:04 ivan-linux dhcpcd[550]: enp34s0: soliciting a DHCP lease

7½ minutes later the lease expires and dhcpcd solicits a new one.

How does this square with your observations?
When and how long was the network down and when did you juggle the NICs up state?

Offline

#10 2020-11-29 16:10:32

maboleth
Member
Registered: 2020-01-03
Posts: 220

Re: [solved] After restart sometimes no internet (KDE - dhcpcd, ethernet)

seth wrote:

Failing attempts to update the system time ~1 minute later - suggesting the network is down at this time?

Shouldn't be. Network is on a cable, 24/7 and didn't experience any connectivity issues at the time. It was purely my PC not able to reconnect.

нов 29 09:22:34 ivan-linux dhcpcd[550]: enp34s0: failed to renew DHCP, rebinding

Almost half an hour later (or the system time jumped?) the lease renewal fails - https://forums.gentoo.org/viewtopic-t-9 … art-0.html

Yes, my wife tried to play the internet radio, but since there was no connection, she left the PC on its own. After I used it later, I saw no internet as well.

нов 29 09:30:04 ivan-linux dhcpcd[550]: enp34s0: DHCP lease expired
нов 29 09:30:04 ivan-linux dhcpcd[550]: enp34s0: deleting route to 192.168.0.0/24
нов 29 09:30:04 ivan-linux dhcpcd[550]: enp34s0: deleting default route via 192.168.0.1
нов 29 09:30:04 ivan-linux dhcpcd[550]: enp34s0: soliciting a DHCP lease

7½ minutes later the lease expires and dhcpcd solicits a new one.

How does this square with your observations?
When and how long was the network down and when did you juggle the NICs up state?

Well, to summarize today's no internet deal:

- PC was resumed at 8:53am and didn't have the internet.
- Wife tried 2x to play the radio, 8:53 and 9:30.
- When I got back at the keyboard later, saw the same and began resetting the NIC with ip link down/up and dhcpd -n. I'm not sure it's shown in the current journal, but that's the way it was.

Wherever I lose internet connection after restart and look at the journal, it's always enp34s0: DHCP lease expired message. However, despite any possible claims of getting a new lease, I do not regain the internet, unless I use ip link command or reset the PC.

That being said, I accessed my modem now on 192.168.0.1 and changed DHCP Lease settings from 3600 -> 86400 seconds or 24h. Maybe from now on I will not experience lease problems that frequently?

The manual says this:
The default DHCP lease time is 3600 seconds and should be changed to 86400 seconds (24 hours). This helps resolve connectivity issues with some iMAC and Windows 7 devices that turn off the network interface when they go into standby mode.
This results in slow Web browsing until the device gets a new IP address via DHCP.

Should I use even higher settings, like days, not just 24h?
Thanks on your investigation!

Last edited by maboleth (2020-11-29 16:12:51)

Offline

#11 2020-11-29 21:12:35

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: [solved] After restart sometimes no internet (KDE - dhcpcd, ethernet)

Shouldn't be.

I meant on the client (ie. the arch computer) - not necessarily the phyiscal connection or your router or the WAN.
We only record: the system had no internet access at this time.

summarize today's no internet deal

Ok, so we can assume that there was really no network for an extended amount of time.

Should I use even higher settings, like days, not just 24h?

I use static leases for expected™ devices (lease never expires) but this will not necessarily help you here.
As far as we can tell (lookup the failing journal on when you actually got the lease (~8:30?) but it seems the network failed before the lease expired.

despite any possible claims of getting a new lease

The posted log segment doesn't suggest anything like that.


Have you ever experienced this outside the context of an S3 cycle?
What if you deactivate upowerd?
Do you run other power saving daemons?

Offline

#12 2020-12-01 19:08:36

maboleth
Member
Registered: 2020-01-03
Posts: 220

Re: [solved] After restart sometimes no internet (KDE - dhcpcd, ethernet)

seth wrote:

Have you ever experienced this outside the context of an S3 cycle?
What if you deactivate upowerd?
Do you run other power saving daemons?

1. Not that I know.
2. I didn't even know it was installed/started. Now that you mentioned it I found it in systemctl. You think I should deactivate it for several days to test? Is there a setting to never power-off my network/ethernet/wifi?
3. No. I only use powerdevil of KDE. And I set it to turn off my screen after 30mins + suspend after 3h of inactivity. Nothing about networks.

If it's worth mentioning, I didn't experience any connection loss after several restarts and suspends since I set lease expire to 24h in my modem. However, still too early to tell it'll be ok.

Last edited by maboleth (2020-12-01 19:16:16)

Offline

#13 2020-12-02 09:33:07

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: [solved] After restart sometimes no internet (KDE - dhcpcd, ethernet)

upower is mostly a power plug monitoring daemon/interface - it won't disable the NIC by itself.
I suspect that the lease might have actually timed out during the S3, do you have a complete journal covering the incident?

Offline

#14 2020-12-21 13:15:33

maboleth
Member
Registered: 2020-01-03
Posts: 220

Re: [solved] After restart sometimes no internet (KDE - dhcpcd, ethernet)

Well, I let it rest and so far no problems. Not a single one.

The key thing that fixed it was changing DHCP Lease settings from 3600 -> 86400 seconds or 24h in the router.

Offline

Board footer

Powered by FluxBB