lavender.t Posted May 16, 2009 Share Posted May 16, 2009 for impatient readers, just download and unzip the attachment, overwrite /System/Library/Extensions/AppleIntelGMAX3100FB.kext/AppleIntelGMAX3100FB with AppleIntelGMAX3100FB.soft-cursor. remove Extensions.mkext and reboot with -f -v and you are done. (better make sure first that the version in Info.plist is 1.5.18.7). ======== if you want to know how i hacked this baby, read on ---- i took some time to track down the scrambled mouse when set to full native LCD resolution with AppleIntelGMAX3100FB 1.5.18.7 in IDA Pro. obviously the code is using X3100's hardware mouse cursor. somewhere it must have put in a bad register parameter and caused the artifact. AppleIntelGMAX3100FB::hwSetCursorState() looks to be slightly different btw .18 and .24, but tracking every detail down would just take too much efforts and even if i nailed it, it would be hard to fix at the binary level. since the screen and window all are perfectly drawn, i believe the software cursor would just work fine. all i need to do is to hack the code telling the system that it doesnt support hardware mouse. sound to be a really promising quick fix. so i took a few glances at the apple developer website for class IOFramebuffer (http://developer.apple.com/documentation/Darwin/Reference/KernelIOKitFramework/IOFramebuffer_h/Classes/IOFramebuffer/index.html). it first appears to me that if getAttribute() method returns FALSE for kIOHardwareCursorAttribute, then the system would use soft cursor. quickly located in IDA pro the instructions to return TRUE for kIOHardwareCursorAttribute. and in HexEdit, search for binary sequence: 31 C9 C7 00 <01> 00 00 00, then replace <01> with <00>. rebooted the system and set my display to max resolution -- voila ! the artifact is gone !! but sadly very soon i found another culprit -- if the LCD went to sleep and woke up, the mouse artifact reappeared. read further down the code, i realized that on wake up the system could've called the override function AppleIntelFramebuffer::setCursorImage() directly without checking the attribute, which triggered the hardware cursor. the IOFramebuffer documents says that setCursorImage() needs to return kIOReturnUnsupported to hide the hardware cursor. using the same approach, i found the starting offset of setCursorImage() was at 0xEECC. so i just went ahead and patched the first 6 bytes of the function to: B8 C7 02 00 E0 C3 (mov eax, 0xe00002c7 retn). and that's it !! the mouse cursor now works perfectly ! - lt x3100.soft_cursor.zip Link to comment Share on other sites More sharing options...
riws Posted May 16, 2009 Share Posted May 16, 2009 Is it reproducible on AppleIntelIntegradeFrameBuffer.kext? Link to comment Share on other sites More sharing options...
lavender.t Posted May 18, 2009 Author Share Posted May 18, 2009 Is it reproducible on AppleIntelIntegradeFrameBuffer.kext? not sure. i never saw this kext loaded in my D830. - lt Link to comment Share on other sites More sharing options...
Kanedo Posted August 19, 2009 Share Posted August 19, 2009 Great work! I'm now able to get a working mouse pointer at 1680x1050 on Thinkpad T61 in Safe Mode (no QE/CI). However, I'm still suffering from blue screen at 1680x1050 in normal mode (with QE/CI). The highest resolution I can use is 1600x1000 with QE/CI. Anyone have any idea how to get 1680x1050 with QE/CI? Link to comment Share on other sites More sharing options...
coldequation Posted September 3, 2009 Share Posted September 3, 2009 lav, Nice work! I've tried to apply your technique to 10.5.6 (AppleIntelGMAX3100FB 1.5.36.25) with no luck. I don't have IDA Pro, so I was using otx and otool. Would you be able to look into 10.5.6 and 10.5.7? If you could share some more details on how you found the location where "getAttribute() method returns FALSE for kIOHardwareCursorAttribute" then I could probably do the same for 10.5.6/10.5.7/10.5.8. Also, I'm curious why you didn't just distribute the zipped kext, with the Info.plist and version.plist. By just distributing the binary, won't there be an issue with using a different (say 10.5.6) version of the Info.plist and version.plist? Or would it just work with any Info.plist and version.plist? -u lav, BTW, I have posted your results to a thread that's trying to get the Intel 4500 working using the 3100 kexts. Lenovo users have a disappearing mouse problem. Two 4500 users have tried your hacked 3100FB kext and it's solved their disappearing cursor problem. I too am a developer. I've been working on hacking the X3100 (not the FB) kext to work on Intel's 4500MHD set of chips. I'm stymied in disassembling the X3100 kext because I don't have tools like IDA Pro. If you have some time, I'd like to know if you can join forces with me on tackling this. I've posted my analysis of the changes made to the BSD drivers to support Intel's 4-series (which were pretty small) here: http://www.insanelymac.com/forum/index.php...t&p=1191941 So far we have a patched X3100FB kext (patched to use the dev ids of the 4500) loading which gives 4500 users native resolution for the first time. Unfortunately, the X3100 kext does not load and dumps its SVG registers, failing on an invalid instruction. I believe that it can't find the Graphics Translation Table. My theory is that we'd basically need to know where to patch the kext to set the following: 1. The address (location) and size of the GTT (Graphics Tranlation Table) 2. The graphics pipeline. For 3D graphics, the 4-series use a new pipeline (pipeline 1) while the older cards (including the X3100) use pipeline 0. 3. The address of the hardware status page which affects the location of the shared memory used by the 4500 versus the 3100. The 4500 BSD driver allocates a separate, fixed hardware status page of 4KB for the 4-series. 4. The 4-series (desktop & mobile) DO NOT allocate any space in the kernel for overlay registers. It's possible that the driver will just fall back to not supporting overlay if we use the X3100 kexts to drive 4-series hardware. Let me know if you'd like to help. As an aside, all new budget hardware is using Intel's 4500 MHD series. -u Link to comment Share on other sites More sharing options...
dvsala Posted September 5, 2009 Share Posted September 5, 2009 Awesome stuff! I have a Toshiba L505-6946 that I successfully installed iAtkos 10.5.7 MAC OSX. I have problems with my video being locked at 1024x768 and I used the patch in this posting (patchx4500.bash) and it worked! I am now seeing things in the native resolution of my laptop at 1366x768 at 60Hz on a 16" screen! Thank you very much for all of your help and assistance in this matter. How should I change the settings to get my 22" Samsung monitor to work with it? The resolution on the monitor is 1920x1080. The only thing I have left now is a way to get my wireless to work. My laptop has a Intel WIFI Link 5100AGN. I read that a kext for this particular wifi card is not supported yet. I'll have to wait..... Link to comment Share on other sites More sharing options...
Proxin Posted September 22, 2009 Share Posted September 22, 2009 Will this also work on GMA X4500 id 2A42 graphics cards? I am seeing horizontal lines as my pointer unless I make it much larger than it should be... Link to comment Share on other sites More sharing options...
dvsala Posted September 22, 2009 Share Posted September 22, 2009 Will this also work on GMA X4500 id 2A42 graphics cards?I am seeing horizontal lines as my pointer unless I make it much larger than it should be... yes, that is the exact specification for the computer's video card It is an Intel x4500 with the numbers 2A42 in the card details when I looked at it in the system profiler I just installed the patch and rebooted. Link to comment Share on other sites More sharing options...
Proxin Posted September 22, 2009 Share Posted September 22, 2009 yes, that is the exact specification for the computer's video card It is an Intel x4500 with the numbers 2A42 in the card details when I looked at it in the system profiler I just installed the patch and rebooted. Didn't work for me... when I rebooted it gave me 1024x768 resolution again when my native res is 1280x800 :/ I am on Snow Leopard, does that make a difference...? My version is also 1.5.36.25, same as coldequation's. Link to comment Share on other sites More sharing options...
jasim Posted September 22, 2009 Share Posted September 22, 2009 yes, that is the exact specification for the computer's video card It is an Intel x4500 with the numbers 2A42 in the card details when I looked at it in the system profiler I just installed the patch and rebooted. Suffering from Mouse Artifact problem??? Read this topic to Solve the mouse artifact problem in Intel X4500 native Resolution. Link to comment Share on other sites More sharing options...
dvsala Posted September 22, 2009 Share Posted September 22, 2009 Didn't work for me... when I rebooted it gave me 1024x768 resolution again when my native res is 1280x800 :/I am on Snow Leopard, does that make a difference...? My version is also 1.5.36.25, same as coldequation's. How did you get Snow Leopard installed? i believe this patch only works with Leopard Link to comment Share on other sites More sharing options...
Proxin Posted September 22, 2009 Share Posted September 22, 2009 How did you get Snow Leopard installed? i believe this patch only works with Leopard A friend found an install online for me, we have the same hardware so he wanted me to test it for him before he tried it. I think he found it on demonoid. jasim's link worked for me, I have full res now Link to comment Share on other sites More sharing options...
Frakke0 Posted June 12, 2010 Share Posted June 12, 2010 I got the ATI Radeon Sapphire HD3850 and got the same problem but I can't get it fixed. Someone can tell me what to do? Link to comment Share on other sites More sharing options...
svfusion Posted October 8, 2010 Share Posted October 8, 2010 sorry for the noob question, but what is the correct way to install this? I did sudo mv -rf AppleIntelGMAX3100FB.soft-cursor /System/Library/Extensions/AppleIntelGMAX3100.kext/AppleIntelGMAX3100FB when i reboot it says that it can't use that kext because it has been installed imporerley Link to comment Share on other sites More sharing options...
Recommended Posts