Retropie switches between LCD/HDMI
-
Hello. I have installed a Kedei 3.5" LCD and latest Retropie on Raspberry Pi 1 b+. I've installed the latest LCD's drivers and when PI boots, i'm getting the screen from LCD, but after the Retropie logo, it switches and i am getting the screen from HDMI and the LCD has a cursor only (or sometimes is used on settings menu or for various messages (for example in mame).
Here is a video with the same problem. Is not screen's fault, works properly on Raspbian.
How can i force the Retropie to stop using HDMI and send the image only at the LCD display?
Thanks in advance...
-
No one has an answer to that?
-
Hello,
If you want, at boot, you can check if a HDMI screen is connected to your PI. And change your file in /boot/config.txt to use LCD or HDMI.
You can use a script like this (launch it before emulstation.sh):
# HDMI connection? rm -f hdmi.name tvservice -n 2>hdmi.name HDMI_NAME=`cat hdmi.name` echo $HDMI_NAME if [ "$HDMI_NAME" == "[E] No device present" ]; then LCD_ON=`cat /boot/config.txt | grep "hdmi_drive=2"` if [ $LCD_ON == "hdmi_drive=2" ]; then echo "reboot avec la configuration LCD" sudo rm -f /boot/config.txt sudo cp /boot/config_lcd.txt /boot/config.txt sudo cp /usr/share/alsa/alsa.conf.lcd /usr/share/alsa/alsa.conf sudo reboot -n fi else HDMI_ON=`cat /boot/config.txt | grep "lcd_rotate=2"` echo $HDMI_ON if [ $HDMI_ON == "lcd_rotate=2" ]; then echo "reboot avec la configuration HDMI" sudo rm -f /boot/config.txt sudo cp /boot/config_hdmi.txt /boot/config.txt sudo cp /usr/share/alsa/alsa.conf.hdmi /usr/share/alsa/alsa.conf sudo reboot -n fi fi
This script, check if you got a HDMI screen and copy/paste the good /boot/config.txt before rebooting pi with the good config file.
Note : When I use a LCD screen, I change sound conf. you can add a "#" before "alsa" configration to keep your sound config.
-
Have you solved the issue? I have the same LCD and the same problem.
-
-
I will check on my PI tomorow.
This script was on my PC, maybe it need some corrections. -
Ok, my bad,
add this at the beginning of the script :#!/usr/bin/env bash
#!/usr/bin/env bash # HDMI connection? rm -f hdmi.name tvservice -n 2>hdmi.name HDMI_NAME=`cat hdmi.name` echo $HDMI_NAME if [ "$HDMI_NAME" == "[E] No device present" ]; then LCD_ON=`cat /boot/config.txt | grep "hdmi_drive=2"` if [ $LCD_ON == "hdmi_drive=2" ]; then echo "reboot avec la configuration LCD" sudo rm -f /boot/config.txt sudo cp /boot/config_lcd.txt /boot/config.txt sudo reboot -n fi else HDMI_ON=`cat /boot/config.txt | grep "lcd_rotate=2"` echo $HDMI_ON if [ $HDMI_ON == "lcd_rotate=2" ]; then echo "reboot avec la configuration HDMI" sudo rm -f /boot/config.txt sudo cp /boot/config_hdmi.txt /boot/config.txt sudo reboot -n fi fi
So create two files in /boot :
/boot/config_hdmi.txt for your HDMI configuration (with hdmi_drive=2)
/boot/config_lcd.txt for your LCD configuration (with lcd_rotate=2 )and the script will change your /boot/config.txt file with the good one and reboot your pi.
You can launch this script in :
/etc/profile.d/10-emulationstation.shlike this :
#rebootWithoutWiimotes=0 /home/pi/Wii/attachewii2.sh # Check display config /home/pi/displayBoot/initDisplay.sh sleep 5 # launch emulationstation (if we are on the correct tty) [ "`tty`" = "/dev/tty1" ] && emulationstation
-
there is my config_lcd.txt :
# For more options and information see # http://www.raspberrypi.org/documentation/configuration/config-txt.md # Some settings may impact device functionality. See link above for details # uncomment if you get no picture on HDMI for a default "safe" mode #hdmi_safe=1 # uncomment this if your display has a black border of unused pixels visible # and your display can output without overscan #disable_overscan=1 # uncomment the following to adjust overscan. Use positive numbers if console # goes off screen, and negative if there is too much border #overscan_left=16 #overscan_right=16 #overscan_top=16 #overscan_bottom=16 # uncomment to force a console size. By default it will be display's size minus # overscan. #framebuffer_width=1280 #framebuffer_height=720 # uncomment if hdmi display is not detected and composite is being output hdmi_force_hotplug=1 # uncomment to force a specific HDMI mode (this will force VGA) #hdmi_group=1 #hdmi_mode=1 # uncomment to force a HDMI mode rather than DVI. This can make audio work in # DMT (computer monitor) modes #hdmi_drive=2 # uncomment to increase signal to HDMI, if you have interference, blanking, or # no display #config_hdmi_boost=4 # uncomment for composite PAL #sdtv_mode=2 #uncomment to overclock the arm. 700 MHz is the default. #arm_freq=800 # Uncomment some or all of these to enable the optional hardware interfaces #dtparam=i2c_arm=on #dtparam=i2s=on #dtparam=spi=on # Uncomment this to enable the lirc-rpi module #dtoverlay=lirc-rpi # Additional overlays and parameters are documented /boot/overlays/README # Enable audio (loads snd_bcm2835) dtparam=audio=on gpu_mem_256=128 gpu_mem_512=256 gpu_mem_1024=256 overscan_scale=1 #overclock arm_freq=1350 over_voltage=4 temp_limit=80 core_freq=500 sdram_freq=500 v3d_freq=500 lcd_rotate=2
and my HDMI configuration :
# For more options and information see # http://www.raspberrypi.org/documentation/configuration/config-txt.md # Some settings may impact device functionality. See link above for details # uncomment if you get no picture on HDMI for a default "safe" mode #hdmi_safe=1 # uncomment this if your display has a black border of unused pixels visible # and your display can output without overscan #disable_overscan=1 # uncomment the following to adjust overscan. Use positive numbers if console # goes off screen, and negative if there is too much border #overscan_left=16 #overscan_right=16 #overscan_top=16 #overscan_bottom=16 # uncomment to force a console size. By default it will be display's size minus # overscan. #framebuffer_width=1280 #framebuffer_height=720 # uncomment if hdmi display is not detected and composite is being output #hdmi_force_hotplug=1 # uncomment to force a specific HDMI mode (this will force VGA) #hdmi_group=1 #hdmi_mode=1 # uncomment to force a HDMI mode rather than DVI. This can make audio work in # DMT (computer monitor) modes hdmi_drive=2 # uncomment to increase signal to HDMI, if you have interference, blanking, or # no display #config_hdmi_boost=4 # uncomment for composite PAL #sdtv_mode=2 #uncomment to overclock the arm. 700 MHz is the default. #arm_freq=800 # Uncomment some or all of these to enable the optional hardware interfaces #dtparam=i2c_arm=on #dtparam=i2s=on #dtparam=spi=on # Uncomment this to enable the lirc-rpi module #dtoverlay=lirc-rpi # Additional overlays and parameters are documented /boot/overlays/README # Enable audio (loads snd_bcm2835) dtparam=audio=on gpu_mem_256=128 gpu_mem_512=256 gpu_mem_1024=256 overscan_scale=1 #overclock arm_freq=1350 over_voltage=4 temp_limit=80 core_freq=500 sdram_freq=500 v3d_freq=500 ignore_lcd=1
-
How I can modify the scipt as you said in:
/etc/profile.d/10-emulationstation.sh
Sorry I am nebie. However, have you tried? It work with your screen?
-
@Hyell Thanks for your effort, but it doesn't work.
The same happens:
The LCD works and shows everything, until the Retropie logo appears. After that and when emulationstation is loaded, the LCD keep working but now has a blinking cursor and ONLY shows messages from emulationstation (the game is on HDMI), like errors, various settings from emulationstation, legal info for MAME, etc.If there is a setting to "tell" emulationstation to do the opposite, to start outputting the games on LCD this time and keep HDMI for messages only, it would be nice.
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.