Bro your sensor issue is hardware not a software issue you
your sensor is faulty bro please check weather your phone can still rotate
to clarify where your problem is coming from and about your downgrade yes you can but to me the lollipop is more better cause is SDK 22 which means recent App can be installed