Jump to content

[Guide] Getting XFX HD6850 connectors to work

ati hd6850 6850

  • Please log in to reply
110 replies to this topic

#1
Alexander Martinez

Alexander Martinez

    InsanelyMac Protégé

  • Members
  • Pip
  • 12 posts
  • Gender:Male
  • Location:Mexico
  • Interests:Minecraft! (jamartinezm)

*
POPULAR

I've finally got a new XFX HD6850, not knowing all the work that I would need to put in for all the
connectors to work, but it was worth it.

It's a 1GiB model with red fans/connectors
Vendor ID: 0x1002
Device ID: 0x6739

It has the following connectors (according to the connector guide on XFX's website)
A top DVI connector is the only DVI with a VGA option (DVI-I) and dual Channel.
A HDMI connector.
A bottom DVI connector is a digital only (DVI-D).
A Display Port connector. I can't test this since I do not have any adapters or displays compatible with this protocol.

For 3 days I read forum threads and did some research and test on my card and, from what I tested, got this to work completely:
* Top DVI port in both Digital and Analog mode (DVI -> VGA passive adapter). Well call it DVI1
* Bottom DVI port. We'll call it DVI2.
* HDMI with audio.
* HotPlug detection on the above ports.
* OpenGL (DVD Player works, Steam games work).
* Quartz and CI.
* All dual monitor combinations work (DVI1 + DVI2, DVI1+HDMI, DVI2+HDMI).

Note: Card does not support triple monitors, even on Windows; If all three ports are plugged, then DVI2 will
disconnect. Removing the HDMI cable will NOT reconnect it automatically, you will need to
click on Detect Displays or disconnect DVI2 and reconnect it.

What is NOT tested:
* Dual Link DVI on first port.
* Display port (video nor audio).

Since I saw no guide (at least with an explanation on the first page) I will try to explain how I did it, what steps to take, etc, to get the card to work.
Bear with me as I have not written that many tutorials in the past (and English is not my first language xD)
At the end of the post, you will find an edited ATI6000Controller.kext that works for my system, and the connector description that I made for the card.

First off, many thanks to:
- Mucha (http://www.insanelym...howtopic=252061)
- bcc9 (http://www.insanelym...threaded&start=)
- streakies (http://www.tonymacx8...=28464&start=90)

for their research and guides (yes, I did read over 30 forum pages). They proved to be extremely useful.

*******************************************************************************************************************
How I did it:

My DSDT is hda-gfx patched using Toleda's guide.
My boot.plist had GE=Yes and did NOT have pciroot or anything similar.
Chimera 1.7

NOTE: I read several cases where using AppleNullCPUManagement.kext or npci=x resulted in personality override not working correctly
(you always get not personality or the default). Take your necessary precautions.

Step 1: Identify default personality

Download IORegistryExplorer (or install Xcode to get it)

Without a personality, the card will work will all the ports, but will lag, have random artifacts and will not work
with OpenGL (DVD Player will crash, etc.). We need a personality for the card to work!

I installed the card and booted into Mac.
I saw that only the monitor connected on DVI1 worked (with or without an adapter).
I wrote down which personality was loaded (ioreg | grep ATY). Duckweed was selected by Chimera.
The correct number of ports were listed (4).

*******************************************************************************************************************
Step 2: Get the tools, dump and decode BIOS, get SenseID and transmitter of each port.

Download bcc9's radeon_bios_decode and ati_personality.pl scripts from the above post. (See UPDATE below)
Download an Hex editor (I used Hex Fiend, you could also use HexEdit, or something similar).
Install (or boot) Windows.
Download and install GPU-Z
Dump your BIOS
Save it into a flash drive or partition accessible by mac.
Reboot into Mac

Decode your BIOS file:
radeon_bios_decode < BARTS.rom
UPDATE: redsock's bios decoder to get the encoder and link information directly from the bios. See bottom of the post

For me, it looked a little something like this:

ATOM BIOS Rom:
	SubsystemVendorID: 0x1682 SubsystemID: 0x3110
	IOBaseAddress: 0x0000
	Filename: 685ZNF63.SB
	BIOS Bootup Message:
BARTS PRO HYNIX GDDR5 32Mx32 BIOS										

PCI ID: 1002:6739
Connector at index 0
	Type [@offset 44250]: DisplayPort (10)
	Encoder [@offset 44254]: INTERNAL_UNIPHY2 (0x21)
	i2cid [@offset 44360]: 0x90, OSX senseid: 0x1
Connector at index 1
	Type [@offset 44260]: HDMI-A (11)
	Encoder [@offset 44264]: INTERNAL_UNIPHY2 (0x21)
	i2cid [@offset 44387]: 0x93, OSX senseid: 0x4
Connector at index 2
	Type [@offset 44270]: DVI-I (2)
	Encoder [@offset 44274]: INTERNAL_UNIPHY (0x1e)
	i2cid [@offset 44424]: 0x94, OSX senseid: 0x5
Connector at index 3
	Type [@offset 44280]: DVI-I (2)
	Encoder [@offset 44284]: INTERNAL_KLDSCP_DAC1 (0x15)
	i2cid [@offset 44424]: 0x94, OSX senseid: 0x5
Connector at index 4
	Type [@offset 44290]: DVI-D (3)
	Encoder [@offset 44294]: INTERNAL_UNIPHY1 (0x20)
	i2cid [@offset 44451]: 0x95, OSX senseid: 0x6

My sense ID's are:
Display port: 1
HDMI: 4
DVI1: 5
DVI2: 6

"INTERNAL_KLDSCP_DAC1" mans that we have an analog signal.
In my case, it's sense-id is the same as DVI1 because that port also provides VGA output with the passive adapter.
So in total we get 4 physical ports, not 5 (as you can probably figure out by looking at your card xD).

The transmitters for my connectors are:
Display port: UNIPHY2
HDMI: UNIPHY2
DVI1: UNIPHY
DVI2: UNIPHY1

These are the physical links that the GPU uses to connect to the ports. We will need these later.

*******************************************************************************************************************
Step 3: Get the personality list and connector info.

Get a list of all the personalities that exist on your system.

sudo /folder/where/you/saved/the/tool/ati_personality.pl.0.7/ati-personality.pl

And the x64 personalities (if you run on 64 bits)

sudo /folder/where/you/saved/the/tool/ati_personality.pl.0.7/ati-personality.pl -x

You will get a very long output. Save the output (copy it or just pipe it to a file).

You should notice that the x32 and x64 versions are identical except for the offset.
Work with whichever version you are booting with, and change the other one when you are finished.

Delete the unnecessary personalities (I'm working with a 6xxx so I deleted all except the ones listed in ATI6000Controller.kext


Now, you will have to make a decision: Will you try to figure out each connector by yourself (Steps 4B-4C),
or will you try to find out if another personality works with the remaining connectors (Step 4A)?

I chose to try out each personality, with each combination of connections, with both AtiPorts=4 and no AtiPorts.
As you may probably guess… it took a long time to do so, many reboots, and a hell lot of paper (or a spreadsheet) to write down the results.

This worked for me to get DVI1 and HDMI (with audio) working.
I had to use the second way to get DVI2 to work.
So, you may not be saved from doing both, if you are unlucky like me.

*******************************************************************************************************************
Step 4A - Trying out each personality

Write down the names of the personalities from your dump.
For me, they are Pithecia, Bulrushes, Cattail, Hydrilla, Duckweed, Fanwort, Elodea, Kudzu,
Gibba, Lotus, Ipomoea, Muskgrass, Juncus and Osmunda.

I can skip Duckweed as I already know what works on it.

You may skip the 'make a table' part if you have good memory, or just write down what works.
I did it to get as much info as I could and learn from it

Make a table (in Excel, in paper, etc). The rows will be the name of the personalities, the columns will be all the
combination of connectors you care about.
In my case these were DVI1, DVI2, HDMI, DVI1+DVI2, DVI1+HDMI, DVI2+HDMI, ALL)

You will fill out the spaces with your results from your tests.

Now, this is something that will differ for some people.
To change the personality that loads, all you need to do is type 'AtiConfig=nameofpersonality' in your boot loader.
This did NOT work for me.
It would get stuck or panic for some strange reason (I blame RealtekRTL81xx.kext as it always does this when I change my default options and it's a pain in the ass to fix).
I edited my boot.plist EVERY SINGLE TIME before trying out the next personality. Your milage may vary.

WARNING: YOU WILL BE STUCK WITH GREY SCREENS, BLACK SCREENS, ERRORS ON THE BOOTLOADER WHEN TRYING OUT DIFFERENT PERSONALITIES.
BE SURE TO HAVE A COMPUTER THAT CAN SSH OR VNC INTO YOUR MAC SO YOU MAY REVERT YOUR CHANGES.
I WILL NOT HELP YOU RECOVER YOU MAC, I WILL NOT EXPLAIN HOW TO MAKE BACKUPS, ETC. BE PREPARED. DON'T SAY I DIDN'T WARN YOU

That being said, I had an additional laptop running Windows 7 that I used to connect via SSH (using puTTY) to the Mac and make the necessary changes to keep on trying.

Now, reboot your computer, and start with the first personality and add the number of physical ports.

I started with Pithecia.
I started with DVI1 plugged in, and nothing else
In the boot loader type (without the quotes) "AtiConfig=Pithecia AtiPorts=4"
Boot.
Write down the result. (Greyscreen, Blackscreen, Flickering, Garbage on screen, panic, etc.)
I plugged DVI2 in. Write down result.
Unplug DVI2, Plug HDMI, write down.
Unplug DVI1, write down.
etc…
Repeat for each combination.

I did not boot with each combination, but if you have the time, you should try it.

When you are done, you should try it out again without AtiPorts. This gave me different results on each try.

For me, I've got the following results:
With AtiPorts = 4
*Pithecia:  Only DVI1 works with corrupted frame buffer.
*Bulrushes: HDMI works. DVI1 works mirroring HDMI (flickering)
*Cattail: Blackscreen on all combinations.
*Hydrilla: Same as cattail
*Duckweed: DVI1 works. HDMI with DVI1 freezes the displays.
*Fanwort: Blackscreen
*Elodea: Blackscreen
*Gibba: Same as duckweed
*Lotus: Black screen
*Ipomoea:  Only DVI1 works but with corrupted frame buffer.
*Mangabey: Everything works because frame buffer does not load, so no acceleration (if you run ioreg | grep ATY, you get  ATY,ATY,RadeonFramebuffer)
*Muskgrass: Blackscreen
*Juncus: Black screen[/list]

Without AtiPorts:
*Elodea: Only DVI1 works.
*Gibba:  Only DVI1 works.
*Lotus: Only HDMI works (with audio!).
With these, I can get 2 ports working: Duckweed/Gibba (DVI1) and Lotus (HDMI).
Now, we need to merge this values in to the personality. This is explained in step 4B.

*******************************************************************************************************************
Step 4B - Create new personality connector information.

First off we need to define how a connector is structured.
Let's use a vanilla duckweed from 10.7.2 as an example as it was the one that had DVI1 working for me.

0000000	00  04  00  00  04  03  00  00  00  01  00  00  12  04  04  01
0000010	00  04  00  00  04  03  00  00  00  01  00  00  22  05  05  02
0000020	00  08  00  00  04  02  00  00  00  01  00  00  11  02  03  04
0000030	00  02  00  00  14  02  00  00  00  01  00  00  00  00  06  05
Each line is a connector. Let's decode connector 4 (0000030)
Split it up like this:

00 02 00 00 / 14 02 00 00 / 00 01 / 00 00 / 00 / 00 / 06 / 05

We get the following descriptors:
00020000
14020000
0001
0000
00
00
06
05

But these are in big endian. We need them in little endian, so we flip each descriptor, and let's also name them:
00 00 02 00 - Connector type
00 00 02 14 - Control flags (ATY,ControlFlags)
01 00 - Features
00 00 - Unknown
00 - Transmitter
00 - Encoder
06 - HotPlug ID
05 - Sense ID

Let's decode them using this information taken from muchas's post:
-----------------------
1- ConnectorType: (I added single link, from bbc9's post)
/* 4 bytes  ,from bbc9 radeondump */
				#define CONNECTORTYPE_LVDS   0x00000002		
				#define CONNECTORTYPE_DVIDL  0x00000004 //Dual Link
				#define CONNECTORTYPE_VGA	  0x00000010
				#define CONNECTORTYPE_S-V	   0x00000080			
				#define CONNECTORTYPE_DP		0x00000400	
				#define CONNECTORTYPE_HDMI   0x00000800
   	 #define CONNECTORTYPE_DVISL  0x00000004	//Single Link

2- ATY,ControlFlags:
/* 4 byte the same as found on ioreg key: ATY,ControlFlags. hardcoded for each connector type
		u can try one by one until u find the working one for u
		0x0002 : LVDS		   >	   ControlFlag : 0x0040 / 0x0100
		0x0004 : DVI-?		  >	   ControlFlag : 0x0016 - 0x0014 / 0x214
		0x0010 : VGA			>	   ControlFlag : 0x0010
		0x0080 : S-Video		>	   ControlFlag : 0x0002	  
		0x0200 : DVI-?			>	   ControlFlag : 0x0014 / 0x0214 - 0x0204
		0x0400 : DisplayPort	>	   ControlFlag : 0x0100 - 0x0104 - 0x0304 / 0x0604 - 0x0400
		0x0800 : HDMI		   >	   ControlFlag : 0x0200
		0x1000 : DVI-?		  >	   ControlFlag : 0x0016
		*/

3-Features;
/* Features byte 0 , for example for LVDS screen it's almost 0x09 = 0x01 + 0x08 > Internal + Backlight */
		#define FEATURE_USE_INTERNAL					0x01
		#define FEATURE_USE_RGB_ON_YUV		  0x04
		#define FEATURE_USE_BACKLIGHT			 0x08
		#define FEATURE_BACKLIGHT_INVERTED	  0x10
		#define FEATURE_USE_CLAMSHELL			 0x20

		/* 1 byte, hardcoded for each connector type
		0x0002 : LVDS		   >	   Features  :  0x09
		0x0004 : DVI-?		  >	   Features  :  0x00
		0x0010 : VGA			>	   Features  :  0x00
		0x0080 : S-Video		>	   Features  :  0x04		
		0x0200 : DVI-?		  >	   Features  :  0x00
		0x0400 : DisplayPort	>	   Features  :  0x00
		0x0800 : HDMI		   >	   Features  :  0x00
		0x1000 : DVI-?		  >	   Features  :  0x00
		*/

		/* Features byte 1 , no idea ???*/

4- Unknown ; ???

5- Transmitter;
/* u can get this from dmesg after installing  Dong's RadeonHD with debug info */
		/* Transmitter Bits 0-3 (TransmitterID) */
		#define UNIPHY	0x00
		#define UNIPHY1   0x01
		#define UNIPHY2   0x02

		/* Transmitter Bits 4-7 (LinkID) */
		#define DUALLINK  0x00 // LINKA + LINKB
		#define LINKA			 0x10
		#define LINKB			 0x20

		/* Transmitter byte  */
		#define UNIPHYA  0x10 // = UNIPHY:LINKA
		#define UNIPHYB  0x20 // = UNIPHY:LINKB
		#define UNIPHYAB   0x00 // = UNIPHY:DUALLINK
		#define UNIPHYC  0x11 // = UNIPHY1:LINKA
		#define UNIPHYD  0x21 // = UNIPHY1:LINKB
		#define UNIPHYCD   0x01 // = UNIPHY1:DUALLINK
		#define UNIPHYE  0x12 // = UNIPHY2:LINKA
		#define UNIPHYF   0x22 // = UNIPHY2:LINKB
		#define UNIPHYEF		0x02 // = UNIPHY2:DUALLINK
		#define DACA					  0x00
		#define DACB			  0x10


6- Encoder;

/* u can get this from Dmesg as above  for R8XX architecture and above there is 06 Digital Encoder: DIG_1 > DIG_6*/
		/* Encoder Bits 0-3 (DIG_ID : Digital) */
		#define DIG1   0x00 // = DIGA
		#define DIG2   0x01 // = DIGB
		#define DIG3   0x02 // = DIGC  Only for Radeon HD 5XXX Series  and above
		#define DIG4   0x03 // = DIGD  Only for Radeon HD 5XXX Series  and above
		#define DIG5   0x04 // = DIGE  Only for Radeon HD 5XXX Series  and above
		#define DIG6   0x05 // = DIGF  Only for Radeon HD 5XXX Series  and above

		/* Encoder Bits 4-7 (DAC_ID : Analog) */
		#define DAC	  0x10

7- HotplugID;

/* 4 bits it's a unique id for each port, i have tried with 0 for port0, 1 for port1 and 2 for port2 and it's just working */

8- SenseID;

/* SenseLine = (i2cid & 0xf) +1 ,you get  i2cid from bbc9 radeondump */  
		 Bits 0-3: Sense Line  
		 Bit	4: Use hw i2c flag


So we get that connector 4 on duckweed is:

00 00 02 00 - Connector type: Single DVI
00 00 02 14 - Control flags (ATY,ControlFlags): DVI + VGA + DVI
01 00 - Features: No Idea.
00 00 - Unknown.
00 - Transmitter: UNIPHY:DUALLINK (Link A + Link <img src='http://www.insanelymac.com/forum/public/style_emoticons/<#EMO_DIR#>/cool.png' class='bbc_emoticon' alt='B)' /> using DAC A
00 - Encoder: DIGA
06 - HotPlug ID: 06
05 - Sense ID: 05

If you remember from above, my bios dump said that DVI1 had a sense ID of 5.
This is the reason that this connector matches!. You can check it out in IORegistryExplorer:
Search for your personality, locate the correct ID and check ATYFlags. 1 means unmatched ( or unconnected ).
Everything else means that it is matched, but it doesn't mean that it working correctly.

So, we have a semi working connector. Why a semi working connector? Because it's supposed to be a Dual Link DVI, not a Single Link DVI. Let's fix this!

I changed the connector type to
00 00 00 04: DualLink DVI

Giving me a final result of (in big endian):

04 00 00 00 14 02 00 00 00 01 00 00 00 00 06 05

So we need to change this value in the kext. Make a backup of your ATI6000Controller.kext

Open up your HEX editor, and locate the correct offset for your personality (176800 for x64 on duckweed)
Find the old connector and replace the values with the new ones.
Save it and install the new kext.
Reboot
For me, DVI1 still worked, and IORegistryExplorer now showed the correct connector-type: 0x4

Next up, fixing HDMI.
Currently, we have duckweed like this:
0000000	00  04  00  00  04  03  00  00  00  01  00  00  12  04  04  01
0000010	00  04  00  00  04  03  00  00  00  01  00  00  22  05  05  02
0000020	00  08  00  00  04  02  00  00  00  01  00  00  11  02  03  04
0000030	04  00  00  00  14  02  00  00  00  01  00  00  00  00  06  05
We have an HDMI descriptor on connector 3 (0000020) but it is not working.
It's sense ID DOES match the bios dump, but something may be off in the rest of the descriptor.
Instead of figuring it out, let's look at Lotus, where we found out that HDMI was working.
0000000	00  04  00  00  04  03  00  00  00  01  00  00  11  02  01  01
0000010	00  08  00  00  04  02  00  00  00  01  00  00  22  05  04  04
0000020	00  04  00  00  00  01  00  00  00  01  00  00  21  03  02  02
We see that connector 2 (0000010) is an HDMI descriptor with a sense id of 04, just as in duckweed, but it has different Control Flags, etc.
What we want to do here, is just copy the line completely into duckweed

This gives us:
0000000	00  04  00  00  04  03  00  00  00  01  00  00  12  04  04  01
0000010	00  04  00  00  04  03  00  00  00  01  00  00  22  05  05  02
0000020	00  08  00  00  04  02  00  00  00  01  00  00  22  05  04  04
0000030	04  00  00  00  14  02  00  00  00  01  00  00  00  00  06  05
We add this into the kext and reboot, and BAM! we've got HDMI working with DVI1 and audio… but there is a little detail:
You need to click Detect Displays for an HDMI device to be detected on connection or disconnection.

This does not happen in DVI1. Let's look at why this is happening…

If we remember from above, the second to last byte is the HotPlugID. This is the one responsible for telling the OS that we plugged (or unplugged) a cable.
We notice that we have 2 connectors with the same HotPlugID: Connector 1(0000000) and the HDMI connector.
So, 2 connectors drive the same signal. This is not good. Let's change that.

0000000	00  04  00  00  04  03  00  00  00  01  00  00  12  04  04  01
0000010	00  04  00  00  04  03  00  00  00  01  00  00  22  05  05  02
0000020	00  08  00  00  04  02  00  00  00  01  00  00  22  05  02  04
0000030	04  00  00  00  14  02  00  00  00  01  00  00  00  00  06  05
So we changed the HDMI's HotPlugID from 04 to 02.
Try different numbers starting with 00.

Also, just for fun, I tried to change DVI1 to 01, and hot plugging stopped working, I had to revert to 06 (Don't fix it if it's not broken!)
You may have to play around with the numbers. until you get it working.

We write this into the kext and BAM! HDMI is detecting the hot plug, as is DVI1.
Both monitors work on dual display. DVI1 also works with the DVI to VGA adapter.

So… if you only want those ports working, then YOU ARE DONE! CONGRATULATIONS! *Virtual High Five*
Enjoy your HDMI and DVI1 dual monitor setup!

But… If you are like me, and want DVI2 to work, then you are not quite done yet…
This is going to be harder, as we do not have any personality that worked with it :c

Let's get dirty.

*******************************************************************************************************************

Step 5: Creating a connector descriptor
You may try to modify a connector that has the same description as you want (Sense ID = 6, Connector type= 0x0200, etc..)
I chose to create it from scratch, as I did not know any real information on it, other that it's a Single Link Connector.

This is what the structure looks like:

AAAAAAAA BBBBBBBB CCCC DDDD EE FF GG HH

A = Connector type
B = Control Flags
C = Features
D = ???
E = Transmitter
F = Encoder
G = HotPlugID
H = Sense ID

Let's look at the bios dump one more time
Sense ID's
Display port: 1
HDMI: 4
DVI1: 5
DVI2: 6

We know the new connector needs to end in 06, so we have

AAAAAAAA BBBBBBBB CCCC DDDD EE FF GG 06
(We will fill out all the letters later..)

Transmitters:
Display port: UNIPHY2
HDMI: UNIPHY2
DVI1: UNIPHY
DVI2: UNIPHY1

So, UNIPHY is being used in dual link (LINKA+LINKB) for DVI1
Display port and HDMI share UNIPHY2… if we convert the connector part of them, we see that HDMI uses LINK B, and DP uses LINK A.
DVI2 uses UNIPHY1… So we have 3 possibilities for the transmitter:

01 UNIPHY1:DUALLINK
11 UNIPHY1:LINKA
21 UNIPHY1:LINKB

We know we don't have dual link on that port (again, by checking the XFX connector guide on their webpage), so we can skip 01.

Let's try with UNIPHY1:LINKA (11):
AAAAAAAA BBBBBBBB CCCC DDDD 11 FF GG 06

Let's give it a HotPlugId, like 03:
AAAAAAAA BBBBBBBB CCCC DDDD 11 FF 03 06

We know that it's a Single Link DVI connector so:
00020000 BBBBBBBB CCCC DDDD 11 FF 03 06

For features, we want DVI…. let's choose the same as in DVI1 so we get:
00020000 BBBBBBBB 0001 DDDD 11 FF 03 06

And the Unknown part… let's keep it zero'ed
00020000 BBBBBBBB 0001 0000 11 FF 03 06

Let's add the control flags… How do we know which one to use? Well… we try all that seem to fit, so it's one of these 3:
0x0004 : DVI-?		  >	   ControlFlag : 0x0016 - 0x0014 / 0x214
0x0200 : DVI-?		  >	   ControlFlag : 0x0014 / 0x0214 - 0x0204
0x1000 : DVI-?		  >	   ControlFlag : 0x0016

Let's start with 0004: (the tables are in little endian, we need them in big endian, remember?)

00020000 04000000 0001 0000 11 FF 03 06

Finally, we need the encoder information. We have 6 different encoders:
#define DIG1   0x00 // = DIGA
		#define DIG2   0x01 // = DIGB
		#define DIG3   0x02 // = DIGC  Only for Radeon HD 5XXX Series  and above
		#define DIG4   0x03 // = DIGD  Only for Radeon HD 5XXX Series  and above
		#define DIG5   0x04 // = DIGE  Only for Radeon HD 5XXX Series  and above
		#define DIG6   0x05 // = DIGF  Only for Radeon HD 5XXX Series  and above

		/* Encoder Bits 4-7 (DAC_ID : Analog) */
		#define DAC	  0x10
We don't have a DAC (as it is a purely digital port.), so the values may be 00 up to 05.

Let's start with 00

00020000 04000000 0001 0000 11 00 03 06

We have a new connector description! So, let's add it to the duckweed personality, by replacing one of the remaining connectors.

I chose to replace connector 2 (0000010).
Why not the first one?
Well, it has a SenseID (01) that matches my display port, and has the correct connector type, so it may be working but I don't have the means for testing it.

So we get this new personality:

0000000	00  04  00  00  04  03  00  00  00  01  00  00  12  04  04  01	<-- Display port
0000010	00  02  00  00  04  00  00  00  00  01  00  00  11  00  03  06	<-- DVI2
0000020	00  08  00  00  04  02  00  00  00  01  00  00  22  05  02  04	<-- HDMI
0000030	04  00  00  00  14  02  00  00  00  01  00  00  00  00  06  05	<-- DVI1
Save it and reboot (Remember to only leave HDMI or DVI1 plugged in. I left DVI1 with the VGA adapter. Connect DVI2)

This is what happened to me:
I booted up and MAGIC I saw that my monitor on DVI2 showed… something…
It was a flickering garbled screen, with the same image as DVI1… I had mirroring turned on, so I turned it off.
The image on DVI2 remained the same as DVI1. I could change resolution, the name of the monitor showed correctly.
HotPlug worked, but, the image was incorrect.

From this, I gathered that: LINKA is the correct physical link to the DVI2 port. The control flags may be correct.
So, what is going on?
We have an incorrect encoder set up! We are stealing DVI1's encoder signal!
Let's brute force this b***h!

Next up, DIGB(01)
0000000	00  04  00  00  04  03  00  00  00  01  00  00  12  04  04  01	<-- Display port
0000010	00  02  00  00  04  00  00  00  00  01  00  00  11  01  03  06	<-- DVI2
0000020	00  08  00  00  04  02  00  00  00  01  00  00  22  05  02  04	<-- HDMI
0000030	04  00  00  00  14  02  00  00  00  01  00  00  00  00  06  05	<-- DVI1
Results: The same…

Up next, DIGC(02)
0000000	00  04  00  00  04  03  00  00  00  01  00  00  12  04  04  01	<-- Display port
0000010	00  02  00  00  04  00  00  00  00  01  00  00  11  02  03  06	<-- DVI2
0000020	00  08  00  00  04  02  00  00  00  01  00  00  22  05  02  04	<-- HDMI
0000030	04  00  00  00  14  02  00  00  00  01  00  00  00  00  06  05	<-- DVI1
Results: SUCCESS!
I got DVI2 to show it's signal.
Everything worked!
I was overwhelmed with joy.
I did it.
I got it to work.

I tried everything out: DVD player worked, steam worked, CI/QE worked, displays shut off. Hot Plug worked on port.
If I had DVI1+DVI2 and plugged HDMI, DVI2 disconnected and HDMI got control.
Unplugging HDMI only gives back control to DVI2 if you click detect monitors (not sure why, and actually, I don't care at all).

I am done
I don't need anything else from the personality.

But, what if you weren't so lucky?
My recommendation: try the remaining encoder, transmitter and control flags combinations, in that order.

*******************************************************************************************************************
Final Results.

This is what my personality looks like right now (I rearranged the connectors, just because I could):

Personality: Duckweed
ConnectorInfo count in decimal: 4
Disk offset in decimal 176800
0000000	04  00  00  00  14  02  00  00  00  01  00  00  00  00  06  05
0000010	00  08  00  00  04  02  00  00  00  01  00  00  22  05  02  04
0000020	00  02  00  00  04  00  00  00  00  01  00  00  11  02  03  06
0000030	00  04  00  00  04  03  00  00  00  01  00  00  12  04  04  01
The first line is the top DVI connector. XFX states this is the only DVI with a VGA option (DVI-I) and dual Channel.
The second line is the HDMI connector. This was taken from the Lotus personality with changed HotPlug ID and Sense ID.
The third line is the bottom DVI connector. XFX states this is a digital only (DVI-D).
No personality worked for this port, and I had to test each value until I got a working signal.
The fourth line is the Display Port connector. I can't test this since I do not have any adapters or displays compatible with this protocol.

I have attached my kext Attached File  ATI6000Controller.kext.zip   230.84KB   1037 downloads if you want to try it out.
I hope this guide helps someone else.
Thanks to everyone for the research.
Alex


Update (11/Feb/'12): There is a new tool available, created by redsockosx to decode the BIOS. This gives way more information than the previous tool in regards to the encoder/phy/link/etc. This tool may be downloaded from here. You dump the BIOS it just like you would with radeon_bios_decode. Thanks redsock!

If you get random freezes/lag try tweaking the encoder values. This seemed to solve all problems for some users.

#2
TH3L4UGH1NGM4N

TH3L4UGH1NGM4N

    (~_~)

  • Retired
  • 1,156 posts
  • Gender:Male
  • Location:Wonderland
  • Interests:(~_^)
Real professional post Alex I read every bit of word. One thing i could help you out on is the fact with the DisplayPort and the reason in which it doesn't work with DVI + DVI + HDMI is that they're all passive signals. You need at least one active signal (that being the Display Port[DP}). If you want to use the DP port or use an active converter from one of the DVI or HDMI would get you beyond the 2 monitor limitation. Just keep in mind active signaling is needed to go beyond 2 monitors due to clock limitations in current gpu architecture.

Again though, great post it almost made me accidentally buy a 6850 =p

#3
Alexander Martinez

Alexander Martinez

    InsanelyMac Protégé

  • Members
  • Pip
  • 12 posts
  • Gender:Male
  • Location:Mexico
  • Interests:Minecraft! (jamartinezm)
That actually makes a lot of sense.
This actually gives me a real excuse to go out and buy a DP to HDMI adapter to stop having to unplug cables (so, I'm lazy, sue me).
Also, I'm glad you liked the post.

#4
TH3L4UGH1NGM4N

TH3L4UGH1NGM4N

    (~_~)

  • Retired
  • 1,156 posts
  • Gender:Male
  • Location:Wonderland
  • Interests:(~_^)
Just make sure it's an active adapter and not the regular passive ones (you'll see the difference in price and the size as well)

And it's a post worth liking what can I say.

#5
RobertX

RobertX

    Yosemite Sam

  • Members
  • PipPipPipPipPipPipPip
  • 570 posts
  • Gender:Not Telling
.....a very good walkthrough...I'm going to take a little walk down your path....see if i can tweak my almost(semi)working graphics....also an avid reader here... :smoke:

#6
VCH888

VCH888

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 585 posts
Thanks for the good guide (rewritten). After I read this topic, I thought to get all working connectors of my PowerColor HD6870 (AX6870 1GBD5-2DH) last night. Finally, I got all connectors today.

ATOM BIOS Rom:SubsystemVendorID: 0x1787 SubsystemID: 0x2305IOBaseAddress: 0x0000Filename: B6A25BCA.HGZBIOS Bootup Message:BARTS XT 1GB GDDR5 BIOS B6A25BCA.HGZ								  PCI ID: 1002:6738Connector at index 0Type [@offset 44499]: DisplayPort (10)Encoder [@offset 44503]: INTERNAL_UNIPHY2 (0x21)	---- DP1i2cid [@offset 44627]: 0x90, OSX senseid: 0x1Connector at index 1Type [@offset 44509]: DisplayPort (10)Encoder [@offset 44513]: INTERNAL_UNIPHY2 (0x21)	---- DP2i2cid [@offset 44654]: 0x91, OSX senseid: 0x2Connector at index 2Type [@offset 44519]: HDMI-A (11)Encoder [@offset 44523]: INTERNAL_UNIPHY1 (0x20)	 ---- HDMIi2cid [@offset 44681]: 0x93, OSX senseid: 0x4Connector at index 3Type [@offset 44529]: DVI-D (3)Encoder [@offset 44533]: INTERNAL_UNIPHY1 (0x20)	---- DVI 2i2cid [@offset 44708]: 0x95, OSX senseid: 0x6Connector at index 4Type [@offset 44539]: DVI-I (2)Encoder [@offset 44543]: INTERNAL_UNIPHY (0x1e)	---- DVI 1i2cid [@offset 44745]: 0x94, OSX senseid: 0x5Connector at index 5Type [@offset 44549]: DVI-I (2)Encoder [@offset 44553]: INTERNAL_KLDSCP_DAC1 (0x15)	---- DVI 1i2cid [@offset 44745]: 0x94, OSX senseid: 0x5

Physical layout:

|__DVI 1__| /_HDMI_\ |_DP2_| |_DP1_|

|__DVI 2__|

Based on Chameleon Boot loader, it will use Duckweed as default when GraphicsEnabler is yes. Duckweed supports DVI 1 + HDMI + DP1 + DP2 natively. However, Dvi 2's not working at all.

Based on 10.7.2 combo update:

Personality: Duckweed
ConnectorInfo count in decimal: 4
Disk offset in decimal 523688
0000000 00 04 00 00 04 03 00 00 00 01 00 00 12 04 04 01
0000010 00 04 00 00 04 03 00 00 00 01 00 00 22 05 05 02
0000020 00 08 00 00 04 02 00 00 00 01 00 00 11 02 03 04
0000030 00 02 00 00 14 02 00 00 00 01 00 00 00 00 06 05
0000040

I looked personalities and got Gibba that is similar to Duckweed. Gibba has 5 connectors while Duckweed has 4 connectors. I booted with AtiConfig=Gibba and got DVI 1 and HDMI working. So, I tried to change as following

from

Personality: Gibba
ConnectorInfo count in decimal: 5
Disk offset in decimal 523928
0000000 00 04 00 00 04 03 00 00 00 01 00 00 12 04 05 01
0000010 00 04 00 00 04 03 00 00 00 01 00 00 22 05 04 02
0000020 00 08 00 00 04 02 00 00 00 01 00 00 11 02 06 04
0000030 00 02 00 00 14 02 00 00 00 01 00 00 00 00 03 05
0000040 04 00 00 00 04 02 00 00 00 01 00 00 11 02 01 03
0000050

to

Personality: Gibba
ConnectorInfo count in decimal: 5
Disk offset in decimal 523928
0000000 00 04 00 00 04 03 00 00 00 01 00 00 12 04 04 01 ---- DP 1
0000010 00 04 00 00 04 03 00 00 00 01 00 00 22 05 05 02 ---- DP 2
0000020 00 08 00 00 04 02 00 00 00 01 00 00 11 02 06 04 ---- HDMI
0000030 00 02 00 00 14 02 00 00 00 01 00 00 00 00 03 05 ---- DVI 1
0000040 04 00 00 00 04 02 00 00 00 01 00 00 11 02 01 06 ---- DVI 2
0000050

Then, I could use combination of either DVI 1 + DVI 2 + DP 1 + DP 2 or DVI 1 + HDMI + DP 1 + DP 2 as maximum four connectors. Also, I could use DVI 1 + DVI 2 or DP 1 + DVI 2 or DP 2 + DVI 2, for example. All connectors can be plugged and unplugged (detectable).

Note: DVI 2 will be disable when HDMI is active. I was using HexEdit to edit the personality. Using PowerColor active mini DisplayPort / DisplayPort to DVI adaptors.


----------------------------------------------------------------------------
Update: 2012-01-05
Another ATi HD5770 Sapphire vapor-x


Before patching:

Personality: Vervet
ConnectorInfo count in decimal: 4
Disk offset in decimal 485112
0000000 00 04 00 00 00 04 00 00 00 71 00 00 12 04 04 02 got black screen on DP2DVI
0000010 04 00 00 00 14 00 00 00 00 71 00 00 01 12 01 04
0000020 00 02 00 00 14 00 00 00 00 71 00 00 00 00 06 03
0000030 00 08 00 00 00 02 00 00 00 71 00 00 22 05 05 01
0000040


After patching

OK --- change only 71 to 01 for DP line
Personality: Vervet
ConnectorInfo count in decimal: 4
Disk offset in decimal 485112
0000000 00 04 00 00 00 04 00 00 00 01 00 00 12 04 04 02
0000010 04 00 00 00 14 00 00 00 00 71 00 00 01 12 01 04
0000020 00 02 00 00 14 00 00 00 00 71 00 00 00 00 06 03
0000030 00 08 00 00 00 02 00 00 00 71 00 00 22 05 05 01
0000040

Got maximum working three monitors properly.

DP2DVI + HDMI + DVI
DP2DVI + DVI + DVI
DP2DVI + DVI2VGA + DVI2V, etc.
must use DP to get the third monitor.
also
DP2DVI + HDMI
DP2DVI + DVI, etc

#7
Alexander Martinez

Alexander Martinez

    InsanelyMac Protégé

  • Members
  • Pip
  • 12 posts
  • Gender:Male
  • Location:Mexico
  • Interests:Minecraft! (jamartinezm)
Nice!
I'm glad you got all connectors to work!
I'm still waiting a little bit to get the active adapter (since I've got to ship it outside the US), then I'll be in multi-monitor heaven!

#8
Fruchtzwergli

Fruchtzwergli

    InsanelyMac Protégé

  • Members
  • Pip
  • 1 posts
Awesome write-up! :-)

A while back I got my Club 3D / Powercolor 6850's second DVI port using Mucha's and bcc9's posts and a bit of chaotic hex editing... However after waking up from sleep, the second monitor remains in sleep mode (connector information is still present in the display menu, also after detect monitors). I'm beginning to think this is could be related to the hotplugIDs; could you check if this happens with your edited personality as well?

Best wishes for the new year!

#9
Alexander Martinez

Alexander Martinez

    InsanelyMac Protégé

  • Members
  • Pip
  • 12 posts
  • Gender:Male
  • Location:Mexico
  • Interests:Minecraft! (jamartinezm)

Awesome write-up! :-)

A while back I got my Club 3D / Powercolor 6850's second DVI port using Mucha's and bcc9's posts and a bit of chaotic hex editing... However after waking up from sleep, the second monitor remains in sleep mode (connector information is still present in the display menu, also after detect monitors). I'm beginning to think this is could be related to the hotplugIDs; could you check if this happens with your edited personality as well?

Best wishes for the new year!


Hello,
This does not happen for any of my monitors. My computer has been waking up and sleeping for over 2 weeks in a row and all displays work correctly. Just like you said, try checking for duplicate Hot plug IDs.


Best wishes to you too.

#10
Shakin_Handz

Shakin_Handz

    InsanelyMac Protégé

  • Members
  • Pip
  • 4 posts
  • Gender:Male
  • Location:Rochester, New York. US of A
I've tried using this method and I'm just not having any luck. I have a Sapphire 6850, however all the outputs are the same as yours. I've tried using the same descriptors as you, tried my own, and I just can't get this to work. I'm using HexFiend. Is it possible that it's not changing the descriptors?
I've gotten my comp to detect the tv but the tv doesn't read the signal. Does this have to do with the transmittor?

#11
Alexander Martinez

Alexander Martinez

    InsanelyMac Protégé

  • Members
  • Pip
  • 12 posts
  • Gender:Male
  • Location:Mexico
  • Interests:Minecraft! (jamartinezm)

I've tried using this method and I'm just not having any luck. I have a Sapphire 6850, however all the outputs are the same as yours. I've tried using the same descriptors as you, tried my own, and I just can't get this to work. I'm using HexFiend. Is it possible that it's not changing the descriptors?
I've gotten my comp to detect the tv but the tv doesn't read the signal. Does this have to do with the transmittor?


Have you tried verifying that the modded kext is being loaded correctly?
If you run ati-personality.pl (or ati-personality.pl -x for x64) after an edit, does it show your modified values?
Are you editing the file for the correct kernel version (32 bits vs 64 bits)?
Could it be that the system is loading a cached version that is not modified (try booting with -f)?

As for the tv not getting a picture:

Check for duplicate hotplug id's.
Check for incorrect connector type.
I'd like to think that it's more of an encoder problem than a transmitter but I would not discard the latter.
Use the decoded bios information to get the transmitter (UNIPHYx where x could be nothing, 1 or 2). HDMI is usually single link (check with your manufacturer), so you would choose UNIPHYx:LINKA or UNIPHYx:LINKB. Try each of the encoders with both transmitters.

Let me know how it goes.

#12
existation

existation

    InsanelyMac Protégé

  • Members
  • PipPip
  • 68 posts
VCH888 Can you post your patched kext pls...
I wanna try.
I have
HD 6870 IceQ X Turbo HIS

#13
VCH888

VCH888

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 585 posts

VCH888 Can you post your patched kext pls...
I wanna try.
I have
HD 6870 IceQ X Turbo HIS


Sorry, I updated to 10.7.3 beta.

You can make it by yourself if you read Alexander's guide.

#14
existation

existation

    InsanelyMac Protégé

  • Members
  • PipPip
  • 68 posts
I read but my native language is russian... i can not do this ((
Do you have any backup of kext?
One guy try patched kext from guide for 6850. Work cool.

#15
VCH888

VCH888

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 585 posts

I read but my native language is russian... i can not do this ((
Do you have any backup of kext?
One guy try patched kext from guide for 6850. Work cool.


You may try this attached file by using Terminal. Back up ATI6000Controller.kext before patching and use as your own risk.

Attached File  HD6870_Gibba_patch.txt   808bytes   294 downloads

#16
existation

existation

    InsanelyMac Protégé

  • Members
  • PipPip
  • 68 posts
This is 2 commands?

sudo perl -pi -e &#39;s|\x00\x04\x00\x00\x04\x03\x00\x00\x00\x01\x00\x00\x12\x04\x05\x01\x00\x04\x00\x00\x04\x03\x00\x00\x00\x01\x00\x00\x22\x05\x04\x02\x00\x08\x00\x00\x04\x02\x00\x00\x00\x01\x00\x00\x11\x02\x06\x04\x00\x02\x00\x00\x14\x02\x00\x00\x00\x01\x00\x00\x00\x00\x03\x05\x04\x00\x00\x00\x04\x02\x00\x00\x00\x01\x00\x00\x11\x02\x01\x03|\x00\x04\x00\x00\x04\x03\x00\x00\x00\x01\x00\x00\x12\x04\x04\x01\x00\x04\x00\x00\x04\x03\x00\x00\x00\x01\x00\x00\x22\x05\x05\x02\x00\x08\x00\x00\x04\x02\x00\x00\x00\x01\x00\x00\x11\x02\x06\x04\x00\x02\x00\x00\x14\x02\x00\x00\x00\x01\x00\x00\x00\x00\x03\x05\x04\x00\x00\x00\x04\x02\x00\x00\x00\x01\x00\x00\x11\x02\x01\x06|g&#39; /System/Library/Extensions/ATI6000Controller.kext/Contents/MacOS/ATI6000Controller
enter
than
sudo touch /System/Library/Extensions
enter
??????

#17
VCH888

VCH888

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 585 posts

This is 2 commands?

sudo perl -pi -e &#39;s|\x00\x04\x00\x00\x04\x03\x00\x00\x00\x01\x00\x00\x12\x04\x05\x01\x00\x04\x00\x00\x04\x03\x00\x00\x00\x01\x00\x00\x22\x05\x04\x02\x00\x08\x00\x00\x04\x02\x00\x00\x00\x01\x00\x00\x11\x02\x06\x04\x00\x02\x00\x00\x14\x02\x00\x00\x00\x01\x00\x00\x00\x00\x03\x05\x04\x00\x00\x00\x04\x02\x00\x00\x00\x01\x00\x00\x11\x02\x01\x03|\x00\x04\x00\x00\x04\x03\x00\x00\x00\x01\x00\x00\x12\x04\x04\x01\x00\x04\x00\x00\x04\x03\x00\x00\x00\x01\x00\x00\x22\x05\x05\x02\x00\x08\x00\x00\x04\x02\x00\x00\x00\x01\x00\x00\x11\x02\x06\x04\x00\x02\x00\x00\x14\x02\x00\x00\x00\x01\x00\x00\x00\x00\x03\x05\x04\x00\x00\x00\x04\x02\x00\x00\x00\x01\x00\x00\x11\x02\x01\x06|g&#39; /System/Library/Extensions/ATI6000Controller.kext/Contents/MacOS/ATI6000Controller
enter
than
sudo touch /System/Library/Extensions
enter
??????


Sorry for not replying all steps.

After you rebuild kextcache, you got to wait a few minute and then restart the system.

Before boot the OS, press F8 (if you don't set timeout in org.chameleon.Boot.plist)

type AtiConfig=Gibba

You should get all ports to work , remember only four maximum monitors.

#18
J Lamp

J Lamp

    InsanelyMac Protégé

  • Members
  • PipPip
  • 57 posts
Sorry guys, this is an excellent write up, but I'm obviously missing something here. I'm having no luck parsing the output from"perl ati-personality.pl -x". I've used the radeon_bios_decode without any trouble. I've read bcc9's "finding the patch address" instructions, but it just leaves my head spinning, especially after I've found two posts with conflicting ways of calculating the hex addresses. Hopefully someone can quickly look at the output files I'm getting from the perl script and point me in the right direction.

EDIT: OK, ignore that, I needed the -x AND -a switches.

Attached Files



#19
lox72

lox72

    InsanelyMac Protégé

  • Members
  • PipPip
  • 62 posts
  • Gender:Male
Alexander martinez Thank you very much for your aticontroller6000 now my graphics card is recognized (sapphire ati radeon HD6850). two monitors are ok but no audio dvi hdmi. I can suggest solutions? send me your dsdt
thanks

http://imageshack.us.../85/info2t.png/

http://img191.images.../3532/suono.png

#20
Alexander Martinez

Alexander Martinez

    InsanelyMac Protégé

  • Members
  • Pip
  • 12 posts
  • Gender:Male
  • Location:Mexico
  • Interests:Minecraft! (jamartinezm)
Hello, lox72.
Glad you got the card recognized.
As for the HDMI audio problem, it's either incomplete/missing DSDT edits or using an old patched AppleHDA.kext.

Start by editing your DSDT. Verify with IORegistryExplorer if HDAU is loading under PEGP.
I edited my DSDT

I will attatch my current DSDT. Your areas of interest will be GFX0 and HDAU, where it says hda-gfx.
This is what my audio edits look like:

		Device (PCI0)
		{
			Name (_HID, EisaId ("PNP0A03"))
			Name (_ADR, Zero)
			Name (_UID, One)
			Name (_BBN, Zero)
			Device (PEGP)
			{
				Name (_ADR, 0x00010000)
				Name (_PRW, Package (0x02)
				{
					0x09,
					0x05
				})
				Device (GFX0)
				{
					Name (_ADR, Zero)
					Name (_SUN, One)
					Method (_DSM, 4, NotSerialized)
					{
						Store (Package (0x06)
							{
								"@0,connector-type",
								Buffer (0x04)
								{
									0x00, 0x08, 0x00, 0x00
								},
								"@1,connector-type",
								Buffer (0x04)
								{
									0x00, 0x08, 0x00, 0x00
								},
								"hda-gfx",
								Buffer (0x0A)
								{
									"onboard-1"
								}
							}, Local0)
						DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
						Return (Local0)
					}
				}
				Device (HDAU)
				{
					Name (_ADR, One)
					Method (_DSM, 4, NotSerialized)
					{
						Store (Package (0x02)
							{
								"hda-gfx",
								Buffer (0x0A)
								{
									"onboard-1"
								}
							}, Local0)
						DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
						Return (Local0)
					}
				}
			}

Good Luck

Attached Files







0 user(s) are reading this topic

0 members, 0 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