Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cable Unplugged in Monterey #73

Closed
THLIVSQAZ opened this issue Oct 28, 2021 · 15 comments
Closed

Cable Unplugged in Monterey #73

THLIVSQAZ opened this issue Oct 28, 2021 · 15 comments

Comments

@THLIVSQAZ
Copy link

mac version: 12.0.1(21A559)
ethernet card :
Screen Shot 2021-10-28 at 12 56 25 AM

problem:
Screen Shot 2021-10-28 at 12 57 11 AM
Screen Shot 2021-10-28 at 12 57 35 AM
kextLoad:
Screen Shot 2021-10-28 at 2 46 16 PM

system is new install ,not OTA upgrade from big sur
I also try to install to /L/E and disable sip ,switch the speed ,deleted and reseted preference ,all not working

network status led on router and motherboard is working, if I use command "sudo ifconfig en0 down" the leds is off , and use "sudo ifconfig en0 up" is on

i didn't found the log in log show and /var/log/system.log, so i take photo when boot up
1
2

@Mieze
Copy link
Owner

Mieze commented Oct 28, 2021

Most likely an interrupt related issue but I have no time to investigate it at the moment.

@THLIVSQAZ
Copy link
Author

I see ,thinks

@vincerutabaga
Copy link

In monterey 12.2.1 with kext v.2.4.2 it work great.
But it's a pcie card, not onboard nic. Monterey have been hard with all onboard nic.
Thanks meize!

@Benau
Copy link

Benau commented Apr 2, 2022

I'm trying to debug now and seems that interruptOccurredPoll doesn't debuglog blah blah blah at all in 12.3, maybe msiIndex is wrong?

In 10.15 every 1 second i see logging from dmesg

@Benau
Copy link

Benau commented Apr 2, 2022

Maybe 12.3 handles

    while ((intrResult = pciDevice->getInterruptType(intrIndex, &intrType)) == kIOReturnSuccess) {
        if (intrType & kIOInterruptTypePCIMessaged){
            msiIndex = intrIndex;
            break;
        }
        intrIndex++;
    }

differently, maybe some new (fake!) devices will break eariler

@Benau
Copy link

Benau commented Apr 5, 2022

BTW it seems that intrType & kIOInterruptTypePCIMessaged is true for 1 2 3 4 with my onboard lan too
In Benau@fcd42d6, I manually 'poll' interrupt and it seems to work fine with both rxPoll on / off, @THLIVSQAZ can you try this Kext and see if it works? (and does my commit make sense, I'm a noob kernel programmer)

RealtekRTL8111.zip

(you can false disableMSI in Info.plist later if you have got a non-onboard rtl8111)

@blacksd
Copy link

blacksd commented Apr 5, 2022

@Benau happy to report that your driver change actually fixed my on-board card.

Realtek RTL8168GU/8111GU PCI Express Gigabit Ethernet:

  Bus:	                PCI
  Vendor ID:	        0x10ec
  Device ID:	        0x8168
  Subsystem Vendor ID:	0x1028
  Subsystem ID:	        0x0706
  Revision ID:	        0x0010
  PCIe Link Speed:	2.5 GT/s
  PCIe Link Width:	x1
  Driver:	        com.insanelymac.RealtekRTL8111
  BSD Device Name:      en0
  MAC Address:	        <REDACTED>
  AVB Support:	        No
  Maximum Link Speed:   1 Gb/s

Even with the automatic link discovery, it works like a charm.

@Benau
Copy link

Benau commented Apr 5, 2022

Nice!

@Mieze can you see if my commit make sense for you? Or do you have a better idea instead of keep polling the card every 1ms?

BTW even changing msiindex to 2, 3 or 4 still doesn't work

@willianfrs
Copy link

willianfrs commented Apr 6, 2022

BTW it seems that intrType & kIOInterruptTypePCIMessaged is true for 1 2 3 4 with my onboard lan too In Benau@fcd42d6, I manually 'poll' interrupt and it seems to work fine with both rxPoll on / off, @THLIVSQAZ can you try this Kext and see if it works? (and does my commit make sense, I'm a noob kernel programmer)

RealtekRTL8111.zip

(you can false disableMSI in Info.plist later if you have got a non-onboard rtl8111)

Thank you so much for making this kext available. Fitting also solved my problem here. Thanks.

Realtek RTL8168G/8111G PCI Express Gigabit Ethernet:

Barramento: PCI
ID do Fabricante: 0x10ec
ID do Dispositivo: 0x8168
ID do Fornecedor do Subsistema: 0x1849
ID do Subsistema: 0x8168
ID da Revisão: 0x0011
Velocidade do Link PCIe: 2.5 GT/s
Largura do Link PCIe: x1
Driver: com.insanelymac.RealtekRTL8111
Nome do Dispositivo BSD: en0
Endereço MAC: XX:XX:XX:XX:XX:XX
Compatibilidade AVB: Não
Velocidade Máxima do Link: 1 Gb/s

@dhavalhirdhav
Copy link

dhavalhirdhav commented Jun 24, 2022

BTW it seems that intrType & kIOInterruptTypePCIMessaged is true for 1 2 3 4 with my onboard lan too
In Benau@fcd42d6, I manually 'poll' interrupt and it seems to work fine with both rxPoll on / off, @THLIVSQAZ can you try this Kext and see if it works? (and does my commit make sense, I'm a noob kernel programmer)

RealtekRTL8111.zip

(you can false disableMSI in Info.plist later if you have got a non-onboard rtl8111)

This kext file works really well for AMD Ryzen 3 3200G. Been struggling since couple of days. Thanks :) Should release this patch as many are facing this issue.

@Hesowcharov
Copy link

BTW it seems that intrType & kIOInterruptTypePCIMessaged is true for 1 2 3 4 with my onboard lan too In Benau@fcd42d6, I manually 'poll' interrupt and it seems to work fine with both rxPoll on / off, @THLIVSQAZ can you try this Kext and see if it works? (and does my commit make sense, I'm a noob kernel programmer)

RealtekRTL8111.zip

(you can false disableMSI in Info.plist later if you have got a non-onboard rtl8111)

@Benau (cc @Mieze) I can also approve that fix works (at least at first glance)! Please consider to review and pull the changes

@Mieze
Copy link
Owner

Mieze commented Jul 2, 2022

If the driver is unable to pick up the matching interrupt, that's clearly an ACPI related problem and problems should be solved at the origin. I know, macOS is becoming more picky on that with every release but that's not my fault. Permanently polling the device makes no sense and I'm not willing to integrate such a patch.

@Mieze Mieze closed this as completed Jul 2, 2022
@blacksd
Copy link

blacksd commented Jul 5, 2022

@Mieze I understand that this patch is not a solution, and should not be merged, but shall we keep this issue open - at least as to have a proper place to look for another solution and/or make people aware of the current limitation?

@adrianlungu
Copy link

adrianlungu commented Jul 6, 2022

Unfortunately, I tried the kext from @Benau on my end but it didn't want to budge. Still getting cable unplugged.

Tried other versions of the kext as well and it was a no go.

I'm not sure what to go for SSDT-wise, but I'm open to any suggestions to get this working!

Update: got some help on Reddit and apparently I had DisableIoMapper set to false which caused this issue to occur. After enabling it, ethernet started working as expected.

@Kissadere
Copy link

BTW it seems that intrType & kIOInterruptTypePCIMessaged is true for 1 2 3 4 with my onboard lan too In Benau@fcd42d6, I manually 'poll' interrupt and it seems to work fine with both rxPoll on / off, @THLIVSQAZ can you try this Kext and see if it works? (and does my commit make sense, I'm a noob kernel programmer)

RealtekRTL8111.zip

(you can false disableMSI in Info.plist later if you have got a non-onboard rtl8111)

You soled my issue (and probably many other's people issues too).

You rock!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants