Rotate Screen Orientation

Post Reply
schmidtbag
Posts: 52
Joined: Sat Mar 30, 2013 10:19 am
languages_spoken: english
ODROIDs: U2 and C1
Has thanked: 0
Been thanked: 0
Contact:

Rotate Screen Orientation

Post by schmidtbag »

I was wondering if anyone knew a way to rotate the screen 90 degrees into portrait mode. When running "randr -o left", I get the following error:

Code: Select all

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  149 (RANDR)
  Minor opcode of failed request:  2 (RRSetScreenConfig)
  Serial number of failed request:  14
  Current serial number in output stream:  14
I have the mali drivers installed and they seem to be working (I get 100FPS in glxgears anyway) so I figure there should be some doable solution.
Last edited by schmidtbag on Tue Oct 08, 2013 12:32 pm, edited 1 time in total.

mdrjr
Site Admin
Posts: 11964
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 5 times
Been thanked: 110 times
Contact:

Re: Rotate Screen Orientation

Post by mdrjr »

GLXGears is OpenGL not OpenGL ES that's what Mali actually supports :)
Correct is es2gears.

We currently don't support rotation on the HDMI driver :( because its very complex on Exynos we couldn't make it work yet.
Probably on the future with newer kernels support Exynos DRM and the rotator IP it will work.

schmidtbag
Posts: 52
Joined: Sat Mar 30, 2013 10:19 am
languages_spoken: english
ODROIDs: U2 and C1
Has thanked: 0
Been thanked: 0
Contact:

Re: Rotate Screen Orientation

Post by schmidtbag »

I tried es2gears and it failed, some EGL error (can't remember off the top of my head).

That's really a shame rotation doesn't work. Think the open source lima drivers could make it work?

mdrjr
Site Admin
Posts: 11964
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 5 times
Been thanked: 110 times
Contact:

Re: Rotate Screen Orientation

Post by mdrjr »

schmidtbag wrote:I tried es2gears and it failed, some EGL error (can't remember off the top of my head).

That's really a shame rotation doesn't work. Think the open source lima drivers could make it work?
Nope, On embedded hardware it doesn't work like your PC where your video card is responsible for video output.

On Embedded Hardware the video hardware, does only one single thing 3D acceleration.

We have a block for 3D video
A block for 2D
A block to HDMI output
A Block to Rotate the screen
A block for color conversion.
and so on..

Its all separated that's why it gets complex.

Its just like. If you want 3D you have to install this card, if you want 2d you have to install this card as well..
something like it on your PC :)

schmidtbag
Posts: 52
Joined: Sat Mar 30, 2013 10:19 am
languages_spoken: english
ODROIDs: U2 and C1
Has thanked: 0
Been thanked: 0
Contact:

Re: Rotate Screen Orientation

Post by schmidtbag »

That's fascinating and logical, yet really annoying and inconvenient at the same time. I guess that would explain why I was getting such abysmal performance out of Beagleboard XM.

But still, shouldn't screen rotating be more of a software thing than a hardware thing? I don't see how the hardware cares what the contents of the pixels are but rather how they're laid out.

mdrjr
Site Admin
Posts: 11964
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 5 times
Been thanked: 110 times
Contact:

Re: Rotate Screen Orientation

Post by mdrjr »

to get screen rotation on this:

You'll need to collect the framebuffer image, send to the FIMC it can convert to a color format that the rotator understands. write that image to the rotator and tell him to rotate, pick that image back rotate, and write to the HDMI interface..
Yet all of this you have to implement on the Mali DDX driver :(
That's why it gets so complex :( It is software only.. however even rotating the image is done via a separated hardware.
Not sure how can this be implemented via software.

schmidtbag
Posts: 52
Joined: Sat Mar 30, 2013 10:19 am
languages_spoken: english
ODROIDs: U2 and C1
Has thanked: 0
Been thanked: 0
Contact:

Re: Rotate Screen Orientation

Post by schmidtbag »

I see.

Well, in my attempts to try fixing this on my own, I thought of the idea of using VNC to create a virtual display, rotate it, and then view it in display :0. I actually got this to work, but for some reason the virtual display was in 8-bit color (even though I set it to 24), and the performance was absolutely terrible. It worked fine on my desktop computer, but I suppose a 4.4GHz 6-core CPU with full GPU acceleration isn't going to struggle with that too much...

Thanks for the feedback anyway.

mdrjr
Site Admin
Posts: 11964
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 5 times
Been thanked: 110 times
Contact:

Re: Rotate Screen Orientation

Post by mdrjr »

I want to let you know that I have plans in the future to do a newer kernel for U2/X2/X ..
Probably 3.13 or 3.14 depending on some patchs that I'm waiting to come.

With those patchs from Samsung it would be possible to do all of this without any hassle as they will be implemented at kernel level.

Right now, its just a matter of time to wait those patchs get accepted on Mainline!

schmidtbag
Posts: 52
Joined: Sat Mar 30, 2013 10:19 am
languages_spoken: english
ODROIDs: U2 and C1
Has thanked: 0
Been thanked: 0
Contact:

Re: Rotate Screen Orientation

Post by schmidtbag »

hmm interesting..... Anywhere I can sign up to get notified?

mdrjr
Site Admin
Posts: 11964
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 5 times
Been thanked: 110 times
Contact:

Re: Rotate Screen Orientation

Post by mdrjr »

When those patchs get on mainline, the next release will be the one that I'll be using.

If they come on pre-3.13 i'll use 3.13 and so on..

I'll start a thread about this project on "The ideas" part of the forum :)

LiquidAcid
Posts: 1094
Joined: Fri Oct 11, 2013 11:07 pm
languages_spoken: english
ODROIDs: X2
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Rotate Screen Orientation

Post by LiquidAcid »

mdrjr wrote:Probably 3.13 or 3.14 depending on some patchs that I'm waiting to come.
Can you comment on the subsystems these patches apply to? I would guess regular and USB.

Anyway, this is certainly nice to hear, especially since Samsung seems to be working quite active on the Exynos DRM. Also, is it correct that (upstream) patch discussion for the Exynos SoC is done primarily on the linux-samsung-soc ml? I know that most of the communication from TI about OMAP is done on the respectively list (linux-omap). Would be good to know if this is also the case here, or if Samsung is using some other "channels".

-lq

mdrjr
Site Admin
Posts: 11964
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 5 times
Been thanked: 110 times
Contact:

Re: Rotate Screen Orientation

Post by mdrjr »

Nope, the patchs that I'm waiting to test is regarding SoC support..
USB 2.0/Ethernet/HDMI should be there already.

Samsung uses mainly linux-samsung-soc but there's another list that I can't talk tell you where it is that some more deep stuff goes :)

LiquidAcid
Posts: 1094
Joined: Fri Oct 11, 2013 11:07 pm
languages_spoken: english
ODROIDs: X2
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Rotate Screen Orientation

Post by LiquidAcid »

mdrjr wrote:Nope, the patchs that I'm waiting to test is regarding SoC support
Uhm, yeah, that is kinda obvious. But the SoC consists of many components. I'm interested in what subsystem this patch is supposed to touch.

I remember some post here on the forums, where a user asked about whether hardkernel is doing any effort in upstreaming code. And the answer was no, one reason the regular initialization still being messy. Since TI has/had the same problems (it took them a while to get this upstream), I was assuming Samsung has it's equal share of troubles with the regular interface. :)

luisborlido
Posts: 4
Joined: Thu Apr 18, 2013 12:17 am
languages_spoken: english
ODROIDs: U2
Has thanked: 0
Been thanked: 0
Contact:

Re: Rotate Screen Orientation

Post by luisborlido »

mdrjr wrote:When those patchs get on mainline, the next release will be the one that I'll be using.

If they come on pre-3.13 i'll use 3.13 and so on..

I'll start a thread about this project on "The ideas" part of the forum :)
Hi!
Did Samsung released the patches you needed to get rotation working?

mdrjr
Site Admin
Posts: 11964
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 5 times
Been thanked: 110 times
Contact:

Re: Rotate Screen Orientation

Post by mdrjr »

nope..

liatoss
Posts: 24
Joined: Mon May 13, 2013 6:57 am
languages_spoken: english, french, russian
ODROIDs: ODROID-U2,X2,U3
Location: Switzerland, Geneve area
Has thanked: 0
Been thanked: 0
Contact:

Re: Rotate Screen Orientation

Post by liatoss »

Dear Mdrjr, do you have any update with regard the rotation issue?

Thx, Vlad.
--------------------------------------------
Vlad Smolovik,
Liatoss Sarl - your technology hub,
in Switzerland

mdrjr
Site Admin
Posts: 11964
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 5 times
Been thanked: 110 times
Contact:

Re: Rotate Screen Orientation

Post by mdrjr »

liatoss wrote:Dear Mdrjr, do you have any update with regard the rotation issue?

Thx, Vlad.
Nope. I don't have anything. Samsung haven't commit that piece of code so far.

Legath
Posts: 26
Joined: Tue Nov 12, 2013 2:50 pm
languages_spoken: english, russian, chinese
ODROIDs: X2,U3
Has thanked: 0
Been thanked: 0
Contact:

Re: Rotate Screen Orientation

Post by Legath »

hi mdrjr,

just for clarification, please explain ,
linux hdmi rotation disabled for 3D acceleration? i am bad in english , and i do not undurstand Vlad and you.

mdrjr
Site Admin
Posts: 11964
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 5 times
Been thanked: 110 times
Contact:

Re: Rotate Screen Orientation

Post by mdrjr »

Nope.. its just Samsung hdmi drivers on Linux that doesn't support rotation..

Legath
Posts: 26
Joined: Tue Nov 12, 2013 2:50 pm
languages_spoken: english, russian, chinese
ODROIDs: X2,U3
Has thanked: 0
Been thanked: 0
Contact:

Re: Rotate Screen Orientation

Post by Legath »

mdrjr wrote:to get screen rotation on this:

You'll need to collect the framebuffer image, send to the FIMC it can convert to a color format that the rotator understands. write that image to the rotator and tell him to rotate, pick that image back rotate, and write to the HDMI interface..
Yet all of this you have to implement on the Mali DDX driver :(
That's why it gets so complex :( It is software only.. however even rotating the image is done via a separated hardware.
Not sure how can this be implemented via software.
Hi mdrjr
are you sure that algorithm is correct?
will this not blocked if we use FIMC and rotator from userspace?

mdrjr
Site Admin
Posts: 11964
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 5 times
Been thanked: 110 times
Contact:

Re: Rotate Screen Orientation

Post by mdrjr »

They will be used from userspace :) They are exposed like this.

We do use the FIMC to enable XBMC for example.
The image decoded by the MFC is sent to the FIMC witch converts the image to a format known by the HDMI block :)

LiquidAcid
Posts: 1094
Joined: Fri Oct 11, 2013 11:07 pm
languages_spoken: english
ODROIDs: X2
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Rotate Screen Orientation

Post by LiquidAcid »

Actually there are two blocks which you can use for (discrete) rotation of pixel data: IPP and G2D, each with their own limitations of supported color formats.

gosi
Posts: 2
Joined: Wed Mar 25, 2015 12:46 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Rotate Screen Orientation

Post by gosi »

Is there an update to the topic?

Fuernweger
Posts: 4
Joined: Wed Aug 12, 2015 4:36 pm
languages_spoken: German
ODROIDs: Odroid XU3 Lite, Odroid XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Rotate Screen Orientation

Post by Fuernweger »

Hello

Is there an Update to the Situation? Can - and if, when - we expect the rotation feature? I would really like to use my Odroid XU4 with a rotated screen =D

Thanks and best regards
Gerald

User avatar
odroid
Site Admin
Posts: 41850
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3429 times
Been thanked: 1915 times
Contact:

Re: Rotate Screen Orientation

Post by odroid »

No update. No plan.

hilton8r
Posts: 138
Joined: Tue Oct 27, 2015 10:43 am
languages_spoken: english
ODROIDs: XU4
Has thanked: 13 times
Been thanked: 2 times
Contact:

Re: Rotate Screen Orientation

Post by hilton8r »

This is a show stopper for us. Our project has the potential of 2000 plus units.

We are working on kiosk proof of concept for two applications (one runs with normal rotation, and the other runs with right rotation). We have everything working on a raspberry py, but wanted to take advantage of the additional cores and ram available with odroid. Please advise if anything changes with regards to rotation support. Thanks,

John

hilton8r
Posts: 138
Joined: Tue Oct 27, 2015 10:43 am
languages_spoken: english
ODROIDs: XU4
Has thanked: 13 times
Been thanked: 2 times
Contact:

Re: Rotate Screen Orientation

Post by hilton8r »

For our project, we are using Chromium with flash support until we get html5 conversions done.

We found some javascript commands to rotate the browser and remove slider bars. So we may still be able to make this work.
This would not be a solution for most people, but since we are running the browser in kiosk mode... it may get us what we meed. Most people will need the entire desktop to rotate etc...

The command below rotates browser to the right. -90deg rotates browser to the left.

javascript:document.body.setAttribute( "style", "-webkit-transform: rotate(90deg);");
javascript:document.body.style.overflow = 'hidden';

Thanks,

John

hilton8r
Posts: 138
Joined: Tue Oct 27, 2015 10:43 am
languages_spoken: english
ODROIDs: XU4
Has thanked: 13 times
Been thanked: 2 times
Contact:

Re: Rotate Screen Orientation

Post by hilton8r »

We've found a better way to handle screen rotation...

However, the "CW" option renders xrandr rotation useless...

We modified /etc/X11/xorg.conf...

In Section "Device"...

Replaced: Driver "armsoc"
with: Driver "fbdev"

Might need to comment out: Option "fbdev" "/dev/fb1"

and added: Option "Rotate" "CW"

User avatar
odroid
Site Admin
Posts: 41850
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3429 times
Been thanked: 1915 times
Contact:

Re: Rotate Screen Orientation

Post by odroid »

Very interesting! :o

Could you run the Chromium on X11 without the armsoc display driver?
Does Mali GPU still work on the Chromium?

ftaurino
Posts: 1
Joined: Fri Dec 18, 2015 4:02 pm
languages_spoken: english
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Rotate Screen Orientation

Post by ftaurino »

hilton8r wrote:We've found a better way to handle screen rotation...

However, the "CW" option renders xrandr rotation useless...

We modified /etc/X11/xorg.conf...

In Section "Device"...

Replaced: Driver "armsoc"
with: Driver "fbdev"

Might need to comment out: Option "fbdev" "/dev/fb1"

and added: Option "Rotate" "CW"
and does it work across reboots and updates? or xorg.conf is rewritten every time?
perhaps a "chattr +i" will do the trick...

hilton8r
Posts: 138
Joined: Tue Oct 27, 2015 10:43 am
languages_spoken: english
ODROIDs: XU4
Has thanked: 13 times
Been thanked: 2 times
Contact:

Re: Rotate Screen Orientation

Post by hilton8r »

ftaurino wrote: and does it work across reboots and updates? or xorg.conf is rewritten every time?
perhaps a "chattr +i" will do the trick...
I apologize for the delayed response. I must not have set up my notifications correctly for this thread.

We don't do updates. I'm not 100% percent sure if it works across reboots. I have code that copies the xorg.conf file into place if it differs... I never actually tested to see if the file was retained...

I will give "chattr +i" a try. Thank you for the suggestion...

John

User avatar
odroid
Site Admin
Posts: 41850
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3429 times
Been thanked: 1915 times
Contact:

Re: Rotate Screen Orientation

Post by odroid »

We also tested hilton8r's guide on the XU4.
It worked well. But there was no GPU acceleration since Mali driver works with only the armsoc video driver not the fbdev driver.

aafoo
Posts: 8
Joined: Thu May 02, 2013 12:29 am
languages_spoken: english
ODROIDs: ODROID-U2
Has thanked: 0
Been thanked: 0
Contact:

Re: Rotate Screen Orientation

Post by aafoo »

odroid wrote:We also tested hilton8r's guide on the XU4.
It worked well. But there was no GPU acceleration since Mali driver works with only the armsoc video driver not the fbdev driver.
Can you try this fix on ODROID-U2?

On my ODROID-U2, the HDMI connection dropped out after "xrandr -o left" (or
right), but is back to normal after "xrandr -o normal". See below for
output of xrandr.

Also I'm curious if this fix would work on ODROID-C2?


Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 4096 x 4096
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 531mm x 299mm
1920x1080 60.0*+ 50.0
1920x1080i 50.0 60.1
1280x1024 60.0
1280x960 60.0
1366x768 59.8
1152x864 75.0
1280x720 50.0 60.0
1024x768 60.0
720x576 50.0
720x480 59.9
640x480 60.0

User avatar
odroid
Site Admin
Posts: 41850
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3429 times
Been thanked: 1915 times
Contact:

Re: Rotate Screen Orientation

Post by odroid »

Did you try Hilton8r's workaround in this thread?
http://forum.odroid.com/viewtopic.php?f ... 40#p116070

aafoo
Posts: 8
Joined: Thu May 02, 2013 12:29 am
languages_spoken: english
ODROIDs: ODROID-U2
Has thanked: 0
Been thanked: 0
Contact:

Re: Rotate Screen Orientation

Post by aafoo »

Yes, I did changed xorg.conf and restarted X before "xrandr -o left"

- Driver "armsoc"
+ Driver "fbdev"
...
+ Option "Rotate" "CW"
EndSection

mycnc
Posts: 21
Joined: Tue Sep 08, 2015 2:22 am
languages_spoken: english
ODROIDs: XU4, C2
Location: Canada
Has thanked: 0
Been thanked: 0
Contact:

Re: Rotate Screen Orientation

Post by mycnc »

aafoo wrote:Yes, I did changed xorg.conf and restarted X before "xrandr -o left"

- Driver "armsoc"
+ Driver "fbdev"
...
+ Option "Rotate" "CW"
EndSection
Thanks a lot.
need to rotate screen and this works fine for me on Odroid-C2
myCNC- CNC controls http://www.pv-automation.com

User avatar
odroid
Site Admin
Posts: 41850
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3429 times
Been thanked: 1915 times
Contact:

Re: Rotate Screen Orientation

Post by odroid »

Yes, C2 fbturbo driver enabled the OpenGL-ES rendering in portrait mode.
viewtopic.php?f=136&t=18709&start=200#p168184

cobelli
Posts: 2
Joined: Tue Dec 17, 2019 2:05 pm
languages_spoken: Español
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Rotate Screen Orientation

Post by cobelli »

Hello my name is Alejandro and I bought an ODROID XU4, to which I installed Ubuntu MATE 18.04.3. My urgency and need for which I go to the forum is why I have been trying to configure the screen of my AOC Smart TV all day, so that the screen can be seen in vertical mode, I currently have it connected with my ODROID XU4 and eh done everything possible in the part of xorg.conf, changing "XRandRRotation true" and placing in the terminal the command xrand -o left so that this screen can rotate but I get the error of 3 lines that does not let me change it and worst of all is that the display does not bring a change of 90 degrees, I do not know what I can do, and I bought the odroid for an informative totem with touch screen, if someone can help me do something to make it work or some help from application that can install software would greatly appreciate it since I need to run the informative totem as soon as possible, I do not know if ANDROID can rotate the screen but I appreciate the prompt help, from Chile a hug and I hope you can help. :cry: :cry: :cry: :cry:

User avatar
odroid
Site Admin
Posts: 41850
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3429 times
Been thanked: 1915 times
Contact:

Re: Rotate Screen Orientation

Post by odroid »

@cobelli,
Unfortunately, Exynos-5422 DRM driver doesn't support display rotation feature.
Only Android OS can rotate the screen. Sorry about that.

cobelli
Posts: 2
Joined: Tue Dec 17, 2019 2:05 pm
languages_spoken: Español
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Rotate Screen Orientation

Post by cobelli »

So if I download this version of ANDROID for my ODROIDXU4 that is on the hardkernel page should it work? and if so? you know? o Does anyone know how to rotate it in this Android operating system KitKat (4.4.4)? I appreciate the answer and if anyone knows how to rotate on Android is also appreciated

I have hopes :| ?

User avatar
mad_ady
Posts: 11753
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, N2L, H2, H3+, Go, Go Advance, M1, M1S
Location: Bucharest, Romania
Has thanked: 656 times
Been thanked: 1197 times
Contact:

Re: Rotate Screen Orientation

Post by mad_ady »

I think you can rotate it from the Odroid settings app. But try one of voodik's images, sincd they are better polished than the Hardkernel images.

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 5 guests