Jump to content

Editing custom personalities for ATI Radeon HD[45]xx


bcc9
 Share

775 posts in this topic

Recommended Posts

Larry, congrats! Do you also have triple (synchronous/ all 3 at the same time) monitors via your 5670 in Win7 64 and AVLin? Did you have to apply any patch(es) in Linux and Windows, too?

 

Also: do all three ports wake form sleep while the correct fb is set (= DVD Player app working)? With my 5450 only the VGA port wakes from sleep when the proper fb is set. For full wake-up from sleep functionality on DVI and HDMI, too, I have to *disable* GraphicsEnabler, causing the 5450 to fall back into generic Radeon FB and also enabling wake-up from sleep for the other ports ...

Link to comment
Share on other sites

Bugs:

 

I originally bought the 5670 2 yrs ago because it was among the lowest cost multiple-monitor capable cards I could find when I transitioned to Win7 from XP. My old card, a Matrox Parhelia, had no drivers available beyond XP. The 5670 card I have is 'Eyefinity' capable, and has DVI/HDMI and DP connectors on it - no VGA, and I have had 3 monitors in Win7 from the start, just using the latest ATI/AMD drivers and Catalyst software - no mods of any kind necessary. I did need to buy an active displayport-to-DVI adapter, as the DP port MUST be used for one of the 3 monitors in Eyefinity mode. If your card does not support Eyefinity, you probably won't be able to get more than 2 displays working at once. YMMV - I haven't had any experience with a non-Eyefinity ATI card - sorry.

 

In AVLinux, there is a special scripted boot mode available which allows the installation of 3rd party Gfx drivers. I just ran that, it found the ATI card, downloaded and installed the drivers from ATI/AMD, and after some juggling with settings in the Linux version of Catalyst, I had all of my monitors working, at the same time. This was actually much easier than fixing the FB settings in OSX - no coding of any kind... The drivers I am using for W7 and AVL are the Catalyst 12.3 drivers available at AMD.com. I am triple-booting using the Grub2 boot mechanism from ALinux.

 

Regarding sleep - I do not use any sleep modes on this PC, as it is my A/V edit box, so I can't tell you how the system comes back from sleep. I generally turn the PC off overnight, and the only screensaving setup I use is to set the monitors to turn off after an hour of no use. Wiggling the mouse brings all screens back - no issues.

 

My system is very stable. Last night, I left it overnight running under OSX rendering an HD video clip, and there were no issues when I returned this morning.

 

Good luck - I am not an expert in this stuff - I just wanted to post here to express my thanks to the experts here and on tonymac that led me to have success. Now I am going to run some more backups, and try to forget what a framebuffer is!!! (no, I won't be upgrading to Lion anytime soon...)

 

Larry

  • Like 1
Link to comment
Share on other sites

thank you, Larry, epic reply :)! A few more questions, and one request:

  1. Do you have the 1 GB DDR5 version?
  2. Is your reason for not upgrading to Lion anytime soon that you would have to go through another avalanche of modding kexts = hours more work? Or would the card work OOTB in Lion with QE/ CI on triple mons?
  3. I have not studied the forum on this is you have, so - would you recommend the 5670, or rather a different one, as a good triple mon card for non-gamer purposes?
  4. Would you be so kind and post (zip and attach) your mods (DSL etc.)?

I checked: my Radeon HD 5450 is unfortunately NOT of the 5450 Eyefinity editions (and I'm postive it can't be modded [driver/ dsdt/ ROM] into simult. 3 mons, lacking the DP)

 

BTW, anybody interested in a bit of education on budget triple mon setups go and read here.

Link to comment
Share on other sites

Bugs:

 

1. The card I have is the Sapphire 100287L HD 5670 512MB card, purchased from Newegg. It is discontinued, unfortunately.

 

2. I don't want any more kext masturbation for a while. I just want to use the computer, and I seriously doubt that the 5670 would work with 3 mon out of the box under Lion.

 

3. I had purchased the 5670 for its Windows triple mon capabilities - I just lucked out stumbling onto this thread outlining the exact way to make it work under OSX. If I was going to buy a card specifically for OSX, there are a lot of folks on these forums think the Gigabyte HD 6850 1GB card is the one to get. That is the card I just sent back after I got my 5670 to work. It will probably still require some FB editing to get it perfect, unless it works OOTB w/Lion. I don't know that.

 

4. Everything I did to make my card work is detailed in the first post of this thread. OP Bcc9 did all the heavy lifting for us. I ended up with the exact same edits he outlined. Since all of my edits were concerned with the Uakari FB on 10.6.8, I don't think my exact files would do you any good unless you had the exact video card I have.

 

Unfortunately, you are going to have to get an Eyefinity-capable card to reach the triple monitor 'Holy Grail' on OSX, and are probably going to have to do some kext/FB editing to make it work perfectly. Re-read the first post, and chase other similar posts. The Gigabyte 6850 card I had is approx. $170 on Newegg. That might be a good place to start. It can be done. Now, I'm done.

 

Thanks,

 

Larry

Link to comment
Share on other sites

LUpton,

Thanks, good to hear some success stories for a change.

It's a shame you had trouble finding this thread, it's a bit of a testament to how disorganized information is across here and tonymac. If users would site where their information came from (especially at tonymac where there seems to be a pervasive problem in this area) that'd go a long way to improving the situation. Probably there should be a master technical thread as a sticky, with subordinate support threads for user questions, and shrink wrapped solutions. This was meant to be the technical thread but hasn't been that way for a while now, with all the newbie posts, thus I don't even follow it much.

 

I'm not an administrator at either site so I cannot make this happen short of taking my info to a web site of my own as others have in the past (not really interested in that, btw).

Link to comment
Share on other sites

@ Larry: epic reply No. 2, thank you very much for your efforts, all is crystal-clear now!

 

@ bcc9: I managed to get some friends ATI going in Lion thanks to your great topic, so there's more than just one .. ;)

 

The forum internal search does not deliver good results. Here's how I search:

Dogpile.com would work, too, instead of Metacrawler.

Link to comment
Share on other sites

Hello all, I'm lost.

 

I do not know that more tests I can perform. I followed your guidelines for "Custom ati kexts" but I do not get the right combination.

 

I have an Acer Aspire 7741G with screen 17" (1600x900x32) with Ati mobility 5650 and I can not work with GraphicsEnabler = Yes

 

I have created a forum thread with all the details of my numerous tests.

http://www.insanelym...howtopic=277765

 

Please, can anyone help me?

 

Regards.

Link to comment
Share on other sites

  • 5 weeks later...

Hello bcc9,

I am attempting to get my 6990m to work on my laptop LVDS. I modded my ATI6000Controller Elodea personality. It turns out, ATYActive flag =4 for 0x400 which is displayport. I need my LVDS to work, how can I get that fixed? I know i'm close. Would you be able to help me? Thanks for your time.

Link to comment
Share on other sites

  • 3 weeks later...

I've updated the perl script in post #1 to version 0.9, which includes support for dumping the connector info for OSX 10.8 kexts.

I've also changed the default dump output to 64 bit kext info instead of 32 bit (you can use -386 for 32 bit kext output).

 

Please note:

Don't ask me about mobile GPU support, I have no first hand experience with such hardware myself. Mucha's thread, referenced in post #1 is a good starting point.

Don't PM me for tech support, I normally don't have time to answer; I don't even have radeon hardware running on a hackintosh myself at this time.

Link to comment
Share on other sites

@bcc9

 

Thanks, I will try version 0.9

 

I am on Mountain Lion DP4 test system with ATI Radeon HD 4350 PCI-e 512MB

 

1) I know now how to make a backup of my video vbios by using GPUz for windows

2) I did try v0.8 but the ML now use AMD4600Controller and not ati4600crontroller

 

Thanks again :)

Link to comment
Share on other sites

2) I did try v0.8 but the ML now use AMD4600Controller and not ati4600crontroller

Yes, 0.9 fixes things to work with Apple's new inconsistent naming (kext is still named ATI* but binary is AMD*).

The script also now handles fat or thin binaries since Apple has now dumped the 386 code from the kexts.

Link to comment
Share on other sites

this is the info i got fram my card MSI ATI Radeon HD 4350 512MB PCI-2 (0x954F1002)

 

 

fbifidos-iMac:Desktop fbifido$ ./radeon_bios_decode < /Extra/1002_954F.rom

ATOM BIOS Rom:

SubsystemVendorID: 0x1462 SubsystemID: 0x1610

IOBaseAddress: 0x0000

Filename: Test.bin

BIOS Bootup Message:

113-MSITV161MS.121 AB85300-101-MI RV710 DDR2 64BIT 600E/500M

PCI ID: 1002:954f

Connector at index 0

Type [@offset 44572]: VGA (1)

Encoder [@offset 44576]: INTERNAL_KLDSCP_DAC2 (0x16)

i2cid [@offset 44626]: 0x90, OSX senseid: 0x1

Connector at index 1

Type [@offset 44582]: DVI-I (2)

Encoder [@offset 44586]: INTERNAL_KLDSCP_DAC1 (0x15)

i2cid [@offset 44651]: 0x94, OSX senseid: 0x5

Connector at index 2

Type [@offset 44592]: DVI-I (2)

Encoder [@offset 44596]: INTERNAL_UNIPHY2 (0x21)

i2cid [@offset 44651]: 0x94, OSX senseid: 0x5

 

 

When i ran version 0.9 it same the same thing about ATI2400*, does that mean my kext should be ATI2400Controller.kext and not the ATI4600* ?

 

here are all the files settings and rom image, i am trying to get my ATI Radeon HD 4350 to work on Mountain Lion DP4 with QE/CI

 

Help

ATI Radeon 4350 OCI-e 512MB.zip

Link to comment
Share on other sites

  • 2 weeks later...
Yes, 0.9 fixes things to work with Apple's new inconsistent naming (kext is still named ATI* but binary is AMD*). The script also now handles fat or thin binaries since Apple has now dumped the 386 code from the kexts.

 

the -386 did not work and -a will not work, because the ATIFramebuffer also use the AMD* naming system.

also you set allkexts to 1 for 10.7 and if the user use -a ???

 

I tried to do x86_64 and i386 but i get the same "Disk offset in dec: 126768" , i was using ML DP4 64bit.

Link to comment
Share on other sites

the -386 did not work and -a will not work, because the ATIFramebuffer also use the AMD* naming system.

also you set allkexts to 1 for 10.7 and if the user use -a ???

 

I tried to do x86_64 and i386 but i get the same "Disk offset in dec: 126768" , i was using ML DP4 64bit.

-386 is of course not going to work under mountain lion dp4 as there is no 386 code in the binary.

The -a switch is to allow parsing of all the controller kexts under 10.6; you do not need that switch for 10.7 or 10.8. It is a no-op if you use -a with the newer releases.

 

The script certainly works with ML DP4 kexts I tested it.

Link to comment
Share on other sites

ok, Thanks.

 

I did not see the ATIFramebuffer.kext from ML DP4 in the list, or was that from the tools i use to install ML DP4?

 

i will double check that.

 

Thanks again.

Link to comment
Share on other sites

I did not see the ATIFramebuffer.kext from ML DP4 in the list, or was that from the tools i use to install ML DP4?

As of 10.7, or the 10.6 2011 MBP kexts, ATIFramebuffer does not contain the personality information. That information was moved to the individual controller kexts at that time.
Link to comment
Share on other sites

-386 is of course not going to work under mountain lion dp4 as there is no 386 code in the binary.

The -a switch is to allow parsing of all the controller kexts under 10.6; you do not need that switch for 10.7 or 10.8. It is a no-op if you use -a with the newer releases.

 

The script certainly works with ML DP4 kexts I tested it.

 

HELP PLEASE.

 

ok, here goes:

 

i installed lion 10.7.3 and set it to 32bit then, load RadeonPCI and dump the rom image:

 

bash-3.2# kextutil RadeonPCI.kext

bash-3.2# ./RadeonDump -d

Found a device of class RadeonPCI: IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/P0P2@1/IOPCI2PCIBridge/display@0/RadeonPCI

it matched on name "ATY_GPU"

 

Then made sure the file was there:

 

bash-3.2# ls -l

total 488

-rw-r--r--@ 1 fbifido staff 6148 Jul 1 10:26 .DS_Store

-rw-r--r-- 1 root staff 61440 Jul 1 10:34 954F.0301.00E0.vga.rom

-rwxr-xr-x 1 root wheel 177032 Jul 25 2008 RadeonDump

drwxr-xr-x 3 root wheel 102 Oct 12 2009 RadeonHD.kext

drwxr-xr-x 3 root wheel 102 Mar 11 2010 RadeonPCI.kext

 

I then need to see what other info i could get from the dump software:

 

bash-3.2# ./RadeonDump -i

Found a device of class RadeonPCI: IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/P0P2@1/IOPCI2PCIBridge/display@0/RadeonPCI

it matched on name "ATY_GPU"

Detected unknown Card (device id: 0x954f)

It's not in known card list, treat as card with device id: 0x9511

Detect EDID may fail for this card.

Start I2C dump

ATOM BIOS detected

ATOM BIOS Rom:

SubsystemVendorID: 0x1462 SubsystemID: 0x1610

IOBaseAddress: 0xd000

Filename: Test.bin

BIOS Bootup Message:

113-MSITV161MS.121 AB85300-101-MI RV710 DDR2 64BIT 600E/500M

object id 0005 01

src object id 2116 22

record type 1

rhdAtomParseI2CRecord: I2C Record: GPIO_ID 9 EngineID: 0 I2CAddr: 0

ddc_line from ATOMBIOS: 0x0

record type 4

object id 0002 02

src object id 2121 33

src object id 2115 21

record type 1

rhdAtomParseI2CRecord: I2C Record: GPIO_ID 9 EngineID: 2 I2CAddr: 0

ddc_line from ATOMBIOS: 0x0

record type 2

record type 4

 

Then i run the rom image decoder:

 

bash-3.2# ./radeon_bios_decode < 954F.0301.00E0.vga.rom

ATOM BIOS Rom:

SubsystemVendorID: 0x1462 SubsystemID: 0x1610

IOBaseAddress: 0xd000

Filename: Test.bin

BIOS Bootup Message:

113-MSITV161MS.121 AB85300-101-MI RV710 DDR2 64BIT 600E/500M

PCI ID: 1002:954f

Connector at index 0

Type [@offset 44572]: VGA (1)

Encoder [@offset 44576]: INTERNAL_KLDSCP_DAC2 (0x16)

i2cid [@offset 44626]: 0x90, OSX senseid: 0x1

Connector at index 1

Type [@offset 44582]: DVI-I (2)

Encoder [@offset 44586]: INTERNAL_KLDSCP_DAC1 (0x15)

i2cid [@offset 44651]: 0x94, OSX senseid: 0x5

Connector at index 2

Type [@offset 44592]: DVI-I (2)

Encoder [@offset 44596]: INTERNAL_UNIPHY2 (0x21)

i2cid [@offset 44651]: 0x94, OSX senseid: 0x5

 

 

then i look up the ATI4600 Shrike info:

 

/System/Library/Extensions//ATI4600Controller.kext/Contents/MacOS/ATI4600Controller

Personality: Shrike

ConnectorInfo count in decimal: 3

Disk offset in decimal 130928

0000000 02 00 00 00 40 00 00 00 09 01 00 00 02 01 00 03

0000010 02 00 00 00 00 01 00 00 09 01 00 00 20 01 02 02

0000020 00 04 00 00 04 03 00 00 00 01 00 00 10 00 01 01

0000030

 

After all of this i tried to modify it to confine to my card connection, which is VGA,DVI,DVI:

but i did not know how to find the Transmitter and Encoder.

 

my Shrike:

0000000 10 00 00 00 10 00 00 00 00 01 00 00 00 10 00 01 VGA

0000010 04 00 00 00 14 00 00 00 00 01 00 00 02 00 01 05 DVI

0000020 04 00 00 00 14 00 00 00 00 01 00 00 02 00 02 05 DVI

 

BTW: this did not work. I did set ATIConfig to Shrike and ATI-ROM as Yes.

 

 

How do i goo about this with all the info from above?

 

As of 10.7, or the 10.6 2011 MBP kexts, ATIFramebuffer does not contain the personality information. That information was moved to the individual controller kexts at that time.

 

About Kexts, how many do we have to modify to get QE/CI to work properly?

say for my card:

1) ATI4600Controller.kext/Contents/info.plist (add your card ID eg: 0x954f1002)

2) ATI4600Controller.kext/Contents/MacOS/ati4600Controller (modify Flicker, Gliff or Shrike to your card ports)

you can check the order by decoding the rom image.

3) ATIRadeonx2000.kext/Contents/MacOS/ATIRadeonx2000 ( i don't know the code that must be change in this file)

Link to comment
Share on other sites

  • 2 weeks later...

would someone mind posting the connecter output info for mountain lion gm (specifically for eulmur framebuffer)? I'm having issues on my install with the perl script locating otools (even with the ml Xcode gm).

Link to comment
Share on other sites

  • 2 weeks later...

would someone mind posting the connecter output info for mountain lion gm (specifically for eulmur framebuffer)? I'm having issues on my install with the perl script locating otools (even with the ml Xcode gm).

Open Xcode, go to Preferences -> Downloads and install Command Line Tools.

 

Thanks, bcc9, for your awesome research and the great description in this post.

 

I have created a slightly enhanced version for my own use, which provides an option to only parse a single KEXT. This saves some time when one is working on the personalities and wants to verify whether the patch has worked.

 

I have used Getopt::Long and Pod::Usage to simplify the parsing of arguments and also to provide a Usage option [-h].

 

#  ./ati-personality-zhell.pl -h
Usage:
ati-personality.pl [OPTIONS] [KEXT]
KEXT is the name of a KEXT in SLE, or the path to a KEXT
Examples for KEXT argument:
	ATI6000Controller.kext
	"/Volumes/OS X/System/Library/Extensions/ATI6000Controller.kext"
Options:
  -s=[sLE]		  Look for KEXTs in directory SLE
  -i386			 Architecture i386 (only available up to OS X Lion)
  -v				Verbose output (only useful for developers)
  -a				Specify if you use OS X 10.6 2011 MacBook Pro KEXTs
					[DEPRECATED]

 

Please find this ati-personality-zhell.pl script with these enhancements attached below.

You are more than welcome to incorporate these enhancements into your own script and make them available to everybody.

ati-personality-0.9-zhell.zip

  • Like 1
Link to comment
Share on other sites

Thanks zhell, I've tweaked&added your changes to the version of the script in post #1.

 

Of course the script should probably look at the version of OSX running on the target volume if /S/L/E is not used, but I'll save that for a future update :)

 

Also, instead of downloading command line tools, one can use otools, etc. with current xcode just by updating your path. e.g.:

set path = ($path `xcode-select -print-path`/usr/bin)

or PATH=$PATH:`xcode-select -print-path`/usr/bin; export PATH

if you're a bash/sh person.

 

I find it really poor of Apple to promote installation of 2 copies of the developer tools on the system just to get the tools find-able via a standard path. They could at least install default symlinks like what some linux distributions do with their /etc/alternatives solution.

 

The script could search for the tools in the above path automatically but maybe that's going too far (better to get one's xcode environment set up right).

Link to comment
Share on other sites

Great job, bcc9!

I want to thank you for the method to make a Radeon working. It will be helpful for many many new users.

My report briefly.

Graphics Card: Gigabyte HD6670 2Gb DeviceID=0x6758. Outputs DVI-D, VGA, HDMI.

1. Without any injector it works natively with RadeonFramebuffer. But DVDPlayer chashes.

2. With GraphicsInjector=Yes, or with DSDT patch, or with Natit, no matter what I inject and what frame buffer choose I always get black screen.

3. With connectors patched by your manual I got fully working Graphics, including resolution, rotating, OpenGL, DVD playback. Injected values are not very important. Only basics are needed. Framebuffer may be chosen anyone, appropriate for 6000. I checked with Pithecia and with Ipomoea. Same result.

 

My final result with Ipomoea

 04 00 00 00  04 03 00 00  00 01  00 00  10  00  01  06
 10 00 00 00  10 00 00 00  00 01  00 00  00  00  00  01
 00 08 00 00  04 02 00 00  00 01  00 00  12  04  04  03

 

To get VBios I made an addition in Clover.

Start with Clover rev579 up to GUI. Press F6 and get EFI/misc/c0000.bin

This file may be used for

./radeon_bios_decode

./redsock_bios_decoder

 

Is it possible to get sources of these decoders?

 

 

PS. Just wonder, why the theme is not pinned in the forum. It is more useful then other pinned here.

Edited by fantomas1
done
Link to comment
Share on other sites

Hi Slice, surprisingly, you're the first to ask for the source. I hadn't posted the source (like I normally would) simply because the code was a midnight hack-attack that is not properly maintainable without some cleanup. The code is way below my standard for releasing but I'll put it out there as-is anyways. The code is largely lifted from two sources:

1. The xf86 ati video driver source xf86-video-ati-6.14.0/src

2. the linux kernel driver source linux-2.6.37/drivers/gpu/drm/radeon

 

Unfortunately the two sources are using different APIs for bios parsing and it's not clear which one was going to be supported going forward (it looked like the newer code was using an inferior API if I remember correctly). I wound up using a bit of both and never got around to cleaning things up.

 

Also I did add hex offset output to radeon_bios_decode as someone was claiming to want it but I don't think it was ever used by anyone in the end. That information should probably be hidden from the output by default.

 

As for redsock_bios_decoder, I do not know who published that or where it came from (I never recommended it). It looks to largely be a re-implementation of radeon_bios_decode. If there is something that radeon_bios_decode is missing that people need in order to edit their connectors, I think it should just be added to radeon_bios_decode. Best not to have a second utility replicating almost everything.

 

Regarding clover, I notice that recent code is patching the ATI connector information using static edited connector tables. I think it's cool to start to automate the patching of connectors but I think static tables is the wrong approach. It would be much cooler to make options to dynamically change the connector count, order, type, etc. And, perhaps this would be better ironed out in a general purpose auto-patch script that newbies could use, rather than in one particular bootloader.

 

PS: I think I have a lot of posts that are worthy of stickies/FAQs, but since I don't run this site none of them are (ok, 1 is now :) Perhaps a short book on best current practices for OSX hackintosh development is in order :)

radeon_bios_decode.0.2.src.zip

  • Like 1
Link to comment
Share on other sites

Hey bcc9, hat's off to ya for all your early and continued effort on all this.

 

Its been many moons since I did anything with my quick hackjob for redsock_bios_decoder, from memory, the only reason I did it was to cross-reference the actual output flags that were scattered from different sources with part of your effort as I had been scratching down lots of hand-written notes when I was playing around with it all.

 

Let me know if y'all want me to dust off my notes as well.

 

Cheers

Link to comment
Share on other sites

 Share

×
×
  • Create New...