Closed xuqinghan closed 1 month ago
Hi, I have the same issue
After a lot of debugging and googling around, I found the solution here: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/92
nmcli connection show
and find the ssid of the wifi connection you would like to connect tonmcli connection modify {connectionUUID} wifi.hidden=yes
And you should get connected straight away at logon.
It looks connecting to the wifi throught the 'Connect to hidden network' button in the Cinnamon network settings dialog does not affect the property stored in NetworkManager
's options. Before the above commands, the hidden
property was set to no
, and it worked without issues in Mint 19.3 with NetworkManager 1.10. In Mint 20 and NetworkManager 1.22, whatever the kernel used (5.4 or 4.15) it no longer works.
I am having exact same issue. Workaround provided by @tkhyn also doesn't work for me.
I confirm that there is a problem with the auto-connection of WIFI to a hidden router (hidden SSID) after (re)start Linux Mint 20.0 - Cinnamon plus after connection, the hidden SSID disappears from the list of other SSIDs in the applet. This problem was not in previous versions of Linux Mint (17.x, 18.x and 19.x).
Can confirm the same thing is happening on my workstation: wifi with hidden SSID is briefly shown on the list of available networks, then, disappears from the list. While trying to connect to it - nothing happens.
I confirm the bug persist.
The workaround by @tkhyn works, but seems to have a slightly different syntax. e.g. for my connection:
nmcli connection modify f9f3363a-7dd8-418e-9d48-b21925f77292 802-11-wireless.hidden yes
I can confirm this is still an issue. Using Mint 20.04.
I can also confirm the right syntax this days for the nmcli workaroud is as @Matthias84 shared above.
nmcli connection modify <UUID>-802-11-wireless.hidden yes
Yep, it must've regressed after the 19.x branch and 20.x, because I just noticed it after upgrading to 20.1, and it's still broken in 20.2. After timeshifting back to 19.3, it auto-connects properly.
Btw, boot time isn't the only situation where this causes problems. My machine was in the middle of its upgrade to 20.1 when the WiFi adapter dropped its connection to the router -- probably due to LM updating networking packages -- and after that it didn't re-establish its connection automatically. The Mint upgrade script errored out after that and had to be run again after I manually reconnected the WiFi. I thought it was a quirk of the upgrade process at first, but then the problem persisted.
Anyway, having something like this break in the middle of an upgrade can leave a machine in a potentially unstable state, so that's another reason to get this fixed.
Just tested a fresh install of 20.3, with all updates, and the bug is still present.
Seems fixed in LM 21 Cinnamon Beta?
It’s not fixed here (in LM21 Cinnamon, now not beta anymore) though.
Someone suggested adding hidden=true
to the [wifi]
section of the /etc/NetworkManager/system-connections/$NAME.nmconnection
file would solve it.
It did indeed do the trick for me, but you need to systemctl restart NetworkManager
before it works. Which somehow wasn’t mentioned anywhere. It seems NetworkManager doesn’t watch for changes of those files.
Sadly, there is no checkbox for this in the GUI. Because for hidden connections, one is always forced to add a connection manually, so hidden=true
isn’t ever added anyway afaik, so such a checkbox is definitely needed.
@navid-zamani, I'll have to do some further testing on my end. It's possible that either I already added that before, or I'm no longer testing on the exact same hardware where I was able to reproduce it. I'm pretty sure the issue only cropped up with certain WiFi hardware, at least according to this thread: https://forums.linuxmint.com/viewtopic.php?f=52&t=330037
@navid-zamani , one other thing. Which kernel are you running?
@mmortal03: I can consistently reproduce it on two very different wifi chips. (An Intel Centrino Advanced-N 620 one and a Realtek 8188eu one.) I don’t think it’s a hardware issue if the thing can connect when you nmcli c up …
the connection manually.
My current kernel is 5.15.0-46.
@navid-zamani For me, it was on either an Intel Centrino Advanced-N 6230 or 6235 chip. And, as you can see above, I tested a fresh install of 20.3 back in June and was able to reproduce it. Since I haven't changed the firmware of my router since then, and I still have the laptops that I did test on, then, in practice, I should still be able to reproduce it. Is your issue with both 2.4GHz and 5GHz? I didn't test 5GHz this time, so I will go back to 20.3 and also test that. I also might've changed some relevant setting on my router that we haven't yet realized is important.
Weirdly, I just tested on a fresh install of 20.3 from the disc image, no updates, and am not able to reproduce it on 5GHz, either. I tried some different settings on the router, as well, but that didn't make any difference. There must be some other variable that we're overlooking.
@mmortal03: I haven’t really looked into this, and am just a passerby here, but that sounds easily solvable with a diff
(e.g. vimdiff
or kidff3
) of all the relevant files and then merging more and more differences over to the fresh install until it is reproducible. And if all else fails, move hardware too if possible. ;)
(E.g. vimdiffing the .nmconnection file, or networkmanager files in /etc or /var or whatever udev does.)
Cumbersome maybe but guaranteed to find the problem.
@navid-zamani , you're not wrong, but if we can't figure out how to recreate the issue on my laptop, what would we be comparing to? On the other hand, if you can find another machine that doesn't have the problem on a fresh install, maybe you can compare it to your machine that has the problem?
@mmortal03: Ah, I have two computers where I can reliably recreate it by creating a new connection in the network connections dialog (Cinnamon), and then not adding hidden=true
in the .nmconnection
file that creates. I go to standby, or reboot, and I’m left not connected. If I add hidden=true
, and reboot, it works as far as I can tell until now. It always works for standby, but I’m not sure it always works for reboots. (I only reboot on kernel updates, and can’t close everything right now since sadly, Cinnamon has no session management that would restore it, as KDE used to.)
Neither of them are fresh installs though. They are just freshly upgraded to Mint 21 (Vanessa). :D
I can provide whatever files necessary though.
But I think the most sensible fix here is, to just change whatever creates that .nmconnection
file, to add hidden=true
to hidden connections. Regardless of anything, this would be sensible anyway, and is much easier than trying to narrow down non-reproducible hardware-specific race conditions. XD
Not only does autoconnect not work, but how do I even connect to a hidden SSID please? I've added the network under connections and saved it, but there's no 'connect' button, and the network name doesn't show under my list of networks in the taskbar icon.
@RichardJECooke: Well, as usual, everything is easier, by using the actual backend, in this case via nmcli, instead of some stupid GUI.
I used to create a new connection via the GUI, and set its bssid or ssid. After that, I could modify the .nmconnection
file.
The connection should appear in the list of wifi networks (under its SSID instead of the connection name, confusingly!) and you simply click on it. But I usually just used nmcli
. NetworkManager is still basically another stupid Microsoft virus that burrowed into Linux, but at least it’s only one layer too much of unnecessary and condescending “smartness” and obfuscation, not two.
I know I should have written a competing solution myself long ago, but there are bigger fish to fry that will obsolete it anyway.
but how do I even connect to a hidden SSID please?
I'm not using Mint at the moment, but I think you have to click on the icon in the tray, and then select Network Settings, rather than Network Connections. That will bring up the menu with the "Connect to Hidden Network" button.
I still face this issue with Linux Mint 20.1. I'm using wifi adapter on USB (Realtek) because built-in wifi adapter (Qualcomm) is a junk. When both wifi adapters were enabled NetworkManager from LM 20.1 was automatically connecting to my hidden network without issues. After I disabled built-in wifi adapter by blacklisting its driver, NetworkManager no longer automatically connects to my hidden network. Most often it doesn't show this network and even if it shows this, nothing happens when I click on this item.
The only way to go is to manually open network settings, then click "Connect to a hidden network" and then selecting my hidden network from the list.
I still face this issue with Linux Mint 20.1.
Since LM 20 is supported until April 2025, and I believe this was fixed in later versions (maybe not absolutely fixed for everyone, but it was for me), I wonder if they could find and backport the fix to LM 20? If you can, at least test the latest version of LM on the same hardware and then report back here if it's fixed. Mind you, I'm just another user giving a suggestion -- I'm not affiliated with Linux Mint development, but maybe someone will see this and do something about it.
Ubuntu would need to fix the NetworkManager on their base packages.
Issue
wifi connection to a hidden network cant auto connet after each restart system.
Need to manually select from "connect to hidden network".
the checkbox "auto connect" of wifi connection seems not work.
It dont exists in mint18-19.