6

I have Ubuntu 20.04 on a Dell XPS-13-9370. Things were fine but today my wifi stopped working after I disconnected of a vpn. I don't have dual boot, only ubuntu.

From the Wi-Fi settings panel I see this error: "No Wi-Fi Adapter Found".

Here is the output of the command lshw -C net:

nameen@nameen-XPS-13-9370- /home/nameen> sudo lshw -c net
  *-network DISABLED        
       description: Wireless interface
       product: QCA6174 802.11ac Wireless Network Adapter
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlp2s0
       version: 32
       serial: 9c:b6:d0:92:4d:01
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=ath10k_pci driverversion=5.4.0-73-generic firmware=WLAN.RM.4.4.1-00140-QCARMSWPZ-1 latency=0 link=no multicast=yes wireless=IEEE 802.11
       resources: irq:139 memory:dc000000-dc1fffff
nameen@nameen-XPS-13-9370- /home/nameen>

Note that when I connect with an ethernet cable the network is also set as DISBALED.

The command ip addr returns:

nameen@nameen-XPS-13-9370- /home/nameen> ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: wlp2s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 9c:b6:d0:92:4d:01 brd ff:ff:ff:ff:ff:ff
nameen@nameen-XPS-13-9370- /home/nameen>

And the command cat /etc/netplan/*.yaml returns:

nameen@nameen-XPS-13-9370- /home/nameen> cat /etc/netplan/*.yaml
# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager
nameen@nameen-XPS-13-9370- /home/nameen>

I tried the solution reported here: Ubuntu 18.04 missing wired connections in settings but it did not work.

Could you let me know what you understand of my problem and what should I do?

Thank you

Some more information:

rfkill list all gives:

0: hci0: Bluetooth 
        Soft blocked: no
        Hard blocked: no
1: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no

The command sudo ifconfig wlp2s0 up does not really change the state of the network. Here is what ip addr says after this ifconfig command:

nameen@nameen-XPS-13-9370- /home/nameen> ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: wlp2s0: <NO-CARRIER, BROADCAST,MULTICAST, UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 9c:b6:d0:92:4d:01 brd ff:ff:ff:ff:ff:ff

cat /etc/network/interfaces says:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
Nameen
  • 101
  • In the WiFi settings panel, is the switch at the top of the window turned on? Edit your question and show me cat /etc/network/interfaces. – heynnema May 29 '21 at 21:34
  • @heynnema, do you mean the Airplane Mode? If so, no. The airplane mode is not activated. – Nameen May 29 '21 at 21:44
  • No, there's a master on/off switch just above where you're looking. – heynnema May 29 '21 at 23:15
  • @heynnema, I don't see this switch. I can see on Internet what you are talking about but this does not appear in my panel. – Nameen May 30 '21 at 06:26
  • See https://imgur.com/gallery/fjB0VpU – heynnema May 30 '21 at 14:30
  • Yes, I know what you mean but this switch is not present at the top of my window. It might be part of the problem? (I cannot remember whether it was there before) – Nameen May 30 '21 at 14:47
  • I just re-read your question. You can't get to your ethernet and your wifi? What VPN are you using? Do you connect via an app, or command line? – heynnema May 30 '21 at 14:52
  • In terminal show me a screenshot of nm-connection-editor. – heynnema May 30 '21 at 14:56
  • This is correct, no internet access from this laptop. I was using ExpressVPN through firefox. – Nameen May 30 '21 at 14:56
  • Do you have a Ubuntu Live USB/DVD? Boot to it and see if any network connection works. – heynnema May 30 '21 at 14:57
  • No, I don't... The command mn-connection-editor opens a window showing my past connections to Networks. Last one was my Wi-Fi 1 day ago. (I don't know where to upload picture) – Nameen May 30 '21 at 15:05
  • Does it show ethernet and wifi connections? You can upload to imgur.com. Do you have a USB flash key or DVD burner? Could you make a Ubuntu Live USB/DVD? Log into a different account on your computer, create a new user if required, and see if anything works there. – heynnema May 30 '21 at 15:28
  • If you don't have the 20.04 .iso image any more, you can get it at https://ubuntu.com/download/desktop or https://releases.ubuntu.com/20.04/ – heynnema May 30 '21 at 15:56
  • I finally managed to have a Ubuntu Live USB and to boot on it. From there I have internet connection, both ethernet and Wi-Fi works. From my installed version of Ubuntu, I created a new user account but I did not have internet connection from this new account. – Nameen May 30 '21 at 17:20
  • Well, your Ubuntu networking system is messed up. Try this first... in terminal do sudo apt update and then sudo apt reinstall network-manager. Reboot and retest. Report back. The next step might be to reinstall Ubuntu... so have good backups of your important data. – heynnema May 30 '21 at 18:07
  • Are you telling me to do that from the Ubuntu live USB session? Because I don't have internet connection from my installed Ubuntu, so I don't think the apt commands will work. – Nameen May 30 '21 at 18:13
  • Oh doh! Silly me. When booted to the Live USB, backup your important files to an external disk or flash drive, then reinstall Ubuntu. Tell the installer to install on top of your old Ubuntu, but, and pay attention, look for the tiny format checkbox, and uncheck it, and it should leave your home folder alone. – heynnema May 30 '21 at 19:18

3 Answers3

4

Here is how my problem was solved. In a terminal I typed:

sudo service NetworkManager stop

Then, I edited this file /var/lib/NetworkManager/NetworkManager.state (with sudo power)

And I changed this line:

NetworkingEnabled=false

to this:

NetworkingEnabled=true

And finally, in a terminal I typed:

sudo service NetworkManager restart

No need to reboot, but to check that the effect is permanent it is better to.

Daniel T
  • 4,594
Nameen
  • 101
  • 2
    Do you know what changed the config for you? One day my wifi was working and the next day it wasn't. – drfence Nov 17 '21 at 13:34
  • 1
    The command to enable the network service failed with Failed to restart network-manager.service: Unit network-manager.service not found.. By the way, it stopped working when I switched to another nVidia driver from Ubuntu's Drivers program. By the way, making the file change and then logging out and back in made a 'Enable Network' button show up in the network dropdown and enabling that connected it with my phone's tether, so thanks! – Lampe2020 Aug 05 '23 at 21:29
0

This works for solving similar problems:

sudo su
systemctl stop NetworkManager.service 
rm /var/lib/NetworkManager/NetworkManager.state
systemctl start NetworkManager.service 

no need to reboot

Ferroao
  • 850
-1

I was able to resolve this issue either just

sudo service network-manager restart
Imani
  • 1