Screen has stopped autorotating

I have been having this screen rotation problem for probably 2 years and have even sent my Tab S2 back to Samsung (while under warranty) back in 2016, which obviously did nothing for the long term. I do notice that when my screen stops rotating and I reboot, the option for Auto screen brightness has been replaced with the Outdoors checkbox. Anyone else experience this? Well, I could always shut down then boot into recovery mode then wipe the partition cache and it would be fixed. I have tried doing this today about 4-5 times with no fix. Has anyone heard anything on this? Does anyone have any ideas?
 
I read about a fix someplace online and I tried it and now it is working again but I don't suppose it will stay working. Here is what I did: Shut it off. Then held down the start button for I forgot how long, a minute or two.

Bullwinkle, this worked! The whole day, I realized my tab 2 was not auto rotating and your fix worked for me. Thanks!

EDIT: SORRY. I didn't realize this was from 2 years ago lol. But it still works today
 
Here is what I did: Shut it off. Then held down the start button for I forgot how long, a minute or two.

Holding for 30 seconds was enough to work for me! Thank you. Mine had not been auto-rotating for week or two.

This fix makes absolutely no sense though! What does holding the power button do while the tablet is booting?

I shut down the tablet then held the power button and when the tablet turned on, I continued holding the power button for about 30 seconds until the tablet showed the home screen. When the home screen first came up it rotated to portrait and then back to landscape (how I was holding it) so something was fixed while it was booting up. Wow. Kudos bro!

Another problem I had which was also solved was when the battery level got to 45% or below the screen refresh rate went down, like when I'm playing Clash of Clans and lots troops make for herky-jerky motion like the processor couldn't keep up.