Jump to content

Editing Custom connector info for Intel HD 3000 Graphics (sandy bridge, OSX Lion)


  • Please log in to reply
211 replies to this topic

#161
Drag0nFly

Drag0nFly

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts

I made a patch that can help make this edition.

1. Seeing the tables
Posted Image
2. Edit table
Posted Image

3. Apply Patch
Posted Image
Download
http://dl.dropbox.co...000Patch-v3.zip


@Modigliani - thanks for this very useful tool. I am trying to sort out the "apparent hang in main graphics engine" bug on my Shuttle SH67H7 (running 10.7.3), and would also like to get the built-in HDMI port working. The system has one DVI-D & one HDMI port (which does send output but it's garbled)

I am am a bit unsure how to modify the table (also: how to you accomplish this with “vim”?) The output references LVDS (which does not exist) and has two HDMI entries (0205 & 0406)
Since it is probably a trivial question for someone more familiar with this, I am wondering what changes I should make to have the right config for my Shuttle system
(using DVI as the main output, with mirroring on the HDMI port)

Below the information your executable produces when being run on the Shuttle SH67H7 –

$ ./modgliani-intelHD3000
60+0 records in
60+0 records out
60 bytes transferred in 0.000130 secs (461758 bytes/sec)


0000000: 0102 0400 1007 0000 1007 0000  ............
000000c: LVDS_0503 0000 0200 0000 3000 0000  ........0...
0000018: HDMI_0205 0000 0004 0000 0700 0000  ............
0000024: DVI_0304 0000 0004 0000 0900 0000  ............
0000030: HDMI_0406 0000 0004 0000 0900 0000  ............

Conectors total:  0400

The table file:

Attached Files



#162
Drag0nFly

Drag0nFly

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts
Ok, I got the HDMI port working with SMproductid set to "MacBookPro8,1" in /Extra/smbios.plist

But I do need some help to get the tables fixed in the HD3000 driver.

#163
Drag0nFly

Drag0nFly

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts
Anyone still reading this thread? My system crashes weekly -- sometimes daily due to this bug. It happens regardless of heavy gfx activity (i.e, an OpenGL screensaver) or just doing stuff in ‘‘Finder’’ and even Terminal.app.

The ring-buffer overflow bug appears to be trivial to fix for anyone who knows what they are doing (i.e, not me). I simply need the connector information in the HD3000 tables to correctly reflect one DVI port and one HDMI port; which is what is present on this Shuttle SH67H7 system.

#164
Manwe150

Manwe150

    InsanelyMac Protégé

  • Members
  • Pip
  • 46 posts
Thanks for the info, bcc9 and everyone else! bcc9's step-by-step instructions are very easy to follow step-by-step once you understand what you are changing (including recomputing the byte offset for the new file version). The third column is probably the most important for most individuals.

I'm posting to report success in enabling the VGA output on my T420.

Here's my new table, my changes are marked in red:

0000000: 0102 0300 1007 0000 1007 0000 ............
000000c: 0503 0000 0200 0000 3000 0000 ........0...
0000018: 0205 0000 0004 0000 0700 0000 ............
0000024: 0602 0000 1000 0000 0900 0000 ............
0000030: 0000 0000 0004 0000 0900 0000 ............


In the first line (the header), I've reduced the number of outputs to 3 (from 4).
The second line is my LCD display (0200 is LVDS)
The third line is my DP output, which also does HDMI and DVI with an adapter (0004 is DP)
The fourth line is VGA (combination of 0602 and 1000)
The fifth line I deleted since I don't have that many outputs

#165
Drag0nFly

Drag0nFly

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts
@Manwe150 – do you mind reposting those instructions? I realize changing this is probably trivial, but I am still in the dark as to what to change (and how; i.e, which hex editor? Do you simply remove the lines referencing unwanted outputs–LVDS for instance in my case? My connector info is in post #161.)

Since I do have all my outputs working (only a DVI-I and a HDMI port), I am hoping this modification will eliminate the "apparent hang in main graphics engine" / ring buffer / stampWait: Overflowed checking for stamp 0x1a103820 on Main ring: called from waiting for blt buffer (3D blt) errors with the HD3000.

It has been rumored to fix it, although I have not been able to find concrete evidence of it.

btw. – I've also tried RevoGirl's kext edits which aimed to reduce the amount of memory available to the HD3000 (from 512mb to 288mb). However, those changes caused serious graphical glitches and the system had to be re-installed.

#166
frankpc

frankpc

    InsanelyMac Protégé

  • Members
  • Pip
  • 3 posts
  • Gender:Male
  • Location:Kansas

Since I do have all my outputs working (only a DVI-I and a HDMI port),


Do both the DVI and HDMI ports work at the same time, i.e. can you have dual monitors?

#167
Drag0nFly

Drag0nFly

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts
They both work at the same time, yes – for spanning desktops and mirroring.

#168
Manwe150

Manwe150

    InsanelyMac Protégé

  • Members
  • Pip
  • 46 posts
just read though the first post for instructions (I don't think I can do better). What is easy to miss is that at a certain point there is a command that dumps the relevant hex bytes to a plain text file (named hex). After editing it, the next few instructions convert it back to hex and write it back to the file. modgliani's script automates this process (i.e. you can make these changes using his tool instead of doing the steps manually)

For your case, try replacing the LVDS device (2nd line) with one of the lower lines (e.g. line 4), and reducing the number of table entries (byte 2 in the first line) to 0200 (which equals 2). This should get you two outputs, of an under-specified type (any of DP, HDMI, and DVI):
0000000: 0102 0200 1007 0000 1007 0000  ............
000000c: DVI_0304 0000 0004 0000 0900 0000  ............
0000018: HDMI_0205 0000 0004 0000 0700 0000  ............
0000024: 0000 0000 0000 0000 0000 0000  ............
0000030: 0000 0000 0000 0000 0000 0000  ............
I also zero'd the remaining rows, although that might not be strictly necessary.
If that doesn't work, you may need to change the device type as well (byte 3 in rows 2-4). 0004 is DisplayPort. 0008 is HDMI. 1000 is VGA. I don't recall the number for DVI right now. But it seems this number is not be actually used.


@Manwe150 – do you mind reposting those instructions? I realize changing this is probably trivial, but I am still in the dark as to what to change (and how; i.e, which hex editor? Do you simply remove the lines referencing unwanted outputs–LVDS for instance in my case? My connector info is in post #161.)

Since I do have all my outputs working (only a DVI-I and a HDMI port), I am hoping this modification will eliminate the "apparent hang in main graphics engine" / ring buffer / stampWait: Overflowed checking for stamp 0x1a103820 on Main ring: called from waiting for blt buffer (3D blt) errors with the HD3000.

It has been rumored to fix it, although I have not been able to find concrete evidence of it.

btw. – I've also tried RevoGirl's kext edits which aimed to reduce the amount of memory available to the HD3000 (from 512mb to 288mb). However, those changes caused serious graphical glitches and the system had to be re-installed.



#169
Drag0nFly

Drag0nFly

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts
@Manwe150, @frankpc – thanks for replying. What confused me was the two HDMI entries in the output (0205 & 0406); how do you know which one to use apart from trial-and-error? I do have the hex file generated (using modgliali's binary), and I guess I'll use xxd to modify it before reinjecting. I also have the OS X Devtools installed, but need to upgrade to 10.7.3/.4 in order for it to work again (after the HD3000 memory debacle which prompted a reinstallation). Seems Apple has disabled it due to version issues (although I somehow doubt there are many changes affecting this between 10.7.2 & 10.7.3)

#170
tluck

tluck

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 628 posts
  • Gender:Male
  • Location:NC, USA
@Manwe150 - thanks for posting your T420 hack (and DSDT). i had previously a great Hack on a T510 (thanks to Aussiep and Joshhh. But that laptop was stolen :(. so now i have a new T420 - it is similiar but only has HD3000 Graphics (vs NVidia)

my system:
T420 with 8 GB memory
i5-2520M (HD3000 only)
bios 1.39 (latest)
lion 10.7.4
beast 4.5.2
using AppleHDA for cx_20590 (but dont see any digital audio?

the DSDT worked great. but there is 1 thing that is a show stopper problem. HD3000 hangs alot.

when using just the laptop display (no external) or with extended screen i get a bunch of graphics hangs
- Debug info for apparent hang in Main graphics engine...

i am using a external monitor on the display port and LCD (extended).
using the dock or side port didnt seem to matter???
Note: patched AppleIntelSNBGraphicsFB and (turns on VGA - turns off Dock Displayport)
I have read RevoGirls posts and tried some of her tips...

does anyone have a fix as how to get the HD3000 graphics hang (all sorts of kernel messages) thing resolved - seems to be a relatively common thing with HD3000 graphic (only) for laptops? even for macs (minimac etc). sometimes the hangs recover but often it will total freeze and never recover.

as a test I did a vanilla install of 10.7.3 and this still problem - same as 10.7.4.

reduced memory to 4GB
patch SNBGraphics kext to use 384
applied all the lastest beast patches and extracted current DSDT and still - same thing. using LCD will hang the thing.
nothing seems to work???

HELP!? as is this is nice desktop (wo LCD) but want to use it as a laptop!

Updated solution:
not ideal...

to get the LCD display to work without the frequent graphics hangs (which sometimes requires a hard reset/restart), I had to remove AppleIntelHD3000Graphics.kext when i want to use as a loptop ie LCD only. otherwise i put the kext back in place and then i close the lid, and use an external HDMI attached display, so the box acts like a desktop (without LCD). (conclusion is HD3000 drivers are buggy on some boxes... given all the real macs that have the exact same issue minimacs and MBP reported on apple forums.) the issue seems to be related to graphics acceleration.

#171
fishy8082

fishy8082

    InsanelyMac Protégé

  • Members
  • Pip
  • 6 posts
So with extensive testing, I think this ring stall issue is really based around some LVDS issue. I have a Asus U24E 11.6" laptop with core i7-2640, VGA and HDMI. Removing of the 0503 entry will cause the ring stall issue to go away, but the internal display won't work. No other modifications besides removing the 0503 entry were necessary to get the ring stall to go away.

I tested this by switching to the mac mini 5.1 profile. This profile doesn't have a table entry for LVDS and works fine on an external HDMI display with no stalling or artifacts.

Editing the Mac Mini 5.1 entry in AppleIntelSNBGraphicsFB.kext (the one with ffff ffff) and adding a 0503 entry in the 3rd row will cause the LVDS internal display to start functioning again but the ring stall would return with it.

The same was confirmed in the opposite, removing the 0503 entry from the Macbook Pro 8.1 entry (the first one) will get rid of the ring stall but once again, no internal display.

One thing that seems odd is that my internal display is detected as "Built-in spdisplays_display" and all other plugged in displays are detected with a model number.

VGA does work by adding a 0602 entry but the display has to be manually detected to show up.

It seems that sandy bridge only supports 2 displays. Any combination of 2 displays works but ring stall always exists if LVDS is in use.

Edit:
I made a custom EDID for my built in display by following this:

http://www.tonymacx8...40968&start=110

The EDID override forces osx to properly recognize my display. This also allows me to rotate my display. You can do this by holding cmd and alt and then pressing settings/display. The rotation menu will show up to the right of the resolution select menu. Strangely enough the ring stall and artifacts issue goes away when the rotation is any other mode besides "Standard". Unfortunately its not very practical to use a laptop upside down but at least its another clue.

Another Edit:
Using 10.7.0 seems to eliminate the ring stalls when used with nullcpupowermanagement.kext. The nullcpupowermanagment is not 100% confirmed. Need to try a patched appleintelcpupowermanagement.kext.
It seems the custom EDID allows the LCD brightness control to functions properly.

#172
tluck

tluck

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 628 posts
  • Gender:Male
  • Location:NC, USA
fishy8082 - been working on this quite a bit also... but no real answers yet.

when using the Internal (LCD) screen, i get hangs almost constantly. i will confirm the odd finding - rotating the display (by SwitchResX) will allow the LCD to work with or without another monitor and no hangs. very very odd. also mirroring will not cause a hang. but i dont know how to fake an external display attached to for the laptop to work (in mirror mode) without attached monitor. i am very curious about your finding with older kexts?

#173
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,278 posts
  • Gender:Male

So with extensive testing, I think this ring stall issue is really based around some LVDS issue.

That is basically my findings in the first post.
The good news is I don't run into any event ring stall errors from the driver under 10.8, no connector info modification required.
Seems like the driver was cleaned up to not presume an LVDS connection.

#174
tluck

tluck

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 628 posts
  • Gender:Male
  • Location:NC, USA
bcc9 -- thanks for the note, my current solution when i want to use the LCD (laptop screen) is to use Quartz Debug and turn off 2D acceleration.

Otherwise i shut the LID to turn off LVDS and use an external monitor. That turns the laptop into a desktop box - not ideal for travel... as i need the screen!

so are you saying the 10.8 drivers work fine with a laptop screen?

#175
fishy8082

fishy8082

    InsanelyMac Protégé

  • Members
  • Pip
  • 6 posts
Hey guys,
So running with 10.7.0 the ring stall is not completely fixed. The difference is very very dramatic though. With 10.7.3 or 10.7.4 the screen would freeze whenever something would pop up like a popup window or clicking on a different folder, opening a new window, a notification and definitely most dramatically, when clicking on mission control. Mission control was so bad that it would take over 2 minutes to recover from it. There would also be terrible artifacts after long freezes, causing the screen to be covered in triangles and while scrolling in a browser, a constant alternation between lines to squares to triangles and then to the correct visual.
This would be constant so the computer was completely unusable.

With 10.7.0 everything works as it should and very rarely, like every couple of hours while doing something erratic like throwing a window below the dock, I might get a ring stall that lasts 5 seconds. Mission control works fine. It is very useable and there are no artifacts. I still haven't tested the AppleIntelCPUPowerManagment. Battery life is pretty good with NullCPU. I am getting 4 hours and the computer doesnt get hot. Still its obviously not cured.

I am really excited to hear about 10.8. I was really wondering what would happen with 10.8. I am saying something a little different about LVDS. I don't think its caused by a presumption that LVDS is being used as there are other ports in the list such as HDMI and displayport in the list and when they are not connected, they don't cause stalls. In my case LVDS is being used and I still suffer from the stalls. On my desktop with a P8Z68M-PRO with a 2600K I dont get ring stalls when using the macbook pro plist.

I have tried to put the 10.7.0 sandybridge kexts in place of 10.7.4 kexts on a 10.7.4 installation but it wont show visual no matter what. It doesn't say anything about SNB not loaded or anything. The boot process runs to dsmos has arrived and then nothing happens. Surprisingly the keyboard works and I can type but the computer doesn't respond to my actions.

#176
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,278 posts
  • Gender:Male

bcc9 -- thanks for the note, my current solution when i want to use the LCD (laptop screen) is to use Quartz Debug and turn off 2D acceleration.

Otherwise i shut the LID to turn off LVDS and use an external monitor. That turns the laptop into a desktop box - not ideal for travel... as i need the screen!

so are you saying the 10.8 drivers work fine with a laptop screen?

I was only noting that it seems the driver event ring bug was fixed with 10.8. Assuming others can confirm, then the need to modify the connectorinfo going forward, as in post #1, goes away.
I do not have a hackintosh with LVDS to test against. I would think theres a high chance event ring hangs would go away in configs with actual LVDS hardware as well.
On the other hand, since genuine macs are able to use this driver just fine with LVDS-only hardware, I thought there was already a working solution for LVDS hackintosh users. (Setting your board-id to a good value such as MacBookPro8,1, and injecting the right AAPL00,DualLink entry via your dsdt).

#177
fishy8082

fishy8082

    InsanelyMac Protégé

  • Members
  • Pip
  • 6 posts
bcc9, very interesting thought. I was looking in the EDID, and my display is declared as a single link. I wonder if osx wants the LVDS to be a dual link.

I would love to test 10.8 but don't have a mac developer license.

#178
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,278 posts
  • Gender:Male

bcc9, very interesting thought. I was looking in the EDID, and my display is declared as a single link. I wonder if osx wants the LVDS to be a dual link.

It's not an original idea, or my idea, but there are plenty of posts claiming that as the solution. I'm not sure where the definitive thread is however. Beyond the scope of this thread anyways (other than it would be nice to have a link to a definitive thread about LVDS specific support).

I would love to test 10.8 but don't have a mac developer license.

Since it's now GM you could hold tight about 2 weeks, or perhaps test with someone who does have the developer access.

#179
tluck

tluck

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 628 posts
  • Gender:Male
  • Location:NC, USA
I will explore the EDID angle some more.

currenly this is where I am at with my Lenovo T420 with HD3000 only on 10.7.4.

1) DSDT - which includes "AAPL00,DualLink" definition
2) LVDS alone - lots of hangs
(mods to SNBGraphics dont eliminate hangs. 4GB or 8GB memory, VRAMOveride - no diff etc.
3) LVDS+HDMI - extended desktop - lots of hangs
-note: mirrored - no hangs.
-note: rotated LVDS - no hangs. (useless)
4) shut lid (or suffer slow graphics) and use external monitor alone - no hangs.4
5) for LCD usage, use Quartz Debug to turn off 2D acceleration when in Laptop mode
- this is the only fix that makes the Laptop usable, in my experience.

#180
Zulakis

Zulakis

    InsanelyMac Protégé

  • Members
  • PipPip
  • 54 posts
When executing `lipo -detailed_info AppleIntelSNBGraphicsFB ` i get the following problem:



input file AppleIntelSNBGraphicsFB is not a fat file
Non-fat file: AppleIntelSNBGraphicsFB is architecture: x86_64

It is a OS X 10.8 Mountain Lion GM System.





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