Do u use board id in SMBIOS.plist?
<key>SMboardproduct</key> <string>Mac-94245B3640C91C81</string>
Yes - use
<key>SMboardproduct</key> <string>Mac-942459F8199B171B</string>
But how do I get output of the nm command ??
Do u use board id in SMBIOS.plist?
<key>SMboardproduct</key> <string>Mac-94245B3640C91C81</string>
<key>SMboardproduct</key> <string>Mac-942459F8199B171B</string>
How can I find the number for 10.6.8 ??
Everything works now except the the edit of the connector info.
I thought it was clear from post #1 that this thread is about the 10.7 drivers and is not applicable to the older versions.
0000000: 0102 0300 1007 0000 1007 0000 ............ 000000c: 0205 0000 0004 0000 0700 0000 ............ 0000018: 0304 0000 0004 0000 0900 0000 ............ 0000024: 0406 0000 0004 0000 0900 0000 ............ 0000030: 0000 0000 0000 0000 0000 0000 ............For DVI, I removed the connector entry for the LVDS display, and shifted the remaining entries up.
Great, so your DVI port was in the same order as in post #7. I suspect the layout is the same for all sandy bridge desktops that have dvi&dp&hdmi. The motherboards without dp might be more interesting.For DVI, I removed the connector entry for the LVDS display, and shifted the remaining entries up.
Thanks for bcc9. i got my DVI work :P ------------------------------------------------------------------------------------------------------------------ Last login: Tue Jul 19 13:52:16 on console 188:~ ye$ cd /System/Library/Extensions/AppleIntelSNBGraphicsFB.kext/Contents/MacOS 188:MacOS ye$ nm -arch x86_64 AppleIntelSNBGraphicsFB | grep 'D _PlatformInformationList' 0000000000029600 D _PlatformInformationList 188:MacOS ye$ lipo -detailed_info AppleIntelSNBGraphicsFB Fat header in: AppleIntelSNBGraphicsFB fat_magic 0xcafebabe nfat_arch 2 architecture x86_64 cputype CPU_TYPE_X86_64 cpusubtype CPU_SUBTYPE_X86_64_ALL offset 4096 size 283552 align 2^12 (4096) architecture i386 cputype CPU_TYPE_I386 cpusubtype CPU_SUBTYPE_I386_ALL offset 290816 size 294736 align 2^12 (4096) 188:MacOS ye$ /code] So i got the disk address is 0x29600+4096=173568. let's go on 188:MacOS ye$ dd if=AppleIntelSNBGraphicsFB of=/tmp/table bs=1 skip=173568 count=60 60+0 records in 60+0 records out 60 bytes transferred in 0.000395 secs (151876 bytes/sec) 188:MacOS ye$ cd /tmp 188:tmp ye$ xxd -c 12 < table > hex 188:tmp ye$ cat hex 0000000: 0102 0300 1007 0000 1007 0000 ............ 000000c: 0205 0000 0004 0000 0700 0000 ............ 0000018: 0304 0000 0004 0000 0900 0000 ............ 0000024: 0406 0000 0004 0000 0900 0000 ............ 0000030: 0000 0000 0000 0000 0000 0000 ............ BY THE WAY, the code above had been edited, i want 0205 (DVI)work, so i should put it in row2, right? xxd -c 12 -r hex >! table % dd if=table of=/System/Library/Extensions/AppleIntelSNBGraphicsFB.kext/Contents/MacOS/AppleIntelSNBGraphicsFB bs=1 seek=173568 conv=notrunc here i got the information 60+0 records 60+0 records out and % touch /System/Library/Extensions it show me need permission, so i put sudo touch /System/Library/Extensions i need reboot for test. After reboot, thanks for bcc9, i SUCCEED! Thanks for every one!
If that's your output, it's because you didn't type the nm command as in post #1. Looks like you flubbed the grep part.00000000000c5a9 t __GLOBAL__D_PlatformInformationList which I believe the address was 0x0c5a9 + 4096 =54697
My table is different, so can this technique be used the same? and how do I know which connector is causing the problem.
I would appreciate any help.
Yes, for dvi as the primary output, row 3 would be moved to row 2, and you'd adjust the connector count and remaining rows. Looks like you got it.BY THE WAY, the code above had been edited, i want 0205 (DVI)work, so i should put it in row2, right?
Some prerequisites:
As of the 10.7 developer preview code, the intel driver uses Smboardproduct (aka board-id in the ioregistry) to determine the display connectors that are available via the Intel HD 3000 graphics hardware. Actually there's also AAPL,snb-platform-id in the ioregistry that achieves the same result, but I'm going to ignore that for now.
- Installation of OSX Developer tools (if you need to lookup a PlatformInformationList that has not already been done by someone else)
- Understanding of hex editing
- Ability to troubleshoot by looking at ioregistry
Older code (10.6 including the 2011 MBP sandy bridge update) seems to strictly rely upon the os-info ioregistry entry for this information. I have not, and probably won't, look into editing os-info to change connector information.
With a 10.7 based version of AppleIntelSNBGraphicsFB.kext, the code uses the board-id as an index into the PlatformInformationList[] table. This table is pretty handy, and looks like:/* 12 byte connectorinfo */ typedef struct { char byte0; char byte1; /* i2cid? */ char unused[2]; uint32 connectortype; /* The connector type, see below */ char byte[4]; } connectorinfo_t; /* 60 byte total */ typedef struct { char byte0; /* Presence? */ char byte1; /* For display pipe max connector index? */ char byte2; /* Usable Connector count */ char byte3; /* Appears unused */ char byte[8]; connectorinfo_t connectors[4]; } PlatformInformationList_type; PlatformInformationList_type PlatformInformationList[8]; where integers are represented in intel little-endian byte order, and bit 0 is the LSB.In English, there are 8 tables in the list, each 60 bytes long. Each 60 byte table entry starts with a 12 byte header, followed by 4 connector information blocks. The connector information blocks are each 12 bytes long.
The connectorytype field appears to use the same codes as the ATI driver, where the only used values used by the driver thus far are:
#define CONNECTORTYPE_LVDS 0x00000002 /* Ie internal Low Voltage display, such as laptop */
#define CONNECTORTYPE_DP 0x00000400 /* Displayport */
#define CONNECTORTYPE_HDMI 0x00000800
If you don't set your board-id to a recognized value, a default connector table is instead taken from the address PlatformInformationDefault. THe default table only has 1 usable connector so this is likely to give you reduced functionality.
Setting SMboardproduct to various sandy bridge board-ids defines the index into PlatformInformationList[]. Interestingly only indexes 0 thru 5 are currently allowed (even though there are two more table entries...) In any case, for the purpose of this note, we'll use index 0 by setting the board-id to the MacBookPro8,1 value. In smbios.plist:<key>SMboardproduct</key> <string>Mac-94245B3640C91C81</string>
Unfortunately all 8 table entries use an LVDS connector for the first value, and the driver seems to malfunction if you have nothing plugged into this port. In my case I would see the kernel log fill up with errors about a stuck ring:kernel[0]: WaitForStamp: Overflowed waiting for stamp 0x2f3 on Main ring: called from ... kernel[0]: Looks like Main ring is stuck waiting on an event kernel[0]: After attempt to clear wait condition = 0x00003001 no longer waitingAnd it would get re-stuck every 5 seconds or so. More importantly this would make the graphics unusably slow unless I unplugged the display for > 5 seconds first. At that point the stuck ring problem would "heal"... Using a dual-head setup also seems to avoid this problem.
However, rather than hot-plugging the graphics display upon every boot, one can instead modify the above table to avoid this problem.
First we find the PlatformInformationList table. In the example below I'm using DP4:% cd /System/Library/Extensions/AppleIntelSNBGraphicsFB.kext/Contents/MacOS % nm -arch x86_64 AppleIntelSNBGraphicsFB | grep 'D _PlatformInformationList' 00000000000295f0 D _PlatformInformationList % lipo -detailed_info AppleIntelSNBGraphicsFB Fat header in: AppleIntelSNBGraphicsFB fat_magic 0xcafebabe nfat_arch 2 architecture x86_64 cputype CPU_TYPE_X86_64 cpusubtype CPU_SUBTYPE_X86_64_ALL offset 4096 size 283008 align 2^12 (4096) architecture i386 cputype CPU_TYPE_I386 cpusubtype CPU_SUBTYPE_I386_ALL offset 290816 size 293092 align 2^12 (4096) %So now we know the disk address for this table is:
0x295f0+4096=173552
Since there are 8 tables of 60 bytes, we could dump 8*60=480 bytes to see all 8 tables. Since I've chosen to work on the first entry, I'll dump just 60 bytes.
ALso since each connector is 12 bytes, I dump 12 bytes per line for our viewing pleasure.% dd if=AppleIntelSNBGraphicsFB of=/tmp/table bs=1 skip=173552 count=60 60+0 records in 60+0 records out 60 bytes transferred in 0.000142 secs (422955 bytes/sec) % cd /tmp % xxd -c 12 < table > hex % cat hex 0000000: 0102 0400 1007 0000 1007 0000 ............ 000000c: 0503 0000 0200 0000 3000 0000 ........0... 0000018: 0205 0000 0004 0000 0700 0000 ............ 0000024: 0304 0000 0004 0000 0900 0000 ............ 0000030: 0406 0000 0004 0000 0900 0000 ............ %In the above table you can see that 4 connectors are marked usable, 1 LVDS and 3 DP. On my h67 motherboard, I have 4 connectors: VGA, DVI, DP and HDMI. The DVI, DP and HDMI connectors all work with the DP connectortype shown in this table (the intel driver doesn't seem to use the connectortype for much).
I believe I can tell which of the above entries match my hardware by checking which entry has av-signal-type set, (or when AAPL,DisplayPipe != 0xffff?). I certainly can by exhausting testing of the combinations...
Now, to remove the problematic LVDS entry, I edit the hex file, producing:0000000: 0102 0300 1007 0000 1007 0000 ............ 000000c: 0304 0000 0004 0000 0900 0000 ............ 0000018: 0205 0000 0004 0000 0700 0000 ............ 0000024: 0406 0000 0004 0000 0900 0000 ............ 0000030: 0000 0000 0000 0000 0000 0000 ............In the above I moved the hex from the 3rd connector (row 4) to the first (row 2), zeroed the hex in row 5, and subtracted 1 from the connector count in row 0.
Now I write back the result:xxd -c 12 -r hex >! table % dd if=table of=/System/Library/Extensions/AppleIntelSNBGraphicsFB.kext/Contents/MacOS/AppleIntelSNBGraphicsFB bs=1 seek=173552 conv=notrunc % touch /System/Library/ExtensionsViola, 3 working connectors and no driver hangs, instead of 1 broken connector & 3 working connectors with driver hangs.
Terminal.jpg 52.53KB
233 downloads
0000000: 0102 0400 1007 0000 1007 0000 ............ 000000c: 0503 0000 0200 0000 3000 0000 ........0... 0000018: 0205 0000 0004 0000 0700 0000 ............ 0000024: 0304 0000 0004 0000 0900 0000 ............ 0000030: 0406 0000 0004 0000 0900 0000 ............
0000000: 0102 0300 1007 0000 1007 0000 ............ 000000c: 0205 0000 0004 0000 0700 0000 ............ 0000018: 0304 0000 0004 0000 0900 0000 ............ 0000024: 0406 0000 0004 0000 0900 0000 ............ 0000030: 0000 0000 0000 0000 0000 0000 ............
dd if=AppleIntelSNBGraphicsFB of=/tmp/table bs=1 skip=173568 count=96
0000000: 0102 0400 1007 0000 1007 0000 ............ 000000c: 0503 0000 0200 0000 3000 0000 ........0... 0000018: 0205 0000 0004 0000 0700 0000 ............ 0000024: 0304 0000 0004 0000 0900 0000 ............ 0000030: 0406 0000 0004 0000 0900 0000 ............ 000003c: 0102 0100 1007 0000 1007 0000 ............ 0000048: 0503 0000 0200 0000 3000 0000 ........0... 0000054: 0000 0000 0100 0000 4000 0000 ........@...
000003c: 0102 0100 1007 0000 1007 0000 ............ 0000048: 0503 0000 0200 0000 3000 0000 ........0...
000003c: 0102 0100 1007 0000 1007 0000 ............ 0000048: 0205 0000 0004 0000 0700 0000 ........0...
0000000: 0102 0400 1007 0000 1007 0000 ............ 000000c: 0503 0000 0200 0000 3000 0000 ........0... 0000018: 0205 0000 0004 0000 0700 0000 ............ 0000024: 0304 0000 0004 0000 0900 0000 ............ 0000030: 0406 0000 0004 0000 0900 0000 ............ 000003c: 0102 0100 1007 0000 1007 0000 ............ 0000048: 0503 0000 0200 0000 3000 0000 ........0...
0000000: 0102 0300 1007 0000 1007 0000 ............ 000000c: 0205 0000 0004 0000 0700 0000 ............ 0000018: 0304 0000 0004 0000 0900 0000 ............ 0000024: 0406 0000 0004 0000 0900 0000 ............ 0000030: 0000 0000 0000 0000 0000 0000 ............ 000003c: 0102 0100 1007 0000 1007 0000 ............ 0000048: 0205 0000 0004 0000 0700 0000 ........0...
So still no luck with video playback. Any advice from anyone?
When you say video playback, what exactly are you doing? Then what happens when you try? Any error message? Anything show up in the logs? (Use the Console utility to look at the logs.)
I did a quick check with VLC in both Snow Leopard and Lion, and didn't notice any problems. I used a .mp4 file with no DRM. I'm using device-id injection in the DSDT. For Lion I patched the connector list in AppleIntelSNBGraphicsFB.kext (as described in this thread), and for Snow Leopard I used device-properties in the boot plist to define AAPL,os-info. I have a GA-H67A-UD3H-B3 motherboard and i5-2500K CPU, and I'm using the DVI connector.Just a black screen with audio only on mplayerx or vlc. Will check in console utility.
0 members, 0 guests, 0 anonymous users