6

When I am on wifi and then plug in the Ethernet cable the internet connection switches to the latter (three-box symbol), but after pause it is back to wifi and I do not know how to return to Ethernet (which I want since much faster). Unplugging and reconnecting the cable doesn't affect the selection of wifi. I only found older (pre-18.04) recipes that do not work.

I switched wifi off, took USB-C adapter out and back in, got network icon symbol, am on network (500 Mbps download) but the icon symbol changed to ?.

Output of sudo lshw -C network

  *-network DISABLED        
       description: Wireless interface
       product: Wireless 8265 / 8275
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlp2s0
       version: 78
       serial: f8:34:41:49:8c:e3
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=5.0.0-29-generic firmware=36.9f0a2d68.0 latency=0 link=no multicast=yes wireless=IEEE 802.11
       resources: irq:135 memory:d0000000-d0001fff
  *-network:0 DISABLED
       description: Ethernet interface
       physical id: 3
       logical name: wwp0s20f0u2i12
       serial: 12:c1:b8:08:68:e9
       capabilities: ethernet physical
       configuration: broadcast=yes driver=cdc_mbim driverversion=22-Aug-2005 firmware=CDC MBIM link=no multicast=yes
  *-network:1
       description: Ethernet interface
       physical id: 4
       logical name: enx0050b692363f
       serial: 00:50:b6:92:36:3f
       size: 1Gbit/s
       capacity: 1Gbit/s
       capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8152 driverversion=v1.09.9 duplex=full ip=192.168.178.10 link=yes multicast=yes port=MII speed=1Gbit/s
15
  • If you right click on the Network symbol does it not give you options?
    – graham
    Sep 28, 2019 at 9:28
  • 2
    This question was already answered here.
    – joelac
    Sep 28, 2019 at 9:32
  • 4
    the problem is likely something else: if the wired network drops it will automatically switch to wireless. So I would assume you got a network related problem when wired. This has nothing to do with "priority": priority only kicks in when 2 or more methods are available. You seem to end up with ONE: wireless.
    – Rinzwind
    Sep 28, 2019 at 9:32
  • 1
    @RobRutten If you don't delete the question. Please accept your answer as the correct one by clicking on the check mark and make it green. You may have to wait a few hours. This will help others.
    – user68186
    Dec 2, 2019 at 18:58
  • 1
    @user68186. Sorry! Done now.
    – Rob Rutten
    Dec 4, 2019 at 10:17

3 Answers 3

14

Open the terminal application and type:

nm-connection-editor

On the window that opens, select your Wired Connection and click the gear icon at the bottom of the window to edit it. You need to select the General tab, enable "Connect automatically with priority", and change the priority to 1. This will prioritize the ethernet connection.

Understand that:

  • Ubuntu normally auto-selects the connection with the best performance.

  • If you have an ethernet connectivity problem, that would explain why your connections keep on switching.

  • Check that your USB-C port doesn't power itself down at idle... you may have to check BIOS settings for that.

enter image description here

15
  • thanks! But the nm-connection-editor window only shows wifi (current and past names). The ethernet light on the connector on my Toshiba Travel Aadaptor is green. Seems I should suspect that box?
    – Rob Rutten
    Sep 29, 2019 at 9:20
  • @heyennema: Aha, I now restarted the laptop (Toshiba) and now have Wired connection in the manager window. I followed your recipe; the priority setting was -999, changed it to 1. The icon remained the curved wifi symbol but the speed is 500 Bps so via the cable. Now hope it stays! Aha, now (minutes later) the icon became the three-box cable one.
    – Rob Rutten
    Sep 29, 2019 at 9:37
  • @RobRutten remember to undo the changes you made to /etc/network/interfaces. Also, please accept my answer if it was helpful. Thanks!
    – heynnema
    Sep 29, 2019 at 14:59
  • @heyennema: next morning here. Reopen laptop. Laptop is on wifi, wifi symbol does not show network. I had removed that line in /etc/network/interfaces. I restarted laptop, again on wifi but now showing "network connected", after two minutes it switched to network. I checked nm-connection-editor, changes still there. Not there yet...
    – Rob Rutten
    Sep 30, 2019 at 8:02
  • By the way, in case some Stack overseer sees this, I find typing such comments very hard. I have emacs habits and type returns all the time. I then get thrown out with an incomplete comment. Luckiily I may edit but often 5 min is too short for me.
    – Rob Rutten
    Sep 30, 2019 at 8:07
2

It was hardware: my Toshiba USB-C Travel adaptor (PA5272U-2PRP). The problem persisted many weeks in which I worked mostly on wifi. After much hesitation (expense) I bought a similar adaptor: Goobay USB-C Premium Multiport dock. It works flawlessly.

0

When you plug in your Ethernet cable, turn on Airplane Mode. The wireless network will not be used. When you unplug the Ethernet cable, turn off Airplane Mode.

Airplane Mode is a setting that is easily toggled on and off in Ubuntu using just a few clicks.

For GNOME, open your Wi-Fi settings and switch "Airplane Mode" to ON

See also: Turn Airplane Mode on/off via terminal

You are probably searching for an automated solution, but this is a solution nonetheless that will work 100% (and there's nothing automated about physically connecting and disconnecting an Ethernet cable anyway)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .