Tutorial: changing screen resolution and orientation of a Pi

Support for connecting hardware to the Raspberry Pi GPIO

Moderators: russ, Ralph

Post Reply
Message
Author
User avatar
PapaLima
Posts: 60
Joined: Fri Jan 05, 2018 10:49 am

Tutorial: changing screen resolution and orientation of a Pi

#1 Post by PapaLima »

Dear all,

It is my third Pi conencted to AM and I realized I totally forgot the setup I made several months ago.

So for all of us (and for me to have this procedure somewhere :roll: ), I share here the steps to follow.
If you are not familliar to Linux, be careful to do not destroy your AirPlayer image. We will use a sudo command which grant you the administrator priviledges. In any doubt exit wihout saving the file.
If you are not sure of you, please do not follow this tutorial


The problematic is simple : either the screen orientation in our cockpit is portrait and we need to rotate the Pi output to have the AM gauges in a vertical manner or the screen resolution taken by default is not the good one your screen is able to support (or both)

After having connected your(s) Pi(s) , they are discovered by AirManager Desktop and see like this (for my setup)

Image

In Air Manager Devices tab, click on the Raspberry fruit icon and note the IP ADDRESS assigned to your Pi on your local network. It should be something like 192.168.XXX.XXX

Open a secured telnet session (SSH tool)
Under Windows 10 it is:
Menu Start , type CMD <enter>
Under Mac open a Terminal
Under Linux your are in 8-)

then in the "Command Window", type

Code: Select all

ssh <your IP address> -l pi
<enter>

(the default raspberry user is pi and the password is .... raspberry)

Now you are logged in your PI, issue the command (to edit the configuration file):

Code: Select all

sudo nano /boot/config.txt
Here you will find a lot of configuration parameters.

The sign # is a comment and forbid the parameter value to be taken. To activate the one you want, just remove the # and save the file.


I first, remove the # to force the HDMI output (maybe not needed in your setup but wihout that, I got a blank screen)

Code: Select all

 # uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1
For the different video options you have a lot of web sites around Raspberry, I used this one tonight:
https://elinux.org/RPiconfig#Video_mode_options

In the video settings, we see that the resolution I need is : 1280x1024 and requires hdmi_more=35 in the CMT group

Thus, the section hdmi_group becomes for me :

Code: Select all

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=2      #CMT
hdmi_mode=35     #1280x1024 60Hz
For the orientation, I did not find any display_rotate section, so I copy/paste the web site and select the normal value for this screen : the captain instruments screen is a 17" horizontal, so normal.
The engines screen I have aside is vertical and have display_rotate=1 instead.

Code: Select all

#display_rotate rotates the display clockwise on the screen (default=0) or flips the display. 
display_rotate=0        Normal
#display_rotate=1         90 degrees
#display_rotate=2        180 degrees
#display_rotate=3        270 degrees
#display_rotate=0x10000  horizontal flip
#display_rotate=0x20000  vertical flip
Save your file <CTRL><O> <ENTER>
Exit the editor <CTRL><X>

And exit the SSH session (type exit <enter>)

From AM, select the Pi you just edit and shutdown it using the top Shutdown button

Restart your Pi, AM auto detects it when back live

Select the Pi entry, it displays now the targetted display resolution 1280x1024 with your screen orientation

Image


I hope it will help. It is quite sure for me in several months if I need to add another Pi to my setup :lol:

Bye
Philippe

User avatar
Corjan
Posts: 2933
Joined: Thu Nov 19, 2015 9:04 am

Re: Tutorial: changing screen resolution and orientation of a Pi

#2 Post by Corjan »

Hi,


Thanks for the tutorial :)

Also reminded me to fix the fact that AM is remembering all previous display resolutions.
Added to TODO list


Corjan

User avatar
PapaLima
Posts: 60
Joined: Fri Jan 05, 2018 10:49 am

Re: Tutorial: changing screen resolution and orientation of a Pi

#3 Post by PapaLima »

Corjan wrote: Fri Dec 07, 2018 10:16 am Thanks for the tutorial :)
It is normal Corjan. The purpose of the forum is to exchange between members !
Corjan wrote: Fri Dec 07, 2018 10:16 am Also reminded me to fix the fact that AM is remembering all previous display resolutions.
Added to TODO list
It is not really blocking... we have to choose our resolution in a drop down list ..

miiya
Posts: 6
Joined: Sat Oct 20, 2018 2:10 pm

Re: Tutorial: changing screen resolution and orientation of a Pi

#4 Post by miiya »

Hi,

I'm using RPi4 and want to rotate screen 180deg, placing it upside down
to avoid my TN display from being whiteout when looked down.

It looks like specifying display_rotate in /boot/config.txt doens't work for Pi4.
Using xrandr is suggested but AirPlayer Pi doens't seem to have one.

Any ideas?
Thanks

Kohei

User avatar
PapaLima
Posts: 60
Joined: Fri Jan 05, 2018 10:49 am

Re: Tutorial: changing screen resolution and orientation of a Pi

#5 Post by PapaLima »

Hi Kohei,

I am using Pi2 and Pi3 versions. I cannot test it on Pi4 I do not have one. I will be surprised it does not work.

Can you please confirm you have removed the # before the value 2 like below and rebooted the Pi ?

Code: Select all

#display_rotate rotates the display clockwise on the screen (default=0) or flips the display. 
#display_rotate=0        Normal
#display_rotate=1         90 degrees
display_rotate=2        180 degrees
#display_rotate=3        270 degrees
#display_rotate=0x10000  horizontal flip
#display_rotate=0x20000  vertical flip
If so, please look in the config file in case other properties are related to the 180 turn you are looking for. You could even copy paste the /boot/config.txt file here for me to doublecheck for differences if any.

Bye

miiya
Posts: 6
Joined: Sat Oct 20, 2018 2:10 pm

Re: Tutorial: changing screen resolution and orientation of a Pi

#6 Post by miiya »

Sorry for late reply.

It looks like new GPU on RPi4 doesn't support display_rotate in the config file
according to official RPi forum.

Also, my display does't look good even if placed upside-down.
I'm now looking for an IPS panel for replacement...

Thanks anyway.

Kohei

Post Reply