4

I'm running Debian 10 Cinnamon, and recently I've noticed that the WiFi settings within Network Manager(nm-applet) are completely missing on every boot/resume from suspend unless you manually restart NetworkManager. Previously, I could click the network icon in the bottom right of the page, click Network Settings, and I would be brought to a menu which listed the different interfaces, in this case wired and wireless. Now, there is only "Wired" and "Network Proxy" shown. All previously saved WiFi settings are still working, but I cannot modify settings as I was previously able to. The nm-connection-editor works fine. The saved Wireless connection can auto connect and works fine in the background, but I have no way to add a new network or easily control the wireless settings for a network via nm-applet anymore.

Why is this menu vanishing on boots/resumes? What can I do to fix it? Heres an image of the missing menu. enter image description here Note, where it says "Wired" on the left side column, there should be another option for "WiFi", as was there when Debian was initially installed.

I have found that running sudo pgrep NetworkManager | xargs sudo kill -9; fixes the issue, but what could be the root cause? This was not happening on a fresh install. I have also found that it happens on every boot, or resuming from suspend, but if NetworkManager is restarted after boot/resume from suspend manually, the issue is fixed.

In addition, I have found that if I cat ~/.xsession-errors, there are many errors relating to wireless and NetworkManager, such as:

Cjs-Message: 11:08:41.602: JS LOG: An active wireless connection, in infrastructure mode, involves no access point?

nm-tray: void NmModelPrivate::onConnectionAdded(const QString&) /org/freedesktop/NetworkManager/Settings/6  is currently invalid...

Cjs-Message: 11:09:21.384: JS LOG: [LookingGlass/error] a.connection is null

(cinnamon:1364): Cjs-WARNING **: 11:08:45.677: JS ERROR: TypeError: apObj.item.updateAccessPoints is not a function
anonymous/NMDeviceWireless.prototype._accessPointRemoved@/usr/share/cinnamon/applets/network@cinnamon.org/applet.js:1387:13

(cinnamon:1364): Cjs-WARNING **: 11:08:46.750: JS ERROR: TypeError: ssid is null
ssidToLabel@/usr/share/cinnamon/applets/network@cinnamon.org/applet.js:66:9

I am using a Wifi AP with a hidden ssid, which seems to cause some of these errors. Using a non-hidden ssid and deleting all profiles relating to the hidden one does not solve the issue.

  • 1
    I don't recommend a hidden SSID. Anybody who knows what they're doing will still be able to find your wifi network. You're better off with an uninformative SSID and a longer WPA2 password. Even if you think you need it hidden, I'd recommend temporarily un-hiding it to see if your issue really is due to it being hidden. This would at least confirm your theory. – Adam Katz Apr 6 at 21:12
  • @AdamKatz Using a non-hidden ssid as well as deleting all profiles relating to the hidden one did not fix the issue. There seems to be an issue when NetworkManager is run automatically on boot/resume from suspend. – john doe Apr 7 at 4:29
  • Well, at least we ruled that out. I had this issue on an older system of mine and couldn't solve it with NetworkManager at all; my solution was to do it with wicd instead, though it appears Debian's wicd package is unavailable to Debian Buster (10) and Bullseye (testing, 11), so you'd have to pull it from Sid (unstable). – Adam Katz Apr 7 at 16:14
  • Note that simply killing network manager doesnt fix it, running service NetworkManager restart doesnt fix it, only a kill -9 is successful. – john doe Apr 9 at 21:59
1

Can you update your original post to include outputs for the following? I see you've taken the systems approach, so I want to rule out hardware startup issues and drivers instead.

  1. lspci -nn This will tell us what hardware your system recognizes
  2. ip link will tell us what network links exist
  3. rfkill list will describe another way wireless devices are configured

Or, if you know what to do, try using dmesg | grep -iC 3 <linkname> to identify anything the kernel logs can give you.

| improve this answer | |
1

As a quick and easiest solution, you may create a service that will auto-fix it for you:

Create the service: sudo touch /lib/systemd/system/wifi-autofix.service

With your preferred editor add the following:

[Unit]
Description=Auto-fix NetworkManager after suspend
After=suspend.target
After=hibernate.target
After=hybrid-sleep.target 

[Service]
Type=oneshot
ExecStart=/usr/bin/killall -s SIGKILL NetworkManager

[Install]
WantedBy=suspend.target
WantedBy=hibernate.target
WantedBy=hybrid-sleep.target

Enable and start the service:

sudo systemctl enable /lib/systemd/system/wifi-autofix.service
sudo systemctl start /lib/systemd/system/wifi-autofix.service

I would also recommend to remove and enable the WiFi driver. Execute:

sudo lspci -v

Look for Kernel driver in use: for the WiFi controller. Then execute:

modprobe -r <wifi_driver>
modprobe <wifi_driver>

where <wifi_driver> is the name of your WiFi driver.

Hope that helps...

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.