Rotate Screen Orientation

Moderators: mdrjr, odroid

Rotate Screen Orientation

Unread postby schmidtbag » Mon Oct 07, 2013 11:38 am

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.
schmidtbag
 
Posts: 44
Joined: Sat Mar 30, 2013 10:19 am
languages_spoken: english
ODROIDs: U2 and C1

Re: Rotate Screen Orientation

Unread postby mdrjr » Mon Oct 07, 2013 11:54 am

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.
mdrjr
Site Admin
 
Posts: 11634
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: Rotate Screen Orientation

Unread postby schmidtbag » Mon Oct 07, 2013 1:01 pm

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?
schmidtbag
 
Posts: 44
Joined: Sat Mar 30, 2013 10:19 am
languages_spoken: english
ODROIDs: U2 and C1

Re: Rotate Screen Orientation

Unread postby mdrjr » Mon Oct 07, 2013 1:07 pm

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 :)
mdrjr
Site Admin
 
Posts: 11634
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: Rotate Screen Orientation

Unread postby schmidtbag » Tue Oct 08, 2013 6:31 am

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.
schmidtbag
 
Posts: 44
Joined: Sat Mar 30, 2013 10:19 am
languages_spoken: english
ODROIDs: U2 and C1

Re: Rotate Screen Orientation

Unread postby mdrjr » Tue Oct 08, 2013 10:35 am

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.
mdrjr
Site Admin
 
Posts: 11634
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: Rotate Screen Orientation

Unread postby schmidtbag » Tue Oct 08, 2013 12:32 pm

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.
schmidtbag
 
Posts: 44
Joined: Sat Mar 30, 2013 10:19 am
languages_spoken: english
ODROIDs: U2 and C1

Re: Rotate Screen Orientation

Unread postby mdrjr » Tue Oct 08, 2013 12:39 pm

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!
mdrjr
Site Admin
 
Posts: 11634
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: Rotate Screen Orientation

Unread postby schmidtbag » Tue Oct 08, 2013 1:04 pm

hmm interesting..... Anywhere I can sign up to get notified?
schmidtbag
 
Posts: 44
Joined: Sat Mar 30, 2013 10:19 am
languages_spoken: english
ODROIDs: U2 and C1

Re: Rotate Screen Orientation

Unread postby mdrjr » Tue Oct 08, 2013 1:09 pm

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 :)
mdrjr
Site Admin
 
Posts: 11634
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: Rotate Screen Orientation

Unread postby LiquidAcid » Fri Oct 11, 2013 11:15 pm

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
LiquidAcid
 
Posts: 1076
Joined: Fri Oct 11, 2013 11:07 pm
languages_spoken: english
ODROIDs: X2

Re: Rotate Screen Orientation

Unread postby mdrjr » Sat Oct 12, 2013 12:09 am

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 :)
mdrjr
Site Admin
 
Posts: 11634
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: Rotate Screen Orientation

Unread postby LiquidAcid » Sat Oct 12, 2013 4:55 am

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. :)
LiquidAcid
 
Posts: 1076
Joined: Fri Oct 11, 2013 11:07 pm
languages_spoken: english
ODROIDs: X2

Re: Rotate Screen Orientation

Unread postby luisborlido » Mon Feb 24, 2014 11:31 pm

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?
luisborlido
 
Posts: 4
Joined: Thu Apr 18, 2013 12:17 am
languages_spoken: english
ODROIDs: U2

Re: Rotate Screen Orientation

Unread postby mdrjr » Tue Feb 25, 2014 8:25 am

nope..
mdrjr
Site Admin
 
Posts: 11634
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: Rotate Screen Orientation

Unread postby liatoss » Thu May 15, 2014 5:22 am

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

Thx, Vlad.
--------------------------------------------
Vlad Smolovik,
Liatoss Sarl - your technology hub,
in Switzerland
liatoss
 
Posts: 22
Joined: Mon May 13, 2013 6:57 am
Location: Switzerland, Geneve area
languages_spoken: english, french, russian
ODROIDs: ODROID-U2,X2,U3

Re: Rotate Screen Orientation

Unread postby mdrjr » Thu May 15, 2014 5:33 am

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.
mdrjr
Site Admin
 
Posts: 11634
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: Rotate Screen Orientation

Unread postby Legath » Fri Aug 29, 2014 8:33 pm

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.
Legath
 
Posts: 26
Joined: Tue Nov 12, 2013 2:50 pm
languages_spoken: english, russian, chinese
ODROIDs: X2,U3

Re: Rotate Screen Orientation

Unread postby mdrjr » Sat Aug 30, 2014 12:57 am

Nope.. its just Samsung hdmi drivers on Linux that doesn't support rotation..
mdrjr
Site Admin
 
Posts: 11634
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: Rotate Screen Orientation

Unread postby Legath » Wed Sep 10, 2014 11:28 pm

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?
Legath
 
Posts: 26
Joined: Tue Nov 12, 2013 2:50 pm
languages_spoken: english, russian, chinese
ODROIDs: X2,U3

Re: Rotate Screen Orientation

Unread postby mdrjr » Wed Sep 10, 2014 11:36 pm

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 :)
mdrjr
Site Admin
 
Posts: 11634
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: Rotate Screen Orientation

Unread postby LiquidAcid » Thu Sep 11, 2014 11:20 pm

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.
LiquidAcid
 
Posts: 1076
Joined: Fri Oct 11, 2013 11:07 pm
languages_spoken: english
ODROIDs: X2

Re: Rotate Screen Orientation

Unread postby gosi » Tue May 05, 2015 5:06 am

Is there an update to the topic?
gosi
 
Posts: 2
Joined: Wed Mar 25, 2015 12:46 am
languages_spoken: english

Re: Rotate Screen Orientation

Unread postby Fuernweger » Wed Aug 12, 2015 4:48 pm

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
Fuernweger
 
Posts: 4
Joined: Wed Aug 12, 2015 4:36 pm
languages_spoken: German
ODROIDs: Odroid XU3 Lite, Odroid XU4

Re: Rotate Screen Orientation

Unread postby odroid » Wed Aug 12, 2015 6:21 pm

No update. No plan.
User avatar
odroid
Site Admin
 
Posts: 24602
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Rotate Screen Orientation

Unread postby hilton8r » Tue Nov 03, 2015 11:50 am

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: 23
Joined: Tue Oct 27, 2015 10:43 am
languages_spoken: english
ODROIDs: XU4

Re: Rotate Screen Orientation

Unread postby hilton8r » Thu Nov 05, 2015 6:11 am

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: 23
Joined: Tue Oct 27, 2015 10:43 am
languages_spoken: english
ODROIDs: XU4

Re: Rotate Screen Orientation

Unread postby hilton8r » Thu Dec 03, 2015 6:29 am

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"
hilton8r
 
Posts: 23
Joined: Tue Oct 27, 2015 10:43 am
languages_spoken: english
ODROIDs: XU4

Re: Rotate Screen Orientation

Unread postby odroid » Thu Dec 03, 2015 12:44 pm

Very interesting! :o

Could you run the Chromium on X11 without the armsoc display driver?
Does Mali GPU still work on the Chromium?
User avatar
odroid
Site Admin
 
Posts: 24602
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Rotate Screen Orientation

Unread postby ftaurino » Fri Dec 18, 2015 4:22 pm

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...
ftaurino
 
Posts: 1
Joined: Fri Dec 18, 2015 4:02 pm
languages_spoken: english
ODROIDs: XU4

Re: Rotate Screen Orientation

Unread postby hilton8r » Fri Jan 15, 2016 6:14 am

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
hilton8r
 
Posts: 23
Joined: Tue Oct 27, 2015 10:43 am
languages_spoken: english
ODROIDs: XU4

Re: Rotate Screen Orientation

Unread postby odroid » Mon Mar 21, 2016 3:02 pm

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.
User avatar
odroid
Site Admin
 
Posts: 24602
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Rotate Screen Orientation

Unread postby aafoo » Mon Apr 25, 2016 8:44 am

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
aafoo
 
Posts: 8
Joined: Thu May 02, 2013 12:29 am
languages_spoken: english
ODROIDs: ODROID-U2

Re: Rotate Screen Orientation

Unread postby odroid » Mon Apr 25, 2016 11:11 am

Did you try Hilton8r's workaround in this thread?
viewtopic.php?f=8&t=2440#p116070
User avatar
odroid
Site Admin
 
Posts: 24602
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Rotate Screen Orientation

Unread postby aafoo » Mon Apr 25, 2016 11:27 am

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

- Driver "armsoc"
+ Driver "fbdev"
...
+ Option "Rotate" "CW"
EndSection
aafoo
 
Posts: 8
Joined: Thu May 02, 2013 12:29 am
languages_spoken: english
ODROIDs: ODROID-U2

Re: Rotate Screen Orientation

Unread postby mycnc » Fri Oct 13, 2017 2:59 am

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
mycnc
 
Posts: 19
Joined: Tue Sep 08, 2015 2:22 am
Location: Canada
languages_spoken: english
ODROIDs: XU4, C2

Re: Rotate Screen Orientation

Unread postby odroid » Fri Oct 13, 2017 8:43 am

Yes, C2 fbturbo driver enabled the OpenGL-ES rendering in portrait mode.
viewtopic.php?f=136&t=18709&start=200#p168184
User avatar
odroid
Site Admin
 
Posts: 24602
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID


Return to Ubuntu

Who is online

Users browsing this forum: No registered users and 1 guest