You are not logged in.

#1 2022-04-11 15:38:24

NorthBound
Member
Registered: 2022-04-03
Posts: 6

[SOLVED] Wifi hotspot not working: activition of connection failed

Hi everyone

I’ve been using my Arch install without any problems for a few months, but lately I’ve been having problems with setting up a wifi hotspot, which I use with my smartphone/laptop.
I use NetworkManager and until a few days ago, I’ve always been able to succesfully set up a hotspot through gnome settings.

When I set up the hotspot now, I get an error on my phone ‘password incorrect’ (double checked multiple times of course, same with scanning generated QR code), after which my desktop gives the error ‘Activation of network connection failed’ and the hotspot shuts down.

Any help would be much appreciated!

Last edited by NorthBound (2022-04-18 08:06:31)

Offline

#2 2022-04-15 14:51:47

NorthBound
Member
Registered: 2022-04-03
Posts: 6

Re: [SOLVED] Wifi hotspot not working: activition of connection failed

So I checked NetworkManager status when starting the hotspot, and got the following:

sudo systemctl status NetworkManager.service 

● NetworkManager.service - Network Manager
     Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: disabled)
    Drop-In: /usr/lib/systemd/system/NetworkManager.service.d
             └─NetworkManager-ovs.conf
     Active: active (running) since Fri 2022-04-15 16:41:38 CEST; 1min 28s left
       Docs: man:NetworkManager(8)
   Main PID: 676 (NetworkManager)
      Tasks: 3 (limit: 18980)
     Memory: 19.0M
        CPU: 1.279s
     CGroup: /system.slice/NetworkManager.service
             └─676 /usr/bin/NetworkManager --no-daemon

apr 15 16:40:08 OmenGT12 NetworkManager[676]: <info>  [1650033608.2533] device (wlp4s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
apr 15 16:40:08 OmenGT12 NetworkManager[676]: <info>  [1650033608.3501] dnsmasq-manager: starting dnsmasq...
apr 15 16:40:08 OmenGT12 NetworkManager[676]: <info>  [1650033608.3506] device (wlp4s0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
apr 15 16:40:08 OmenGT12 NetworkManager[2194]: dnsmasq: failed to create listening socket for 10.42.0.1: Address already in use
apr 15 16:40:08 OmenGT12 dnsmasq[2194]: failed to create listening socket for 10.42.0.1: Address already in use
apr 15 16:40:08 OmenGT12 dnsmasq[2194]: FAILED to start up
apr 15 16:40:08 OmenGT12 NetworkManager[676]: <warn>  [1650033608.3524] dnsmasq-manager: dnsmasq exited with error: Network access problem (address in use, permissions) (2)
apr 15 16:40:08 OmenGT12 NetworkManager[676]: <info>  [1650033608.3561] device (wlp4s0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
apr 15 16:40:08 OmenGT12 NetworkManager[676]: <info>  [1650033608.3562] device (wlp4s0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
apr 15 16:40:08 OmenGT12 NetworkManager[676]: <info>  [1650033608.3565] device (wlp4s0): Activation: successful, device activated.

After some searching, it found that the port dnsmasq is trying to use, is already used by another process. I tried changing the port via

sudo nano /etc/dnsmasq.conf

port=5353
listen-address=127.0.0.1#5353
...

After this, the status of NetworkManager.service does not show that dnsmasq failed, but I still cannot connect any devices to the hostpot. However, the hotspot itself does not shut down anymore.

sudo systemctl status NetworkManager.service

● NetworkManager.service - Network Manager
     Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: disabled)
    Drop-In: /usr/lib/systemd/system/NetworkManager.service.d
             └─NetworkManager-ovs.conf
     Active: active (running) since Fri 2022-04-15 16:49:50 CEST; 1min 17s left
       Docs: man:NetworkManager(8)
   Main PID: 603 (NetworkManager)
      Tasks: 4 (limit: 18980)
     Memory: 20.0M
        CPU: 1.197s
     CGroup: /system.slice/NetworkManager.service
             ├─ 603 /usr/bin/NetworkManager --no-daemon
             └─2662 /usr/bin/dnsmasq --conf-file=/dev/null --no-hosts --keep-in-foreground --bind-interfaces --except-interface=lo --clear-on-reload --strict-order --listen-address=10>

apr 15 16:48:25 OmenGT12 dnsmasq[2662]: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack ipset auth cryptohash DNSSEC loop-detect inotify>
apr 15 16:48:25 OmenGT12 dnsmasq[2662]: chown of PID file /var/run/nm-dnsmasq-wlp4s0.pid failed: Operation not permitted
apr 15 16:48:25 OmenGT12 dnsmasq-dhcp[2662]: DHCP, IP range 10.42.0.10 -- 10.42.0.254, lease time 1h
apr 15 16:48:25 OmenGT12 dnsmasq[2662]: reading /etc/resolv.conf
apr 15 16:48:25 OmenGT12 dnsmasq[2662]: using nameserver 192.168.1.1#53
apr 15 16:48:25 OmenGT12 dnsmasq[2662]: using nameserver fde8:541c:cc2e::1#53
apr 15 16:48:25 OmenGT12 dnsmasq[2662]: cleared cache
apr 15 16:48:25 OmenGT12 NetworkManager[603]: <info>  [1650034105.6246] device (wlp4s0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
apr 15 16:48:25 OmenGT12 NetworkManager[603]: <info>  [1650034105.6250] device (wlp4s0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
apr 15 16:48:25 OmenGT12 NetworkManager[603]: <info>  [1650034105.6253] device (wlp4s0): Activation: successful, device activated.

Offline

#3 2022-04-15 16:44:18

seth
Member
Registered: 2012-09-03
Posts: 58,803

Re: [SOLVED] Wifi hotspot not working: activition of connection failed

After some searching, it found that the port dnsmasq is trying to use, is already used by another process.

systemd-resolved?
Use a different resolver, https://wiki.archlinux.org/title/Networ … management

Offline

#4 2022-04-16 09:18:12

NorthBound
Member
Registered: 2022-04-03
Posts: 6

Re: [SOLVED] Wifi hotspot not working: activition of connection failed

Yes, when disabling systemd-resolved and configuring networkmanager with dnsmasq like in the wiki, the hotspot does not shut down anymore after 30 seconds. However, my devices still give the error 'Incorrect password' and cannot connect.

Is this line in the output related maybe? Any idea how to fix it?

sudo systemctl status NetworkManager.service

...
apr 15 16:48:25 OmenGT12 dnsmasq[2662]: chown of PID file /var/run/nm-dnsmasq-wlp4s0.pid failed: Operation not permitted
...

Additionally, is it preferrable to use dnsmasq or systemd-resolved? Any major differences between the two?

Last edited by NorthBound (2022-04-16 09:21:38)

Offline

#5 2022-04-16 12:26:38

seth
Member
Registered: 2012-09-03
Posts: 58,803

Re: [SOLVED] Wifi hotspot not working: activition of connection failed

I wanted to point out that the service occupying the port is probably resolved.
resolved and dnsmasq have overlapping features, your preference determines which you will use but running them in parallel will require some more elaborate configuration to keep them away from each other.
NM however according to the wiki will prefer/rely on dnsmasq, so there you go.

However, my devices still give the error 'Incorrect password' and cannot connect.

You're aware that the very most likely cause for that is still that you're issuing the wrong password?
Are there any chars outside the ASCII range (8-byte conflict utf8/iso)?
I'd try changing the password (for testing purposes) to "abcdefghi" and see whether the error remains.

Offline

#6 2022-04-16 13:35:03

NorthBound
Member
Registered: 2022-04-03
Posts: 6

Re: [SOLVED] Wifi hotspot not working: activition of connection failed

You're aware that the very most likely cause for that is still that you're issuing the wrong password?

I double checked this multiple times. The password itself is auto-generated by gnome settings(?), so I doubt any non-ASCII characters are causing the issue.
I tested with multiple passwords and also tried the generated QR-code to connect to the hotspot, but no success.

Offline

#7 2022-04-16 14:20:07

seth
Member
Registered: 2012-09-03
Posts: 58,803

Re: [SOLVED] Wifi hotspot not working: activition of connection failed

I tested with multiple passwords

Including some generated by you, filtered through a human brain?

I'd check the APs system journal whether the failed association is logged there - NM is usually very chatty.

Offline

#8 2022-04-18 07:38:58

NorthBound
Member
Registered: 2022-04-03
Posts: 6

Re: [SOLVED] Wifi hotspot not working: activition of connection failed

Tried both to disable dnsmasq and use systemd-resolved, and disable resolved and use dnsmasq, but still no success. Also didn't get muchg meaningful info from journalctl.

Finally found out that the issue is probably not with networkmanager, but with android not accepting/supporting ad-hoc (?) connections, and people have had similar issues in the past:
https://bbs.archlinux.org/viewtopic.php?id=209415
https://bbs.archlinux.org/viewtopic.php?id=209414

I gave up on trying to get it to work with networkmanager and installed linux-wifi-hotspot from the AUR, which worked out of the box.

Offline

#9 2022-04-18 07:51:08

seth
Member
Registered: 2012-09-03
Posts: 58,803

Re: [SOLVED] Wifi hotspot not working: activition of connection failed

A "hotspot" isn't an "ad-hoc" connection and the situation is even recorded in the NM wiki, https://wiki.archlinux.org/title/Networ … over_Wi-Fi

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#10 2022-04-18 08:05:36

NorthBound
Member
Registered: 2022-04-03
Posts: 6

Re: [SOLVED] Wifi hotspot not working: activition of connection failed

Thx, didn't know the difference between the two.
I double checked and the wifi mode of the hotspot in networkmanager was indeed "hotspot" and not "ad-hoc", so not sure why my android device won't connect.

Offline

Board footer

Powered by FluxBB