Fl0r!an
|
 |
« Reply #45 on: August 29, 2016, 08:25:15 AM » |
|
I just had a short look at Apples 660M VBIOS, they've defined the connection to the internal display as standard DP connection, no eDP or anything. The DCB spec defines some more detailed properties which I didn't compare so far. I'm hoping to find a difference in the Apple EFI between the internal and the external DP ports. Applying them to your MXM card might fix some issues. We'll see... 
|
|
|
Logged
|
|
|
|
Fl0r!an
|
 |
« Reply #46 on: August 29, 2016, 10:40:50 AM » |
|
One more thing: Your GTX 660M defines a "Maximum Link Rate" of 5.4 Gbps, while Apples 660M defines 2.7 Gbps. I think that's DisplayPort 1.1 vs. 1.2, right? Might be a good idea to reduce that Maximum Link Rate in your VBIOS to prevent the drivers from choosing a pixel clock which the connection can't take, at least on the internal port. So I propse the following edit: A6 7F 02 02 10 00 42 0F -> A6 7F 02 02 10 00 22 0F Additionally: Try reducing your resolution in OS X and reboot, verify if this has any affect on the boot screen (not sure if the prefered resolution is even considered but anyway...). Oh, and I'd really love to see how an active DP adapter behaves on your TB port(s)... 
|
|
|
Logged
|
|
|
|
richardhancock
Not Newbie
Offline
Posts: 41
|
 |
« Reply #47 on: August 29, 2016, 12:12:43 PM » |
|
Strange how it doesn't detect it as an iMac display, it detects the external monitor as a TV opposed to cinema display I have just changed the maximum link rate on the internal iMac display to test it out, but no difference on the boot up screen, with or without changing the resolution. Changed to lower ones and still the same. I don't think that the OS X resolution affects the boot screen, as it looks like it is displaying at full 1440p. Just to check about making the ports 'Active', as I am still a bit confused on this, below my current DCB Table, do I simply just disable the display ports defined for display port for the ports I know aren't for the internal iMac display? (See second DCB Table example - which is edited) and then leave the corresponding TVDS signal enabled? 1F0F0001 34000100 1F1F0001 10000200 1F2F0001 30000200 D65F0108 2000420F 925F0108 20000200 C64F0108 1000420F 824F0108 10000200 8F3F0108 30000200 B68F0304 1000420F 728F0304 10000200 A67F0202 1000 220F 627F0202 10000200 6F6F0202 10000200 0F9F0402 00000000 1F0F0001 34000100 1F1F0001 10000200 1F2F0001 30000200 DF5F0108 2000420F 925F0108 20000200 C64F0108 1000420F 824F0108 10000200 8F3F0108 30000200 BF8F0304 1000420F 728F0304 10000200 A67F0202 1000 220F 627F0202 10000200 6F6F0202 10000200 0F9F0402 00000000 Is the iMac display already Active if it is beyond 1080p?
|
|
« Last Edit: August 29, 2016, 12:15:48 PM by richardhancock »
|
Logged
|
|
|
|
Fl0r!an
|
 |
« Reply #48 on: August 29, 2016, 12:48:51 PM » |
|
Okay, still thanks for the quick test!  I shouldn't have used the term "active" when talking about ports, my bad. When talking about an "active" port I simply meant that it's enabled, nothing more. So an active (= enabled) port has a valid "type" indicator (e.g. 0x6 or 0x2) while an inactive (= deactivated) port has the type 0xf or 0xe. When talking about adapters, the term active labels an adapter which behaves like a real DisplayPort device (in contrast to passive adapters, which are in fact TMDS devices). So in short, active <-> inactive ports and active <-> passive adapters.  You shouldn't need to disable the additional ports as your current DCB table contains 4 enabled ports, which is within the limits of Apples drivers (btw, does your GPU run with Apples drivers or do you need to use the WebDrivers?). I think Apple didn't follow Nvidias DCB rules when they implemented their internal screen, but I still have to fully understand that. Maybe Rominator or netkas will come up with a good idea in the meantime...  EDIT: Btw, I guess your internal display is recognized as Cinema Display because the system recognizes it as "Apple made", but some flag is missing to mark it as "internal" or something. EDIT2: Really strange. Apples DCB table defines all 3 DP connectors (1x internal, 2x external) as "external backlight control", which means that the GPU can't control it. So it seems they've implemented a proprietary way to control the backlight. The whole GPIO assignment table also doesn't define a single IO port which is used for PWM backlight control. Just the usual stuff, e.g. some ports for hotplug detection, thermal signals and some unspecified voltages.
|
|
« Last Edit: August 29, 2016, 01:42:03 PM by Fl0r!an »
|
Logged
|
|
|
|
richardhancock
Not Newbie
Offline
Posts: 41
|
 |
« Reply #49 on: August 29, 2016, 02:08:31 PM » |
|
No Problem So in order to test how an active display port adapter functions on the external thunderbolt connection do I simply need to 0xF out the corresponding TMDS single to make it a simple active connection? Or did you mean for me to try another Display port to dvi / hdmi adapter? The friend I thought had one doesn't anymore but someone else i know has one but they're on holiday I am just using the Apple drivers currently, as I had tried the Nvidia ones previously and it wouldn't boot up properly. But i might try this again as I can now see what is happening on the external display! (unless you recommend staying with the Apple ones?) (EDIT: Just tried and now boots up with the Nvidia Drivers as well as just apple ones)Yes there must be some sort of code defining it as internal, unless it only recognising it as being an iMac display if it is set to be the main display in the DCB Table? It is rather strange if that both external thunderbolts are defined as DP that both of mine are not working properly. Do you think that there is some sort of link between the DCB table and the EFI of the iMac that somehow specifies how the brightness is controlled because of the inbuilt ambient light sensor?
|
|
« Last Edit: August 29, 2016, 02:12:53 PM by richardhancock »
|
Logged
|
|
|
|
Fl0r!an
|
 |
« Reply #50 on: August 29, 2016, 02:26:35 PM » |
|
I'd just like to see how your external ports behave when connecting an active DisplayPort adapter. No need for any software edits, just a different adapter. (Actually two different adapters would be interesting: An active DP to DVI/HDMI and a passive one, just to be sure).
I guess your 660M just has an (physically) incompatible port assignment. One of your iMac's TB ports might now be connected with a VGA or DVI port, so it won't give any output. This is a hardware thing, not software.
As far as I know there's no rule / standard which defines how ports should be mapped on MXM cards, it's completely up to the manufacturer. That your iMac now has the internal display and one external port working is very good, considering you've just chosen an arbitrary MXM card.
I have no clue how they've implemented brightness control, but as far as I can tell it's not the "standard NVIDIA way" but rather a "propriertary Apple way". But maybe I'm missing something...
|
|
|
Logged
|
|
|
|
richardhancock
Not Newbie
Offline
Posts: 41
|
 |
« Reply #51 on: August 29, 2016, 03:48:11 PM » |
|
Would something like this be the sort of thing that would be active ? goo.gl/mWwCsOI am currently using the official apple VGA so this must be passive. I was thinking that possibly the other port that currently doesn't work has the dual link option and this is what is making it incompatible with this graphics card? Yes its great that it is working like this, for me personally the one external output with VGA is what I was using to start with! Do you think it might be worth trying the 21.5 screen that I have from the other 2011 iMac which is 1080p and see if the boot screen displays correctly on this?
|
|
|
Logged
|
|
|
|
Fl0r!an
|
 |
« Reply #52 on: August 29, 2016, 04:00:07 PM » |
|
Yes this seems to be active. I'm actually not 100% sure if Apples VGA adapters are active or passive, but I think it's the latter type. Both TB connectors on your iMac should be identical I think. From a GPU perspective, both should be DP 1.1 with integrated single link TMDS. Testing the small screen on your iMac would be an awesome experiment, so if they're physically compatible and you have to time to do this, sure, go ahead! 
|
|
|
Logged
|
|
|
|
richardhancock
Not Newbie
Offline
Posts: 41
|
 |
« Reply #53 on: August 29, 2016, 04:11:13 PM » |
|
Ive just read a review for the alienware laptop this card was from and states: Three video interfaces (VGA, HDMI 1.4 and Mini-DisplayPort) as being outputs on the laptop, so as you say it is probably just not compatible with both ports! Just checked the connections and the 21.5 is different  however I can take the card out of my 27 and try in the 21.5 machine as I wanted to prep it anyway! I will try this out this evening! :-)
|
|
|
Logged
|
|
|
|
Rominator
|
 |
« Reply #54 on: August 29, 2016, 08:40:50 PM » |
|
I hd same problem doing EFI for GT640 with DP port.
Required surgery on another part of BIOS.
Was a full weekend project.
Hopefully Florian has time and sees issues.
|
|
|
Logged
|
Before asking a question, check your "Personal Settings" and be sure that you have "Brain Services" set to "On".
|
|
|
Fl0r!an
|
 |
« Reply #55 on: August 30, 2016, 07:48:26 AM » |
|
Hehe, so at least we know it's possible.
I guess by "another part of BIOS" you mean something outside of Nvidias DCB documentation, right? Guess I'll have a look at the tools and documentation of the nouveau project then.
|
|
|
Logged
|
|
|
|
richardhancock
Not Newbie
Offline
Posts: 41
|
 |
« Reply #56 on: August 30, 2016, 06:36:48 PM » |
|
Tried it on the 21.5 last night and accidentally broke the LVDS cable  so unable to test on that machine until a replacement cable arrives ! Have also found that after installing the Nvidia Drivers on odd occasions my machine gives a blank screen after the loading bar, whereas using the inbuilt OS X Drivers it works every time 
|
|
|
Logged
|
|
|
|
Fl0r!an
|
 |
« Reply #57 on: August 30, 2016, 08:56:11 PM » |
|
Oh well, that's bad luck. In the meantime I had another look at the DCB spec. I might have found a way to make the internal display really internal, thus hopefully enabling backlight control. 1. Delete unnecessary entries from Connector table:Search: 40000000 61110000 31120000 31030001 46040001 46050002 31060100 46070100 46080200 00090000 Replace: ff000000 ff110000 ff120000 ff030001 46040001 46050002 ff060100 46070100 46080200 ff090000 => Only DP connectors left. 2. Change internal connector to "location 0" (index 0x7 as seen in DCB, so it's the 8th in the list):Search: 46070100 Replace: 46 000100 3. Change "Platform" byte from 'MXM' to 'Desktop with integrated full DP':Search: 4005100409 Replace: 40051004 074. Explanation:According to DCB spec, this should enable the following condition: 0x46 = DisplayPort External Connector (as a special case, if the "Location" field is 0 and the "Platform" type in the Connector Table Header is 7 (Desktop with Integrated full DP), this indicates a non-eDP DisplayPort Internal Connector, which is non-removeable) That's the exact same configuration as Apple is using with their Nvidia 2012 iMac, so hopefully it'll be enough to flag that DP port as "internal". Good luck! 
|
|
|
Logged
|
|
|
|
richardhancock
Not Newbie
Offline
Posts: 41
|
 |
« Reply #58 on: August 31, 2016, 07:28:35 PM » |
|
Thanks for the response and taking the time to look through the BIOS  I have made all of the changes to the BIOS this evening. I think that the EFI and OSX boot screen now knows that the iMac display is the main display as there is no longer any loading bar on the external screen only internal, although its still stretched and blurred. (So I think that moving the iMac DP to location 0 worked, so the DCB order makes a difference in OS X). Once booted the OS however still thinks the external display is the main screen as login screen appears here not on the internal iMac? Brightness control doesn't work as its still listed as a Cinema Display  Have tried unplugging external etc and trying but the same! Very strange... Do you think there is a special definition in the BIOS somewhere to specify thats its an Apple iMac internal display?
|
|
|
Logged
|
|
|
|
Fl0r!an
|
 |
« Reply #59 on: August 31, 2016, 08:05:22 PM » |
|
I didn't expect it to change boot screen behavior, but I was hoping it would enable backlight control - sadly it didn't  I just researched how backlight control is enabled on Hackintoshs: Most are using an Intel GPU, which can be enabled by adding a special device through a DSDT edit. That doesn't work on Nvidia cards though, and I didn't find a single person who had backlight control working on a notebook with Nvidia dGPU.  I guess all of them are missing that real Macs have some IOReg keys called "built-in", "AAPL,backlight-control" and "backlight-control". The GTX 680 luckily contains those keys, but I don't know in which conditions they'll be set up properly. You could do a ioreg dump on your machine (e.g. ioreg -l -w0 -p IODeviceTree > dump.txt) to see what the EFI has done, but I don't expect it to be enabled. If we're lucky, the Nvidia EFI will set up those values according to Nvidia DCB spec. I don't know what else I'd have to change to mark your display appear as "internal". Will have another look in the next days... The scrambled boot screen surely is a different story. Maybe Rominator will give us another hint, re-doing work that has already been done isn't exactly motivating, I'd rather spend my time on the other issues...  EDIT: Okay, found one positive report: http://www.tonymacx86.com/threads/laptop-backlight-not-working.135329/#post-830957Seems "built-in" and "backlight-control" are enough, maybe also "pwm-info". I'm almost sure the Nvidia EFI can generate that from the VBIOS, I just don't know how to enable that... EDIT2: Try setting the connector type of the internal display form 0x46 to 0x47 (DisplayPort Internal Connector(non-removeable)). That's not what Apple does but maybe it'll still work? 46000100 -> 47000100
|
|
« Last Edit: August 31, 2016, 08:14:23 PM by Fl0r!an »
|
Logged
|
|
|
|
|