Contribute
Register

Nvidia GTX 1080 + LG Ultrafine 5K full 5K@60hz Success!

Joined
Nov 18, 2013
Messages
71
Motherboard
Asrock x299 Designer+
CPU
i9-7900x
Graphics
zotac gtx1080 TI
Mac
iMac, MacBook, MacBook Pro, Mac mini, Mac Pro
Finally I get the LG Ultrafine 5K full 5K@60hz Success.

I think I am the first one of this world make LG Ultrafine 5K full 5K@60hz Success with gtx1080.
LOL. :clap::lol::lol::lol::lol::lol::lol::headbang:

Hardware:

Mobo: MSI x99a Raider/Asrock x299 Designer+
AIC: Asrock Thunderbolt3 AIC.
Display: DELL UP2715K/DELL U2312HM , LG UltraFine 5K,
Grahpics: Zotac GTX1080 plus OC/Zotac GTX1080TI
CPU: I9-7900x 10 cores / Xeon E5-2696V4 22 cores
Connections:
1. 2DP-->Asrock Thunderbolt3 AIC--> 1 TB3 Cable->LG UltraFine 5K->at 5120x2880 @60hz
2. 1DP -->DELL UP2715K --> at 3840 x 2160@60hz

System:
MacOs High Sierra 10.13.2 (17C88)
Nvidia Web driver : 378.10.10.10.25.102

Patched:

1. My own NvidiaGraphicsFixup at: https://github.com/aerror2/NGFixLG5K
2. My own CoreDisplayFix at: https://github.com/aerror2/CoreDisplayFixLG5K
3. boot arg of clover. nv_createDetailedTimingsFromEdid=1,-ngfxnoaudio,-ngfxnoaudiocon

PS: nv_spanmodepolicy is useless , no matter set/not set, it just works.
Code:
------------------------------------- AGDC REPORT -------------------------------------


AGDCDiagnose Version: 3.16.21

## ScanPort - Start ##


[1] IOService:/IOResources/AppleGPUWrangler

Vendor: Apple [0000106b]: AppleGPUWrangler [8 10000] (0)


[2] IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/BR3C@3,2/IOPP/H000@0/NVDC

Vendor: NVIDIA [000010de]: DiscreteGPU [2 10002] (0)

FBs: 6

Ports: 0xff00 mst:0x5400 ddc:0xab00 aux:0x5400

Streams: dp:3 dvi:4 mst:3 max:4

FB: 00 : Group:  -1 Address[ 0.0], Flags:[offline MayGroup ], Stream:N/A

FB: 01 : Group:   5 Address[14.0], Flags:[online associated grouped], Stream:Enabled

FB: 02 : Group:   5 Address[ 0.0], Flags:[offline ], Stream:N/A

FB: 03 : Group:  -1 Address[ 0.0], Flags:[offline MayGroup ], Stream:N/A

FB: 04 : Group:  -1 Address[10.0], Flags:[online MayGroup ], Stream:N/A

FB: 05 : Group:  -1 Address[ 0.0], Flags:[offline MayGroup ], Stream:N/A

Port: 08 : empty

Port: 09 : empty

Port: 10 : [DP, 1.2, 4 x HBR2] set [4 x HBR2 : status: 7777]  Sink OUI:0-0-0  [0-0-0-0-0-0] HW Version: 0 FW Version:0.0

Port: 11 : empty

Port: 12 : [DP, 1.2, 4 x HBR2] set [4 x HBR2 : status: 7777]  Sink OUI:204-45-140 27MD5K [50-55-77-68-53-75] HW Version: 20 FW Version:3.4

Port: 13 : empty

Port: 14 : [DP, 1.2, 4 x HBR2] set [4 x HBR2 : status: 7777]  Sink OUI:204-45-140 27MD5K [50-55-77-68-53-75] HW Version: 20 FW Version:3.4

Port: 15 : empty
Screen shot attached.

Welcome test them and Feed back if you have the gtx1080 with LG UltraFine 5K.
 

Attachments

Last edited:
Joined
Nov 18, 2013
Messages
71
Motherboard
Asrock x299 Designer+
CPU
i9-7900x
Graphics
zotac gtx1080 TI
Mac
iMac, MacBook, MacBook Pro, Mac mini, Mac Pro
History:

I make two patches:
1. NVDA::validateDetailedTiming, only return success when resolution is 3840x2160. It make LG ultrafine 5K can be light up with one cable. (Without this patch LG ultrafine 5K just stay black always, no matter how I try). But it works flawly, In most of time screen show up for few seconds, then turn black again...
2. setStartupDisplayMode just sleep for 10 seconds, It get more stable, will not turn black so much, I got 80% to light up the screen without problem with one cable(3840x2160). I make it sleep for 10 seconds, because I noticed that the screen turn black after 4-5 seconds. But it seems unreasonable, and very ugly patch, very very ugly, it cause the system boot up very slowly , takes a few minutes, and any display settings changing operation is very very slow. Anyone can give me tips on how to patch it more nicely?

With above two patches, I still get black screen when I plug two cables( I let the 5120x2880 past in validateDetailedTiming).
So, any tips ? Help Please.

Patch codes attached
Patch 1:
Code:
IOReturn NGFX::nvda_validateDetailedTiming_patch(IONDRVFramebuffer *that, void* _desc, IOByteCount descripSize)
{
    if(callbackNGFX && callbackNGFX->org_nda_validateDetailedTiming)
    {
      
        //kIOReturnSuccess
        if (descripSize == sizeof(IOFBDisplayModeDescription))
        {
            IOFBDisplayModeDescription * fbdesc = (IOFBDisplayModeDescription *) _desc;
          
        
            DBGLOG("ngfx", "validateDetailedTiming %llx info %u x %u  @ %u.%u hz, maxDepthIndex: %u",(void*)that,
                   fbdesc->info.nominalWidth,
                   fbdesc->info.nominalHeight,
                   (fbdesc->info.refreshRate>>16)&0xffff,
                   fbdesc->info.refreshRate&0xffff,
                   fbdesc->info.maxDepthIndex
                  
                   );
          
            if(
               isValidTime(fbdesc->timingInfo)
               )
            {
                logTimingInfoV2(that, "validateDetailedTiming isValidTiming", fbdesc->timingInfo.detailedInfo.v2);
            }
            else
            {
                logTimingInfoV2(that, "validateDetailedTiming notvalidTiming", fbdesc->timingInfo.detailedInfo.v2);
                return kIOReturnUnsupported;
            }
          
          
        }
        else if(sizeof(IODetailedTimingInformationV2)==descripSize)
        {
            IODetailedTimingInformationV2 *pifov2 =(IODetailedTimingInformationV2 *) _desc;
          
            if(
               isValidTimev2(*pifov2)
               )
            {
                logTimingInfoV2(that, "validateDetailedTiming V2 isValidTiming", *pifov2);
            }
            else
            {
                logTimingInfoV2(that, "validateDetailedTiming V2 notvalidTiming",  *pifov2);
                return kIOReturnUnsupported;
            }
          
        }
        else
        {
            DBGLOG("ngfx", "validateDetailedTiming %llx called size %llu unknown  ", (void*)that, descripSize);

        }
      
      
      
        IOReturn ret=  callbackNGFX->org_nda_validateDetailedTiming(that,_desc, descripSize);
        DBGLOG("ngfx", "validateDetailedTiming  %llx  org_nda_validateDetailedTiming return %x", (void*)that, ret);
        return ret;
      
      
    }
  
    DBGLOG("ngfx", "validateDetailedTimin not install ");
  
    return kIOReturnUnsupported;
}

bool isValidTimev2(IODetailedTimingInformationV2        &v2)

{
    if (
        (v2.horizontalActive == 1920  && v2.verticalActive == 1080)
        ||
        (v2.horizontalActive == 3840  && v2.verticalActive == 2160)
     ||
        (v2.horizontalActive == 1080  && v2.verticalActive == 1920)

        )
    {
        return true;
    }
  
    return false;
}
bool isValidTime(IOTimingInformation         &timingInfo)
{
    if (
        isValidTimev2(timingInfo.detailedInfo.v2)
        )
    {
        return true;
    }
  
    return false;
}


Patch 2:
Code:
IOReturn NGFX::setStartupDisplayMode (IONDRVFramebuffer *that, IODisplayModeID displayMode, IOIndex depth )
{
    if (callbackNGFX && callbackNGFX->org_setStartupDisplayMode)
    {

        DBGLOG("ngfx", "setStartupDisplayMode %llx displayMode %u depth %u called",that,  displayMode, depth);

       IOSleep(10000); // 80% lightup
        //do not call the orinal setStartupDisplayMode, just return kIOReturnSuccess
        //
        return kIOReturnSuccess;
     }

      return kIOReturnSuccess;
}

I have found a perfect solution. there is a few kConnectionHandleDisplayPortEvent attribute settings for this display, such as , kIODPEventStart, kIODPEventIdle and kIODPEventContentProtection. Althought I still not know it trigger by who, But I can get screen not black any more by skipping the kIODPEventIdle. It works fine and fastly. Patch 2 is no longer needed.

Patch3:
Code:
IOReturn NGFX::NVDA_setAttributeForConnection(IONDRVFramebuffer *that , IOIndex connectIndex,
                                               IOSelect attribute, uintptr_t value )
{
  switch(attribute)
        {
            case kConnectionHandleDisplayPortEvent:
            {
              
                if(kIODPEventIdle==evt)
                {
                     return kIOReturnSuccess;
                }

            }
            break;
     }

 }
      
        IOReturn ret = callbackNGFX->org_NVDA_setAttributeForConnection(that, connectIndex,attribute,value);
        DBGLOG("ngfx", "NVDA_setAttributeForConnection %s:%s ret %x ",that->getName(),  that->getProvider()!=NULL?that->getProvider()->getName():"nopriver",ret);
        return ret;
 
}




A lot of people buy a LG 5K Display with GTX1080(TI)/1070. But the web driver for MacOs can not driver the Display up. People had to give up the GTX Card, and turn to the AMD's Vega and RX580. It is really bad for the faithful Nvidia user. We were proud of the Nvidia driver that is stable and mighty. Do something please, or give us some advise what we can do the make the webdriver work with LG 5K. the LG ultrafine EDID attached:

EDID report generated by SwitchResX Version 4.6.6 (x64) for display LG UltraFine


-----------------------------------------------------
------------------- RAW DATA ------------------------
-----------------------------------------------------
0 1 2 3 4 5 6 7 8 9 A B C D E F
-----------------------------------------------------
0 | 00 FF FF FF FF FF FF 00 1E 6D 11 5B 53 45 00 00
1 | 09 1B 01 04 B5 3C 22 78 80 0F 91 AE 52 43 B0 26
2 | 0F 50 54 20 00 00 01 01 01 01 01 01 01 01 01 01
3 | 01 01 01 01 01 01 25 CC 00 50 F0 70 3E 80 08 20
4 | 18 00 58 54 21 00 00 1A A3 5B 00 50 A0 A0 29 50
5 | 08 20 18 00 58 54 21 00 00 1A 00 00 00 FF 00 37
6 | 30 39 4E 54 4D 58 30 48 37 34 37 0A 00 00 00 FC
7 | 00 4C 47 20 55 6C 74 72 61 46 69 6E 65 0A 02 A4

-----------------------------------------------------
0 1 2 3 4 5 6 7 8 9 A B C D E F
-----------------------------------------------------
0 | 70 12 79 03 00 01 00 0C 3E 17 16 0D 00 14 40 0B
1 | 50 78 4E 99 29 00 10 B0 4B CE D5 4A E0 49 D7 AC
2 | 4C E4 51 03 80 BD 60 03 00 28 F5 E7 00 04 FF 0F
3 | 4F 00 07 80 1F 00 FF 08 41 00 00 00 07 00 5E 8E
4 | 00 04 7F 0C 4F 00 07 80 1F 00 07 07 33 00 00 00
5 | 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
6 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
7 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 DC 90

-----------------------------------------------------
0 1 2 3 4 5 6 7 8 9 A B C D E F
-----------------------------------------------------
0 | 70 12 79 03 00 12 00 16 82 10 00 00 FF 09 3F 0B
1 | 00 00 00 00 00 47 53 4D 11 5B 01 01 01 01 03 00
2 | 14 45 B7 00 08 FF 09 4F 00 07 80 1F 00 3F 0B 51
3 | 00 00 00 07 00 00 00 00 00 00 00 00 00 00 00 00
4 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
5 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
6 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
7 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 90

-----------------------------------------------------
< 00FFFFFF FFFFFF00 1E6D115B 53450000 091B0104 B53C2278 800F91AE 5243B026 0F505420 00000101 01010101 01010101 01010101 010125CC 0050F070 3E800820 18005854 2100001A A35B0050 A0A02950 08201800 58542100 001A0000 00FF0037 30394E54 4D583048 3734370A 000000FC 004C4720 556C7472 6146696E 650A02A4 70127903 0001000C 3E17160D 0014400B 50784E99 290010B0 4BCED54A E049D7AC 4CE45103 80BD6003 0028F5E7 0004FF0F 4F000780 1F00FF08 41000000 07005E8E 00047F0C 4F000780 1F000707 33000000 07000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0000DC90 70127903 00120016 82100000 FF093F0B 00000000 0047534D 115B0101 01010300 1445B700 08FF094F 0007801F 003F0B51 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00005590 >

-----------------------------------------------------
{ 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x1E, 0x6D, 0x11, 0x5B, 0x53, 0x45, 0x00, 0x00, 0x09, 0x1B, 0x01, 0x04, 0xB5, 0x3C, 0x22, 0x78, 0x80, 0x0F, 0x91, 0xAE, 0x52, 0x43, 0xB0, 0x26, 0x0F, 0x50, 0x54, 0x20, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x25, 0xCC, 0x00, 0x50, 0xF0, 0x70, 0x3E, 0x80, 0x08, 0x20, 0x18, 0x00, 0x58, 0x54, 0x21, 0x00, 0x00, 0x1A, 0xA3, 0x5B, 0x00, 0x50, 0xA0, 0xA0, 0x29, 0x50, 0x08, 0x20, 0x18, 0x00, 0x58, 0x54, 0x21, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x37, 0x30, 0x39, 0x4E, 0x54, 0x4D, 0x58, 0x30, 0x48, 0x37, 0x34, 0x37, 0x0A, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x4C, 0x47, 0x20, 0x55, 0x6C, 0x74, 0x72, 0x61, 0x46, 0x69, 0x6E, 0x65, 0x0A, 0x02, 0xA4, 0x70, 0x12, 0x79, 0x03, 0x00, 0x01, 0x00, 0x0C, 0x3E, 0x17, 0x16, 0x0D, 0x00, 0x14, 0x40, 0x0B, 0x50, 0x78, 0x4E, 0x99, 0x29, 0x00, 0x10, 0xB0, 0x4B, 0xCE, 0xD5, 0x4A, 0xE0, 0x49, 0xD7, 0xAC, 0x4C, 0xE4, 0x51, 0x03, 0x80, 0xBD, 0x60, 0x03, 0x00, 0x28, 0xF5, 0xE7, 0x00, 0x04, 0xFF, 0x0F, 0x4F, 0x00, 0x07, 0x80, 0x1F, 0x00, 0xFF, 0x08, 0x41, 0x00, 0x00, 0x00, 0x07, 0x00, 0x5E, 0x8E, 0x00, 0x04, 0x7F, 0x0C, 0x4F, 0x00, 0x07, 0x80, 0x1F, 0x00, 0x07, 0x07, 0x33, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x90, 0x70, 0x12, 0x79, 0x03, 0x00, 0x12, 0x00, 0x16, 0x82, 0x10, 0x00, 0x00, 0xFF, 0x09, 0x3F, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x53, 0x4D, 0x11, 0x5B, 0x01, 0x01, 0x01, 0x01, 0x03, 0x00, 0x14, 0x45, 0xB7, 0x00, 0x08, 0xFF, 0x09, 0x4F, 0x00, 0x07, 0x80, 0x1F, 0x00, 0x3F, 0x0B, 0x51, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x90 }

-----------------------------------------------------
Valid EDID block #0: checksum ok
Valid EDID block #1: checksum ok
Valid EDID block #2: checksum ok

-----------------------------------------------------
------------------- MAIN EDID BLOCK -----------------
-----------------------------------------------------

EDID Version........1.4
Manufacturer........GSM (1E6D)
Product ID..........23313 (5B11)
Serial Number.......00004553

Manufactured........Week 9 of year 2017
Max H Size..........60 cm
Max V Size..........34 cm
Gamma...............2.20

Display Supported Features:
---------------------------
Power Management: Standby


Display type:
-------------
RGB 4:4:4 Color Encoding Format
Display is non continuous frequency
Default color space is not sRGB standard


Input signal & sync:
--------------------
Digital Input
10 Bits per Primary Color
DisplayPort interface


Color info:
-----------
Red x = 0.680 Green x = 0.265 Blue x = 0.150 White x = 0.312
Red y = 0.320 Green y = 0.690 Blue y = 0.060 White y = 0.329

Established Timings:
--------------------
640 x 480 @ 60Hz

Manufacturer Reserved Timings:
------------------------------

Standard Timing Identification:
-------------------------------

Monitor Description blocks:
---------------------------
Descriptor #0 - Timing definition:
Mode = 3840 x 2160 @ 59.999Hz
Pixel Clock............. 522.61 MHz Non-Interlaced

Horizontal Vertical
Active.................. 3840 pixels 2160 lines
Front Porch............. 8 pixels 1 lines
Sync Width.............. 32 pixels 8 lines
Back Porch.............. 40 pixels 53 lines
Blanking................ 80 pixels 62 lines
Total................... 3920 pixels 2222 lines
Scan Rate............... 133.319 kHz 59.999 Hz

Image Size.............. 600 mm 340 mm
Border.................. 0 pixels 0 lines

Sync: Digital separate with
* Negative vertical polarity
* Positive horizontal polarity

Descriptor #1 - Timing definition:
Mode = 2560 x 1440 @ 60.000Hz
Pixel Clock............. 234.59 MHz Non-Interlaced

Horizontal Vertical
Active.................. 2560 pixels 1440 lines
Front Porch............. 8 pixels 1 lines
Sync Width.............. 32 pixels 8 lines
Back Porch.............. 40 pixels 32 lines
Blanking................ 80 pixels 41 lines
Total................... 2640 pixels 1481 lines
Scan Rate............... 88.860 kHz 60.000 Hz

Image Size.............. 600 mm 340 mm
Border.................. 0 pixels 0 lines

Sync: Digital separate with
* Negative vertical polarity
* Positive horizontal polarity

Descriptor #2 - Serial number:
709NTMX0H747

Descriptor #3 - Monitor name:
LG UltraFine


-----------------------------------------------------
------------ EXTENSION EDID BLOCK 1 ---------------
-----------------------------------------------------

DID-EXT: Display ID Extension:
------------------------------
(only partly interpreted)
DisplayID version........1.2



DisplayID Block Type = Detailed Timing Block type 1:
Detailed Timing #1 in Block
Mode = 4096 x 2304 @ 59.999Hz
Pixel Clock............. 593.82 MHz Non-Interlaced

Horizontal Vertical
Active.................. 4096 pixels 2304 lines
Front Porch............. 8 pixels 1 lines
Sync Width.............. 32 pixels 8 lines
Back Porch.............. 40 pixels 57 lines
Blanking................ 80 pixels 66 lines
Total................... 4176 pixels 2370 lines
Scan Rate............... 142.198 kHz 59.999 Hz

Is non-default Mode
Sync: Digital separate with
* Negative vertical polarity
* Positive horizontal polarity

Detailed Timing #2 in Block
Mode = 3200 x 1800 @ 59.999Hz
Pixel Clock............. 364.47 MHz Non-Interlaced

Horizontal Vertical
Active.................. 3200 pixels 1800 lines
Front Porch............. 8 pixels 1 lines
Sync Width.............. 32 pixels 8 lines
Back Porch.............. 40 pixels 43 lines
Blanking................ 80 pixels 52 lines
Total................... 3280 pixels 1852 lines
Scan Rate............... 111.119 kHz 59.999 Hz

Is non-default Mode
Sync: Digital separate with
* Negative vertical polarity
* Positive horizontal polarity















-----------------------------------------------------
------------ EXTENSION EDID BLOCK 2 ---------------
-----------------------------------------------------

DID-EXT: Display ID Extension:
------------------------------
(only partly interpreted)
DisplayID version........1.2


DisplayID Block Type = Detailed Timing Block type 1:
Detailed Timing #1 in Block
Mode = 2560 x 2880 @ 60.000Hz
Pixel Clock............. 469.18 MHz Non-Interlaced

Horizontal Vertical
Active.................. 2560 pixels 2880 lines
Front Porch............. 8 pixels 1 lines
Sync Width.............. 32 pixels 8 lines
Back Porch.............. 40 pixels 73 lines
Blanking................ 80 pixels 82 lines
Total................... 2640 pixels 2962 lines
Scan Rate............... 177.720 kHz 60.000 Hz

Is non-default Mode
Sync: Digital separate with
* Negative vertical polarity
* Positive horizontal polarity
 
Last edited by a moderator:
Joined
Nov 18, 2013
Messages
71
Motherboard
Asrock x299 Designer+
CPU
i9-7900x
Graphics
zotac gtx1080 TI
Mac
iMac, MacBook, MacBook Pro, Mac mini, Mac Pro
Tow cables works but It can not show up after sleep. I tried to figure out why and failed. The log is strange:

Code:
// wake it up
//
2017-12-19 01:01:35.825406  NVDA_setAttribute NVDA:NVDA,Display-B kIOPowerStateAttribute value: 2 begin  

 // a attribut the dirver do not support , also I can not found any docs about it, don't know what it is.
 //
2017-12-19 01:01:36.041344  NVDA_getAttributeForConnection NVDA:NVDA,Display-B  attribute:aupr(61757072)  begin  
2017-12-19 01:01:36.041353  NVDA_getAttributeForConnection NVDA:NVDA,Display-B index:0 attribute:aupr(61757072) value:0 ret:e00002c7

//wake is done, I believe I saw that the screen was on.
//
2017-12-19 01:01:36.121003  NVDA_setAttribute NVDA:NVDA,Display-B  kIOPowerStateAttribute ret 0  


 //don't know what it is, no codes changed the state, it is wierd also.
 //
2017-12-19 01:01:36.121050  IOFramebuffer_checkPowerWork NVDA:NVDA,Display-B ret 4 option:|kIOFBPaging  
2017-12-19 01:01:36.121232  IOFramebuffer_checkPowerWork NVDA:NVDA,Display-B option:none begin
2017-12-19 01:01:36.121237  IOFramebuffer_checkPowerWork NVDA:NVDA,Display-B ret 4 option:|kIOFBPaging
2017-12-19 01:01:36.121473  IOFramebuffer_checkPowerWork NVDA:NVDA,Display-B option:none begin
2017-12-19 01:01:36.121477  IOFramebuffer_checkPowerWork NVDA:NVDA,Display-B ret 4 option:|kIOFBPaging
2017-12-19 01:01:36.128901  IOFramebuffer_checkPowerWork NVDA:NVDA,Display-B option:none begin
2017-12-19 01:01:36.128923  IOFramebuffer_checkPowerWork NVDA:NVDA,Display-B ret 4 option:|kIOFBPaging
2017-12-19 01:01:36.130467  IOFramebuffer_checkPowerWork NVDA:NVDA,Display-B option:none begin
2017-12-19 01:01:36.130472  IOFramebuffer_checkPowerWork NVDA:NVDA,Display-B ret 4 option:|kIOFBPaging
2017-12-19 01:01:36.144367  IOFramebuffer_checkPowerWork NVDA:NVDA,Display-B option:none begin
2017-12-19 01:01:36.144371  IOFramebuffer_checkPowerWork NVDA:NVDA,Display-B ret 4 option:|kIOFBPaging
2017-12-19 01:01:36.157897  IOFramebuffer_checkPowerWork NVDA:NVDA,Display-B option:none begin
2017-12-19 01:01:36.157901  IOFramebuffer_checkPowerWork NVDA:NVDA,Display-B ret 4 option:|kIOFBPaging

//from source codes, it it mean,  IOGraphics: Implement display state attribute for deteriming display state post wake
//
2017-12-19 01:01:36.158834  NVDA_getAttribute NVDA:NVDA,Display-B kIOFBDisplayState begin            
2017-12-19 01:01:36.158839  NVDA_getAttributeForConnection NVDA:NVDA,Display-B  attribute:kConnectionCheckEnable  begin

//At this monet I added  codes to check if the display is online, 
// it waw online , because  attribute:kConnectionCheckEnable value:1 , 
// and I also saw the screen is on. 
//
2017-12-19 01:01:36.158850  NVDA_getAttributeForConnection NVDA:NVDA,Display-B index:0 attribute:kConnectionCheckEnable value:1 ret:0    
2017-12-19 01:01:36.158855  NVDA_getAttribute NVDA:NVDA,Display-B kIOFBDisplayState   value 0 online 1
2017-12-19 01:01:36.158860  NVDA_setAttributeForConnection NVDA:NVDA,Display-B index:0 attribute:kConnectionHandleDisplayPortEven
2017-12-19 01:01:36.158867  NVDA_setAttributeForConnection NVDA:NVDA,Display-B index:0 attribute:kConnectionHandleDisplayPortEven

//But The webdriver seems not support .....
//
2017-12-19 01:01:36.158872  NVDA_getAttribute NVDA:NVDA,Display-B kIOFBDisplayState ret e00002c7 value 0  



2017-12-19 01:01:36.163028  IOFramebuffer_checkPowerWork NVDA:NVDA,Display-B option:none begin      
2017-12-19 01:01:36.163032  IOFramebuffer_checkPowerWork NVDA:NVDA,Display-B ret 4 option:|kIOFBPaging
2017-12-19 01:01:36.163133  NVDA_getAttributeForConnection NVDA:NVDA,Display-B  attribute:kConnectionPostWake  begin
2017-12-19 01:01:36.163138  NVDA_getAttributeForConnection NVDA:NVDA,Display-B index:0 attribute:kConnectionPostWake value:0 ret:0
2017-12-19 01:01:36.163143  NVDA_getAttributeForConnection NVDA:NVDA,Display-B  attribute:kConnectionChanged  begin
2017-12-19 01:01:36.163148  NVDA_getAttributeForConnection NVDA:NVDA,Display-B index:0 attribute:kConnectionChanged value:0 ret:0
 //again....
2017-12-19 01:01:36.165295  NVDA_getAttribute NVDA:NVDA,Display-B kIOFBDisplayState begin      
//not support again.... but so far so good.            
2017-12-19 01:01:36.165302  NVDA_getAttribute NVDA:NVDA,Display-B kIOFBDisplayState ret e00002c7 value 0    

2017-12-19 01:01:37.467163  IOFramebuffer_checkPowerWork NVDA:NVDA,Display-B option:none begin                
2017-12-19 01:01:37.467168  IOFramebuffer_checkPowerWork NVDA:NVDA,Display-B ret 4 option:|kIOFBPaging
2017-12-19 01:01:37.467380  IOFramebuffer_checkPowerWork NVDA:NVDA,Display-B option:none begin
2017-12-19 01:01:37.467385  IOFramebuffer_checkPowerWork NVDA:NVDA,Display-B ret 4 option:|kIOFBPaging

 // I believe it is called from the NVDA , but have not found where it came from
2017-12-19 01:01:39.951718  NVDA_getAttribute NVDA:NVDA,Display-B kIOMirrorAttribute begin                  
2017-12-19 01:01:39.951723  NVDA_getAttribute NVDA:NVDA,Display-B kIOMirrorAttribute ret 0 value 3221225631

//!!!!!!!!!!screen is go black ... I don't what bad thing the NVDA do ..., 
//compare with the normal waking-up's log, it is the time to call the interrupt of IOFramebuffer::dpProcessInterrupt
//
2017-12-19 01:01:39.984698  NVDA_getAttributeForConnection NVDA:NVDA,Display-B  attribute:kConnectionChanged  begin.    
2017-12-19 01:01:39.984703  IONDRVFramebuffer_processConnectChange NVDA:NVDA,Display-B begin
2017-12-19 01:01:39.984707  NVDA_getAttributeForConnection NVDA:NVDA,Display-B  attribute:kConnectionCheckEnable  begin

//!!!!!!!!!!The screen was black, check   by IONDRVFramebuffer::processConnectChange
//
2017-12-19 01:01:40.087860  NVDA_getAttributeForConnection NVDA:NVDA,Display-B index:0 attribute:kConnectionCheckEnable value:0 ret:0. 
2017-12-19 01:01:40.087902  IONDRVFramebuffer_processConnectChange NVDA:NVDA,Display-B ret 0
2017-12-19 01:01:40.087907  NVDA_getAttributeForConnection NVDA:NVDA,Display-B index:0 attribute:kConnectionChanged value:9923109261359972537 ret:0
2017-12-19 01:01:40.087912  NVDA_getAttributeForConnection NVDA:NVDA,Display-B  attribute:kConnectionCheckEnable  begin
2017-12-19 01:01:40.087918  NVDA_getAttributeForConnection NVDA:NVDA,Display-B index:0 attribute:kConnectionCheckEnable value:0 ret:0


2017-12-19 01:01:40.087926  NVDA_setAttribute NVDA:NVDA,Display-B kIOFBLimitHDCPAttribute value 4 begin
2017-12-19 01:01:40.087930  NVDA_setAttribute NVDA:NVDA,Display-B  kIOFBLimitHDCPAttribute ret e00002c7
I have tried to manually call the IOFramebuffer::dpProcessInterrupt at the moment of "NVDA_getAttribute NVDA:NVDA,Display-B kIOFBDisplayState" after "NVDA_setAttribute NVDA:NVDA,Display-B kIOPowerStateAttribute value: 2" , it didn't work out. I make thing worse, whole system stuck. :(

Hereby, I had tried the old trick. IOSleep 10 seconds, It did work again ... OMG.. A really ugly ugly ugly patch....
Code:
 case kIOFBDisplayState:
                if(that->getProvider()!=NULL && value!=NULL)
                {
                    int val  = getDisplayOnline(that->getProvider()->getName());

                    if(val==2)
                    {

                        uintptr_t konline = 0;
                        that->getAttributeForConnection(0, kConnectionCheckEnable, &konline);
                       
                        if(konline!=0)
                        {
                            IOSleep(10000);
                            *value = kIOFBDisplayState_AlreadyActive;
                           return kIOReturnSuccess;
                        }
                       
                   
                    }
             }
NVDA driver did something to shutdown the screen between 2017-12-19 01:01:37.467385 to 2017-12-19 01:01:39.951718.

What did NVDA driver do?

Any tips for me please?
 
Joined
Feb 9, 2012
Messages
319
Motherboard
Razer Blade Stealth
CPU
i7-8565U
Graphics
UHD 620, 1920 x 1080
Mac
iMac, MacBook Pro
Mobile Phone
iOS
Wow. I just saw ur post. Amazing-

So if you do not use sleep/wake, it is perfect? Or somthing still needed to fix? My vega 64 has even some problem with the monitor. When i use the monitor as my primary system, sometimes it goes black right after boot but my scond monitor which is connectd a dp cable is fine. After 3-5min or if i touch switchresx to refresh the monitor, it is on. When it is on, everything is fine even restart or reboot. But power off for like long time, the monitor will hav the same problem. But ok with it at least work well now.

I have titan xp card too. I will test ur kext tonight.

Thanks!!
 
Joined
Nov 18, 2013
Messages
71
Motherboard
Asrock x299 Designer+
CPU
i9-7900x
Graphics
zotac gtx1080 TI
Mac
iMac, MacBook, MacBook Pro, Mac mini, Mac Pro
Wow. I just saw ur post. Amazing-

So if you do not use sleep/wake, it is perfect? Or somthing still needed to fix? My vega 64 has even some problem with the monitor. When i use the monitor as my primary system, sometimes it goes black right after boot but my scond monitor which is connectd a dp cable is fine. After 3-5min or if i touch switchresx to refresh the monitor, it is on. When it is on, everything is fine even restart or reboot. But power off for like long time, the monitor will hav the same problem. But ok with it at least work well now.

I have titan xp card too. I will test ur kext tonight.

Thanks!!
the sleep / awake works with IOSleep 10 seconds, But it is very slow when you waking it up until the screen really responsible. you can tried this one for wake/sleep. I have 4 little problem:

1. Sometimes it is shown in the Display list, but It is black screen. I sleep the system and wake up, LG's Screen turn on . still buggy, I think.

2. In most of time, I can boot into system gracefully , but sometimes, I need to boot into windows once, then restart, it works again.

3. sometimes even you boot into windows, it still black, you need to unplug and plug the TB3 cable to make it turn on . I think it's a hardware problem of this Display.

4. Waking it up is very slow , I am working on it now.
 

Attachments

Joined
Feb 9, 2012
Messages
319
Motherboard
Razer Blade Stealth
CPU
i7-8565U
Graphics
UHD 620, 1920 x 1080
Mac
iMac, MacBook Pro
Mobile Phone
iOS
So can you show me the way to apply this method?

I took out vega. Re insatlled titan and webdriver with your attached nvidiafix kext. It working with other monitor but black screen with 5k monitor.
 
Joined
Nov 18, 2013
Messages
71
Motherboard
Asrock x299 Designer+
CPU
i9-7900x
Graphics
zotac gtx1080 TI
Mac
iMac, MacBook, MacBook Pro, Mac mini, Mac Pro
So can you show me the way to apply this method?

I took out vega. Re insatlled titan and webdriver with your attached nvidiafix kext. It working with other monitor but black screen with 5k monitor.

hmm.

1. Sometimes it is shown in the Display list, but It is black screen. I sleep the system and wake up, LG's Screen turn on . still buggy, I think.

2. In most of time, I can boot into system gracefully , but sometimes, I need to boot into windows once, then restart, it works again.

3. sometimes even you boot into windows, it still black, you need to unplug and plug the TB3 cable to make it turn on . I think it's a hardware problem of this Display.

4. Waking it up is very slow , I am working on it now.


try 1-4, It is more stable with gtx1080 than gtx1080ti,
I try to enable the CSM , it seems more stable , but I am not sure.

my hardware:

Mobo:
Asrock x299 Designer+
CPU:
i9-7900x
Graphics:
zotac gtx1080 TI


my boot Argument is :
Code:
-v slide=0 dart=0 npci=0x2000 kext-dev-mode=1 keepsyms=1 -ngfxnoaudio -ngfxnoaudiocon ngfxpatch=pikera -liludbgall nv_createDetailedTimingsFromEdid=1
I am using the MacOs 10.13.2.

nothing special.


you can make sure the connections of two dp is good if you have a windows system, boot into the windows to make sure connection is good with full 5k resolution firstly.


I compile a new kext add more log. Attached.

you'd better have two monitor to start the MacOS, you can take some log if you boot with Blackscreen LG. using the command line:
Code:
log show | grep ngfx > blackscreen.log
you will need the -liludbgall in the boot argument if you want to get the debug log. also you need debug version of Lilu.kext( attached also).

you'd better using command line to erase all the log before you try to get the screen boot log, otherwise, the log will be very huge and take very log time to finish the log show command.


Try to get me some log about it, and I will see what I can help.
 

Attachments

Joined
Jun 10, 2015
Messages
38
Motherboard
Z87Pro
CPU
i7 4770k
Graphics
nvidia gtx 770
Mac
Classic Mac
Mobile Phone
:clap:
looking forward to try this in a few weeks, when i’ll have my new hw
 
Joined
May 16, 2010
Messages
66
Motherboard
Gigabyte GA-Z270X-UD5
CPU
Intel Core i7 8700K
Graphics
Radeon RX Vega Frontier Edition
Mac
Mac Pro
Mobile Phone
iOS
Thank you for taking the time to share all this information with us. I’m currently running the Vega FE card with my LG 5k but I would love to be able to switch back to using titan xp, as far as I know your the only one who has managed to pull off this hat trick and make Nvidia + LG 5k work! Will attempt this soon.
 
Joined
Jun 10, 2015
Messages
38
Motherboard
Z87Pro
CPU
i7 4770k
Graphics
nvidia gtx 770
Mac
Classic Mac
Mobile Phone
I've got a GC-Alpine-Ridge thunderbolt 3 card running, with a Geforce 1080 ti. It works great on Windows 10 (full 5K resolution @ 60hz).

On MacOS High Sierra 10.13.3, I have installed the latest NVIDIA Web Driver.
But the system hangs as soon as I connect the LG 5K screen.

From this Thread I understand I need both NGFixLG5k and CoreDisplayFixLG5K.
Do I need to install XCode and build both projects to generate a .kext?
And then copy Lilu + NGFixLG5k + CoreDisplayFixLG5K into Clover bootloader?


UPDATE:
I took the following steps from my secondary monitor (over HDMI):
- installed the 3 kexts linked in this thread: Lilu (debug) + NGFixLG5k + CoreDisplayFixLG5K into /EFI/CLOVER/kexts/10.13/
- added in Clover Configurator the boot arguments: nv_createDetailedTimingsFromEdid=1,-ngfxnoaudio,-ngfxnoaudiocon,-liludbgall
- In terminal: log show |grep ngfx > ~/Desktop/blackscreen.log

When I connect the LG 5k, the screen stays black, my other monitor becomes black and almost freezes (showing only the mouse arrow). Then on disconnect of the LG 5k, after 5-10 seconds the monitor becomes visible. But the black screen.log file is empty. (Also the log process has automatically exited)

I hope you have a suggestion as to what I'm doing wrong :crazy:
Thank you :)
 
Last edited:
Top