I got a problem with my Nvidia 540m 2gb graphics card. Whenever i play any game, (after a while) my laptop freezes and the game exits with a notification that "Nvidia graphics kernel sttoped responding and has been recovered" . I tried - formating my computer and reinstalling windows, tdrdelay method, installing lestest graphics driver, changing rams, high performance mode, through cleaning of inside of my laptop but nothing seems to be working. Also i have noticed that when I play games DISABILING my Nvidia graphics card (my laptop has dual gpu ie on intel hd graphics 3000 2gb) it works without any errors or freezing. I have Dell XPS L502X laptop. Can anyone please advise me what should I do to cure this error.
It sounds like you've done most forms of diagnostics. If the issue is persisting beyond a clean installation and latest driver installation, this points more towards a hardware issue of some form. If you can remember a point where the device worked without a problem, it may be worth using an older driver just to completely eliminate a software cause.
It's worth keeping an eye on the temperature of the GPU with some form of monitoring software (The first that comes to mind is GPUTemp) to see if there's a link between the temperature and when it crashes.
If there is a link and the temperatures are getting particularly high, I realise you have said you've cleaned it but it may be worth opening the machine and making sure air can flow properly. The heatsinks may need clearing, then fan may need replacing. I've also seen cases where heatpipes have failed and don't transfer heat correctly, and replacing the block with the heatpipes can resolve overheating issues. Finally, it could be a bad contact with the GPU itself, and replacing the thermal pad may be beneficial.
If temperature isn't the issue, it's likely the GPU itself is failing. Depending on the laptop, this may be replaceable, but looking at this thread gives a fairly swift indication that this isn't possible. As such, you could find out from Dell what it would cost to repair this, if the machine is outside of it's warranty period.