HDMI Resolution Issues
-
Pi Model or other hardware: 3 model b
Power Supply used: 5V-2.5A micro usb wall cable (came with my Cana Kit)
RetroPie Version Used: 4.3
Built From: Pre made SD Image on RetroPie website
Controller used: ipega 9055 bluetooth gamepadI am in the process of making a portable retropie build based on this video:
Part of my build is a waveshare 5 inch HDMI display that sits on the GPIO pins found here: https://www.amazon.com/gp/product/B00TIA0PMQ/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&tag=e074d-20&camp=1789&creative=9325&linkCode=as2&creativeASIN=B00TIA0PMQ&linkId=6aec94845ee989b3a5b0b34c68553444
The raspberry pi doesn't use the right resolution on the screen, so I had to manually set it by putting my micro SD into my computer and editing the config.txt file with the following:
hdmi_group=2
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
hdmi_drive=1max_usb_current=1
This solution worked great, but now, when I switch back to a tv, the pi doesn't display the right resolution. I really want this to be a versatile system, like a retropie switch. Is there a way I can have the resolution change automatically when switching back to a tv?
-
I don't know anything about code, so I'm hoping to find a simple solution
-
I don't think there is a simple solution to this. If you set your resolution in the
config.txt
file, then that's the resolution used by the Pi.
You could try to not configure the resolution in the file and during the startup sequence determine which device you're connected to and set the resolution on the fly.
Usingtvservice
, you can read information about your display and switch the resolution with the same command. Or you could try to usetvservice -p
to set the resolution to the output's preferred resolution. See more details here. -
@mitu Is there no way I could fix this from a different angle? Like, making the pi recognize the correct resolution for the waveshare screen from the start? Having to bust out a keyboard and fix the resolution every time I start up the pi would essentially ruin its portability
-
@nemnadogg I didn't suggest to input the command manually, but rather create a script to run
tvservice
and take actions depending on the display connected. -
@mitu are there any existing tutorials on how to do this? I'm finding your reference hard to understand
-
Here are some handy links found
- https://www.raspberrypi.org/forums/viewtopic.php?t=25933
- https://raspberrypi.stackexchange.com/questions/46153/detect-hdmi-and-start-gui/46158#46158
- (the guide from the Raspberry Pi site) https://www.raspberrypi.org/documentation/configuration/config-txt/video.md
You can start playing with the command and see if you can switch manually between resolutions, on the fly. If this works, then you can incorporate it in a script to be run at boot.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.