Nvidia GT 540M runs smoothly then performances drop
Your computer's glitchy performance is characteristic of video RAM artifacts. If the RAM in your graphics processor is failing, sometimes just a small fraction of the RAM goes bad while the rest of the RAM continues to work properly. This results in the part of the operating system or program that was being stored in that RAM malfunctioning. Sometimes as a result of this the screen also freezes or a section of audio plays repeatedly in a loop. Rebooting the computer also clears whatever was stored in the RAM, and the laptop's performance goes back to normal.
If the situation becomes intolerable you may have to disable the NVIDIA graphics on your laptop and use only the integrated Intel graphics.