Guide : LCD-PI Screen Rotation

Topics that concern all LCD-PI shields. New drivers and images for Raspberry Pi will be released through this forum.

Guide : LCD-PI Screen Rotation

Postby intika » Mon Apr 14, 2014 7:52 pm

Hi all...

Here is how to rotate the screen

Info :
0 = No rotation
1 = 90° Rotation
3 = 180° Rotation

On boot rotation :
Edit "cmdline.txt" present on your SD
add fbcon=rotate:1
Code: Select all
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=rotate:1


Rotation On Demand :
Use this command :
echo 1 | sudo tee /sys/class/graphics/fbcon/rotate

Enjoy
;)
intika
 
Posts: 12
Joined: Mon Apr 14, 2014 7:36 pm

Re: Guide : LCD-PI Screen Rotation

Postby studunihd » Mon Apr 28, 2014 6:59 pm

This method (on boot rotation) rotates the screen of the boot console but if I use
Code: Select all
FRAMEBUFFER=/dev/fb1 startx
the screen is in default landscape mode again. Is there a way to rotate the X window manager?

The rotation on demand does not work at all.
studunihd
 
Posts: 3
Joined: Mon Apr 28, 2014 5:30 pm

Re: Guide : LCD-PI Screen Rotation

Postby intika » Wed Apr 30, 2014 6:48 pm

hello...

if hwlevel screen would be supported on fbtft it would be easy to do many stuff like rotating the gui... and playing hd videos... will see later if it will be available.

Therefore there is a solution to rotate the Gui (startx) you have to modify the xorg.config file

edit your x11 config file with gedit, it's present on \etc\x11\xorg.conf
you could play with the file by adding/removing this lines :
Code: Select all
Option "rotate" "CW"
Option "SwapAxes" "True"
Option  "InvertY" "True"
Option  "InvertX" "True"   


don't use all the line at the same time.

you can create a copy of your config file and indicate to startx what config file to load by this command

Code: Select all
startx -- -config /etc/X11/yournewcfgfile


...

Rotation on demand does not work under the gui interface

you have to edit /sys/class/graphics/fbcon/rotate value to rotate the screen on demand
you could try
echo 1 > /sys/class/graphics/fbcon/rotate
echo 0 > /sys/class/graphics/fbcon/rotate

cheers
intika
 
Posts: 12
Joined: Mon Apr 14, 2014 7:36 pm

Re: Guide : LCD-PI Screen Rotation

Postby studunihd » Thu May 01, 2014 9:51 pm

It's not working for me. It either throws errors or nothing happens at all. Could you post a complete xorg.conf file please, so I can see where exactly it's supposed to go?
studunihd
 
Posts: 3
Joined: Mon Apr 28, 2014 5:30 pm

Re: Guide : LCD-PI Screen Rotation

Postby intika » Fri May 09, 2014 7:34 am

intika
 
Posts: 12
Joined: Mon Apr 14, 2014 7:36 pm

Re: Guide : LCD-PI Screen Rotation

Postby berbano » Sun May 11, 2014 4:31 pm

Hi!, Isn't working for me too (the startx rotation) :(.
Adafruit have that https://learn.adafruit.com/adafruit-pit ... stallation, they can easily setup the screen for rotation. Do we have something similar to easily rotate the screen in lcd32?. Thanks. Ber
berbano
 
Posts: 10
Joined: Mon May 05, 2014 1:49 pm

Re: Guide : LCD-PI Screen Rotation

Postby intika » Mon May 12, 2014 10:28 am

Adafruit is using/compatible fbtft wich is not available for HWLevel for the moment...
the only way i know is the one i posted... maybe admin will post something else

give us a chance to help when you post...

what system are you using ?
What kernel version ?
What did you done exactly ?

Note : Edit "cmdline.txt" present on your SD
cmdline.txt could be also present on /boot/
intika
 
Posts: 12
Joined: Mon Apr 14, 2014 7:36 pm

Re: Guide : LCD-PI Screen Rotation

Postby berbano » Mon May 12, 2014 2:00 pm

Hi Intika!
My system is the Raspbian version of "Hwlevel",
My kernel is 3.10.32+
I done:
Code: Select all
 fbcon=rotate:1
in the cmdline.txt, thats made my console go in 90° (cool :) )
I done in /etc/X11/xorg.conf differents combinations of:
Code: Select all
Option "rotate" "CW"
Option "SwapAxes" "True"
Option  "InvertY" "True"
Option  "InvertX" "True"

I tryed rebooting, with and with out the HDMI tv connected --> didn't work :(
I tryed
Code: Select all
startx -- -config /etc/X11/xorg.conf
with and without sudo and with and without FRAMEBUFFER=/dev/fb1 (or fb0) at the begin. And didn't work aswell.
startx -- -config /etc/X11/xorg.conf -> gove me the next error:
Fatal server error / cannot move old log file "/var/log/Xorg.0.log" to "/var/log/Xorg.0.log.old"
xinit. giving up
xinit:unable to connect to X server: Bad file descriptor
xinit: server error.

Really thanks for your help.
berbano
 
Posts: 10
Joined: Mon May 05, 2014 1:49 pm

Re: Guide : LCD-PI Screen Rotation

Postby markdoll01 » Sun May 18, 2014 1:14 pm

Hi,

Got the X server rotation working. The description in here is not very good and to get the X rotation working, one needs to add a new section to the xorg.conf. First section is "Device" and it configures the Display and this is where you Rotate the output. CW for ClockWise and CCW for CounterClockWise. The second section is for the touch input "InputClass". Here is my whole xorg.conf file:

# configuration for LCD-PI43 and LCD-PI50
Section "Device"
Identifier "LCD-PI32"
Driver "fbdev"
Option "rotate" "CW"
Option "fbdev" "/dev/fb1"
EndSection

Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
# Option "SwapAxes" "True"
Option "InvertY" "False"
Option "InvertX" "False"
EndSection
markdoll01
 
Posts: 3
Joined: Wed May 14, 2014 6:07 pm

Re: Guide : LCD-PI Screen Rotation

Postby berbano » Wed May 28, 2014 9:45 am

Wow!, thanks intika and markdoll01. I use the instructions of markdoll01 and the rotation in X works amazing. Thanks you!!!
berbano
 
Posts: 10
Joined: Mon May 05, 2014 1:49 pm

Next

Return to LCD-PI Common Topics

Who is online

Users browsing this forum: No registered users and 4 guests

cron