(I didn’t know were to put this, but I thought I’d share this for others having a similar problem.)
TL;DR: To enable all orientations on a SailfishOS device execute this terminal/SSH command with user permissions:
dconf write /desktop/sailfish/silica/default_allowed_orientations 15
How I discovered this: Using my device (Sony Xperia X) often while charging I found myself often struggling with the charging cable making it annoying to hold the device in one hand while resting my palm on the desk. Similarly, I sometimes find myself wanting to place the device with some content open on a flat surface while it is charging. While running under Android all my custom ROMs had a feature where you could just enable the inverted landscape (often called 180°) mode from settings, but with SailfishOS I found no such option.
When stumbling over the Default allowed orientations patch in Coderus’ patch manager, I got the hint that it might be possible using the
/desktop/sailfish/silica/default_allowed_orientations dconf property but there was no hint anywhere what the format of that property is, so my attempts at guessing a correct value failed.
Recently I rediscovered this property’s name in some system binary by accident and, having done some light QML UI work in the meantime, had some idea what the full message that that string was part of could mean: „Invalid default allowed orientations defined. Check your device configuration! Defaulting to: QFlags<DeclarativeOrientation::
Orientation>(Portrait|LandscapeMask)“. Search the Internet, I tried a couple of values but they all failed until I found the documentation of the
Screen.orientation QML property. The
Qt::ScreenOrientation type mentioned there has some documentation mentioning integer constants and as it turns out, those integer values are exactly what the Silica framework expects to find in that
/desktop/sailfish/silica/default_allowed_orientations dconf property. In particular the numeric value
15 enables all possible orientations on newly started apps. Yeah!