Graphics Processor doesn't run games anymore (dxgifactory or d3d swapchain error)

shayak2007

Prominent
Dec 20, 2017
14
0
560
Hi,
My problem is regarding the Lenovo Ideapad Z570 graphics and applications. Basically whenever I try to run ANY game (Max Payne 3, GTA V, NFS Run, BattleField3, etc.) it always ends immediately or within a few seconds with the error "dxgifactory createswapchain E_InvalidArg" or "gfx d3d swapchain alloc 2". I can run them only on the Integrated Graphics but not on the NVIDIA GPU. I can run the games on the dedicated GPU only if I disable the Integrated Graphics in Device Manager. But then I cant play them since the CPU usage suddenly spikes to 99-100 percent until I turn the integrated graphics back on. This was never an issue before. I've had this laptop for about 5 years now and it used to run all these games smoothly. This has been happening from the past month. I have an i3 2.10 ghz processor with 6GB RAM. The Integrated Graphics is Intel HD 3000 and the Dedicated GPU is NVIDIA 520M (1GB). I have uninstalled and reinstalled all the latest drivers for both Intel and the NVIDIA GPU and I have all the updates from DirectX upto DirectX12. I just don't know what the problem is or what I can do to fix it. I'm really stuck with this. Any help regarding this would be much appreciated.
 
Solution
Hi,

I've finally found a solution myself to the problem.

See this thread for a specific game : https://steamcommunity.com/app/228200/discussions/0/3182216552765743658/

This one for global correction : https://www.reddit.com/r/Windows10/comments/645ukf/windows_10_cu_fullscreen_optimizations/

Mark RM

Estimable
Jul 16, 2014
222
1
5,110
The problem is obviously with the drivers and GPU switching.

Try this...
Download and save where you can find them
https://downloadcenter.intel.com/download/24971/Intel-HD-Graphics-Driver-for-Windows-7-8-64-bit?v=t
Download and save where you can find it
https://www.geforce.com/drivers/results/128425

Follow these steps in sequence
Use DDU to uninstall the nvidia drivers cleanly
http://www.guru3d.com/files-details/display-driver-uninstaller-download.html
Using this app will also prevent Windows from automatically looking for or installing drivers, this is helpful at this stage.
reboot when prompted
uninstall the the intel graphics drivers completely from Add/remove applications.
reboot

Your screen may look like garbage at this point, but soldier on.
Install the Intel driver you downloaded, it might say windows 8.1 and it is a legacy driver because of the age of you machine but it will install fine.
Reboot
Install the downloaded Geforce driver.
reboot
start DDU again and click the big orange/yellow button the right that puts windows back into automatically installing drivers, reboot if prompted
Test

I know these processes are slow to work through, but that's how it is.
 

shayak2007

Prominent
Dec 20, 2017
14
0
560


OK. Let me try this method. I already have the drivers since I have reinstalled all of them. Although I haven't used DDU before. So i'm going to try it this time to see if it works. I'll get back to you once I've completed the procedure. The weirdest part of this is that two games run perfectly now when everything else doesn't (X-Plane 11 and RailWorks Train Simulator 2017).

BTW you want me to uninstall Intel Graphics Driver from add/remove applications and not uninstall device from Device Manager.. Right? Also previously when I removed the Intel Graphics Driver it just reinstalled itself automatically after the reboot.
 

Mark RM

Estimable
Jul 16, 2014
222
1
5,110


-Correct, remove the driver from add remove programs

- this time DDU is turning off the Windows policy that allows Windows to automatically install a driver so it will not automatically reinstall, you will have to install it manually as I said. The final step of running DDU again is as I wrote to turn this function back on.

Make sure the drivers you have now are EXACTLY the same as the ones I linked to, random drivers will screw this up.
 

shayak2007

Prominent
Dec 20, 2017
14
0
560


OK. I'm going to uninstall and reinstall the drivers. Let's see if it works. Will get back to you after it completes or if I get stuck somewhere.
 

shayak2007

Prominent
Dec 20, 2017
14
0
560


Hi,
I followed the entire method step by step but unfortunately it didn't work. Used DDU. Removed NVIDIA drivers then removed Intel Drivers from remove applications. Reinstalled drivers from the links you gave me. Intel and then NVIDIA. And yet it has the same error. I do hope there is a solution to this. Anything else I could try?

BTW This is one of the error I'm getting.

"DirectX error

DirectX function "m_dxgiFactory->CreateSwapChain( m_device, &sd, &m_swapChain.assignGet{})' failed with E_INVALIDARG: An invalid parameter was passed to the returning function. GPU: 'NVIDIA GeForce GT 520M', Driver. Unknown
"
 

Mark RM

Estimable
Jul 16, 2014
222
1
5,110
Well that helps a lot.
The way the game accesses DX isn't allowing the graphics cards to pass off DX control to each other without crashing.

The only cure is to launch the game with only one GPU enabled. In other words, it has to be disabled before the game launches.

I know before you said that when you disabled the Intel GPU in device manager (not deleted, disabled) that your CPU was spiking to 100%. Is this still true? because that's what i was targeting with this fix first.
 

shayak2007

Prominent
Dec 20, 2017
14
0
560


Yeah it's still spiking to 100% when I disable the Intel HD 3000. What I don't get is how X-Plane and Train Simulator are running on the NVIDIA GPU without enabling or disabling anything i.e normally, but none of the other games are. Even more I tried playing NFS Run yesterday (I installed it after about 3 years) and it ran for about a minute until I clicked on display settings within the game and then it crashed. Sniper Elite 3 was even weirder. It ran for 8 whole hours (On the NVIDIA GPU) and I closed the game normally. Only next day when I try to launch it, it comes up with error that I mentioned. Is there something wrong with the system files or the registry which is preventing these games to run for a second time?

BTW Thank you so much for your prompt response and your help. Much appreciated.
 

shayak2007

Prominent
Dec 20, 2017
14
0
560


Yeah I tried that. I did a clean and custom install. First I did a clean install with installing all the features from the custom install window and clean checkbox selected i.e (Graphics Driver, HD Audio, GeForce Experience and PhysX System Software). Also I tried with just the Graphics Driver and HD Audio and also only the Graphics Driver. None of them worked unfortunately. It keeps throwing the same error. Either a "swap chain alloc 2" or a "createswapchain E_INVALIDARG".

I've also run benchmark tests on this system after the issue happened. At that time apparently it uses the NVIDIA GPU with no troubles. Also when I select the Intel Graphics processor from the right click menu of an exe it runs the game. But when I select the High performance Graphics from the menu, it starts throwing the errors.
 

Mark RM

Estimable
Jul 16, 2014
222
1
5,110
You are welcome, thanks for the thanks

It depends what GPU is actually active when the game launches dictating whether or not it errors out. This is specifically an Optimus problem and I don't think there's a whole pile I can do about it.

I mean if it was was here on the bench and I was determined, I'd take the clients drive out of the machine stick in a little SSD and cleanly install windows and drivers to see if I should even bother pursuing a resolution with the existing customers build.

Anyhow, one more thing to try (check) that's often associated with that error;
Control panel -> Region -> Administrative tab
Change Language for non-Unicode programs To English(US)

 

shayak2007

Prominent
Dec 20, 2017
14
0
560


Yeah I'm guessing for lack of a better resolution I might just have to install Windows from the scratch. and see if the hardware holds up after the driver install. Guessing manual driver update on a Windows 7 clean install would help. Besides the system is old but this is new drive. Seagate Barracuda 1TB. Barely been a month. And about that regional settings that's the first thing I checked after BattleField 3 failed. It's set to English(US) by default. Besides I think (I'm not sure) it's for the E_INVALID_CALL.

Also in the task manager Windows 10 has that GPU and GPU Engine column. When the game starts/runs it always triggers the NVIDIA response or shows the NVIDIA process for the games which are running as I mentioned earlier. I even checked if the BIOS setting was set to OPTIMUS and not VGA Only. Even more games from the Microsoft Windows Store can run on the GPU and it shows as well but anything else and it won't run. I'm befuddled with this.

Appreciate your time though.
 

ovidiubisoc

Prominent
Dec 23, 2017
3
0
510
i hope i dont bother you guys,i have the exact same issue,on any game i play i get the E_INVALIDARG.I have an integrated intel HD and a dedicated nvidia 540 M,the language change didn`t work and neither did the DDU,please help
 

shayak2007

Prominent
Dec 20, 2017
14
0
560


Nope. Haven't gotten around to reinstalling Windows yet but seeing your predicament I'm reconsidering that option. What version of Windows did you install?
 

shayak2007

Prominent
Dec 20, 2017
14
0
560


Don't think there is an easy fix to this. At least haven't seen one yet. Nothing we try seems to work. Apparently according to the last comment even reinstalling Windows didn't help.
 

ovidiubisoc

Prominent
Dec 23, 2017
3
0
510
This is very annoying,even the most simple games like worms dont work,it is either that E_INVALIDARG or it just crashes saying that it stopped responding or something,i have these errors ON EVERY GAME I PLAY.I have windows 10 64bit version.I did not find a fix anywhere...anything new for you?
 

shayak2007

Prominent
Dec 20, 2017
14
0
560


Mine is a bit different. Some games run while some don't courtesy of that E_INVALIDARG or Swapchain Alloc 2. Nothing new as of now. But I am thinking of reinstalling Windows to Windows 7. From there I can start installing the drivers manually and see what happens before I upgrade again to Windows 10. Weirdly enough games which came out this year is running on the GPU without any problems while older games fail to run. For the games I removed (which weren't working previously) I'm thinking of removing the AppData files from the system before i reinstall Windows to see if they run again.