linux-wifi-hotspot icon indicating copy to clipboard operation
linux-wifi-hotspot copied to clipboard

[ SOLVED ] Wifi-hotspot not start

Open pcxz opened this issue 1 year ago • 11 comments

After upgrade at last Linux Mint ( 22 ) wifi-hotspot not more start ( with Mint 21.3 all ok ).

This is system info and log.

... pkexec --user root create_ap wlp4s0 wlp4s0 'AstronomiaPiobbicoPC' '12345678' --mkconfig /etc/create_ap.conf --freq-band 2.4 Config options written to '/etc/create_ap.conf' cp: warning: behavior of -n is non-portable and may change in future; use --update=none instead cp: warning: behavior of -n is non-portable and may change in future; use --update=none instead ... And not start.

... uname -a Linux Unknown-1 6.8.0-40-generic #40-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 5 10:34:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux ...

... dmesg not report issue or error ... journalctl -b ...yes report more error and problem: ago 09 11:48:40 Unknown-1 pkexec[3282]: root: Executing command [USER=root] [TTY=/dev/pts/1] [CWD=/home/pcxz] [COMMAND=/usr/bin/create_ap wlp4s0 wlp4s0 AstronomiaPiobbicoPC 12345678 --mkconfig /etc/create_> ago 09 11:48:40 Unknown-1 pkexec[3298]: pam_unix(polkit-1:session): session opened for user root(uid=0) by pcxz(uid=0) ago 09 11:48:40 Unknown-1 pkexec[3298]: root: Executing command [USER=root] [TTY=/dev/pts/1] [CWD=/home/pcxz] [COMMAND=/usr/bin/create_ap --config /etc/create_ap.conf --freq-band 2.4] ago 09 11:48:40 Unknown-1 NetworkManager[1085]: <info> [1723196920.7628] device (ap0): driver supports Access Point (AP) mode ago 09 11:48:40 Unknown-1 NetworkManager[1085]: <info> [1723196920.7632] manager: (ap0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/5) ago 09 11:48:40 Unknown-1 NetworkManager[1085]: <info> [1723196920.7808] device (ap0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external') ago 09 11:48:40 Unknown-1 NetworkManager[1085]: <warn> [1723196920.7978] platform-linux: do-change-link[4]: failure 16 (Dispositivo o risorsa occupata) ago 09 11:48:40 Unknown-1 wpa_supplicant[1087]: Could not set interface ap0 flags (UP): Device or resource busy ago 09 11:48:40 Unknown-1 wpa_supplicant[1087]: nl80211: Could not set interface 'ap0' UP ago 09 11:48:40 Unknown-1 wpa_supplicant[1087]: nl80211: deinit ifname=ap0 disabled_11b_rates=0 ago 09 11:48:40 Unknown-1 wpa_supplicant[1087]: Could not set interface ap0 flags (UP): Device or resource busy ago 09 11:48:40 Unknown-1 NetworkManager[1085]: <error> [1723196920.8001] device (ap0): Couldn't initialize supplicant interface: GDBus.Error:fi.w1.wpa_supplicant1.UnknownError: wpa_supplicant couldn't gra> ago 09 11:48:40 Unknown-1 wpa_supplicant[1087]: WEXT: Could not set interface 'ap0' UP ago 09 11:48:40 Unknown-1 wpa_supplicant[1087]: ap0: Failed to initialize driver interface ago 09 11:48:40 Unknown-1 wpa_supplicant[1087]: ap0: CTRL-EVENT-DSCP-POLICY clear_all ago 09 11:48:40 Unknown-1 dhcpcd[1031]: dhcpcd_prestartinterface: Device or resource busy ago 09 11:48:40 Unknown-1 dhcpcd[1031]: ap0: waiting for carrier ago 09 11:48:50 Unknown-1 zeitgeist-fts[2289]: Unable to get info on application://gnome-terminal-server.desktop ago 09 11:48:50 Unknown-1 NetworkManager[1085]: <warn> [1723196930.9686] device (ap0): re-acquiring supplicant interface (#1). ago 09 11:48:50 Unknown-1 wpa_supplicant[1087]: Could not set interface ap0 flags (UP): Device or resource busy ago 09 11:48:50 Unknown-1 wpa_supplicant[1087]: nl80211: Could not set interface 'ap0' UP ago 09 11:48:50 Unknown-1 wpa_supplicant[1087]: nl80211: deinit ifname=ap0 disabled_11b_rates=0 ago 09 11:48:50 Unknown-1 NetworkManager[1085]: <error> [1723196930.9706] device (ap0): Couldn't initialize supplicant interface: GDBus.Error:fi.w1.wpa_supplicant1.UnknownError: wpa_supplicant couldn't gra> ago 09 11:48:50 Unknown-1 wpa_supplicant[1087]: Could not set interface ap0 flags (UP): Device or resource busy ago 09 11:48:50 Unknown-1 wpa_supplicant[1087]: WEXT: Could not set interface 'ap0' UP ago 09 11:48:50 Unknown-1 wpa_supplicant[1087]: ap0: Failed to initialize driver interface ago 09 11:48:50 Unknown-1 wpa_supplicant[1087]: ap0: CTRL-EVENT-DSCP-POLICY clear_all ago 09 11:48:50 Unknown-1 kernel: audit: type=1400 audit(1723196930.971:133): apparmor="DENIED" operation="open" class="file" profile="/usr/sbin/cups-browsed" name="/proc/sys/net/ipv6/conf/all/disable_ipv6> ago 09 11:48:50 Unknown-1 kernel: audit: type=1400 audit(1723196930.976:134): apparmor="DENIED" operation="open" class="file" profile="/usr/sbin/cups-browsed" name="/proc/sys/net/ipv6/conf/all/disable_ipv6> ago 09 11:49:00 Unknown-1 NetworkManager[1085]: <warn> [1723196940.9684] device (ap0): re-acquiring supplicant interface (#2). ago 09 11:49:00 Unknown-1 wpa_supplicant[1087]: Could not set interface ap0 flags (UP): Device or resource busy ago 09 11:49:00 Unknown-1 wpa_supplicant[1087]: nl80211: Could not set interface 'ap0' UP ago 09 11:49:00 Unknown-1 wpa_supplicant[1087]: nl80211: deinit ifname=ap0 disabled_11b_rates=0 ago 09 11:49:00 Unknown-1 wpa_supplicant[1087]: Could not set interface ap0 flags (UP): Device or resource busy ago 09 11:49:00 Unknown-1 wpa_supplicant[1087]: WEXT: Could not set interface 'ap0' UP ago 09 11:49:00 Unknown-1 wpa_supplicant[1087]: ap0: Failed to initialize driver interface ago 09 11:49:00 Unknown-1 wpa_supplicant[1087]: ap0: CTRL-EVENT-DSCP-POLICY clear_all ago 09 11:49:00 Unknown-1 NetworkManager[1085]: <error> [1723196940.9703] device (ap0): Couldn't initialize supplicant interface: GDBus.Error:fi.w1.wpa_supplicant1.UnknownError: wpa_supplicant couldn't gra> ago 09 11:49:04 Unknown-1 sudo[3221]: pam_unix(sudo:session): session closed for user root

Any info? Thanks.

pcxz avatar Aug 09 '24 09:08 pcxz

I'm having the same issue. Are you also having the issue with wifi connecting and disconnecting multiple times and still no Internet?

H3LF4R3 avatar Aug 12 '24 02:08 H3LF4R3

same thing here.

(wihotspot-gui:175170): GLib-GObject-WARNING **: 14:00:53.391: invalid cast from 'GtkEntry' to 'GtkTextView'

(wihotspot-gui:175170): Gtk-CRITICAL **: 14:00:53.391: gtk_text_view_get_buffer: assertion 'GTK_IS_TEXT_VIEW (text_view)' failed

(wihotspot-gui:175170): GLib-GObject-WARNING **: 14:00:53.391: invalid (NULL) pointer instance

(wihotspot-gui:175170): GLib-GObject-CRITICAL **: 14:00:53.391: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
pkexec --user root create_ap wlp0s20f3 enp4s0 'kme' '' --mkconfig /etc/create_ap.conf --freq-band 2.4 --ieee80211n  --ieee80211ac  
Config options written to '/etc/create_ap.conf'

enamul-ssl avatar Aug 12 '24 08:08 enamul-ssl

Please try to delete /etc/create_ap.conf and rw install as a temporary fix

On Mon, Aug 12, 2024, 13:34 enamul-ssl @.***> wrote:

same thing here.

(wihotspot-gui:175170): GLib-GObject-WARNING **: 14:00:53.391: invalid cast from 'GtkEntry' to 'GtkTextView'

(wihotspot-gui:175170): Gtk-CRITICAL **: 14:00:53.391: gtk_text_view_get_buffer: assertion 'GTK_IS_TEXT_VIEW (text_view)' failed

(wihotspot-gui:175170): GLib-GObject-WARNING **: 14:00:53.391: invalid (NULL) pointer instance

(wihotspot-gui:175170): GLib-GObject-CRITICAL **: 14:00:53.391: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed pkexec --user root create_ap wlp0s20f3 enp4s0 'kme' '' --mkconfig /etc/create_ap.conf --freq-band 2.4 --ieee80211n --ieee80211ac Config options written to '/etc/create_ap.conf'

— Reply to this email directly, view it on GitHub https://github.com/lakinduakash/linux-wifi-hotspot/issues/420#issuecomment-2283334746, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADA2EXI2A3UFWVHJBKVYZ4LZRBUBPAVCNFSM6AAAAABMIEWDLGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBTGMZTINZUGY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

lakinduakash avatar Aug 12 '24 08:08 lakinduakash

Please try to delete /etc/create_ap.conf and rw install as a temporary fix On Mon, Aug 12, 2024, 13:34 enamul-ssl @.***> wrote: same thing here. (wihotspot-gui:175170): GLib-GObject-WARNING **: 14:00:53.391: invalid cast from 'GtkEntry' to 'GtkTextView' (wihotspot-gui:175170): Gtk-CRITICAL **: 14:00:53.391: gtk_text_view_get_buffer: assertion 'GTK_IS_TEXT_VIEW (text_view)' failed (wihotspot-gui:175170): GLib-GObject-WARNING *: 14:00:53.391: invalid (NULL) pointer instance (wihotspot-gui:175170): GLib-GObject-CRITICAL : 14:00:53.391: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed pkexec --user root create_ap wlp0s20f3 enp4s0 'kme' '' --mkconfig /etc/create_ap.conf --freq-band 2.4 --ieee80211n --ieee80211ac Config options written to '/etc/create_ap.conf' — Reply to this email directly, view it on GitHub <#420 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADA2EXI2A3UFWVHJBKVYZ4LZRBUBPAVCNFSM6AAAAABMIEWDLGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBTGMZTINZUGY . You are receiving this because you are subscribed to this thread.Message ID: @.>

not working this way. then I tried this command: sudo create_ap wlp0s20f3 enp4s0 'kme' '12345678'

it gives this results:

Config dir: /tmp/create_ap.wlp0s20f3.conf.X9qkmbCK
PID: 8178
Network Manager found, set ap0 as unmanaged device... DONE
Creating a virtual WiFi interface... 

and get hang or loading

enamul-ssl avatar Aug 12 '24 08:08 enamul-ssl

Yeah, I'm also facing the same issue after upgrading to Linux Mint 22. It was working fine in Linux Mint 21.

It gets stuck at the following stage: image

image

bhavberi avatar Aug 16 '24 04:08 bhavberi

A workaround is:

  1. launch command for start wi-hotspot
  2. from bash execute: sudo systemctl restart NetworkManager sleep 5 sudo systemctl restart NetworkManager

After first restart is created ap0 After second restart is started hotspot

Schermata del 2024-08-20 23-41-21

Why??

pcxz avatar Aug 20 '24 21:08 pcxz

And this is bugreport created from python. bugreport.txt

pcxz avatar Aug 20 '24 21:08 pcxz

Subscribed, I see the same thing as @bhavberi on my Linux Mint 21.3.

Moini avatar Aug 20 '24 23:08 Moini

I sent a bugreport to "apparmor" gitlab. They said it's an old bug that's already patched, and probably not related to the wi-hotspot issue. https://gitlab.com/apparmor/apparmor/-/issues/424#note_2065922723

pcxz avatar Aug 21 '24 15:08 pcxz

SOLVED

Edit /etc/NetworkManager/conf.d/ubuntu-system-adjustments.conf and change line: unmanaged-devices=none in: #unmanaged-devices=none

pcxz avatar Sep 11 '24 21:09 pcxz

A workaround is:

  1. launch command for start wi-hotspot
  2. from bash execute: sudo systemctl restart NetworkManager sleep 5 sudo systemctl restart NetworkManager

After first restart is created ap0 After second restart is started hotspot

Schermata del 2024-08-20 23-41-21

Why??

So this works for me on Guix as opposed to just commenting out unmanaged-devices=none in /etc/NetworkManager/NetworkManager.conf, but I still lose Internet access from the WiFi I was connected to in the first place. Also, I can connect another device to ap0, but eventually I will get this:

Failed to set beacon parameters
ap0: INTERFACE-DISABLED 
ap0: INTERFACE-ENABLED 
ap0: INTERFACE-DISABLED

I made a Guix package for the linux-wifi-hotspot (CLI only) but now I am hesitant to submit it to Guix repo because it seems many people are having issues with actually using the core features like AP+WiFi at the same time, or are stuck at the "Creating a virtual WiFi interface..." step. Restarting the networking service does seem to work around this latter issue, but can hardly be integrated in a package, and in any case it seems the access point remains unstable and will get disabled in my case.

Kabouik avatar Apr 13 '25 13:04 Kabouik

Edit /etc/NetworkManager/conf.d/ubuntu-system-adjustments.conf and change line: unmanaged-devices=none in: #unmanaged-devices=none

That did it for me, I changed ubuntu to debian as I don't use ubuntu distro, but otherwise worked perfectly.

rredford avatar Oct 20 '25 15:10 rredford