Dropping the phone just worked for me too! (it's absurd to need such kind of 'solution' in a top mobile phone like Moto X 2014, but anyway, at least rotation is back!)
After dropping my phone when trying to disable the alarm 3 days ago in the morning (was around 10 inches high), my X axis sensor...