accelerometer + screen rotation on non-touchscreen laptop?

The whole story you mention is actually a kind of bug in iio-sensor-proxy or in your DE code who makes use of iio-sensor-proxy info.

Is not bios or kernel that does the rotation but the marriage between iio-sensor-proxy and your Desktop Environment.

DE like Gnome (and Cinnamon as turns out) does screen auto rotate based on the data provided by iio-sensor-proxy in dbus.

You can try to remove/purge iio-sensor-proxy and screen rotation will go away completely.

It is not clear if this is a iio-sensor-proxy bug or a Cinnamon bug. It could be iio-sensor-proxy that is reading in a wrong way your accelerometer data or could be Cinnamon who even if it receives correct data by sensor-proxy, rotates the screen wrongly.

You can clarify this issue by running monitor-sensor in root terminal. This utility comes with iio-sensor-proxy package and displays in terminal the current state of accelerometer / current screen orientation.
If orientation is correctly displayed by monitor-sensor then it is a Cinnamon bug. But i'm 90% sure that this is an iio-sensor-proxy bug and you should report it to the developer.

PS: It had been also mentioned that sensor-proxy had been working well with kernels up to version 4.7 but had some problems with kernel 4.8 and above. You could try to install an older kernel (i.e 4.7) for testing.

If monitor-sensor reports correctly the orientation and this is a Cinnamon bug, as a workaround you could disable Cinnamon auto screen rotation feature and run a kind of shell script that will make the correct rotation based on the data of monitor-sensor.

PS: Gnome gives the option to completely disable auto screen rotation, i'm not sure if Cinnamon has this option too.

In XFCE that iio-sensor-proxy is installed but XFCE devs are not performing auto screen rotation (yet) we apply this script to have auto screen rotation:

PS: Improved version for touch screens with transformation matrix:

Update for future reference / future "google searches"

As advised in comments, by running monitor-sensor in a root terminal and observing the messages provided by iio-sensor-proxy it proved that iio-sensor-proxy is correctly understood the real screen orientation.
As a result this seems to be a Cinnamon bug that though it gets correct info by iio-sensor-proxy is rotating the screen wrongly.

You can disable the Cinnamon auto rotation feature and try the auto-rotation script as advised above (

To disable Cinnamon internal autorotation you need to apply settings set org.cinnamon.settings-daemon.plugins.orientation active false as advised in OP's comment.

Using dconf-editor, change the key value for


to False.

This is identical to the command line solution presented above, but uses the gui tool dconf-editor.