Score:3

Can't use internet because networkmanager has disappeared !! (Ubuntu 20.04 LTS)

cn flag

I need help, and it is quite urgent. I had connections issues (my Wi-Fi connection kept disconnecting)

So I followed what a member of this community recommended, in a similar post written by a fellow member

I entered these commands in a shell

sudo apt-get purge network-manager 
sudo apt-get update 
sudo apt-get autoremove 
sudo apt-get upgrade 
sudo apt-get install network-manager 
sudo apt install ubuntu-desktop

And now... I don't see any wifi parameters. I can't connect to the internet...

How can I fix this?

Here is what I get when i type sudo dmesg | grep wlo1

enter image description here

cocomac avatar
cn flag
Well, that uninstalls network-manager (breaking your network access), then tries to update the package repo, which fails due to no internet access. So... that is either missing context of plain wrong. Where did you see that?
chili555 avatar
cn flag
Do you still have a wireless interface? Please edit your question to show the result of the terminal command: `iwconfig | head -3` Welcome to Ask Ubuntu.
cn flag
Thanks for your help. When i enter your command chili555, i get : lo no wireless extension enx0c5.. no wireless extension wlo1 ieee 802.11 essid off/any mode managed access point not associated tx-power=0 dBm retry short limit:7 rts thr:off fragment thr:off
crip659 avatar
pl flag
I remember doing that a long time ago. Not sure now if I used the CD to install, or had to download network manager on another computer.
cn flag
Besides my computer, I have two more devices right now a smartphone with an usb cable, and a usb pluggable 4g modem
cn flag
Bluetooth connection of my computer is still working. Could that help?
ChanganAuto avatar
us flag
*Could that help?* Theoretically yes. If you can connect to a Bluetooth tethered network from your smartphone it may be enough to install/reinstall what you need. But speeds will be atrocious let alone stability.
cn flag
My laptop and smartphone are paired. My smartphone isbconnected to internet. What should i do to share my internet connection to my laptop please ? Is there à command to enter ?
cn flag
I use Ubuntu 20.04 LTS
cn flag
What other information do you need guiverc?
Score:5
cn flag

In the absense of Network Manager, I suggest that you use netplan. From the terminal, do:

ls /etc/netplan

Find out the name of the file. Make a backup as you will need it after reinstalling NM:

sudo mv /etc/netplan/<file_you_found>.yaml /etc/netplan/<file_you_found>.bak

Now, let’s create a new file:

sudo nano /etc/netplan/config.yaml

Write the file to read:

network:
  version: 2
  renderer: networkd
  wifis:
    wlo1:
      dhcp4: yes
      dhcp6: yes
      access-points:
        "network_ssid_name":
          password: "**********"

Of course, substitute your details here. Note that the network name and password are enclosed in quotes “.

Netplan is very specific about spacing, indentation, etc., so proofread carefully twice. Save (Ctrrl+o followed by Enter) and exit nano (Ctrl+x followed by Enter).

Follow with:

sudo netplan generate
sudo netplan apply

Did you connect?

iwconfig
ping -c3 www.ubuntu.com

It might take a reboot.

If you are connected, reinstall NM:

sudo apt update 
sudo apt install –reinstall network-manager ubuntu-desktop

Reboot and tell us if there is any improvement. If so, I will edit this answer to revert netplan.

EDIT: Now that you are connected and have reinstalled Network Manager, we should revert the netplan file to again refer to NM.

Please do:

 ls /etc/netplan

I assume that the file you backed up is /etc/netplan/01-network-manager-all.bak

If so, first back up the file you just created above:

sudo mv /etc/netplan/config.yaml  /etc/netplan/config.bak

And restore the previous file:

sudo mv /etc/netplan/01-network-manager-all.bak  /etc/netplan/01-network-manager-all.yaml

Follow with:

sudo netplan generate
sudo netplan apply

You should be all set.

cn flag
Thanks very much for your help. Im trying
heynnema avatar
ru flag
Excellent answer! +1
cn flag
So i followed what you adviced me to do. For some reason, its not working is there a way to re open file that i have just created to make sure that i made no mistake please?
chili555 avatar
cn flag
Sure, simply reopen with nano and save and exit as I outlined above.
cn flag
Thanks ! I added an extra space and now that k have fixed it, there are changes. When i type iwconfig i see my ssid name and other information but i the ping command is not working
chili555 avatar
cn flag
Please run and edit your question to show: `sudo dmesg | grep wlo1`
cn flag
So i have taken a picture of my screen and updated my original post to show you what i get. it would have taken too much time to type everything. Im sorry the picture is wrongly rotated
chili555 avatar
cn flag
The wireless appears to be roaming from among two access points; evidently with the same name! This is typical of 2.4gHz and 5 gHz segments of a router. Is it possible to rename them to myrouter2.4 and my router5 or some such. Then you'd meed to amend the netplan file to specify which.
cn flag
I have just tried with another device and its working ! THANKS A LOT. You have all my respect :')
chili555 avatar
cn flag
Awesome! Glad it's working. If my answer has been helpful, please accept it: https://askubuntu.com/tour The searchers will appreciate it.
cn flag
Sure, I will. Really thanks Again. So i have just réinstalled network manager but it does not detect my other wifi network which used to appear in the wifi liste :/ and the interface seems a bit different
chili555 avatar
cn flag
Does it appear if you do: `nmcli device wifi rescan` and follow with: `nmcli device wifi list` ?
cn flag
It says scanning not allowed While unavailable or activating. By the way it seems that The only wifi connection that I can use is the one I put in the nano file apparently
chili555 avatar
cn flag
Ahhh! We need to, as I mentioned in my answer, revert the netplan file. I shall write an edit in a few moments.
cn flag
THANKS A LOT CHILI555 YOU ROCK. I WISH YOU ALL THE BEST FOR THE FUTURE. TAKE CARE !!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.