r4tprize
Posts: 10
Joined: Sat Feb 06, 2016 7:14 pm

How To Rotate Screen 180 Degrees?

Sat Feb 06, 2016 7:21 pm

Hello,

I purchased the official raspberry pi screen, and one of the cases. The case is OK .. I will be asking more about different cases in another forum post.

My immediate question is this: I assembled the Pi and display from the included instructions, and it displayed and booted on the first try. However, much to my surprise the the display output is upside down, with respect to the feet of the display case. As near as I can tell, there is only one way to attach the legs of the case, so I don't think I can rotate the legs 180 degrees.

So is there an easy (and possibily without programming) way to rotate the output of the Pi LCD display? Thanks in advance for any guidance!

Cheers,
R4TPRIZE

User avatar
rpdom
Posts: 12410
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: How To Rotate Screen 180 Degrees?

Sat Feb 06, 2016 8:02 pm

Put "lcd_rotate=2" in /boot/config.txt and the screen will turn upside-down.

When the original software, cases and everything else was designed for the screen, no one noticed they'd got it the wrong way up. (oops!)

A software fix was put in place to flip it the other way, but some cases had already been designed for it. So the "lcd_rotate=2" option was added to flip the image and touchscreen "upside-down" so it works in those cases.

User avatar
rpdom
Posts: 12410
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: How To Rotate Screen 180 Degrees?

Sat Feb 06, 2016 8:03 pm

The difference is that the viewing angles are slightly better when the screen is the right way up. Otherwise it makes no difference which way up you have it.

r4tprize
Posts: 10
Joined: Sat Feb 06, 2016 7:14 pm

Re: How To Rotate Screen 180 Degrees?

Sun Feb 07, 2016 8:25 pm

THANK-YOU! Worked like a charm!

Cheers,
R4TPRIZE ;) ;) ;) ;)

Barbieboy
Posts: 5
Joined: Mon Feb 08, 2016 10:03 pm
Location: london

Re: How To Rotate Screen 180 Degrees?

Mon Feb 08, 2016 10:58 pm

Hello, where do I input this: "lcd_rotate=2" in /boot/config.txt - I can't find it anywhere. Also put the MicroSD in my desktop and still can't find it :/

Thanks,

Marcus
Attachments
boot.JPG
USB drive SDcard screengrab
boot.JPG (53.33 KiB) Viewed 19719 times
Pi 2 / NOOBs 1.7 / Raspbian / 7" Screen / J.River Media Center 20 / ifi Micro iDAC-2 / HDMI out to projector

User avatar
rpdom
Posts: 12410
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: How To Rotate Screen 180 Degrees?

Tue Feb 09, 2016 6:25 am

You have a NOOBS installation. You won't be able to see config.txt on a PC. You could access it from your Pi with "sudo nano /boot/config.txt", or you can use the NOOBS Recovery/Config editor - Press the Shift key when prompted during the boot, then go to the config editor and add that line. Save and exit and reboot.

Barbieboy
Posts: 5
Joined: Mon Feb 08, 2016 10:03 pm
Location: london

Re: How To Rotate Screen 180 Degrees?

Tue Feb 09, 2016 9:00 pm

Many thanks for the advice, but still in the dark on this.

- Holding down SHIFT during boot just leads to the normal desktop regardless of how long its held down.

- Can't find where "sudo nano /boot/config.txt" is within Pi
rpdom wrote:You have a NOOBS installation. You won't be able to see config.txt on a PC. You could access it from your Pi with "sudo nano /boot/config.txt", or you can use the NOOBS Recovery/Config editor - Press the Shift key when prompted during the boot, then go to the config editor and add that line. Save and exit and reboot.
Pi 2 / NOOBs 1.7 / Raspbian / 7" Screen / J.River Media Center 20 / ifi Micro iDAC-2 / HDMI out to projector

lasersrl
Posts: 28
Joined: Tue Jan 12, 2016 4:02 pm
Location: Rovere, IT

Re: How To Rotate Screen 180 Degrees?

Fri Feb 19, 2016 10:10 am

Barbieboy,
When the Raspberry is booted, open the terminal and type:

Code: Select all

sudo nano /boot/config.txt
at the end of the file, you simply add:

Code: Select all

lcd_rotate=2
then save and exit with CTRL+X, Y, Enter key.

Reboot the Raspberry and you've done.

Ak7w
Posts: 2
Joined: Sat Nov 05, 2016 3:29 am

Re: How To Rotate Screen 180 Degrees?

Thu Nov 10, 2016 6:40 am

Right on. lcd_rotate=2 works like a charm.

Based on this being a known issue (and the prevalence of some of those screen/case combinations) is there any reason that text (with an explanation and commented out by default) couldn't be added to the preloaded config file? It would probably save on new user anxiety about what exactly to add and where to put it.

Just a thought.

Seagarth
Posts: 21
Joined: Tue Dec 27, 2016 5:28 pm

Re: How To Rotate Screen 180 Degrees?

Wed Apr 19, 2017 8:31 am

I'm having the same issue. Is it possible to clarify (for an absolute beginner) exactly where I should be adding lcd_rotate=2 ?
I can access terminal using sudo nano /boot/config.txt and then I am faced with a block of text. The Pimoroni site (where I bought the touchscreen) say that I should add lcd_rotate=2 to the top of this text. Unfortunately, whether I'm adding it to the very top of the very bottom before pressing exit and Y for save, when I reboot the screen is still upside down.

Do I need to slot lcd_rotate=2 into a particular place? Am I missing something really simple here? I have Googled but all instructions tell me to 'simply' add lcd_rotate=2 to the config.txt section.

alphanumeric
Posts: 1414
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: How To Rotate Screen 180 Degrees?

Wed Apr 19, 2017 1:37 pm

At the end of the file should be fine. Any line with a # as the first character is treated as a comment and not executed. Remove the # and its acted apon. Just so you know. A lot of what is in that file doesn't do anything.

Seagarth
Posts: 21
Joined: Tue Dec 27, 2016 5:28 pm

Re: How To Rotate Screen 180 Degrees?

Wed Apr 19, 2017 7:13 pm

Sorted now, thanks.

Indieu
Posts: 1
Joined: Sat Oct 07, 2017 3:38 pm

Re: How To Rotate Screen 180 Degrees?

Sat Oct 07, 2017 3:44 pm

lcd_rotate=2 didn't work for me. :?

User avatar
DougieLawson
Posts: 32361
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: How To Rotate Screen 180 Degrees?

Sun Oct 08, 2017 10:31 am

Indieu wrote:
Sat Oct 07, 2017 3:44 pm
lcd_rotate=2 didn't work for me. :?
That only works with the official Raspberry Pi Foundation 7" display.
https://www.raspberrypi.org/products/ra ... h-display/
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

conrad9900
Posts: 19
Joined: Wed Dec 09, 2015 9:50 am

Re: How To Rotate Screen 180 Degrees?

Wed Nov 01, 2017 10:50 am

I have the offical touchscreen, the lcd_rotate=2 does not work, it reverses the touch input but not the screen rotation

User avatar
DougieLawson
Posts: 32361
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: How To Rotate Screen 180 Degrees?

Wed Nov 01, 2017 11:05 am

conrad9900 wrote:
Wed Nov 01, 2017 10:50 am
I have the offical touchscreen, the lcd_rotate=2 does not work, it reverses the touch input but not the screen rotation
It works on my RPF display. Picture and touch are both rotated with lcd_rotate=2.
https://thepihut.com/products/official- ... en-display

That shows up as
pi@Challenger:~ $ tvservice -s
state 0x400000 [LCD], 800x480 @ 60.00Hz, progressive
pi@Challenger:~ $
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

alphanumeric
Posts: 1414
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: How To Rotate Screen 180 Degrees?

Wed Nov 01, 2017 11:36 am

conrad9900 wrote:
Wed Nov 01, 2017 10:50 am
I have the offical touchscreen, the lcd_rotate=2 does not work, it reverses the touch input but not the screen rotation
Raspbian Jessie or Stretch?

AlexWilsonsBlog
Posts: 1
Joined: Tue Jan 23, 2018 7:03 pm

Re: How To Rotate Screen 180 Degrees?

Tue Jan 23, 2018 7:32 pm

Ready to pull what is left of my hair out... I have the official display. Tried adding the lcd_rotate=2 line at the top of config.txt, the bottom... it doesn't work.

I am running the latest update to Raspbian. I am relatively new to the Pi and Linux (but not computing). Wanting to learn some new skills and working on a deployable package for my clients to do network monitoring, remote access, and a few other things.

Just need to get this goofy screen rotated so I can use the case properly.

masterzion
Posts: 1
Joined: Thu Feb 01, 2018 1:30 am

Re: How To Rotate Screen 180 Degrees?

Thu Feb 01, 2018 1:47 am

Ok, it found the reason...

it worked in Jessie

But The GL driver in Stretch is not compatible with "lcd_rotate = 2"
You must disable it.

Image

I had the same issue here
it is some bug.

BigE
Posts: 12
Joined: Tue Mar 27, 2018 2:04 pm

Re: How To Rotate Screen 180 Degrees?

Tue Mar 27, 2018 4:53 pm

after reading about 90 different articles (70%) were either outdated or either crashed my pi in the process. I have the adafruit resistive touch 2.8 touch screen and I tried everything, I did: xinput --list to find out my touch screens xinput name and tried to use commands such as display rotate in the boot config files and I even tried to figure out the X11 files (since I heard there is a way to configure the pi to use more memory)

I am about ready to pull my hair out since I wasted about 30 hours for my senior project to do this and ive made next to no progress

aBUGSworstnightmare
Posts: 660
Joined: Tue Jun 30, 2015 1:35 pm

Re: How To Rotate Screen 180 Degrees?

Wed Mar 28, 2018 8:18 am

'lcd_rotate' works on raspberry Pi 7in display only!
lcd_rotate
This flips the display using the LCD's inbuilt flip functionality, which is a cheaper operation that using the GPU-based rotate operation.
For example, lcd_rotate=2 will compensate for an upside down display.
Such a feature is available from the dispalys TCON --> many displays have control inputs for rotating/flipping Image --> changing the scan direction.
scan direction.PNG
What happens when changing LCD scan direction
scan direction.PNG (52.68 KiB) Viewed 4652 times
display_hdmi_rotate
Use display_hdmi_rotate to rotate or flip the HDMI display orientation. The default value is 0.
display_hdmi_rotate
result
0 - no rotation
1 - rotate 90 degrees clockwise
2 - rotate 180 degrees clockwise
3 - rotate 270 degrees clockwise
0x10000 horizontal flip
0x20000 vertical flip

Note that the 90 and 270 degree rotation options require additional memory on the GPU, so these will not work with the 16MB GPU split.
display_lcd_rotate
Use display_lcd_rotate to rotate or flip the LCD orientation. Parameters are the same as display_hdmi_rotate.

display_rotate
display_rotate is deprecated in the latest firmware but has been retained for backwards compatibility. Please use display_lcd_rotate and display_hdmi_rotate instead.
Use display_rotate to rotate or flip the screen orientation. Parameters are the same as display_hdmi_rotate.
Full test is here https://www.raspberrypi.org/documentati ... t/video.md

Return to “Official Foundation Display”

Who is online

Users browsing this forum: No registered users and 4 guests