mutter ignores accel-sensor reading on suspend (by LID switch) and does not honor it after resume (by LID switch) either
This is with 3.32, I have not tested master.
One of the devices I was testing today is a 10" tablet with a portrait screen. So its native resolution in iio-sensor-proxy "normal" orientation is portrait.
This tables comes with a keyboard cover / folio and when using the tablet with its keyboard folio, the tablet is oriented in landscape mode, which iio-sensor-proxy correctly reports as "right-up" orientation and all is well.
All is well until the user folds the tablet down with its screen towards the keyboard, as one would do when closing a normal clamshell design laptop. In this case the hw reports a LID switch being closed (good) and the tablet suspends (good).
But just before suspending one can observe mutter rotation the screen from the correct right-up orientation to its "normal" orientation. This is a bit weird, but ok. The real problem is that on resume mutter does not re-apply the orientation, keeping the display as if iio-sensor-proxy is returning "normal" orientation, leading to the unlock screen being displayed on its side / 90 degree rotated as the tablet actually still is in "right-up" orientation.
Note I've run monitor-sensor and it keeps reporting "right-up" orientation all the time, mutter is deciding to fallback to "normal" on suspend all by itself; and as mentioned more importantly mutter fails to re-check / restore the orientation on resume.