I want to disable the onboard WiFi card, as I use a better USB one. Having both of them was causing weird conflicts where they'd both try to connect to the network at the same time and would keep the machine from connecting outside of the netowrk.
Start with:
lspci
Returns
00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers (rev 07)
00:02.0 VGA compatible controller: Intel Corporation CoffeeLake-S GT2 [UHD Graphics 630]
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model
00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller (rev 10)
00:14.2 RAM memory: Intel Corporation Cannon Lake PCH Shared SRAM (rev 10)
-->00:14.3 Network controller: Intel Corporation Cannon Lake PCH CNVi WiFi (rev 10)
00:16.0 Communication controller: Intel Corporation Cannon Lake PCH HECI Controller (rev 10)
00:17.0 SATA controller: Intel Corporation Cannon Lake PCH SATA AHCI Controller (rev 10)
00:1b.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #21 (rev f0)
00:1f.0 ISA bridge: Intel Corporation Device a308 (rev 10)
00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10)
00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10)
00:1f.5 Serial bus controller: Intel Corporation Cannon Lake PCH SPI Controller (rev 10)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (7) I219-V (rev 10)
01:00.0 Non-Volatile memory controller: Intel Corporation SSD 660P Series (rev 03)
I'm looking for the 00:14.3
address.
ls -la /sys/bus/pci/devices | grep "00:14.3"
Should return:
lrwxrwxrwx 1 root root 0 May 1 07:24 0000:00:14.3 -> ../../../devices/pci0000:00/0000:00:14.3
^ ^
+----------+
The 0000:00:14.3
is my device id for that wifi card.
Add a rule in udev.
sudo vi /etc/udev/rules.d/10-disable-pci-wifi.rules
Add:
ACTION=="add", KERNEL=="0000:00:14.3", SUBSYSTEM=="pci", RUN+="/bin/sh -c 'echo 1 > /sys/bus/pci/devices/0000:00:14.3/remove"
^ ^ ^ ^
+----------+ +----------+
Update these for whatever device you want to disable, then reboot.