This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Screen Rotate after screen powered off and on again
#1
Hey All,

I'm currently using TinkerOS 2.0.4 with a portrait screen and using 'xrandr --output HDMI-1 --rotate left' in my .xsessionrc file to rotate the screen on bootup - which works great.

Problem is, if I power off the screen or remove and replug the HDMI cable, the orientation reverts back to landscape and I need to issue the 'xrandr --output HDMI-1 --rotate left' command again to switch the orientation back to portrait.

Does anyone know if there is any way to force/lock the orientation to portrait so that it never reverts back to landscape?

Thanks in advance.

Gus
Reply
#2
Any ideas guys?  This is driving me nuts.

Thanks
Reply
#3
Seems like I'm talking to myself, but if anyone is listening and has any knowledge on this topic - Would I need to make this change at the kernel level to get it to change orientation at Boot instead of after it boots?  Basically I want it to behave the same way as the Pi does, by booting up portrait mode, instead of booting up landscape and then changing orientation once the desktop has loaded.

Thanks.

Gus
Reply
#4
For anyone with the same problem, the fix is quite simple.

Just add this line "xrandr -o left" to "/usr/local/bin/hdmi-toggle" in the following section

# The external display is connected
if [ "$EXTERNAL_DISPLAY" != "" ]; then
# Set the display settings
xrandr
xrandr  --output HDMI-1 --auto
        xrandr -o left # add this code
else

'left' can be substituted for whichever orientation you require.

Hope it helps someone out there, it bugged the hell out of me!!

Gus.
[-] The following 1 user Likes Gus's post:
  • ocejo 117
Reply
#5
Thanks for sharing.

Is it works on X only?
I use console mode, and when typing 'xrandr' getting only 'Can't open display' message.
Is it possible to rotate screen at the low level at system start?

I use 1024x600 screen and custom box, and I want to mount screen 180deg rotated.
I saw some hints, like adding '/etc/default/grub' or use '/boot/config.txt' but I don't have this files.

Is it possible to rotate screen 180 degrees at low/system level, with boot/log screen also rotated?
Reply
#6
(02-24-2018, 11:04 AM)Gus Wrote: For anyone with the same problem, the fix is quite simple.

Just add this line "xrandr -o left" to "/usr/local/bin/hdmi-toggle" in the following section

# The external display is connected
if [ "$EXTERNAL_DISPLAY" != "" ]; then
# Set the display settings
xrandr
xrandr  --output HDMI-1 --auto
        xrandr -o left # add this code
else

'left' can be substituted for whichever orientation you require.

Hope it helps someone out there, it bugged the hell out of me!!

Gus.


i'm just starting with this, where do i get the config txt to add the lines?  could you guide me to how to get there?
Reply
#7
(02-24-2018, 11:04 AM)Gus Wrote: For anyone with the same problem, the fix is quite simple.

Just add this line "xrandr -o left" to "/usr/local/bin/hdmi-toggle" in the following section

# The external display is connected
if [ "$EXTERNAL_DISPLAY" != "" ]; then
# Set the display settings
xrandr
xrandr  --output HDMI-1 --auto
        xrandr -o left # add this code
else

'left' can be substituted for whichever orientation you require.

Hope it helps someone out there, it bugged the hell out of me!!

Gus.
 
Exuse me im new to this and i have the screen flipped 180 where do i add the comand lines? is there a config.txt file? or where do i modifie the text? thanxyou
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)