6

I have Ubuntu 18.04 with a PCI ethernet cable (connected). When I boot my machine it always tries to open a USB ethernet connection. I can switch this off using the menue in the top right corner of my screen, but this switching off is not persistent: At the next reboot, it tries to open a USB ethernet connection again.

How can I switch this off permanently?

EDIT: Added some outputs

Output of lsusb:

 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 005: ID 04f2:b51d Chicony Electronics Co., Ltd 
 Bus 001 Device 004: ID 8087:0a2b Intel Corp. 
 Bus 001 Device 003: ID 03f0:9d1d Hewlett-Packard 
 Bus 001 Device 002: ID 046d:c050 Logitech, Inc. RX 250 Optical Mouse
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Output of lspci

 00:00.0 Host bridge: Intel Corporation Skylake Host Bridge/DRAM Registers (rev 08)
 00:02.0 VGA compatible controller: Intel Corporation HD Graphics 520 (rev 07)
 00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
 00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
 00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 (rev 21)
 00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
 00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21)
 00:1c.0 PCI bridge: Intel Corporation Device 9d11 (rev f1)
 00:1c.3 PCI bridge: Intel Corporation Device 9d13 (rev f1)
 00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller (rev 21)
 00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
 00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev      21)
 00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
 00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection I219-V (rev 21)
 01:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader (rev 01)
 02:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a)

EDIT2: Output of ip link show (ifconfig -a |grep Link produces no output)

 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
 2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
     link/ether 10:e7:c6:6c:59:b3 brd ff:ff:ff:ff:ff:ff
 3: enp0s20f0u3c2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
     link/ether 26:b7:4e:09:a6:4a brd ff:ff:ff:ff:ff:ff
 4: wlp2s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
     link/ether 68:ec:c5:c0:78:e4 brd ff:ff:ff:ff:ff:ff

EDIT 3: Output of sudo lshw -class network

 *-network DISABLED        
      description: Wireless interface
      product: Wireless 8260
      vendor: Intel Corporation
      physical id: 0
      bus info: pci@0000:02:00.0
      logical name: wlp2s0
      version: 3a
      serial: 68:ec:c5:c0:78:e4
      width: 64 bits
      clock: 33MHz
      capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
      configuration: broadcast=yes driver=iwlwifi driverversion=4.15.0-34-generic firmware=34.0.1 latency=0 link=no multicast=yes wireless=IEEE 802.11
      resources: irq:128 memory:e1100000-e1101fff
 *-network
      description: Ethernet interface
      product: Ethernet Connection I219-V
      vendor: Intel Corporation
      physical id: 1f.6
      bus info: pci@0000:00:1f.6
      logical name: enp0s31f6
      version: 21
      serial: 10:e7:c6:6c:59:b3
      size: 100Mbit/s
      capacity: 1Gbit/s
      width: 32 bits
      clock: 33MHz
      capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
      configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k duplex=full firmware=0.13-4 ip=134.96.90.25 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s
      resources: irq:125 memory:e1200000-e121ffff
 *-network
      description: Ethernet interface
      physical id: 2
      logical name: enp0s20f0u3c2
      serial: 72:63:21:bf:e2:28
      capabilities: ethernet physical
      configuration: broadcast=yes driver=cdc_ether driverversion=22-Aug-2005 firmware=CDC Ethernet Device link=yes multicast=yes

PS.: The behaviour is still the same under Ubuntu 20.04

1 Answers1

1

A similar question (also a bounty) was asked 8 years ago: Disable wireless on startup

The accepted answer was:

There are so many ways to disable the card. The simplest I would say would be to put:

sudo ifdown enp0s20f0u3c2 

in your /etc/rc.local above the line exit 0. This should disable the wireless card (replace wlan0 with your wireless interface card)

If you want to enable/disable on a keyboard press, this thread on Ubuntu Forums explains how to link a keyboard event to a script. If you want it to toggle when you push keys you will have to add some logic to the script. Though the simplest way might be to have one key to enable and another to disable.

down script

#!/bin/bash
IFACE=enp0s20f0u3c2
ifconfig ${IFACE} down

and up script

#!/bin/bash
IFACE=enp0s20f0u3c2
ifconfig ${IFACE} up