-
-
Notifications
You must be signed in to change notification settings - Fork 12
LVDS
LVDS was a standard replaced by eDP in 2009. So finding AMD metal MXM cards with LVDS support may become difficult, since the first AMD GPUs with Apple metal support were released in 2012 (M4000 and M5100 Venus family). Other vendors like Dell and HP did not adopt the new standard eDP as consequently as Apple and therefore we found some vBIOS versions with LVDS support, the M4000 and the red Dell M5100.
Unfortunately the connector definitions used a notation not compatible with Apple macOS drivers. In detail these VBIOS version used within the Object_Info
table the connector identifier 16
instead of 0E
as used on Apples vBIOS versions of the AMD 4670 (iMac10,1 21.5") and AMD 4850 (iMac9,1 24") cards.
Below you will find the output generated by radeon_bios_decode marking the type (null) to these first two connectors (even the tool does not recognize it properly):
ATOM BIOS Rom:
SubsystemVendorID: 0x1028 SubsystemID: 0x053e
IOBaseAddress: 0x0000
Filename: C42205A1.021
BIOS Bootup Message:
Chelsea XTGL C42205 GDDR5 64Mx16 350e/150m 0.9V A1
PCI ID: 1002:682d
Connector at index 0
Type [@offset 3918]: (null) (1701736270)
Encoder [@offset 3922]: INTERNAL_UNIPHY2 (0x21)
i2cid [@offset 4046]: 0x93, OSX senseid: 0x4
HotPlugID: 4
Connector at index 1
Type [@offset 3928]: (null) (1701736270)
Encoder [@offset 3932]: INTERNAL_UNIPHY (0x1e)
i2cid [@offset 4073]: 0x94, OSX senseid: 0x5
HotPlugID: 5
Connector at index 2
Type [@offset 3938]: DisplayPort (10)
Encoder [@offset 3942]: INTERNAL_UNIPHY1 (0x20)
i2cid [@offset 4100]: 0x90, OSX senseid: 0x1
HotPlugID: 1
Connector at index 3
Type [@offset 3948]: DisplayPort (10)
Encoder [@offset 3952]: INTERNAL_UNIPHY1 (0x20)
i2cid [@offset 4127]: 0x91, OSX senseid: 0x2
HotPlugID: 2
Connector at index 4
Type [@offset 3958]: DisplayPort (10)
Encoder [@offset 3962]: INTERNAL_UNIPHY2 (0x21)
i2cid [@offset 4154]: 0x92, OSX senseid: 0x3
HotPlugID: 3
Connector at index 5
Type [@offset 3968]: VGA (1)
Encoder [@offset 3972]: INTERNAL_KLDSCP_DAC1 (0x15)
i2cid [@offset 4181]: 0x97, OSX senseid: 0x8
Apples drivers simply drop all connectors defined with 16
immediately and from the six connectors visible from Ubuntu Linux or with the BIOS decoder tools only the last four where recognized by macOS, only DP
and VGA
. So at least an external display connected via miniDP
could be used. But without a visible LVDS connector the internal display will not be recognized.
There are three approaches so solve this issue:
This easy modification in the OBJ_Info data table (always fix the checksum) gave us immediately success with radeon_bios_decode, but broke backlight on the internal LCD. The OC picker was visible on the external screen.
ATOM BIOS Rom:
SubsystemVendorID: 0x1028 SubsystemID: 0x053e
IOBaseAddress: 0x0000
Filename: C42205A1.021
BIOS Bootup Message:
Chelsea XTGL C42205 GDDR5 64Mx16 350e/150m 0.9V A1
PCI ID: 1002:682d
Connector at index 0
Type [@offset 3918]: LVDS (7)
Encoder [@offset 3922]: INTERNAL_UNIPHY2 (0x21)
i2cid [@offset 4046]: 0x93, OSX senseid: 0x4
HotPlugID: 4
Connector at index 1
Type [@offset 3928]: LVDS (7)
Encoder [@offset 3932]: INTERNAL_UNIPHY (0x1e)
i2cid [@offset 4073]: 0x94, OSX senseid: 0x5
HotPlugID: 5
Connector at index 2
Type [@offset 3938]: DisplayPort (10)
Encoder [@offset 3942]: INTERNAL_UNIPHY1 (0x20)
i2cid [@offset 4100]: 0x90, OSX senseid: 0x1
HotPlugID: 1
Connector at index 3
Type [@offset 3948]: DisplayPort (10)
Encoder [@offset 3952]: INTERNAL_UNIPHY1 (0x20)
i2cid [@offset 4127]: 0x91, OSX senseid: 0x2
HotPlugID: 2
Connector at index 4
Type [@offset 3958]: DisplayPort (10)
Encoder [@offset 3962]: INTERNAL_UNIPHY2 (0x21)
i2cid [@offset 4154]: 0x92, OSX senseid: 0x3
HotPlugID: 3
Connector at index 5
Type [@offset 3968]: VGA (1)
Encoder [@offset 3972]: INTERNAL_KLDSCP_DAC1 (0x15)
i2cid [@offset 4181]: 0x97, OSX senseid: 0x8
Nevertheless macOS booting was possible and using OpenCore DEBUG version we could gather the complete connector information from macOS level! In addition the internal LCD worked on macOS login screen, but with a pale white (milky) screen.
No idea how to fix this, possibly we need to populate another data table called LVDS_Info
with values found in the Apple AMD vBIOS?
@internetzel did this successfully. Using the boot-args
flash -raddvi
this enhanced version does the same as the connector patches described below.
Using the vBIOS mod described above we could boot macOS and grab the WhateverGreen debug log with all six connectors shown as defined within the modded vBIOS:
The WhateverGreen debug log revealed this connector info:
con: @ (DBG) 0 is type 00000002 (LVDS) flags 00000040 feat 0009 pri 0000 txmit 02 enc 05 hotplug 04 sense 04
con: @ (DBG) 1 is type 00000002 (LVDS) flags 00000040 feat 0009 pri 0000 txmit 00 enc 00 hotplug 05 sense 05
con: @ (DBG) 2 is type 00000400 (DP ) flags 00000304 feat 0100 pri 0000 txmit 11 enc 02 hotplug 01 sense 01
con: @ (DBG) 3 is type 00000400 (DP ) flags 00000304 feat 0100 pri 0000 txmit 21 enc 03 hotplug 02 sense 02
con: @ (DBG) 4 is type 00000400 (DP ) flags 00000304 feat 0100 pri 0000 txmit 12 enc 04 hotplug 03 sense 03
con: @ (DBG) 5 is type 00000010 (VGA ) flags 00000010 feat 0000 pri 0000 txmit 00 enc 00 hotplug 00 sense 08
Pulling the data out you get (blocks describing: type, flags, feat, pre, txmit, enc, hotplug, sense):
00000002 00000040 0009 0000 02 05 04 04
00000002 00000040 0009 0000 00 00 05 05
00000400 00000304 0100 0000 11 02 01 01
00000400 00000304 0100 0000 21 02 02 02
00000400 00000304 0100 0000 12 04 03 03
00000010 00000010 0000 0000 00 00 00 08
Now you have to reorder all data blocks longer that one byte (endian)
02000000 40000000 0900 0000 02 05 04 04
02000000 40000000 0900 0000 00 00 05 05
00040000 04030000 0001 0000 11 02 01 01
00040000 04030000 0001 0000 21 02 02 02
00040000 04030000 0001 0000 12 04 03 03
10000000 10000000 0000 0000 00 00 00 08
and you get this (not base64 encoded) both for the connector patch and count of 6 (Use Xcode to insert the strings!)
<key>connectors</key>
<data>020000004000000009000000020504040200000040000000090000000000050500040000040300000001000011020101000400000403000000010000210202020004000004030000000100001204030310000000100000000000000000000008</data>
<key>connector-count</key>
<data>06000000</data>
Put this into OpenCore to define connector-count
(here 6) and connectors
properties, reverted to the original vBIOS with 16
as LVDS connector definition and let OC do the 16
-> 0E
conversion on the fly while macOS was running!
After Xcode insertion you can open the config.plist using a normal text editor and you will discover the base64 conversion result. These four lines below can used via copy and paste into the plist using a normal text editor.
<key>connectors</key>
<data>AgAAAEAAAAAJAAAAAgUEBAIAAABAAAAACQAAAAAABQUABAAABAMAAAABAAARAgEBAAQAAAQDAAAAAQAAIQICAgAEAAAEAwAAAAEAABIEAwMQAAAAEAAAAAAAAAAAAAAI</data>
<key>connector-count</key>
<data>BgAAAA==</data>
After adding these lines into the DeviceProperties section side by side to the CAIL settings already provided by OCLP the iMac happily booted macOS High Sierra and later Monterey with full metal graphics acceleration support, fully working internal and external display, brightness control, DRM support.
Unfortunately after a sleep wake cycle the macOS drivers take over completely and surprises us with the same pale while milky screen. Behind a virtual fog the display is perfectly visible, even colors are detectable. So it is not a color depth problem. An help is greatly appreciated to identify the root cause of this effect!
Using these cards in the iMac9,1 early 2009 24" works quite similar, unfortunately you get the pale while milky screen from the start even on the OC boot picker screen. Only an external display is working normally. Since OCLP does not provide support for MXM modded iMac9,1 you need to add the following entries to the boot-args
manually radpg=15 -wegtree agdpmod=pikera
- otherwise no screen output on macOS.
My guess about the LVDS_Info table was correct, @dfranetic and his relentless testing came like a white knight and he provided both a working connector information module (OBJ_Info) from an Dell HD6770M and an LVDS_Info table from another HP HD5870M vBIOS avoiding the milky pale display. Only a few minutes later both M4000 and M5100 original LVDS_Info tables could be fixed.
Uploaded finalized versions of M4000 and M5100 (red Dell only) vBIOS. You can create LVDS versions for the HP W5170M or M6000 replacing the Object_Info
module and the LVDS_Info module with the one you will find in the LVDS M5100 or M4000 versions (LVDS folder).
After some EDK exploration I managed to compile a modified version of the EnableGop driver working only on iMac9,1 models. Finally we have EFI Boot screen support for all Apple MXM3 iMacs. In any case these Venus cards need OpenCore to boot even supported versions of macOS due to the CAIL issue.
The W5170M causes SMBUS conflicts in the iMac9,1 - you need to desolder the two little resistors as shown in this picture:
(all rights reserved by @dfranetic).