Well, this is the nature of Nvidia's Optimus Technology
For basic tasks (usage) that aren't GPU intensive, the system automatically switches to Intel's onboard graphics to save power (better battery life). But when you decided to do some serious gaming or watch HD movies, the system switches to the 540M to meet performance expectations.
While there isn't a definitive solution to this problem, you will find an option in the NVIDIA control panel to set the GPU (540M) as your preferred option. You will need to look for this.