FS#49685 - [dhcpcd] service orders itself too early, delays bootup
Attached to Project:
Arch Linux
Opened by Gerry Kessler (renegat) - Sunday, 12 June 2016, 13:27 GMT
Last edited by Toolybird (Toolybird) - Wednesday, 20 September 2023, 03:45 GMT
Opened by Gerry Kessler (renegat) - Sunday, 12 June 2016, 13:27 GMT
Last edited by Toolybird (Toolybird) - Wednesday, 20 September 2023, 03:45 GMT
|
Details
Description:
Description: With systemd (230-3) there is a significant delay on boot when starting wpa_supplicant (1:2.5-3). With systemd-boot (no DM used) the cursor starts to flicker weird for ca. 5 seconds than the Message appears: 'A start job is running for dhcpcd on wlp1s0' wich lasts for ca. 5-10 seconds causing a total delay of ca. 20 seconds (which makes boot last double for me!) No difference if netctl profile or dhcpcd@.service is used. Downgraded dhcpcd and wpa_supplicant with no effect. Issue appears with linux 4.4.13-1-lts and 4.6.2-1 Downgrading systemd and libsystemd to 229-3 solves the issue and arch boots with normal speed again without the 'start job' message. No entries in logs about it. Additional info: package version(s): see above config and/or log files: not available Additional info: package versions: see above config and/or log files: inexistent Steps to reproduce: see above |
This task depends upon
Closed by Toolybird (Toolybird)
Wednesday, 20 September 2023, 03:45 GMT
Reason for closing: Deferred
Additional comments about closing: Old and stale. No longer seems to be a common issue. The wiki mentions workarounds if you're still affected.
Wednesday, 20 September 2023, 03:45 GMT
Reason for closing: Deferred
Additional comments about closing: Old and stale. No longer seems to be a common issue. The wiki mentions workarounds if you're still affected.
I thought this issue was related to wireless only as it did not appear with wired network for me.
Wants=network.target
Before=network.target
This should be changed to network-online.target.
Reference document: https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
In the dhcpcd case, if you don't want it to stall boot up because of hiccup in getting an IP or so, you could simply override ExecStart= to run it without -w.
But why does dhcpcd.service fork to background immediately, and dhcpcd@.service doesn't?
ExecStart=/usr/bin/dhcpcd -q -b
dhcpcd@ has this one:
ExecStart=/usr/bin/dhcpcd -q -w %I
The -w flag is what hangs up the boot. It forces dhcpcd to wait to get an IP address before forking into the background. I think the flag should be removed and these issues would largely be solved.
If dhcpcd used some kind of sd_notify thing, you could change the service type to notify if you still wished for systemd to wait for it to acquire an address.
If this was fixed I can investigate if there is any other problem with the boot, but would like to double check I got the fix...