Jump to content

RealtekR1000 v3

LAN 8111 8168

  • Please log in to reply
99 replies to this topic

#1
Slice

Slice

    InsanelyMacaholic

  • Local Moderators
  • 2,924 posts
  • Gender:Male
  • Location:Moscow

*
POPULAR

I want to present you updated RealtekR1000 driver. I added support for new chips according to linux's sources.
Now it supports RTL8168E,F/8111E,F.It works for me and works better then v2.0.6 from realtek.com.tw. Now I have no problems with sleep/wake. With native driver I sometimes lose LAN after wake.With this driver never.

I have a little problem. Network utility shows Link Speed = 0Can someone help me to resolve this Resolved!
Unplug cable
Attached File  Screen Shot 2013-03-11 at 21.05.46.png   45.32KB   343 downloads
Plug cable
Attached File  Screen Shot 2013-03-11 at 21.05.25.png   47.58KB   285 downloads

UPDATE. In this version I applied my own inventions so my driver differs from native.


25.04.2013
Corrected a mistake with warm boot after Windows. Thanks for Mieze, dmazar, rehabman.
Updated part for RTL 8105/RTL8136
This kext is compiled under SL, XCode 3.2.5. For use in ML I'll check little later. EDITED: I checked, it works in ML 10.8.3.
Attached File  RealtekR1000SL.kext-v304.zip   188.58KB   1537 downloads
Attached File  RealtekR1000SL_src_25.04.2013.zip   376.54KB   380 downloads

 

15.12.2013

I made some changes according to official Realtek driver 8.037, newest for now. I can't say I take it as a whole. No, my driver is cropped and may not work for some chips.

Anyway it tested for me in Mavericks.

Change log:

- adopted for new chips RTL8168GU/8111GU, 8411B, RTL8168EP/8111EP . But not tested

- autolink to 1000Mb/s

- some functions for WOL, not tested.

 

17.12.2013

More changes from linux sources implemented

Attached File  RealtekR1000SL_src_17.12.2013.zip   775.65KB   41 downloads

Attached File  RealtekR1000SL.kext-311b-Snow.zip   197.59KB   89 downloads

 

20.12.2013

Implemented WoL as Mieze did.

Attached File  RealtekR1000SL_src_20.12.2013.zip   668.06KB   64 downloads

Attached File  RealtekR1000SL.kext-312.zip   197.85KB   606 downloads

 

24.12.2013

More codes for 8105E but not complete

Attached File  RealtekR1000SL_src_22.12.2013.zip   2.69MB   554 downloads



#2
buoo

buoo

    The Prodigal Son

  • Moderators
  • 4,534 posts
  • Gender:Male
  • Location:Italy
Thank you, very appreciated :)

#3
Maniac10

Maniac10

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,061 posts
  • Gender:Not Telling
Thanks a lot Slice, will test it later.

#4
Badeendje

Badeendje

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 200 posts
This kext is way better than the older ones, no more lag or loose of signal during normal use.
Also sleep seems to work fine.
Thank you, this really completes my stable build using an otherwise already well supported GA-Z68X-UD3H board.

#5
Rampage Dev

Rampage Dev

    InsanelyMac Deity

  • Local Moderators
  • 1,975 posts
  • Gender:Male
Great work. Will have to fire up my testing rig and try it out.

#6
mitch_de

mitch_de

    InsanelyMacaholic

  • Local Moderators
  • 2,880 posts
  • Gender:Male
  • Location:Stuttgart / Germany
THANKS!

I use (since 9 months) the Lnx2Mac Realtek RTL81xx driver for my LAN (EP-35 Board) - worked fine (also has sleep / speed fixes) , but i always try some new things.

http://lnx2mac.blogs...osx-driver.html (v0.0.90) Lnx2Mac's Realtek RTL81xx Driver... Due to the shortcomings of the current Realtek 81xx Hackintosh drivers (such as lack of or limited support of 8111E, 32/64-bit, sleep issues), I endeavored to port the Linux RTL81xx driver to Mac OS X.)

Problem with rtl8168 ( Hersteller-ID: 0x10ec, Geräte-ID: 0x8168, Subsystem-Hersteller-ID: 0x1458, Subsystem-ID: 0xe000, Versions-ID: 0x0001)
Your kext get loaded : org.chucko.driver.RealtekR1000 (3.0.0d1) <37 10 5 4 3 1>
but no Ethernet available. OS X 10.8.3 dev D76, Gigabyte EP35

system.log (yours):
10.03.13 10:45:20,000 kernel[0]: RealtekR1000: init
10.03.13 10:45:20,000 kernel[0]: RealtekR1000: start
10.03.13 10:45:20,000 kernel[0]: RealtekR1000: R1000InitBoard @ PCI 0x4,00
10.03.13 10:45:20,000 kernel[0]: RTL8xxx@0xd000: Found chip reg=bb500700 // = val32 = ReadMMIO32(TxConfig);
10.03.13 10:45:20,000 kernel[0]: RTL8xxx@0xd000: Unknown device type, reg = 0xb8000000
// code section in voidRealtekR1000::R1000GetMacVersion(). mfg not set in case ...
bb500700 // u32 val32 = ReadMMIO32(TxConfig);
bb500700 & 0xFC800000 = 0xB8000000 // u32 reg = val32 & 0xFC800000; // was 0x7C800000
But there is no case for 0xB8000000 !
SOLUTION:
But if you would use // was 0x7C800000 vs 0xFC800000 for the & , then it would be in case as 0x38000000
0xbb500700 & 0x7C800000 = 0x38000000 (vs
bb500700 & 0xFC800000 = 0xB8000000 ), and case 0x3800000, or change value the case to B8000000, it would work - side effects fpor others unknown of course.

void RealtekR1000::R1000GetMacVersion()
{
u32 val32 = ReadMMIO32(TxConfig);
u32 reg = val32 & 0xFC800000; // was 0x7C800000
u32 ICVerID = val32 & 0x00700000;
DLog("Found chip reg=%08x\n", val32);
switch (reg)
{
.......
case 0x38000000:
if(ICVerID == 0x00000000) {
mcfg = MCFG_8168B_2;
} else if(ICVerID == 0x00500000) {
mcfg = MCFG_8168B_3;
} else {
mcfg = MCFG_8168B_3;
}
break;
....
default:
mcfg = -1;
break;
}

if (mcfg < 0)
{
DLog("Unknown device type, reg = %#08x\n", reg);
}
else
{
...
}

10.03.13 10:45:20,000 kernel[0]: RTL8xxx@0xd000: R1000InitBoard: **** Ethernet chip unrecognized ****
10.03.13 10:45:20,000 kernel[0]: RTL8xxx@0xd000: start: Failed, R1000ProbeAndStartBoard returned false
10.03.13 10:45:20,000 kernel[0]: RTL8xxx@0xd000: start: returning '0'


system.log with working (v0.0.90) Lnx2Mac's Realtek RTL81xx Driver:
10.03.13 02:06:28,000 kernel[0]: [RealtekRTL81xx:init] RealtekRTL81xx.kext v0.0.90 ©2010-2011 by Lnx2Mac (lnx2mac@gmail.com)
10.03.13 02:06:28,000 kernel[0]: [RealtekRTL81xx:init] _logLevel is now 132 (0x0084)
10.03.13 02:06:28,000 kernel[0]: [RealtekRTL81xx:init] Using updated PHY config method
10.03.13 02:06:28,000 kernel[0]: [RealtekRTL81xx:init] init completed
10.03.13 02:06:28,000 kernel[0]: [RTL81xx@0xd000:rtl8168_init_board] NIC identified as RTL8168B/8111B mcfg=2


#7
Slice

Slice

    InsanelyMacaholic

  • Local Moderators
  • 2,924 posts
  • Gender:Male
  • Location:Moscow
OK, thank you for the note. Will correct.
lnx2mac driver doesn't work for me, I don't remember exactly what is the problem, like my chip 8111F is not supported.

#8
Slice

Slice

    InsanelyMacaholic

  • Local Moderators
  • 2,924 posts
  • Gender:Male
  • Location:Moscow

But if you would use // was 0x7C800000 vs 0xFC800000 for the &amp; , then it would be in case as 0x38000000
0xbb500700 &amp; 0x7C800000 = 0x38000000 (vs bb500700 &amp; 0xFC800000 = 0xB8000000 ), and case 0x3800000, or change value the case to B8000000, it would work - side effects fpor others unknown of course.

The reason is an attempt to join with 8169
  case 0x98000000:
   mcfg = MCFG_8169SC_2;
   break;

I will add case 0xB8000000

#9
Warped

Warped

    InsanelyMac Protégé

  • Members
  • PipPip
  • 61 posts
Slice,

I start to love this driver as it is first RTL driver which offers me working WOL on my GA-P35-DS4 under ML 10.8.2!
I just started to play with it and currently I see there is problem with idle sleep.
With LNX2MAC driver sleep works perfectly - so it looks my system is OK.
Also - when system is woken via WOL, wakeup reason is undefined:


Mar 10 21:28:27 Piotr-Desktop kernel[0]: en0: disable
Mar 10 21:28:27 Piotr-Desktop kernel[0]: en0: setActivationLevel(0)
Mar 10 21:28:27 Piotr-Desktop kernel[0]: en0: setPowerState(0)
Mar 10 21:28:27 Piotr-Desktop kernel[0]: en0: R1000Suspend
Mar 10 21:28:27 Piotr-Desktop kernel[0]: Wake reason: ?
Mar 10 21:28:56 Piotr-Desktop kernel[0]: Previous Sleep Cause: 5
Mar 10 21:28:56 Piotr-Desktop kernel[0]: en0: setPowerState(1)
Mar 10 21:28:56 Piotr-Desktop kernel[0]: en0: R1000Resume
Mar 10 21:28:56 Piotr-Desktop kernel[0]: en0: R1000ResetTask
Mar 10 21:28:56 Piotr-Desktop kernel[0]: en0: enable
Mar 10 21:28:56 Piotr-Desktop kernel[0]: en0: setActivationLevel(2)
Mar 10 21:28:56 Piotr-Desktop kernel[0]: en0: Selected medium index 5
Mar 10 21:28:56 Piotr-Desktop kernel[0]: en0: selectMedium, index=5
Mar 10 21:28:56 Piotr-Desktop kernel[0]: en0: R1000SetMedium(0x3, 0x2, 0x2)
Mar 10 21:28:56 Piotr-Desktop.local configd[19]: network changed: v4(en0-:192.168.1.1) DNS- Proxy- SMB 

Maybe this explains why WOL wake system with monitor off for 15-20sec and next system returns to sleep.
Setting ttyspreventsleep not helps, but using caffeination -s allows to keep system ON.

Anyway - million thx for excellent work!

#10
Slice

Slice

    InsanelyMacaholic

  • Local Moderators
  • 2,924 posts
  • Gender:Male
  • Location:Moscow
More correct version 3.0.2 is in topic.

#11
verleihnix

verleihnix

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 164 posts
  • Gender:Male
Hi Slice,
Thanks for your efforts.
Tried to use your kext (3.0.1) for device 10ec:8136 in lenovo z560, but it won't work.


11.03.13 08:34:47,000 kernel[0]: RealtekR1000: init
11.03.13 08:34:47,000 kernel[0]: RealtekR1000: start
11.03.13 08:34:47,000 kernel[0]: RealtekR1000: R1000InitBoard @ PCI 0x7,00
11.03.13 08:34:47,000 kernel[0]: com_chucko_RealtekR1000: Ethernet address XX:XX:XX:XX:XX:XX
11.03.13 08:34:47,000 kernel[0]: RTL8xxx@0x2000: attaching as en0
11.03.13 08:34:47,000 kernel[0]: en0: start: returning '1'
11.03.13 08:34:47,000 kernel[0]: en0: enable
11.03.13 08:34:47,000 kernel[0]: en0: setActivationLevel(2)
11.03.13 08:34:47,000 kernel[0]: en0: Selected medium is NULL, forcing to autonegotiation
11.03.13 08:34:47,000 kernel[0]: en0: selectMedium, index=6
11.03.13 08:34:47,000 kernel[0]: en0: R1000SetMedium(0x2, 0x2, 0x1)
11.03.13 08:34:47,000 kernel[0]: en0: RTLN8101NicReset
11.03.13 08:34:47,000 kernel[0]: en0: RTL8100DSM
11.03.13 08:34:47,000 kernel[0]: en0: RTL8100DisableEEE called on an unsupported chip.

Is this device supported? ID was in plist.

Regards

#12
Warped

Warped

    InsanelyMac Protégé

  • Members
  • PipPip
  • 61 posts
Slice,
I don't know what things are improved in 3.0.2 but I decided give you just small update after going to 3.0.2:
-idle sleep is still not working
-WOL still gives "wake reason: ?" and turns-off PC after 15sec
-the same like previous version driver auto detects my GE network like 100Mb/s. Manual selection to 1GE works OK.

#13
tj5

tj5

    InsanelyMac Protégé

  • Donators
  • 9 posts
I've been testing this version on my MSI Z77MA-G45 mobo and so far it works flawlessly! Latency seems down, downloads about 10% faster - sleep/wake is problem free. LNX2MAC has issues on my mobo when waking sometimes the network is dead and the OS needs to be rebooted to get the network going again. Nice job, thanks!

#14
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,892 posts
  • Gender:Male
Hi, Slice! Congratulations for your work! :D

Will your driver also work for the RTL8105E (10/100), which i think is a variation of the 8139? Or, better yet, can you add support for it in your driver (which i can personally confirm it works for the 8111).

Best regards!

#15
gothic860

gothic860

    InsanelyMac Protégé

  • Members
  • PipPip
  • 84 posts
  • Gender:Male
  • Location:Germany, Bavaria
Works great on my GA-Z77N-Wifi thank you very much!

#16
Slice

Slice

    InsanelyMacaholic

  • Local Moderators
  • 2,924 posts
  • Gender:Male
  • Location:Moscow

Hi Slice,
Thanks for your efforts.
Tried to use your kext (3.0.1) for device 10ec:8136 in lenovo z560, but it won't work.


11.03.13 08:34:47,000 kernel[0]: RealtekR1000: init
11.03.13 08:34:47,000 kernel[0]: RealtekR1000: start
11.03.13 08:34:47,000 kernel[0]: RealtekR1000: R1000InitBoard @ PCI 0x7,00
11.03.13 08:34:47,000 kernel[0]: com_chucko_RealtekR1000: Ethernet address XX:XX:XX:XX:XX:XX
11.03.13 08:34:47,000 kernel[0]: RTL8xxx@0x2000: attaching as en0
11.03.13 08:34:47,000 kernel[0]: en0: start: returning '1'
11.03.13 08:34:47,000 kernel[0]: en0: enable
11.03.13 08:34:47,000 kernel[0]: en0: setActivationLevel(2)
11.03.13 08:34:47,000 kernel[0]: en0: Selected medium is NULL, forcing to autonegotiation
11.03.13 08:34:47,000 kernel[0]: en0: selectMedium, index=6
11.03.13 08:34:47,000 kernel[0]: en0: R1000SetMedium(0x2, 0x2, 0x1)
11.03.13 08:34:47,000 kernel[0]: en0: RTLN8101NicReset
11.03.13 08:34:47,000 kernel[0]: en0: RTL8100DSM
11.03.13 08:34:47,000 kernel[0]: en0: RTL8100DisableEEE called on an unsupported chip.

Is this device supported? ID was in plist.

Regards

Hi, Slice! Congratulations for your work! :D

Will your driver also work for the RTL8105E (10/100), which i think is a variation of the 8139? Or, better yet, can you add support for it in your driver (which i can personally confirm it works for the 8111).

Best regards!

Sorry guys, I made no new support for 8105/8136 series cards although it is possible.
Just some work needed. If someone do this....
The new sources include a folder with recent linux driver for those.
Attached File  RealtekR1000SL_12.03.2013-src-with8101.zip   368KB   81 downloads

#17
beta992

beta992

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 338 posts
  • Gender:Male
Thanks Slice!

Going to try with my P8H67-M Pro MB, seems that I have a Realtek 8111E. :)

I never had any problems with their driver (Realtek), but it is always nice to have a 'bug free' kext. :P

#18
Maniac10

Maniac10

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,061 posts
  • Gender:Not Telling
Slice, with the latest version it gets an ip even though the cable is not even connected. The one before that worked great. It's a RTL8111E.

3.0.2d1:
12/03/13 19:58:52,000 kernel[0]: en0: setActivationLevel(2)
12/03/13 19:58:52,000 kernel[0]: en0: Selected medium index 6
12/03/13 19:58:52,000 kernel[0]: en0: selectMedium, index=6
12/03/13 19:58:52,000 kernel[0]: en0: R1000SetMedium(0x2, 0x2, 0x1)
12/03/13 19:58:52,000 kernel[0]: en0: setLinkStatus but no PHYStatus


Older (2.0.0d1?):

12/03/13 20:00:55,000 kernel[0]: en0: setActivationLevel(2)
12/03/13 20:00:55,000 kernel[0]: en0: Selected medium is NULL, forcing to autonegotiation
12/03/13 20:00:55,000 kernel[0]: en0: selectMedium, index=6
12/03/13 20:00:55,000 kernel[0]: en0: R1000SetMedium(0x2, 0x2, 0x1)


#19
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,892 posts
  • Gender:Male
Thank you, Slice! I'm going to see what can i do!

Best regards!

EDIT: Slice, are you sure the new Linux drivers for the 8136/8105 are included with your sources? In Which folder are they? I only found 8101, 8102, 8103 and 8139: are these the drivers?

#20
Slice

Slice

    InsanelyMacaholic

  • Local Moderators
  • 2,924 posts
  • Gender:Male
  • Location:Moscow

Thank you, Slice! I'm going to see what can i do!

Best regards!

EDIT: Slice, are you sure the new Linux drivers for the 8136/8105 are included with your sources? In Which folder are they? I only found 8101, 8102, 8103 and 8139: are these the drivers?

As I see
static const struct {
const char *name;
u8 mcfg;
u32 RxConfigMask; /* Clears the bits supported by this chip */
} rtl_chip_info[] = {
_R("RTL8101E", CFG_METHOD_1, 0xff7e1880),
_R("RTL8101E", CFG_METHOD_2, 0xff7e1880),
_R("RTL8101E", CFG_METHOD_3, 0xff7e1880),
_R("RTL8102E", CFG_METHOD_4, 0xff7e1880),
_R("RTL8102E", CFG_METHOD_5, 0xff7e1880),
_R("RTL8103E", CFG_METHOD_6, 0xff7e1880),
_R("RTL8103E", CFG_METHOD_7, 0xff7e1880),
_R("RTL8103E", CFG_METHOD_8, 0xff7e1880),
_R("RTL8401E", CFG_METHOD_9, 0xff7e1880),
_R("RTL8105E", CFG_METHOD_10, 0xff7e1880),
_R("RTL8105E", CFG_METHOD_11, 0xff7e1880),
_R("RTL8105E", CFG_METHOD_12, 0xff7e1880),
_R("RTL8105E", CFG_METHOD_13, 0xff7e1880),
_R("RTL8402", CFG_METHOD_14, 0xff7e1880),
_R("RTL8106E", CFG_METHOD_15, 0xff7e1880),
_R("RTL8106E", CFG_METHOD_16, 0xff7e1880)
};







2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy