You are not logged in.
I am using mt7601u as my wifi adapter, and I have been using it for 5 months without a flow. But when I installed the VirtualBox, it needs to pass the usb port of the adapter to it. I mean I need to turn on the usb port manually with devices options. And when I do the host machine's wifi turns off. This didn't bother me much as I can do my work. But today when I try to connect to the wifi after disconnecting the VirtualBox's usb device, nmcli doesn't let me connect. When I do nmcli dev wifi list, it shows nothing. As I guess the wifi adapter is there but no networks.
~ ❯ journalctl -xb | grep wlan 19:39:51
Mar 01 19:34:11 dead NetworkManager[463]: <info> [1646143451.9308] manager: (wlan0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/3)
Mar 01 19:34:11 dead NetworkManager[463]: <info> [1646143451.9312] device (wlan0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Mar 01 19:34:11 dead systemd-networkd[293]: wlan0: Link UP
Mar 01 19:34:11 dead systemd-networkd[293]: wlan0: Link DOWN
Mar 01 19:34:11 dead NetworkManager[463]: <info> [1646143451.9836] device (wlan0): state change: unavailable -> unmanaged (reason 'removed', sys-iface-state: 'removed')
Mar 01 19:34:12 dead systemd-networkd[293]: wlan0: Link UP
Mar 01 19:34:12 dead NetworkManager[463]: <info> [1646143452.0114] manager: (wlan0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/4)
Mar 01 19:34:12 dead NetworkManager[463]: <info> [1646143452.0177] device (wlan0): new IWD device state is disconnected
Mar 01 19:34:12 dead NetworkManager[463]: <info> [1646143452.0215] device (wlan0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Mar 01 19:34:12 dead NetworkManager[463]: <info> [1646143452.0247] device (wlan0): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed')
Mar 01 19:37:37 dead dbus-daemon[462]: [system] Activating via systemd: service name='org.freedesktop.home1' unit='dbus-org.freedesktop.home1.service' requested by ':1.35' (uid=0 pid=1382 comm="sudo iw dev wlan0 scan ")
Mar 01 19:37:37 dead sudo[1382]: dead : TTY=pts/0 ; PWD=/home/dead ; USER=root ; COMMAND=/usr/bin/iw dev wlan0 scanAny idea how to fix this?
Offline
Why is the device called wlan0? Do you have iwd installed/running?
Online
Why is the device called wlan0? Do you have iwd installed/running?
yeah I have iwd installed
~ ❯ pacman -Qi iwd 20:40:02
Name : iwd
Version : 1.25-1
Description : Internet Wireless Daemon
Architecture : x86_64
URL : [url]https://git.kernel.org/cgit/network/wireless/iwd.git/[/url]
Licenses : LGPL
Groups : None
Provides : None
Depends On : glibc readline libreadline.so=8-64 ell
Optional Deps : None
Required By : None
Optional For : networkmanager
Conflicts With : None
Replaces : None
Installed Size : 1909.87 KiB
Packager : Andreas Radke <andyrtr@archlinux.org>
Build Date : Fri Feb 25 12:16:23 2022
Install Date : Tue Mar 1 19:29:05 2022
Install Reason : Explicitly installed
Install Script : Yes
Validated By : SignatureOffline
journalctl -xb | grep wlan
sudo journalctl -b | curl -F 'f:1=<-' ix.ioBut you've *at least* systemd-networkd and NetworkManager enabled, possibly iwd and you're also trying iw scan…
find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -fOffline
~ ❯ sudo journalctl -b | curl -F 'f:1=<-' ix.io 20:40:21
[sudo] password for dead:
http://ix.io/3R5J~ > find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f
find: ‘test’: No such file or directoryBut you've *at least* systemd-networkd and NetworkManager enabled, possibly iwd and you're also trying iw scan…
Yes I have both NetworkManager and iwd running.
Last edited by dead101 (2022-03-01 15:46:43)
Offline
find: ‘test’: No such file or directory
"test" is part of the coreutils package which is required by the kernels and util-linux and many more?
=> What kind of distribution do you run?
Either way, you're running too many services for sure.
If you want to use iwd as NM backend, see https://wiki.archlinux.org/title/Networ … Fi_backend
Offline
~ ❯ sudo journalctl -b | curl -F 'f:1=<-' ix.io 20:40:21 [sudo] password for dead: http://ix.io/3R5J~ > find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f find: ‘test’: No such file or directoryBut you've *at least* systemd-networkd and NetworkManager enabled, possibly iwd and you're also trying iw scan…
Yes I have both NetworkManager and iwd running.
That's a problem. You want one, and only one, network management daemon enabled.
I usually just use `tree /etc/systemd/` to check what's enabled. That find command seems popular here, but tree is much simpler IMO.
Online
If you want to use iwd as NM backend
I'm using iwd as backend
~ ❯ bat /etc/NetworkManager/conf.d/wifi_backend.conf 14:44:11
───────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ File: /etc/NetworkManager/conf.d/wifi_backend.conf
───────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ [device]
2 │ wifi.backend=iwd
───────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────And last night I slept without fixing this, and for my surprise it's working now. I don't know what had happened.
PS: Thank you all guys. I love using Arch and it's community too.
Offline
https://en.wikipedia.org/wiki/Race_condition
But you've *at least* systemd-networkd and NetworkManager enabled, possibly iwd and you're also trying iw scan…
find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f
Offline
That's a problem. You want one, and only one, network management daemon enabled.
Sorry for an off-topic question but I didn't understand this. I am using NM with iwd as the backend. I have both of their service files enabled. But there has never been a problem. Is that safe?
Offline
It's safe in that your system will not explode and burn to ashes, but it's not safe in that you're provoking a race condition. Whether that has any consequences is not deterministic - the nature of a race condition.
Also things can go south very quickly if NM decides it needs to start iwd w/ a certain configuration/parameters and then blindly relies on that, but iwd is actually running w/ the configuration read by the iwd.service.
The recommendation is to not activate mutliple services because they'll compete for the NIC - in the case of activating iwd and also having NM run iwd it's not as certain to cause problems, but
1. it's not required at all
2. nothing good will come from it
So don't.
Offline
I haven't use NM's IWD backend, but in general, you would want NM to start the wireless daemon instead of running it standalone with systemd.
My statement was a bit broad, though. I should say you only want one enabled that's going to manage any given interface. You can, for instance, have systemd-networkd configured to only manage a wired interface and still use IWD for a wireless one.
Online
Thanks for the information from both of you. I will add a small note on this iwd wiki page. In that page it mentions to start/enable iwd.service to use iwctl. Now that I read both your posts it's more clear to me. So, something like :
Optionally, start/enable iwd.service so it can be controlled using the iwctl command.
or
Start/enable iwd.service so it can be controlled using the iwctl command (may not be necessary if you are using [[Network_configuration#Network_managers]]).
Offline
I'd take the second, but potentially change that link directly to the relevant NetworkManager config section in the wiki, as this kind of usage is only implemented by it in that form afaik
Offline
V1del I am a bit confused by your comment. Are you referring to NetworkManager ? I was referring to Network_configuration#Network_managers as ConnMan also works with iwd.
Offline