Registered to say thank.. This worked on my galaxy note 4Ok so I was having the same issue on my S5. The camera was completely upside down and the screen rotation wasn't working at all. I was reading posts and did everything (besides to a reset) I could do on my phone. Ones persons answer was that he physically hit his phone and it started working again. So considering it was worth a shot I held the top of the phone with my left hand and gave it a little smack on its arse and it seriously worked. So before you go reseting or sending it out for repair, give it a little spanking and it'll do the trick.
Thank you for sharing this information.
RegisteredI just did this and it worked. Thanks!
