I had the same problem (auto-brightness) and I did factory reset and even sent back to Samsung (they did another reset). But end of the day I figured out it was a VERY WEIRD situation for me - believe it or not, I am using Spigen Liquid Armor case and that is the culprit.
I remove the case and...