Solution: If you're stuck, here's a solution that worked on a 2012 HP Envy 14":
sudo apt-get remove iio-sensor-proxy (UbuntuForums Source)
Then log out and log back in.
Caveat: orientation lock icon is gone from the menu bar and you can't use the gyroscope (if it even exists in your device) to change orientation but that's not a problem since you don't want orientation changes anyway :). If you ever want to re-enable the feature, reverse the process:
sudo apt-get install iio-sensor-proxy
Observations: The HP Envy did not respond to the
gsettings changes suggested here. It also did not respond to physically rotating the laptop or tilting the screen. Orientation settings were also missing from the settings application.
For some reason the auto-rotate code gets triggered after it's been asleep and it's impossible to get it to return to normal without CLI intervention.
The laptop does not recognize orientation changes or tilting the lid so I'm not sure why the orientation (rotation) automatically changed in the first place.