How to manually change the screen orientation ?
-
Hello everyone, my Nexus 5 can't rotate to portrait/landscape, I checked the lock. I don't know if this is from the OS or the device but anyway.
I only need to know how to change the orientation in shell command, or something that doesn't need a working sensor.I found an interesting variable for this in the documentation : NATIVE_ORIENTATION. But whatever the value it has (portrait or landscape), it doesn't do anything. I tried many commands like
export $NATIVE_ORIENTATION = landscapeI would prefer making the rotation in shell instead of making an app just for this, I'm not comfortable with QML programming yet.
-
@ub You could check if your sensors are working with SensorStatus from the OpenStore.
-
@ub Do you want a one thing change of orientation or something that you can toggle?
-
@kugiigi I only need a one thing change, I'm okay with that. Do you know a way?
-
I checked the lock
Did you try to reboot your phone to check if the feature really doesn't work ?
-
@ub So you basically want your phone to be always in landscape?
there's a configuration to change the native orientation of a device.Or if you want, I can make you patch to use the rotation lock setting to change between portrait and landscape

-
@kugiigi No I actually didn't explain well what I want. I want to be able to switch from portrait to landscape (and vice versa), that's what I want.
Making a patch would be nice, I would appreciate but would you mind telling me how I can do that by myself ? Unless this is too complex of course.
The thing is that I want to improve my skills in programming/scripting. I'd be fine if this requires QML code. I didn't find much about it in the doc though... -
@domubpkm Yes I did. This didn't solve the issue. Maybe I should factory reset.
-
@ub Strange. You can try to change the channel with phone system settings or flash again the phone using the UBports installer (without wipe data option).
-
@ub Try to check of your sensor is really broken. I had the same rotation problem on my Nexus 7 2013 but not on my Nexus 5. Anyway, in case you really want a patch, I actually created a script to install custom patches in UT. I can point you to that script and provide a package with the patch you need.
-
-
@ub I was able to create a patch where if rotation is locked, it'll switch to portrait when unlocked, it'll switch to landscape. You can try the script I created (https://github.com/kugiigi/jerk-installer) to easily install and uninstall it or I can provide you the single QML file for it. Not yet sure where to put the files though. If you have telegram, I can send them to you.
-
Hi!
Perhaps it is an "app issue"? Some apps are restricted to a certain screen orientation. You could check in ~.local/share/applications, in the .desktop files. Some apps have a setting called
X-Ubuntu-Supported-Orientations=Possible values are
primary, portrait, inverted-portrait, landscape, inverted-landscapeperhaps it helps to change it there.
-
@kugiigi said in How to manually change the screen orientation ?:
@ub I was able to create a patch where if rotation is locked, it'll switch to portrait when unlocked, it'll switch to landscape. You can try the script I created (https://github.com/kugiigi/jerk-installer) to easily install and uninstall it or I can provide you the single QML file for it. Not yet sure where to put the files though. If you have telegram, I can send them to you.
Put it somewhere public (in jerk-installer/sample-packages?) please. Last week I thought such feature (manualy rotate screen if rotation is locked) would be great for me. I now I read you made something similar. I would like to try it too.
Thanks.
-
-
@kugiigi said in How to manually change the screen orientation ?:
@jezek I created a separate repo. Check the ManualOrientation under Lomiri.
Thank you.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better š
Register Login