If all the above fail then it is possible that the g-sensor IC on the circuit board has malfunctioned. Try download an app for manually rotating the screen?
open