Contribute
Register

[Fix] Intel HD4200/HD4400/HD4600 Mobile on Yosemite

vbo

Joined
Jul 13, 2014
Messages
299
[FIX] Intel HD4600 Mobile on Yosemite

HD4400 is working fine on my Lenovo U430.
Including preview / quick look with images? No past CVMCompiler crash reports in ~/Library/Diagnostics/Logs (not the proper path but I'm not near a mac right now)
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
190,977
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
[FIX] Intel HD4600 Mobile on Yosemite

Including preview / quick look with images?
No problem with preview/quick look.

No past CVMCompiler crash reports in ~/Library/Diagnostics/Logs (not the proper path but I'm not near a mac right now)
I see some logs at ~/Library/DiagnosticReports/Logs, but they do not appear to affect preview.
 

vbo

Joined
Jul 13, 2014
Messages
299
[FIX] Intel HD4600 Mobile on Yosemite

No problem with preview/quick look.
I see some logs at ~/Library/DiagnosticReports/Logs, but they do not appear to affect preview.
Well it looks like I'm looking in the wrong place then don't it :)
I'll open a separate thread to try to track my issue down without mucking up this thread further.
 
Joined
Feb 7, 2012
Messages
95
Motherboard
Gigabyte GA-Z77-DS3H
CPU
i5-3570k
Graphics
HD4000
Mac
Classic Mac
Mobile Phone
[FIX] Intel HD4600 Mobile on Yosemite

Well it looks like I'm looking in the wrong place then don't it :)
I'll open a separate thread to try to track my issue down without mucking up this thread further.
I have the same problems with Preview on my Lenovo T440 - HD4400
 

vbo

Joined
Jul 13, 2014
Messages
299
[FIX] Intel HD4600 Mobile on Yosemite

Fixed for HD4400 using the same method as the-darkvoid indicated - Patching the HD4600 desktop ID with HD4400 mobile ID makes the plugin work, and fixes the crashes in preview/quick look:
Code:
# HD4400 only
sudo perl -pi -e 's|\x86\x80\x12\x04|\x86\x80\x16\x0A|sg' /System/Library/Frameworks/OpenCL.framework/Libraries/libCLVMIGILPlugin.dylib
(Make a backup of libCLVMIGILPlugin.dylib first)

the-darkvoid: the regex in post #10 doesn't work with the default perl version in 10.10 (maybe you're using perl6?). Since we want to patch all 3 references anyway (and if there was any other in a future version, we'd want to patch them too), I just used the intel IDs in the regex and replace all.
 

vbo

Joined
Jul 13, 2014
Messages
299
[FIX] Intel HD4600 Mobile on Yosemite

On a side note, I don't know how this can work for any HD4400 users without this patch. While the 10.9 plugin references 0xa168086 throughout, the 10.10 plugin does not anywhere, and only the following IDs are referenced as valid to load this HD5k plugin:
Code:
0000000000002949         cmp        edi, 0xa268085
0000000000002951         cmp        edi, 0x4128086
000000000000295b         cmp        edi, 0xa2e8085
0000000000002963         cmp        edi, 0xa268086
000000000000296d         cmp        edi, 0xa2e8086
0000000000002975         cmp        edi, 0xd228086
000000000000297d         cmp        edi, 0xd268086
The penalty for not using (or patching) one of these ids is:
Code:
0000000000002995         test       rdi, rdi
0000000000002998         je         0x2a9f
...
0000000000002a9f         lea        rax, qword [ds:0xf1df]    ; "loadIcbeDylib",
0000000000002aa6         lea        rcx, qword [ds:0xe73c]    ; "/SourceCache/GPUDriversIntel/GPUDriversIntel-10.0.86/Common/CLPlugin/Intel/igil/cvms_plugin/igil_cvms_plugin.cpp"
0000000000002aad         lea        rbx, qword [ds:0xf1ed]    ; "gIcbeDylib != NULL"
i.e. the exact crash reported by the-darkvoid in post #1 for HD4600 mobile, which I also see with HD4400 before patching.

On the bright side, HD4400/HD4600/HD5k all follow the same path throughout the code of the plugin in 10.9. In 10.10, HD4600 desktop and HD5k also follow the same path, so there doesn't seem to be any feature specific to a certain intel gpu class used by this plugin.
I haven't seen any crashes with HD4400 so far either.
 
Joined
Jul 3, 2014
Messages
935
Motherboard
Dell XPS 9360 (KabyLake R)
CPU
Intel i7 8550U
Graphics
Intel UHD 620
Mac
MacBook, MacBook Pro
Mobile Phone
Android
[FIX] Intel HD4600 Mobile on Yosemite

Correct, I pasted a wrong regex from my notes.

This is the working one:

See first post for final working patch.


I made it pull in the opcodes besides the device ID because I want to make sure that in future versions no accidental other patches are done.

Replacing the device ID alone might have unintended side effects.

I will update the first post with your feedback on HD4400 so everyone has the information in 1 go.
 

vbo

Joined
Jul 13, 2014
Messages
299
[FIX] Intel HD4600 Mobile on Yosemite

Fair enough, although I think that since the ids are so long there's little chance we'd accidentally patch anything but the device id, and if a new reference was introduced in some future code we'd want to patch it too.
Plus my perl regex writing skills really suck, so I have to keep it real simple :)
 
Joined
Jul 3, 2014
Messages
935
Motherboard
Dell XPS 9360 (KabyLake R)
CPU
Intel i7 8550U
Graphics
Intel UHD 620
Mac
MacBook, MacBook Pro
Mobile Phone
Android
[FIX] Intel HD4600 Mobile on Yosemite

Rehabman,

Would you be able to update the thread title to "[FIX] Intel HD4400/HD4600 Mobile on Yosemite"?
 
Joined
Jul 3, 2014
Messages
935
Motherboard
Dell XPS 9360 (KabyLake R)
CPU
Intel i7 8550U
Graphics
Intel UHD 620
Mac
MacBook, MacBook Pro
Mobile Phone
Android
[FIX] Intel HD4600 Mobile on Yosemite

vbo,

When new references come you and I will see what they do first before blindly patching.
Otherwise OS X might start crashing unnecessarily :crazy:.
 
Top