You are not logged in.

#1 2019-12-16 11:26:09

dynaxis
Member
From: Seoul/Korea
Registered: 2019-12-16
Posts: 20

iwd service needs to be restarted after a boot

Hi,

I'm on a Lenovo IdeaPad S340-14IIL i7 w/ 5.4.3-arch1-1 kernel
and Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter built-in.

I enabled iwd.service and even though I have a wireless LAN device,
I can't get any device at all from 'iwctl device list' (but there is one from 'ip link', which
is named 'wlan0').

But if I restart iwd.service after a successful boot, then 'iwctl device list'
shows up my wireless LAN device properly and I can configure it whatever I like.

Currently I use no network manager, and already tried to override iwd.service
settings by specifying 'After=systemd-udevd.service' to no avail.

I see no error in 'journalctl -e'.

Since it's not working from the very early stage of the Arch installation,
I think someone should be bumped on the same or similar issue.

Any clue?

Thanks in advance.

DH

Offline

#2 2019-12-16 11:33:46

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 4,750

Re: iwd service needs to be restarted after a boot

systemctl list-unit-files --state=enabled

No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2019-12-17 03:57:39

dynaxis
Member
From: Seoul/Korea
Registered: 2019-12-16
Posts: 20

Re: iwd service needs to be restarted after a boot

UNIT FILE                                               STATE
acpid.service                                         enabled
autovt@.service                                    enabled
dbus-org.freedesktop.resolve1.service enabled
getty@.service                                      enabled
iwd.service                                            enabled
systemd-resolved.service                     enabled
remote-fs.target                                    enabled

Initially there was no acpid.service enabled.

Offline

#4 2019-12-17 04:05:40

dynaxis
Member
From: Seoul/Korea
Registered: 2019-12-16
Posts: 20

Re: iwd service needs to be restarted after a boot

FYI, the content of /etc/iwd/main.conf is as follows:
-------------------
[General]
EnableNetworkConfiguration=true

[Network]
NameResolvingSerivce=systemd
-------------------

And currently no override by drop-ins for iwd.service.

Offline

#5 2019-12-17 05:00:16

glitsj16
Member
Registered: 2015-04-26
Posts: 103

Re: iwd service needs to be restarted after a boot

@dynaxis I would check the forum's IWD thread. And perhaps ask a moderator to move your issue there.

Offline

#6 2019-12-17 07:28:37

dynaxis
Member
From: Seoul/Korea
Registered: 2019-12-16
Posts: 20

Re: iwd service needs to be restarted after a boot

@glitsj16 thanks for your suggestion. Actually I tried to glance at a few recent posts in the thread and to search via keywords, but I think I couldn't find relevant posts. Anyway, per your suggestion, I'll ask the moderator to move this issue there.

Offline

#7 2019-12-17 07:43:30

dynaxis
Member
From: Seoul/Korea
Registered: 2019-12-16
Posts: 20

Re: iwd service needs to be restarted after a boot

@Slithery could you move this issue to the IWD thread if you agree?

Offline

#8 2019-12-17 07:46:27

dynaxis
Member
From: Seoul/Korea
Registered: 2019-12-16
Posts: 20

Re: iwd service needs to be restarted after a boot

journalctl -b -0 before and after restart of iwd.service.

Offline

#9 2019-12-17 16:15:40

dynaxis
Member
From: Seoul/Korea
Registered: 2019-12-16
Posts: 20

Re: iwd service needs to be restarted after a boot

I thought picked "Applications & Desktop Environments" section following another post on iwd. But it seems I was then a bit confused. This post had to be in Networking, Server, and Protection. Sorry. Please move this post to the forum.

Thanks in advance.

Offline

#10 2019-12-17 16:36:20

CarbonChauvinist
Member
Registered: 2012-06-16
Posts: 383
Website

Re: iwd service needs to be restarted after a boot

Don't post back-to-back-to-back like that, edit the last post if no one else has posted.

dynaxis wrote:

already tried to override iwd.service
settings by specifying 'After=systemd-udevd.service' to no avail.

Based on your quote above, I'd try and start with the default service unit file (i.e. remove any edits you may have already made)

Then I'd try running IWD in debug mode to get more info about what's happening. (You can simply override the default service unit file):

# systemctl edit iwd

add the following lines:

[Service]
ExecStart=
ExecStart=/usr/lib/iwd/iwd -d

Then make sure to reload and restart iwd:

# systemctl daemon-reload
# systemctl reload-or-restart iwd

You should then be able to get detailed logs from IWD as to what may be going on

i.e.

# systemctl status iwd (get the PID)
# journalctl -b _PID=XXXX (where XXXX is the PID from above)

It may make sense to reboot, copy the logs for the IWD on boot to a file, then restart the IWD service and copy the logs from the new instance to compare what's different between the two.

Last edited by CarbonChauvinist (2019-12-17 16:39:48)


"the wind-blown way, wanna win? don't play"

Offline

#11 2019-12-18 11:30:37

dynaxis
Member
From: Seoul/Korea
Registered: 2019-12-16
Posts: 20

Re: iwd service needs to be restarted after a boot

https://gist.github.com/dynaxis/8d47056 … 41fe09d841

The outputs of

journalctl -b _PIDXXX

before and after the restart of

iwd -d

.

As you see, the last two lines of the log before restart are different.

Offline

#12 2019-12-18 16:26:50

CarbonChauvinist
Member
Registered: 2012-06-16
Posts: 383
Website

Re: iwd service needs to be restarted after a boot

Thanks - that is helpful, I tried asking on the freenode #iwd and here's the response (I've bolded the replies which are what's important here):

carbonchauvinist: I'm working with someone who on first boot is unable to list any devices using iwctl, even though the device is listed in `ip link` output, they have to restart the iwd.service in order for iwd to connect.
carbonchauvinist: Looking at the logs to compare what's different on first boot vs. after restarting the service I see on first boot it reaches these two lines then no additional output
carbonchauvinist: Dec 18 19:29:19 dynaxis-laptop iwd[396]: src/manager.c:manager_config_notify() Notification of command New Interface(7)
Dec 18 19:29:19 dynaxis-laptop iwd[396]: src/netdev.c:netdev_link_notify() event 16 on ifindex 2
carbonchauvinist: is there any insight to be gained from this? I've tried to suss out what `netdev_link_notify() event 16` is... any thoughts?
@ denkenz: carboonchauvinist: So it would seem the kernel doesn’t tell iwd that the card exists
@ denkenz: What hardware / driver is it?

carbonchauvinist: TMK it's a "Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter built-in"
carbonchauvinist: this is running on a "Lenovo IdeaPad S340-14IIL i7 w/ 5.4.3-arch1-1 kernel"
@ denkenz: So basically when a new card is detected, it should send a New Wiphy and a New Interface events
@ denkenz: It seems that the kernel isn’t sending the New Wiphy event
@ denkenz: Any chance you guys can start iwmon right before iwd and provide the logs?

carbonchauvinist: Interesting, yes I can def. try to get them to do that and report back with logs. They've already pastebinned some versions of their logs here if at all useful?
carbonchauvinist: https://gist.github.com/dynaxis/8d47056 … 41fe09d841
carbonchauvinist: The "before.txt" shows the logs on first boot, the "after.txt" shows the logs after restarting the iwd service
carbonchauvinist: "starting iwmon right before iwd" -- just to be clear. Since they are enabling the service iwd so it starts on boot, what is the way you'd advise that we make sure to start iwmon prior to starting iwd? Do you want us to start manually? Or just use an ExecStartPre line in the iwd service?
@ denkenz: Whichever works
@ denkenz: I just would like a trace of what happens on the nl80211 socket
@ denkenz: As long as iwmon starts before iwd we should get what we need

carbonchauvinist: Got it, thanks -- will relay information and report back

Can you go ahead and try above and report back with the iwmon logs?

As a side note, did this just recently start happening for you with iwd 1.3 and was not present in 1.2 for instance? If so I wonder if it's related to this commit: device/netdev: init  scan in netdev instead of device. Either way with the logs requested above, there should be some progress.


"the wind-blown way, wanna win? don't play"

Offline

#13 2019-12-19 02:29:16

dynaxis
Member
From: Seoul/Korea
Registered: 2019-12-16
Posts: 20

Re: iwd service needs to be restarted after a boot

Thanks for your effort, @CarbonChauvinist.

First of all, I tried to downgrade to iwd 1.2-1 and reboot, and the same problem happened.

And I spawn up iwmon right before iwd as follows:

[dynaxis@dynaxis-laptop ~]$ cat /etc/systemd/system/iwd.service.d/override.conf
[Service]
ExecStart=
ExecStart=sh -c '/usr/bin/iwmon&/usr/lib/iwd/iwd -d'

* I tried to use ExecStartPre instead, but iwmon blocks in the foreground and I was getting weird coredumps. So did it the way described above.

The following is the logs taken with journalctl -b -u iwd.service.:

https://gist.github.com/dynaxis/07a84e8 … e390edb9af

Additional findings in the meantime:

  1. if I put ExecStartPre=sleep 1s to override.conf, iwd works fine.

  2. w/ iwd.service disabled, if I start iwd.service manuall after boot, it works (I mention this to be clear, since I'm not sure it's communicated clearly to all reading this post.)

Last edited by dynaxis (2019-12-19 04:56:23)

Offline

#14 2019-12-25 12:36:27

AlecMGiles
Member
Registered: 2019-11-16
Posts: 3

Re: iwd service needs to be restarted after a boot

For the record this has been reported on flyspray: https://bugs.archlinux.org/task/63912 and iwd ML: https://lists.01.org/hyperkitty/list/iw … 6QR4UMQKB/

Offline

#15 2019-12-27 08:08:14

dynaxis
Member
From: Seoul/Korea
Registered: 2019-12-16
Posts: 20

Re: iwd service needs to be restarted after a boot

Thanks for letting me know about the bug report.
I left a link to this thread there in the hope that my report may be helpful.

Last edited by dynaxis (2019-12-28 03:40:08)

Offline

#16 2020-02-07 15:06:06

dynaxis
Member
From: Seoul/Korea
Registered: 2019-12-16
Posts: 20

Re: iwd service needs to be restarted after a boot

[Solved] In the upstream iwd, the fix for my problem was incorporated. I use iwd-git to benefit from the fix immediately. If you have ath10k WLAN device, then you can be assured. For details, please refer to the bug report mentioned above. Kudos to the guys working on iwd.

Offline

#17 2020-02-09 10:55:21

walteweiss
Member
Registered: 2019-09-07
Posts: 20

Re: iwd service needs to be restarted after a boot

I have the same issue, and I have fixed it (maybe temporarily) with:

CarbonChauvinist wrote:

Then make sure to reload and restart iwd:

# systemctl daemon-reload
# systemctl reload-or-restart iwd

My `systemctl list-unit files --state=enabled` shows these .services:

  • autovt@

  • dbus-org.freedesktop.timesync1

  • dhcpcd

  • getty@

  • iwd

  • systemd-timesyncd

  • tlp

  • uwf

  • remote-fs

I run MacBook Air 11 (2010, Model 3,1). I may add any relevant information if needed, but I have no idea what is relevant here.

Offline

Board footer

Powered by FluxBB