can't enable enp3s0 (ethernet interface) and ethernet wired simply does not work

I've started experiencing a weird issue. I'm normally connected via RJ45 but as I write this I was forced to switch to Wifi instead.

So here's the thing, I've noticed that lately when coming back from suspend, I basically had to reboot in order to get Internet connectivity again.

After the second time, I decided to dig why this was happening. So here's what I tried so far:

sudo lshw -C network

Output:

  *-network                 
       description: Wireless interface
       product: Dual Band Wireless-AC 3168NGW [Stone Peak]
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlp2s0
       version: 10
       serial: 1c:4d:70:8b:e1:97
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=5.11.0-27-generic firmware=29.1654887522.0 3168-29.ucode ip=192.168.1.144 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:126 memory:df200000-df201fff
  *-network DISABLED
       description: Ethernet interface
       product: QCA8171 Gigabit Ethernet
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: enp3s0
       version: 10
       serial: 4c:cc:6a:e2:a9:77
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi msix bus_master cap_list ethernet physical
       configuration: broadcast=yes driver=alx latency=0 multicast=yes
       resources: irq:19 memory:df100000-df13ffff ioport:d000(size=128)

As you can see the enp3s0 device is disabled...so if I try to bring it up:

sudo ip link set enp3s0 up

I get this:

RTNETLINK answers: No such device

Searching for info on this error doesn't show up a lot of help.

Then, I tried to restart netplan via NetWorkManager, here are the contents of my file:

sudo cat /etc/netplan/01-network-manager-all.yaml           
# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager
  ethernets:
    enp3s0:
      dhcp4: true

Then applied and restarted NetworkManager service

sudo netplan apply
sudo systemctl restart NetworkManager.service

But still, no luck. Checking on the UI I noticed the following:

enter image description here

Which is weird...not sure why there are that many listed??

If I click on any of the 2, I get this

enter image description here

Checking the settings I see this:

enter image description here

I'm not sure what's really happening here...tried checking dmesg but I don't see specific errors related with this interface

dmesg | grep -e etwork -e enp                    
[ 2695.416481] alx 0000:03:00.0 enp3s0: wol: ctrl=3, speed=A
[12199.099371] alx 0000:03:00.0 enp3s0: wol: ctrl=3, speed=A
[15886.753884] alx 0000:03:00.0 enp3s0: wol: ctrl=3, speed=A
[26846.775196] alx 0000:03:00.0 enp3s0: wol: ctrl=3, speed=A
[26877.043272] alx 0000:03:00.0 enp3s0: wol: ctrl=3, speed=A
[36094.086555] alx 0000:03:00.0 enp3s0: wol: ctrl=3, speed=A
[36124.365270] alx 0000:03:00.0 enp3s0: wol: ctrl=3, speed=A
[57796.358176] alx 0000:03:00.0 enp3s0: wol: ctrl=3, speed=A
[68289.487047] alx 0000:03:00.0 enp3s0: wol: ctrl=3, speed=A
[77002.517657] alx 0000:03:00.0 enp3s0: wol: ctrl=3, speed=A

When rebooting, this is what I see:

sudo lshw -C network                             
[sudo] password for internetmosquito: 
  *-network DISABLED        
       description: Wireless interface
       product: Dual Band Wireless-AC 3168NGW [Stone Peak]
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlp2s0
       version: 10
       serial: 1c:4d:70:8b:e1:97
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=5.11.0-27-generic firmware=29.1654887522.0 3168-29.ucode latency=0 link=no multicast=yes wireless=IEEE 802.11
       resources: irq:126 memory:df200000-df201fff
  *-network
       description: Ethernet interface
       product: QCA8171 Gigabit Ethernet
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: enp3s0
       version: 10
       serial: 4c:cc:6a:e2:a9:77
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi msix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=alx driverversion=5.11.0-27-generic duplex=full ip=192.168.1.141 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
       resources: irq:19 memory:df100000-df13ffff ioport:d000(size=128)
sudo ip link show enp3s0       
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 4c:cc:6a:e2:a9:77 brd ff:ff:ff:ff:ff:ff

And then in the UI again:

enter image description here

enter image description here

Any idea what might be going on here? Having to restart to solve the issue is just a nightmare...what is happening when going to suspend and waking up that causes this?


Edit /etc/netplan/01-network-manager-all.yaml to look like this:

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

sudo netplan generate

sudo netplan apply

Bring up the Network settings panel.

Click on the cogwheel icons for netplan-enp3s0, and then Wired Connection 1, and click the Remove Connection Profile button for both examples.

Reboot the computer.

Open the Network settings panel again.

Click the + icon to create a new Wired Connection profile, if one doesn't already exist. Check that the Identity tab MAC Address looks like this... click the down arrow if it's not...

enter image description here

Check that all other settings are appropriate in the other tabs.

Apply the Wired Connection profile.

Close the Network settings panel.

Choose Wired Connection from the Network pull down menu.

Update #1:

See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1931301 entry #23. Basically, update your 21.04 to the latest kernel 5.11.0-34.36, released on 9/7/21. This fixed it.