I've learned not to ignore these signals (lack of motivation) but take them in stride. So I usually wiggle a little to put things in perspective and see if there's room for incremental change. If everything else fails, I don't hesitate to make drastic changes to my environment. This takes some intuition and guts. At one time or another, I've been a classics PhD student, a civil engineer, and software developer. So it helps being reflexive, opening yourself up and exposing yourself to life's forces beyond what bears on you at present, and sometimes putting yourself in a situation where there's no way but to try something new. If you're stuck in a local equilibrium, one way out may be to put some life's forces to bear on it.