Default [Q] nexus 5 accelerometer problem.

After two weeks of use the accelerometer stops working and auto rotation from portrait to landscape stop working .. i reboot the device and nothing - factory reset/hard reset wipe out all data nothing the accelerometer is not working.
Any one else with this problem and please give a solustion.