Skip to main content
Topic: Cannot connect to wifi [SOLVED] (Read 2787 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Cannot connect to wifi [SOLVED]

I installed Artix with artix-community-gtk-openrc-20220713-x86_64.iso and I updated it from chroot since I couldn't connect to the wifi.

No way to connect:
Code: [Select]
rfkill unblock wifi
connmanctl enable wifi
connmanctl agent on
connmanctl scan wifi
Error /net/connman/technol./wifi: no carrier
connmanctl scan wlan0
Method scan  "Scan" with signature "" on interface "net.connman.Technology" doesn't exist
iwconfig wlan0 mode Managed
iwconfig wlan0 essid <WiFi>
iwconfig wlan0 key <password>

The netcard used to work on Artix, with that community iso and it's working on another Linux.

Then I reinstalled it with artix-lxde-openrc-20230111-x86_64.iso and again "No carrier" error from connman-gtk.

Code: [Select]
lspci
03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821AE 802.11ac PCIe Wireless Network Adapter
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 11)

Re: Cannot connect to wifi

Reply #1
Weird. I'd guess it's a hardware thing but I don't know really (In my case, wifi has issues with the Arch iso if I try to use anything but iwd, and Gentoo but not Artix)


 

Re: Cannot connect to wifi

Reply #3
How did you connect with iwd?

When I was using the Artix iso live the netcard was always working,
I am dual booting and it is working on another distro.

I don't have networkmanager now but before I installed to try to connect.
I have only connman now, I reinstalled Artix using that lxde iso.

Re: Cannot connect to wifi

Reply #4
How did you connect with iwd?

When I was using the Artix iso live the netcard was always working,
I am dual booting and it is working on another distro.

I don't have networkmanager now but before I installed to try to connect.
I have only connman now, I reinstalled Artix using that lxde iso.
Are you using connman in chroot? Do you have your user in the wheel and/or network groups? I'm not really sure what's the cause but when searching the connman error you got I found this https://bbs.archlinux.org/viewtopic.php?id=221772 and also this https://wiki.archlinux.org/title/ConnMan#Troubleshooting

Sorry if I'm not helping much but I've not used connman a lot (just 2 times) only iwd on the Arch iso (for convenience I guess) and wpa supplicant on Artix's.

Re: Cannot connect to wifi

Reply #5
I used chroot before.
No I am using a usb wifi dongle.

My user is on both groups.

I have wpa supplicant and connman since they are the default of the iso.
Are those 2 services supposed to work together?

Also before I disabled all services and I tried to connect with iwconfig.
Some error "mode auto invalid argument".

Re: Cannot connect to wifi

Reply #6
 
I don't think it's a hardware problem but connman's fault doing crappy job with wireless connections. In my opinion connman has some conflicts with resolvconf, but I wouldn't dig too much into this rabbit hole. Try different network manager and see if works that way.


Re: Cannot connect to wifi

Reply #7
Please post the output of
Code: [Select]
sudo dmesg
and
Code: [Select]
ip link show

Re: Cannot connect to wifi

Reply #8

I don't think it's a hardware problem but connman's fault doing crappy job with wireless connections. In my opinion connman has some conflicts with resolvconf, but I wouldn't dig too much into this rabbit hole. Try different network manager and see if works that way.


I wouldn't recommend networkmanager either (check known issues)
The ideal usage is wpa_supplicant+dhcpcd, you can configure the former with the wpa_gui utility, no need to even touch config files. Unfortunately this is still too complicated for an average user, I know. So best compromise remains connman, with it's conflicts and everything, which in some cases don't even matter (talking from my personal experience with e.g. wg-quick).

Re: Cannot connect to wifi

Reply #9
Code: [Select]
dmesg
...
[    0.136436] pci 0000:00:01.0:   bridge window [io  0xe000-0xefff]
[    0.136436] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xf30fffff]
[    0.136436] pci 0000:02:00.0: [10ec:8821] type 00 class 0x028000
[    0.136436] pci 0000:02:00.0: reg 0x10: [io  0xd000-0xd0ff]
[    0.136436] pci 0000:02:00.0: reg 0x18: [mem 0xf3200000-0xf3203fff 64bit]
[    0.136436] pci 0000:02:00.0: supports D1 D2
[    0.136436] pci 0000:02:00.0: PME# supported from D0 D1 D2 D3hot D3cold
...
[    9.246700] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    9.253888] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    9.280086] usbcore: registered new interface driver btusb
[    9.283642] Bluetooth: hci0: RTL: examining hci_ver=06 hci_rev=000a lmp_ver=06 lmp_subver=8821
[    9.284633] Bluetooth: hci0: RTL: rom_version status=0 version=1
[    9.284635] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821a_fw.bin
[    9.310786] intel_rapl_common: Found RAPL domain package
[    9.310788] intel_rapl_common: Found RAPL domain core
[    9.310789] intel_rapl_common: Found RAPL domain dram
[    9.384210] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821a_config.bin
[    9.385164] Bluetooth: hci0: RTL: cfg_sz 10, total sz 17438
[    9.698211] rtl8821ae 0000:02:00.0: enabling device (0000 -> 0003)
[    9.711613] rtl8821ae: Using firmware rtlwifi/rtl8821aefw_29.bin
[    9.711616] rtl8821ae: Using firmware rtlwifi/rtl8821aefw_wowlan.bin
[    9.713624] ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
[    9.713915] rtlwifi: rtlwifi: wireless switch is on
[   10.173700] Bluetooth: hci0: RTL: fw version 0x0e2fa041

ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,DYNAMIC,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether 70:85:c2:47:3d:8b brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,DYNAMIC,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
    link/ether c8:3d:d4:48:fe:1b brd ff:ff:ff:ff:ff:ff
4: wlan1: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
    link/ether 00:0f:00:66:0e:53 brd ff:ff:ff:ff:ff:ff

Other netcard works.

Re: Cannot connect to wifi

Reply #10
I'd sooner you hadn't truncated the dmesg output.

The ip link show output shows two wifi interfaces wlan0 & wlan1.
The commands you posted in the first post used wlan0.
Try with wlan1 if you haven't.

What follows is commands I've used (and resulting notes I made for myself) in the past to create a manual wifi connection on my ARM Chromebook when I was struggling to get wifi working.

Find wireless device
Code: [Select]
iwconfig
Bring it up
Code: [Select]
ip link set mlan0 up
Scan
Code: [Select]
iwlist mlan0 scan |less
Set up wpa_supplicant
Code: [Select]
wpa_passphrase ESSID PASSWORD > /etc/wpa_supplicant/my.conf
Connect
Code: [Select]
wpa_supplicant -imlan0 -c/etc/wpa_supplicant/my.conf -B
If your lucky dhcpcd , otherwsise set ip addr and route
Code: [Select]
dhcpcd mlan0
or
Code: [Select]
ip addr add 192.168.1.212/24 broadcast 192.168.1.255 dev mlan0
ip route add default via 192.168.1.1
echo "nameserver 1.1.1.1" > /etc/resolv.conf
Clearly you'd have to substitute mlan0 for your interface names.  And you may be missing some of the packages containing the programs used ?
Maybe no use to you ? But might help you debug what's going wrong ? Or know that's it's not your hardware if you get a connection.

Re: Cannot connect to wifi

Reply #11
As I said I now am using another netcard, a usb wifi key, that I simply enabled on connman-gtk.
That is wlan1 and works.
But I'd like to use the wlan0 netcard instead.

I had to install wireless_tools and dhcpcd was enough.
Finally it works.

Thanks that was totally of use.
Not sure upon reboot what I'll need to do to connect.

Re: Cannot connect to wifi

Reply #12
You can put some of those those commands (bar scanning and creating /etc/wpa_supplicant/my.conf again) in a script and run it as root when you login. Just play around with it.
You could call the script from /etc/rc.local or just put the commands in there.

connman must be getting confused somehow. I'm sure that can be resolved but wouldn't know how ?

Re: Cannot connect to wifi

Reply #13
Code: [Select]
wpa_supplicant -iwlan0 -c /etc/wpa_supplicant/my.conf -B
dhcpcd wlan0
Upon reboot I needed to run that.
Should I report a bug somewhere?

connman has always "no carrier" error.
Before I tried networkmanager too and I couldn't connect.

Re: Cannot connect to wifi

Reply #14
You'd need to work out what the bug is and with what?
man pages and logs plus starting the programs the service file starts, manually on the command line might shed some light?

It could be something really simple in a config file ? There's a lot of possibilities ?