Jump to content

[Help] Disabling devices at the PCIe bus level


rafale77
 Share

12 posts in this topic

Recommended Posts

I know this is possibly purely cosmetic but I am investigating for the sake of also learning.

 

I have noticed on my Hack that the network interface menu has a PCI Serial adapter below:

1017872403_ScreenShot2022-07-13at10_59_55.png.69f527ea26990a547ffc5bdb044fe68e.png

which I have traced back to come from the intel Keyboard and Text Redirect device:

1875327076_ScreenShot2022-07-13at10_58_36.png.8ff7761cd5e7afe60dae751702e740d6.png

 

This device doesn't exist on a real iMac and by the way along with two other devices I would like to disable/hide from MacOS:

 

690602504_ScreenShot2022-07-13at10_59_14.thumb.png.107a26dde0090090617747de45a0a332.png

 

The Gaussian Mixture model and the Thermal subsystem. (resp. GAUS and B0D4 above)

 

I have tried to do this through SSDT by setting the _STA to zero either through name or method, none of which works. I have accessorily been successful at renaming them as you see.

 

DefinitionBlock ("", "SSDT", 2, "Lenovo", "Disable", 0x00000000)
{
    External (_SB_.PCI0, DeviceObj)
    External (_SB_.PCI0.B0D4, DeviceObj)
    External (_SB_.PCI0.GAUS, DeviceObj)
    External (_SB_.PCI0.KTRD, DeviceObj)

    Scope (\_SB.PCI0)
    {
        Scope (B0D4)
        {
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                If (_OSI ("Darwin"))
                {
                    Return (Zero)
                }
                Else
                {
                    Return (0x0F)
                }
            }
        }

        Scope (GAUS)
        {
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                If (_OSI ("Darwin"))
                {
                    Return (Zero)
                }
                Else
                {
                    Return (0x0F)
                }
            }
        }

        Scope (KTRD)
        {
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                If (_OSI ("Darwin"))
                {
                    Return (Zero)
                }
                Else
                {
                    Return (0x0F)
                }
            }
        }
    }
}

 

I am not super familiar with the language. Anyone could help me disable these 3 devices? These methods apparently work on child devices but not for PCIe bus devices?

Link to comment
Share on other sites

39 minutes ago, 5T33Z0 said:

 

Thanks, It's actually where I got the idea of using the _STA as a method or a name. Unfortunately it doesn't work and it seems like the guide indicates that it only works for child devices.

Link to comment
Share on other sites

Guest 5T33Z0

@rafale77 Okay. I have this serial device in my Laptop as well. It uses Apple16X50.kext in S/L/E

 

You could try to just block this kext from loading in OpenCore using the Kernel/Block feature.

 

262632398_Bildschirmfoto2022-07-14um08_00_02.png.9fb3623477af8bdc4ed99cd25aa524b6.png

 

I've deleted the PCI Serial Adapter from Network Settings. macOS asked if it should show this adapter in the list again if it would be connected. I said "Yes" and saved the settings.

 

After applying the block rule and rebooting, the device entry did not return yet and it's gone from IO Reg as well:

 

918710971_Bildschirmfoto2022-07-14um12_17_34.png.fcd36a2fe9fb14602042102815bc7f28.png

Edited by 5T33Z0
Link to comment
Share on other sites

@5T33Z0, @Hervé, Thank you.

Adding the kext block is a bit too broad as it may block peripherals which needs this kext. I don't have any right now but I would prefer not to do that.

Removing the device permanently from the prefpane seems to be better though it appears that the kext seems to still load for this device per ioreg.

 

More fundamentally I wanted to remove all 3 of the devices and if possible learn how to do this. The Keyboard and Text was only the thing that got me to this. If anyone knows a method, though property injection to the kernel or at the ACPI level through an SSDT, I would like to learn.

 

 

Link to comment
Share on other sites

Guest 5T33Z0

@rafale77

 

I couldn't find any dependencies for other devices. Since the serial port has to be disabled in BIOS on every Wintel machine in order to boot macOS I think his kext doesn't do anything. But I couldn't find much any info about it either, except this: https://developer.apple.com/forums/thread/116061

 

i think he kext doen't rely on the devices/methods you want to block via ACPI, because I don't have them in my DSDT.  Seems to be reatied to serial modems detection only, since "Serial ports are exposed to apps in a way that’s independent of how they’re connected."

 

 

Edited by 5T33Z0
Link to comment
Share on other sites

@5T33Z0, understood. What I meant is that I wouldn't be too surprised if I would install some devices in the future which potentially would require this kext forcing me to troubleshoot after forgetting about this.

If you look at ioreg, it is clearly tied to a the PCI device in ACPI... which I renamed but haven't figured out how to disable.

Link to comment
Share on other sites

Guest 5T33Z0

I can't think of a device that would require a kext for serial modems on any peripheral you can put in thismachine ;)

Edited by 5T33Z0
Link to comment
Share on other sites

40 minutes ago, 5T33Z0 said:

I can't think of a device that would require a kext for serial modems on any peripheral you can put in thismachine ;)

 

Though I agree with you, I sometimes tinker with Home automation devices and or car programming which run through serial modems... Even connected through USB as a translation layer. I don't know what I don't know and have caught myself in this type of situations before.  The point though is that it isn't just about getting rid of the prefpane device. I would like to learn how to block them at the ACPI device level.

Link to comment
Share on other sites

Guest 5T33Z0
Quote

It appears to be a driver for serial ports, likely left in from the PPC days, and possibly left in for serial ports in internal devkits and unpopulated headers on production Macs. Looks like it only depends on the kernel (of course), but I'm not sure whether it has any dependents. It doesn't seem that way from a quick Google search.

 

https://www.reddit.com/r/hackintosh/comments/vyz6ia/comment/ig5695x/?utm_source=share&utm_medium=web2x&context=3

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...