View Single Post
Old 7th July 2015, 04:33   #2589  |  Link
Zachs
Suptitle, MediaPlayer.NET
 
Join Date: Nov 2001
Posts: 1,721
Optimus bug with R352 driver branch (fault in ntdll.dll)

I really doubt the Microsoft WHQL certification process is working correctly when it comes to Optimus (perhaps they have no idea how to test all the different configs out there) as there have been 3 WHQL releases of R352 branch NVIDIA GPU drivers and certain configs of Optimus still suffer from a critical bug that causes a fault in ntdll.dll when you run certain applications (MPDN x64 is one of them unfortunately). Other apps are also affected - e.g. GPU-Z (32-bit) and Visual Studio 2010/2013 (see this bug report on Microsoft Connect).

It is caused by the Nvidia Optimus DLL Injection code (nvinit.dll for 32-bit apps and nvinitx.dll for 64-bit apps). 32-bit processes fail at fault offset 0x000e5624 in ntdll.dll while 64-bit processes fail at fault offset 0x00000000000f0f20. They both have the same exception code 0xc0000374 which means heap corruption.

The fault happens when the following conditions are true:
1) You are using NVIDIA R352 branch drivers (if you revert to R346 it'll work just fine)
2) Laptop is an NVIDIA Optimus laptop
3) Win8.1 (Win7 works fine)
4) Secondary monitor via HDMI (or DVI) output is set to "Extend my desktop" and is set to a different resolution to your laptop screen
5) System has been restarted after you've installed NVIDIA R352 branch drivers. DLL injected codes from nvinit.dll and nvinitx.dll won't get loaded before you reboot as they reside in the registry (AppInit_DLLs).

Workaround:

Remove nvinit.dll and nvinitx.dll in %systemroot%\sysWOW64 and %systemroot%\system32 respectively.

Note that you can't actually delete the files since they get loaded with every single process (including Explorer.exe) - it's DLL injection - so you have to rename the files (e.g. nvinitx.dl_ and nvinit.dl_) and restart. You can then remove the renamed files.

This removes the ability to make your primary screen (or GPU adapter) render with NV GPU and present with your Intel GPU (essentially disables Optimus) but if you setup MPDN to display on the secondary display, your NV GPU will still operate fine.

Other Optimus issues:

Some users have reported other odd behaviours when using MPDN with Optimus. If you believe Optimus is the culprit (it usually is), you can follow the instructions in the above workaround to "disable Optimus".

Last edited by Zachs; 30th July 2015 at 00:17.
Zachs is offline   Reply With Quote