Jump to content

[Fixed] Ghost display on MSI R5770 Hawk in Lion


  • Please log in to reply
82 replies to this topic

#1
tallest

tallest

    InsanelyMac Protégé

  • Members
  • Pip
  • 29 posts
  • Location:New Mexico, USA
EDIT: You can see my solution in post #8, below, as well as various versions of the kext below that.

When in Lion, the OS thinks it has two displays, when in fact it only has one. I see an arrangement tab in the system preferences, I can move my mouse off the screen, and System Information reports

ATI Radeon HD 5700 Series:

  Chipset Model:	ATI Radeon HD 5700 Series
  Type:	GPU
  Bus:	PCIe
  PCIe Lane Width:	x16
  VRAM (Total):	1024 MB
  Vendor:	ATI (0x1002)
  Device ID:	0x68b8
  Revision ID:	0x0000
  Displays:
SHARP HDMI:
  Resolution:	1920 x 1080 @ 60 Hz
  Pixel Depth:	32-Bit Color (ARGB8888)
  Main Display:	Yes
  Mirror:	Off
  Online:	Yes
  Rotation:	Supported
  Television:	Yes
VGA Display:
  Resolution:	800 x 600 @ 60 Hz
  Pixel Depth:	32-Bit Color (ARGB8888)
  Mirror:	Off
  Online:	Yes
  Rotation:	Supported
Display Connector:
  Status:	No Display Connected
Display Connector:
  Status:	No Display Connected
I have a Gigabyte GA-P35-DS3R with an MSI R5770 (ATI Radeon HD 5770). QE/CI work, out of the box, with GraphicsEnabler=Yes.

I followed MaLd0n's installation instructions for Lion, found here. I used his DSDT Auto-Patcher, here. The only kexts I've installed are Lnx2Mac's Realtek Ethernet, the IntelCPUMonitor and SuperIOFamily FakeSMC plugins, AHCIPortInjector, and IOAHCIBlockStorageInjector.

I do not have the same problems in my Snow Leopard install. How can I rid myself of this ghost display?

Thanks in advance. Apologies if this has been asked before, I couldn't think of a good way to Google for the topic without getting lots of posts about actually having two displays.

19 July 2011: Edited title to better reflect problem and solution.

#2
axm

axm

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts
  • Gender:Male
For me exactly the same thing happens. I've got a MSI 5770 card...

Do you have already a solution for the second VGA screen?

#3
tallest

tallest

    InsanelyMac Protégé

  • Members
  • Pip
  • 29 posts
  • Location:New Mexico, USA
No solution yet. We probably have the same card (MSI R5770 Hawk?). I've been waiting for the official release of Lion to see if the problem persists before investigating/pushing for an answer. Does yours work properly in Snow Leopard?

Post here if you figure it out; I'll do the same. Glad to hear I'm not the only one.

Thanks.

#4
axm

axm

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts
  • Gender:Male
Hello,

Yes, I have the same MSI Hawk 5770 card. ;)

I've started my Osx86 project only with Lion GM, never tried it on Snow Leopard...

At the moment I try to set up the HDMI output... When I connect a HDMI <--> DVI-D cable on the card, the screen is detected as VGA display, like the "ghost display". But I can not choose the right resolution for my screen (1680x1050). :D

#5
wolodya

wolodya

    InsanelyMac Protégé

  • Members
  • Pip
  • 36 posts
Vervet->Eulemur

#6
tallest

tallest

    InsanelyMac Protégé

  • Members
  • Pip
  • 29 posts
  • Location:New Mexico, USA

Vervet->Eulemur

I booted with AtiConfig=Eulemur (this is the only 5000 personality that works with my card, other than Vervet), but it still results in an extra display.

If I boot with GraphicsEnabler=No, everything works properly, except DVD Player, etc.

It took me a minute of Googling to figure out what you're talking about, but now I feel much more informed about AtiConfig. Here's what I think I learned:

Booting with GraphicEnabler=No uses the RadeonFramebuffer personality. This results in a working system but some programs, like DVD Player, crash. All three connectors for my card are correctly detected: DP (0x400), HDMI (0x800), and DVI (0x4).

Booting with GraphicsEnabler=Yes AtiConfig=Vervet uses the Vervet personality (default for this card). It defines four connectors: DVI (Single link? 0x200), DP (0x400), HDMI (0x800), and DVI (0x4). When this profile is used, Lion recognizes the unnecessary 0x200 DVI as being connected to a VGA display, hence the "Ghost display".

Booting with GraphicsEnabler=Yes AtiConfig=Eulemur uses the Eulemur personality. It defines three connectors: VGA (0x10), HDMI (0x800), DVI (0x4). When this profile is used, Lion recognizes the unnecessary 0x10 VGA as being connected to a VGA display, hence the "Ghost display".

I am considering modifying the ATI kext per the instructions here. I believe this would let me replace the VGA (0x10) entry in Eulemur with the DP (0x400) entry in Vervet. I hope this would result in Eulemer having the correct three connector entries.

Any other suggestions? Am I way off base here?

Thanks in advance.

#7
wolodya

wolodya

    InsanelyMac Protégé

  • Members
  • Pip
  • 36 posts
1. Put in extra video card BIOS file
2. In com.apple.Boot.plist add
<key> UseATIRom </ key>
<string> Yes </ string>

#8
tallest

tallest

    InsanelyMac Protégé

  • Members
  • Pip
  • 29 posts
  • Location:New Mexico, USA
Editing the Eulemur personality per the instructions here worked!

Below I outline the steps I took to replace the Eulemer personality with the Vervet personality modified to only use three connectors.

I used ati_personality.pl.0.7 (from the above link) to read all the personalities. I'm only interested in the two working personalities, Vervet and Eulemer. For 32-bit:
$ perl ati-personality.pl -a
... 
Kext ATI5000Controller
...
Personality: Vervet
ConnectorInfo count in decimal: 4
Disk offset in decimal 488552
0000000	00  04  00  00  00  04  00  00  00  71  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
...
Personality: Eulemur
ConnectorInfo count in decimal: 3
Disk offset in decimal 488664
0000000	04  00  00  00  14  00  00  00  00  01  00  00  01  02  01  04
0000010	00  08  00  00  00  02  00  00  00  71  00  00  12  04  04  02
0000020	10  00  00  00  10  00  00  00  00  00  00  00  00  10  00  01
0000030
...
For 64-bit:
$ perl ati-personality.pl -x
... 
Kext ATI5000Controller
...
Personality: Vervet
ConnectorInfo count in decimal: 4
Disk offset in decimal 167264
0000000	00  04  00  00  00  04  00  00  00  71  00  00  12  04  04  02
...
Personality: Eulemur
ConnectorInfo count in decimal: 3
Disk offset in decimal 167376
...
The only difference between the 32 and 64 bit output is the disk offset for each, I will use both later.

To fix my problem, I extracted the Vervet personality first. It has 4 connectors, so we dump 4*16=64 bytes. Its offset it 488552 from above.
$ cp -r /System/Library/Extensions/ATI5000Controller.kext ./
$ dd if=ATI5000Controller.kext/Contents/MacOS/ATI5000Controller of=Vervet.orig bs=1 skip=488552 count=64
Then I converted it to hex
$ xxd < Vervet.orig > Vervet.orig.hex
$ cat Vervet.orig.hex 
0000000: 0004 0000 0004 0000 0071 0000 1204 0402  .........q......
0000010: 0400 0000 1400 0000 0071 0000 0112 0104  .........q......
0000020: 0002 0000 1400 0000 0071 0000 0000 0603  .........q......
0000030: 0008 0000 0002 0000 0071 0000 2205 0501  .........q.."...
Now I edit the hex file with a text editor, delete the second line (for the unnecessary 0x200 DVI connector), and modify the new second line's first string appropriately (0000030->0000020). I save the new file as Eulemer.new.hex
$ cat Eulemur.new.hex 
0000000: 0004 0000 0004 0000 0071 0000 1204 0402  .........q......
0000010: 0400 0000 1400 0000 0071 0000 0112 0104  .........q......
0000020: 0008 0000 0002 0000 0071 0000 2205 0501  .........q.."...
I convert back to binary and write the new Eulemer profile into the kext. I write the same data to two addresses. From the ati_personality.pl.0.7 output above, the Eulemer personality has a disk offset of 488664 (32-bit) and 167376 (64-bit). It has only 3 connectors, so we write 3*16=48 bytes.
$ xxd -r < Eulemur.new.hex > Eulemur.new
$ dd if=Eulemur.new of=ATI5000Controller.kext/Contents/MacOS/ATI5000Controller bs=1 count=48 seek=488664 conv=notrunc
$ dd if=Eulemur.new of=ATI5000Controller.kext/Contents/MacOS/ATI5000Controller bs=1 count=48 seek=167376 conv=notrunc
Now all that's left is to backup the original ATI5000Controller.kext, replace it with the new one, rebuild caches, and reboot. Voila, no more ghost display.

Tell me if this helps or if I've got any typos here.

#9
axm

axm

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts
  • Gender:Male
Good to hear, that there is a method to fix the problem. :)
Thank's for your investigation and your work tallest!!

Would it be possible, that you share your modified ATI5000Controller.kext for all the MSI Hawk 5770 users here?

#10
jsl

jsl

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 246 posts
Thanks for your information.
After patching your ATI5000Controller, can you use your HDMI audio now in Lion ?
I also use MSI 5770 Hawk card in my Asus P6T SE motherboard.
In Snow Leopard 10.6.6/10.6.7 I can use DP, HDMI, & DVI ports at the same time with working HDMI audio.
After patching ATIFramebuffer and DSDT plus set GraphicsEnabler=Y and Kabyl's boot.
However in Lion I can only use HDMI & DVI ports without working HDMI audio now (just set GraphicEnabler=N).

[Solved] After patching AppleHDA.kext to new 2.05 version, my HDMI audio works again with the following:
_____________________________________________________________
Personality: Vervet

0000000 00 08 00 00 00 02 00 00 00 71 00 00 22 05 05 05 (HDMI audio)
0000010 00 04 00 00 04 06 00 00 00 71 00 00 12 04 04 02 (DP-->HDMI audio with Eyefinity convertor)
0000020 04 00 00 00 14 00 00 00 00 71 00 00 01 02 01 04 (DVI)
0000030 00 02 00 00 14 00 00 00 00 71 00 00 00 00 06 00
_____________________________________________________________

#11
tallest

tallest

    InsanelyMac Protégé

  • Members
  • Pip
  • 29 posts
  • Location:New Mexico, USA
Here's my kext. This is based on the one in the GM, I assume it will be the same in 10.7.0, but you might check.


EDIT: Replaced the attachment with the correct file. The attachments here and the one three posts down are now the same.

Attached Files



#12
axm

axm

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts
  • Gender:Male
Hm, I've tried your kext, but no difference for me. :(

Here, what I've done:
1. Installed your ATI5000Controller.kext via Kext Utility
2. Insert

<key>GraphicsEnabler</key>
<string>Yes</string>
<key>AtiConfig</key>
<string>Eulemur</string>

into org.chameleon.Boot.plist.

But there's no change, still the "ghost VGA screen" beside my DVI screen. :(

#13
tallest

tallest

    InsanelyMac Protégé

  • Members
  • Pip
  • 29 posts
  • Location:New Mexico, USA
Sorry. I think I uploaded the wrong kext (I think mine was the original). I've attached my modified kext again.

Attached Files



#14
axm

axm

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts
  • Gender:Male
Thanks for your work tallest! :D :D
Your kext solves my "ghost VGA monitor" problem. For MSI Hawk 5770 your next is the perfect one! :D

#15
Rolgar

Rolgar

    InsanelyMac Protégé

  • Members
  • Pip
  • 3 posts
Many thanks for the fix.
I applied the above outlined fix to the ATI5000Controller.kext which comes with 10.7.1. It is working with my MSI Hawk 5770. Feel free to use it.

Rolgar

Attached Files



#16
Pintglass

Pintglass

    InsanelyMac Protégé

  • Members
  • Pip
  • 12 posts
tallest

Do you have any issues with your display waking from sleep when using your modified eulemur personality?

I have the same ports as you on a sapphire 5770, i was getting the ghost display, which i managed to remove following your guide ive just got the display problem.

The problem occurs on the dvi port i have not tested it on the hdmi/dp connector.

Is your dvi port dual link?

Thanks Pintglass

#17
axm

axm

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts
  • Gender:Male
Has anyone done this patching for 10.7.2 already? :)

#18
tallest

tallest

    InsanelyMac Protégé

  • Members
  • Pip
  • 29 posts
  • Location:New Mexico, USA
Yes. I can upload it later today or you can follow the instructions above to make your own. It seems to be working just fine.

#19
axm

axm

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts
  • Gender:Male

Yes. I can upload it later today...


Would be very nice, if you can upload it. Not only for me, but also for the other users, who switches to 10.7.2 with a MSI HAWK 5770.

Thanks in advance. :)

#20
tallest

tallest

    InsanelyMac Protégé

  • Members
  • Pip
  • 29 posts
  • Location:New Mexico, USA
The modified 10.7.2 kext is attached.

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