Jump to content

Editing custom personalities for ATI Radeon HD[45]xx


bcc9
 Share

775 posts in this topic

Recommended Posts

Hello bcc9,

 

thanks for sharing your very interesting advanced knowledge.

 

I am a Sony VAIO F11 user with a nvidia gt330m card. I believe sony users have similar problems with the nvidia driver. For windows nvidia patched their driver especially for sony notebooks, since 260+.

 

Under OSX the driver will lead into a black internal screen. All investigations show the problem must be inside the driver. The ioreg shows the driver is correctly loaded, also hdmi works. Only display0 inside Display-B is matched by IOGraphicsFamily, but there is a Display-A missing: screenshot ioreg

 

Now I have some questions to you:

 

1. How did you find out that there are these personalities inside the driver?

 

2. How did you know you have to look into the atiframebuffer kext, and not another ati kext?

 

3. Do you have any suggestions how I could start investigation on the nvidia kexts to fix this problem?

 

Thank you for help!

Link to comment
Share on other sites

Thanks bcc9!

 

I can finally report success enabling QE/CI on my Mobility Radeon HD 4330. There are numerous other successes in our Mobility Radeon thread.

 

I want to share with you my experiences. I have Acer Aspire 7741G (HD5650, 17")

 

I tried EVERYONE, but my internal still doesn't show anytehing!

 

And now some questions:

 

1. Maybe something wrong with boot file? I use attached one from this topic.

2. Maybe something wrong with ATY_Init or its version? I use attaced one (see below).

3. Maybe I should use 10.6.6 kexts, instead Lion?

4. Maybe something wrong with DIGs encoders (they were not initialized or something else)?

5. Maybe I should use DSDT? I don't have it yet (see this topic).

Your experience sounds like mine

 

Try krazybirdy's method getting dmesg from Linux, its much easier than brute force for encoder/decoder.

 

CCC has reported LVDS will not enable with NullCPUPowerManagement.kext (or presumable Disabler.kext) in /Extra/Extensions

 

Booter is very important. Most of us in Mobility Radeon thread are using Chameleon trunk, which we have recompiled after modifying ATI.C such that our card is supported -- change kNull to kEulemur (or whatever FB)

 

You don't need ATY_Init and it will probably interfere.

 

In theory 10.7 should be no different from 10.6.6, but I have used 10.6.6

 

You need both encoder/decoder correct; then it will initialize.

 

DSDT is mostly not relevant, but may help deal with AppleIntelCPUPowerManagement without NullCPUPowerManagement.

Link to comment
Share on other sites

In theory 10.7 should be no different from 10.6.6, but I have used 10.6.6

 

It is different, ATIFramebuffer personalities have moved to ATI5000Controller. 10.7 is different. for unsupported cards there may have to be another solution when Lion gets up[ and running with a bootloader but atm its still very buggy.

Link to comment
Share on other sites

Booter is very important. Most of us in Mobility Radeon thread are using Chameleon trunk, which we have recompiled after modifying ATI.C such that our card is supported -- change kNull to kEulemur (or whatever FB)

Please post link to this boot file.

 

 

Thank you for answering my questions.

 

It is different, ATIFramebuffer personalities have moved to ATI5000Controller. 10.7 is different. for unsupported cards there may have to be another solution when Lion gets up[ and running with a bootloader but atm its still very buggy.

 

So, what kexts I shoud use 10.6.6 or Lion with my HD5650m? The answer to this question is very important to me.

Link to comment
Share on other sites

Please post link to this boot file.

source code is at http://code.google.com/p/chameleon/source/checkout

So, what kexts I shoud use 10.6.6 or Lion with my HD5650m? The answer to this question is very important to me.

I don't personally know, but I think you could do either.

Most people using bcc9 method have used 10.6.6 so far, but that's bound to change.

 

I think you need the new version of XCode if you want to use this method with Lion kext

Link to comment
Share on other sites

source code is at http://code.google.com/p/chameleon/source/checkout

 

I don't personally know, but I think you could do either.

Most people using bcc9 method have used 10.6.6 so far, but that's bound to change.

 

I think you need the new version of XCode if you want to use this method with Lion kext

 

wmarsh --> Who is Krazybirdy? Also I just load ubuntu goto terminal and type dmesg >blahblah.txt and it should print out my whole hardware configuration right, Link to this krazybirdy please.

 

i will go install ubuntu onto my USB stick, load ATI drivers then do the dmesg

Link to comment
Share on other sites

atlee, I see you have HD5650 too. Please answer some questions?

 

1. Is your internal display works properly with fullres and QE/CI?

2. What boot file do you use?

3. What kernel do you use?

4. Do you use 10.6.6 or Lion kexts?

5. What is your FB and personality?

 

Thanks a lot.

 

CCC has reported LVDS will not enable with NullCPUPowerManagement.kext (or presumable Disabler.kext) in /Extra/Extensions

 

You don't need ATY_Init and it will probably interfere.

I removed "NullCPUPowerManagement.kext", "Disabler.kext" and "ATY_Init.kext". Hope it will help me...

 

I don't have compiller to compile boot file myself. Attach your one, please.
Link to comment
Share on other sites

I don't have compiller to compile boot file myself. Attach your one, please.

Once you install Xcode -- which you need to follow this guide -- you will.

http://prasys.info/2010/01/compiling-chame...-newbies-howto/

 

wmarsh --> Who is Krazybirdy?

You can click on members above, type in his name, and find his profile

Also I just load ubuntu goto terminal and type dmesg >blahblah.txt and it should print out my whole hardware configuration right, Link to this krazybirdy please.

 

i will go install ubuntu onto my USB stick, load ATI drivers then do the dmesg

Well, you could do that, but it would be easier to download the dvd you just stick in you drive and run off dvd.

http://www.ubuntu.com/desktop/get-ubuntu/download

Link to comment
Share on other sites

ATI 5650M - DMESG from UBUNTU:

 

[   16.766850] [drm] radeon: ib pool ready.
[   16.766935] [drm] ib test succeeded in 0 usecs
[   16.767270] [drm] Radeon Display Connectors
[   16.767273] [drm] Connector 0:
[   16.767274] [drm]   LVDS
[   16.767277] [drm]   DDC: 0x6560 0x6560 0x6564 0x6564 0x6568 0x6568 0x656c 0x656c
[   16.767279] [drm]   Encoders:
[   16.767280] [drm]	 LCD1: INTERNAL_UNIPHY
[   16.767282] [drm] Connector 1:
[   16.767283] [drm]   HDMI-A
[   16.767285] [drm]   HPD1
[   16.767287] [drm]   DDC: 0x6430 0x6430 0x6434 0x6434 0x6438 0x6438 0x643c 0x643c
[   16.767289] [drm]   Encoders:
[   16.767290] [drm]	 DFP1: INTERNAL_UNIPHY1
[   16.767292] [drm] Connector 2:
[   16.767293] [drm]   VGA
[   16.767295] [drm]   DDC: no ddc bus - possible BIOS bug - please report to xorg-driver-ati@lists.x.org
[   16.767297] [drm]   Encoders:
[   16.767299] [drm]	 CRT1: INTERNAL_KLDSCP_DAC1

 

Hope this helps people.

Link to comment
Share on other sites

ATI 5650M - DMESG from UBUNTU:

 

[   16.766850] [drm] radeon: ib pool ready.
[   16.766935] [drm] ib test succeeded in 0 usecs
[   16.767270] [drm] Radeon Display Connectors
[   16.767273] [drm] Connector 0:
[   16.767274] [drm]   LVDS
[   16.767277] [drm]   DDC: 0x6560 0x6560 0x6564 0x6564 0x6568 0x6568 0x656c 0x656c
[   16.767279] [drm]   Encoders:
[   16.767280] [drm]	 LCD1: INTERNAL_UNIPHY
[   16.767282] [drm] Connector 1:
[   16.767283] [drm]   HDMI-A
[   16.767285] [drm]   HPD1
[   16.767287] [drm]   DDC: 0x6430 0x6430 0x6434 0x6434 0x6438 0x6438 0x643c 0x643c
[   16.767289] [drm]   Encoders:
[   16.767290] [drm]	 DFP1: INTERNAL_UNIPHY1
[   16.767292] [drm] Connector 2:
[   16.767293] [drm]   VGA
[   16.767295] [drm]   DDC: no ddc bus - possible BIOS bug - please report to xorg-driver-ati@lists.x.org
[   16.767297] [drm]   Encoders:
[   16.767299] [drm]	 CRT1: INTERNAL_KLDSCP_DAC1

 

Hope this helps people.

 

It is very helpful information. Thanks a lot! atlee, answer some questions I posted above (HERE), please.

Link to comment
Share on other sites

atlee, I see you have HD5650 too. Please answer some questions?

 

1. Is your internal display works properly with fullres and QE/CI?

I'm still working on bcc9's guide to complete my patching, will let everyone know. 10.7 kexts work, 10.6.6 i will have to patch Eulemur Framebuffer.

2. What boot file do you use?

Kabyl branch rev749

3. What kernel do you use?

legacy_kernel due to my CPU.

4. Do you use 10.6.6 or Lion kexts?

I'm using 10.6.6 kexts right now.

5. What is your FB and personality?

Eulemur is the FB that gives me true 3D. and Full res.

 

Thanks a lot.

 

I removed "NullCPUPowerManagement.kext", "Disabler.kext" and "ATY_Init.kext". Hope it will help me...

 

I don't have compiller to compile boot file myself. Attach your one, please.

 

don't need a compiler, just use the boot file checcco has in his 5650 thread. place it on your desktop, open terminal.

sudo su

cd Desktop

cp -Rf boot /Volumes/YourOSXVolumename (Example mine is /Volumes/snow)

Link to comment
Share on other sites

There are 6 encoder available. Try all of 'em. This is the only way since you can't use RadeonHD to obtain the dump. Other than this, I have no idea. Sorry. :unsure:

 

Did all three ports works in windows?

In windows 7 I can detect all 3 ports at the same time, but only any two of them can be selected for mirror or using as extended window.

By changing Transmitter and Encoder my conclusion is :

HDMI need fixed 22 05 for proper display and working HDMI audio function

DP can use 12 04 or 02 04 for proper display and working HDMI audio function

DVI can use a lot :

01 12

01 02

01 03

10 00

11 02

21 03

Link to comment
Share on other sites

In windows 7 I can detect all 3 ports at the same time, but only any two of them can be selected for mirror or using as extended window.

You got the same thing on OS X, right? This means your hardware only support 2 displays at one time. It's a hardware/vbios limitation. So, what you got right now on OS X already what your hardware can do.

Link to comment
Share on other sites

TRANSMITTER / ENCODER

LVDS

UNIPHY0 DUAL / 00,01

UNIPHY0 A / 00,01,02,03,04,05

UNIPHY0 B / 00,01

 

All above not working, just posting so you do not retry the combination :unsure:

Link to comment
Share on other sites

TRANSMITTER / ENCODER

LVDS

UNIPHY0 DUAL / 00,01

UNIPHY0 A / 00,01,02,03,04,05

UNIPHY0 B / 00,01

 

All above not working, just posting so you do not retry the combination :D

 

To my mind something wrong either with boot or with FB, because I tested all combinations with INTERNAL_UNIPHY same way as atlee. It should work, but it doesn't!

Link to comment
Share on other sites

bcc9, your method works for Lion also, its just the ConnectorInfo has migrated to a different place

 

The ConnectInfo strings have migrated to the ATIController executables.

 

I found the ConnectInfo for Shrike in ATI4600Controller at 1ff70 and 743f8

Gliff is right above it at 1ff40 and 743a8

 

I did not find Peregrine or Motmot -- did not look for all.

 

You have made many people very happy.

Link to comment
Share on other sites

bcc9, your method works for Lion also, its just the ConnectorInfo has migrated to a different place
Great, good to know. But what about netkas's claim that injection is no longer necessary?

The ConnectInfo strings have migrated to the ATIController executables.
Yes, I did post about that back here

http://www.insanelymac.com/forum/index.php...t&p=1655289

and http://www.insanelymac.com/forum/index.php...t&p=1655416

Guess this thread is getting a bit messy and could use new separate info&support threads.

 

You have made many people very happy.
Glad it's working out for everybody, especially for mobile users with the additional info from mucha.

Now we could go further and automate most/all this, there isn't really a need for users to manually dump&patch the ConnectorInfo for example.

Link to comment
Share on other sites

But what about netkas's claim that injection is no longer necessary?

Probably its true -- I injected Shrike and still got peregrine on ioreg. There is some choice -- in the controller plist you can set one of the personalities in the plist.

 

Do you know anything about 10.6.2 Framebuffer? I am applying method to that -- I think the older drivers with ATI4500Controller.kext will work better on lower end Mobility Radeons - like my notebook. The ConnectorInfo strings look to be 20 bytes not 16. Most of it looks like filler though. I'm reinstalling on a usb disk to make a 10.6.2 test platform.

Link to comment
Share on other sites

I am a Sony VAIO F11 user with a nvidia gt330m card. I believe sony users have similar problems with the nvidia driver. For windows nvidia patched their driver especially for sony notebooks, since 260+.

 

Under OSX the driver will lead into a black internal screen. All investigations show the problem must be inside the driver. The ioreg shows the driver is correctly loaded, also hdmi works. Only display0 inside Display-B is matched by IOGraphicsFamily, but there is a Display-A missing: screenshot ioreg

 

Now I have some questions to you:

 

1. How did you find out that there are these personalities inside the driver?

It was well known from the ATI injection techniques that the driver had these personalities. Kabyl's chameleon branch went a bit further and allowed one to dynamically specify which personality to try (but still left you with 26 hardcoded choices to trudge through).

 

Additionally, even without the above, the "I/O Kit Fundamentals" document defines driver personalities, and it was obvious these personalities existed just from looking at the Info.plist for the ATI Framebuffer kext.

2. How did you know you have to look into the atiframebuffer kext, and not another ati kext?

When you look at the driver personality definitions in the info.plist, you can quickly see that there are only a couple parameters that are defined there, and these are insufficient to explain the behavioral difference seen in practice when you test against different personalities.

 

So the code must be checking the personality string itself. A simple

cd /System/Library/Extensions

find . -exec fgrep -l Vervet {} \;

 

showed that, lacking obfuscation, only the ATIFramebuffer kext references the example personality string. Then looking at the decompiled or disassembled code, it is clear that these strings are only set in the C++ class specific createInfo() routines, where those routines were also initializing other important attributes beyond what was in the Info.plist.

 

3. Do you have any suggestions how I could start investigation on the nvidia kexts to fix this problem?

Getting a bit off topic, but...

 

The nvidia and ati drivers have several key IO registry values in common such as the connector-type, and av-signal-type, that seem to share the same pre-defined values. I was able to, for example, see that my nvidia 9400m's HDMI audio was failing due to the connector-type being identified wrong after I figured out the connector-type for HDMI from the ATI driver.

 

It takes quite a bit of programming experience to be able to figure out the semantics of what the code is doing just from looking at the disassembled/decompiled kexts. Unfortunately the nvidia driver is harder to look at than the ati driver, as it looks like there is a bloated abstraction layer in NVDAResman that gets in the way.

 

So a simpler approach is probably to figure out the answer as to what exactly is different under OSX about a genuine mac with a gt330m vs a sony with a gt330m. Prepare to compare hardware initialization via breakpointing of the kexts if you have to. If sony really has a necessary hardware specific patch for the driver under windows, figure out exactly what it is doing, then check for such support in OSX if applicable.

 

But probably it's a simple matter of getting the right values for NVCAP and perhaps display-cfg. nvenabler trys to compute these dynamically for you, unfortunately it's closed source. Are you sure nobody has figured out working NVCAP/display-cfg for your hardware?

Link to comment
Share on other sites

bcc9, your method works for Lion also, its just the ConnectorInfo has migrated to a different place

 

The ConnectInfo strings have migrated to the ATIController executables.

 

I found the ConnectInfo for Shrike in ATI4600Controller at 1ff70 and 743f8

Gliff is right above it at 1ff40 and 743a8

 

I did not find Peregrine or Motmot -- did not look for all.

 

You have made many people very happy.

 

wmarsh i was looking for Eulemur inside ATI5000Controller in 10.7 would you know where it is? or where it starts? or do i have to restart all the calculations again?

Link to comment
Share on other sites

Do you know anything about 10.6.2 Framebuffer? I am applying method to that -- I think the older drivers with ATI4500Controller.kext will work better on lower end Mobility Radeons - like my notebook. The ConnectorInfo strings look to be 20 bytes not 16. Most of it looks like filler though. I'm reinstalling on a usb disk to make a 10.6.2 test platform.

I had never looked back at older versions until just now. Yes, looks like you're right, ConnectorInfo is 20 bytes in 10.6.x until 10.6.4 when it became 16 bytes.

Link to comment
Share on other sites

wmarsh i was looking for Eulemur inside ATI5000Controller in 10.7 would you know where it is? or where it starts? or do i have to restart all the calculations again?

 

atlee, look HERE. checcco already found all patterns. Just look for them in hex ​​editor.

Link to comment
Share on other sites

But probably it's a simple matter of getting the right values for NVCAP and perhaps display-cfg. nvenabler trys to compute these dynamically for you, unfortunately it's closed source. Are you sure nobody has figured out working NVCAP/display-cfg for your hardware?

 

Thanks bcc9. It's already well known that nvcap is completly useless for the internal screen on Sony Vaios. Krazubu, the developer of nvenabler believes this, too. The correct nvcap also is available, but has no effect to the problem.

Link to comment
Share on other sites

Thanks bcc9. It's already well known that nvcap is completly useless for the internal screen on Sony Vaios. Krazubu, the developer of nvenabler believes this, too. The correct nvcap also is available, but has no effect to the problem.
I wonder how you know it's actually the correct nvcap. For example the NVCAP for a mac with a 9400m is different than the NVCAP for a dell with a 9400m because the dell has more/better external video ports.

 

In addition to all the other methods for figuring out what's going on, surely the linux open source driver works with your hardware and you could look there to see what is different vs a macbook. It's like playing sesame street's one-of-these-things-is-not-like-the-other ;)

Link to comment
Share on other sites

I wonder how you know it's actually the correct nvcap.

The nvcap was derived from graphic card's ROM file. The same method works for other notebook model but not on sony. The internal LCD doesn't detected at all (in IORegistry).

 

I agree with you, to solved this problem they need to look to linux open source driver. Learn how the linux driver detect & intialized the internal LCD. :P

Link to comment
Share on other sites

 Share

×
×
  • Create New...