Q:

RTL8152 on Ubuntu 18.04

I've just started setting up a multi-gig network. I've found some nice USB to 2.5GBASE-T adapters.
Now whilst they do run out-of-the-box, they seem to be using cdc-ncm as their driver which can't fully utilize the capabilities of the NIC (Limited to 1500MTU and hampered performance)
This is solved by installing the now outdated Realtek drivers for this chip.
Problem is, I need to kick both cdc-mbim and cdc-ncm with modprobe -r before attaching the device since otherwise the modules will conflict and cdc-ncm will win. However I don't just want to blacklist those two modules since I also have a LTE modem installed which uses those modules.
My two questions:

How can I prevent cdc-ncm from overtaking the device without just ripping it out?
How can I patch the driver to work with the latest kernel versions?

System info:

uname -r: 5.3.8-050308-generic
Realtek driver: r8152_2.12.0
dmesg output after connecting with cdc-ncm:

[  556.959398] usb 3-3.2: New USB device found, idVendor=0bda, idProduct=8156, bcdDevice=30.00
[  556.959400] usb 3-3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=6
[  556.959401] usb 3-3.2: Product: USB 10/100/1G/2.5G LAN
[  556.959402] usb 3-3.2: Manufacturer: Realtek
[  556.959403] usb 3-3.2: SerialNumber: 000000001
[  556.984103] cdc_ncm 3-3.2:2.0: MAC-Address: a0:ce:c8:cb:7c:ca
[  556.984105] cdc_ncm 3-3.2:2.0: setting rx_max = 16384
[  556.984172] cdc_ncm 3-3.2:2.0: setting tx_max = 16384
[  556.984445] cdc_ncm 3-3.2:2.0 usb0: register 'cdc_ncm' at usb-0000:00:14.0-3.2, CDC NCM, a0:ce:c8:cb:7c:ca
[  557.009821] usbcore: registered new interface driver r8152
[  557.012312] cdc_ncm 3-3.2:2.0 enxa0cec8cb7cca: renamed from usb0
[  557.062459] usb 2-3.1.1: new high-speed USB device number 8 using xhci_hcd
[  557.062510] cdc_ncm 3-3.2:2.0 enxa0cec8cb7cca: network connection: disconnected
[  557.094515] cdc_ncm 3-3.2:2.0 enxa0cec8cb7cca: network connection: disconnected
[  557.126508] cdc_ncm 3-3.2:2.0 enxa0cec8cb7cca: network connection: disconnected
[  557.158506] cdc_ncm 3-3.2:2.0 enxa0cec8cb7cca: network connection: disconnected
[  557.190514] cdc_ncm 3-3.2:2.0 enxa0cec8cb7cca: network connection: disconnected

dmesg output after kicking the two modules:

[  624.246651] usb 3-3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=6
[  624.246653] usb 3-3.2: Product: USB 10/100/1G/2.5G LAN
[  624.246654] usb 3-3.2: Manufacturer: Realtek
[  624.246655] usb 3-3.2: SerialNumber: 000000001
[  624.330110] usb 3-3.2: reset SuperSpeed Gen 1 USB device number 5 using xhci_hcd
[  624.444293] r8152 3-3.2:1.0 eth0: v2.12.0 (2019/04/29)
[  624.444295] r8152 3-3.2:1.0 eth0: Hello 
[  624.606497] usbcore: registered new interface driver cdc_ncm
[  624.608322] usbcore: registered new interface driver cdc_wdm
[  624.656599] cdc_mbim 2-4:1.0: setting rx_max = 16384
[  624.657267] cdc_mbim 2-4:1.0: cdc-wdm0: USB WDM device
[  624.657816] cdc_mbim 2-4:1.0 wwan0: register 'cdc_mbim' at usb-0000:00:14.0-4, CDC MBIM, d2:c8:53:b2:65:df
[  624.659148] usbcore: registered new interface driver cdc_mbim
[  624.661511] cdc_mbim 2-4:1.0 wwp0s20u4: renamed from wwan0
[  624.675680] r8152 3-3.2:1.0 enxa0cec8cb7cca: renamed from eth0
[  628.423530] IPv6: ADDRCONF(NETDEV_CHANGE): enxa0cec8cb7cca: link becomes ready
[  628.423959] r8152 3-3.2:1.0 enxa0cec8cb7cca: carrier on

Any help is greatly appreciated!

A:

I figured it out. I just had to copy the included 50-usb-realtek-net.rules into my /udev/rules.d to make it not conflict.

