You are not logged in.

#1 2021-04-06 06:09:49

yaboibpm
Member
Registered: 2021-02-07
Posts: 5

connecting to wifi using iwd

Hello all,

I have recently lost all internet connection (wired & wireless) after I uninstalled the gnome desktop(I wanted to check it out to see how it would perform on my hardware), Im really not sure how but networkmanager was also removed along with wpa-supplicant. I still have iwd and wireless_tools, but I was not able to connect. I ran:

[iwd]# station wlan0 connect SSID
got a terminal message saying I was connected, but when I tried using a browser I got messages of not being connected.

I also tried running:
# iwconfig wlan0 essid my_essid
Again confirmed in terminal I was connected, but same story as  above.

I'm not sure how to diagnose why this all happened since I had no problem prior to installing/uninstalling gnome. I think my next shot is to use my arch live usb to chroot into my existing installation and re-install networking packages, but I would really love to understand:
1) why did uninstalling gnome break my internet?
2) why couldn't I just connect to my wifi using iwd or iwconfig?

I know this is difficult to answer especially without any terminal output, but any help in the matter would be greatly appreciated.

Offline

#2 2021-04-06 06:22:52

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,809
Website

Re: connecting to wifi using iwd

The iwd package won't assign IP addresses unless you follow https://wiki.archlinux.org/index.php/Iw … figuration

Offline

#3 2021-04-06 16:44:07

yaboibpm
Member
Registered: 2021-02-07
Posts: 5

Re: connecting to wifi using iwd

Head_on_a_Stick wrote:

The iwd package won't assign IP addresses unless you follow https://wiki.archlinux.org/index.php/Iw … figuration

Thanks for the reference, I was able configure /etc/iwd/main.conf and set static IPv4 address as per https://wiki.archlinux.org/index.php/Iw … figuration and enabled systemd-resolved and systemd-networkd. Still no luck in connecting to the internet despite being able to connect to my wifi network.

Offline

#4 2021-04-06 17:03:14

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,809
Website

Re: connecting to wifi using iwd

You shouldn't have systemd-networkd running at the same time as iwd if you've enabled network configuration for the latter because the two will conflict. You don't need systemd-resolved either but you can use it if you want.

So try running iwd without systemd-networkd and see if it works by itself. If it doesn't post back with your full configuration files and journal contents.

Offline

#5 2021-04-07 02:55:46

yaboibpm
Member
Registered: 2021-02-07
Posts: 5

Re: connecting to wifi using iwd

Head_on_a_Stick wrote:

You shouldn't have systemd-networkd running at the same time as iwd if you've enabled network configuration for the latter because the two will conflict. You don't need systemd-resolved either but you can use it if you want.

So try running iwd without systemd-networkd and see if it works by itself. If it doesn't post back with your full configuration files and journal contents.

I disabled systemd-networkd and systemd-resolved. Unfortunately I'm still stuck in the same situation using only iwd .
here is my main.conf:
http://controlc.com/e1f8efbc

wifi config:
http://controlc.com/bd078bab

journal entry:
http://controlc.com/b04711a6

Offline

#6 2021-04-07 05:59:50

progandy
Member
Registered: 2012-05-17
Posts: 4,236

Re: connecting to wifi using iwd

systemd-resolved is required by iwd (Edit: for automatic dns configuration), and you have to set /etc/resolv.conf to use it as well with the stub symlink.
https://wiki.archlinux.org/index.php/Sy … figuration
https://wiki.archlinux.org/index.php/Iw … NS_manager

(You could also install openresolv and configure iwd to use it instead)
Edit: You can set up a static IP dns resolver in /etc/resolv.conf if you do not switch networks or can live without a lan-internal resolver. Thanks for the reminder Head_on_a_Stick.

Last edited by progandy (2021-04-07 15:16:39)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#7 2021-04-07 13:43:14

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,809
Website

Re: connecting to wifi using iwd

yaboibpm wrote:

I disabled systemd-networkd and systemd-resolved. Unfortunately I'm still stuck in the same situation using only iwd

Are you absolutely sure iwd is the only networking service running? Check

systemd-cgtop

or

systemctl status

to see all running services.

Once iwd is up & running does it associate with your SSID? Use this command to confirm (check the "ssid" line):

# iw dev wlan0 info

And is the IP address assigned corrrectly?

ip a
ip r
yaboibpm wrote:

main.conf

Why have you enabled IPv6 if you're only using IPv4? Why have you explicitly set RouterPriorityOffset to the default value? Try removing the [Network] stanza; I don't think it will break things but we should try to keep stuff as simple as possible while troubleshooting.

yaboibpm wrote:

journal entry

I can't see anything obvious there but 6000 lines is a bit much. Can you post the journal from just a single boot instead?

progandy wrote:

systemd-resolved is required by iwd

It is only required for the DNS configuration to be honoured. I run iwd without systemd-resolved or openresolv and just set the nameservers manually instead.

Offline

#8 2021-04-09 07:29:13

yaboibpm
Member
Registered: 2021-02-07
Posts: 5

Re: connecting to wifi using iwd

Head_on_a_Stick wrote:
yaboibpm wrote:

I disabled systemd-networkd and systemd-resolved. Unfortunately I'm still stuck in the same situation using only iwd

Are you absolutely sure iwd is the only networking service running? Check

systemd-cgtop

or

systemctl status

to see all running services.

Once iwd is up & running does it associate with your SSID? Use this command to confirm (check the "ssid" line):

# iw dev wlan0 info

And is the IP address assigned corrrectly?

ip a
ip r
yaboibpm wrote:

main.conf

Why have you enabled IPv6 if you're only using IPv4? Why have you explicitly set RouterPriorityOffset to the default value? Try removing the [Network] stanza; I don't think it will break things but we should try to keep stuff as simple as possible while troubleshooting.

yaboibpm wrote:

journal entry

I can't see anything obvious there but 6000 lines is a bit much. Can you post the journal from just a single boot instead?

progandy wrote:

systemd-resolved is required by iwd

It is only required for the DNS configuration to be honoured. I run iwd without systemd-resolved or openresolv and just set the nameservers manually instead.

So after some experimenting and reading I was able to fix the problem. After reading the wiki, got rid of all static ip addresses in my network, enabled and used systemd as the DNS manager, reconnected using iwd, and I successfully got use the internet once again. I found out that iwd uses systemd-resolved by default so I added it to my main.conf just in case and enabled the service which led to everything working again!.

Thanks alot @Head_on_a_Stick and @progandy for all your help

Offline

Board footer

Powered by FluxBB