How to disable and reenable Thunderbolt 3 port in Mac OS Catalina?

So all of a sudden my MacBook went really slow, I contacted apple support tried everything they said, resetting nvram e.t.c, wiped out my entire disk and reinstalled the macOS, but the problem still not solved. After analysing the activity monitor I found that kernel task was taking 20-90% of the cpu most of the time on the higher side(70-90%) so I researched on internet found that it is the broken port or broken sound card that is causing this issue, and there were some people (or a person) saying that disabling the port will fix this.

Note: I am pretty much certain that my upper left port is not functioning well, sometimes it works and sometimes I have rotate the charging pin and insert it again to make it work, so it's not sound card or any other component that's causing the issue but the port.

So long story short, I want to disable my port.

macOS Catalina 10.15.6, MacBook Pro 13 inch with two thunderbolt 3 ports, 2017


So long story short, I want to disable my port.

Technically, you can't.

The Thunderbolt ports really cannot be disabled because they are used for functions outside the operating system like charging. So, even if you completely uninstall macOS the ports will continue to function, accepting and negotiating a charge.

The most you can hope to do is disable them from the OS, however, that's an all or nothing proposition. The kexts are for all of the ports; not for each port.

I am pretty much certain that my upper left port is not functioning well, sometimes it works and sometimes I have rotate the charging pin and insert it again to make it work,

Have you tested the cable? The port is reversible so you shouldn't need to "rotate the charging pin;" there's actually two of them - one on each "side" of the cable (Vbus). If it is the port, why disable it? Why not just not use it or better yet, take it in to have the port replaced? There are board level repair outfits that specialize in this type of repair.

Now, if you are getting CPU spikes then it is possible there's a short between one of the power pins and a data bin (i.e. Vbus and TX1/RX1). If these spikes occur while a cable is plugged in, again, try changing the cable. If they occur regardless, then the problem is your port and it must be fixed. If it's a physical problem, you either have to physically disable it (cut the connectors so it's no longer usable) or if you're going to go that far, just fix the port.