HDMI not working on TV when hooked to official "7 PI screen
-
Hi I got the official 7 inch pi screen hooked up to my pie 3. When I hook my HDMI to my TV it stays lit up on the screen hooked to the pie. Just like the audio option in retro pie can I choose somewhere use HDMI connection if it's plugged in somewhere?
Thanks.
-
Hello,
I have the same issue with LCD screen.You have to change /boot/config.txt file.
and had : ignore_lcd=1 to use HDMI.I have write a little script to automaticly detect HDMI plug. I'm at work for the moment, I can upload the script later If you want.
-
OK and tell me how to input it. I'm a newbie.
-
Ok,
In first you must copy your config.txt.cd /boot sudo cp config.txt config_hdmi.txt sudo cp config.txt config_lcd.txt
config_hdmi.txt is for.. your hdmi config (put hdmi_drive=2 and ignore_lcd=1)
config_lcd.txt is for your lcd config (put lcd_rotate=2)create script file :
cd /home/pi vi initDisplay.sh
copy :
#!/usr/bin/env bash 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
give execution rigth to the script :
sudo chmod 755 initDisplay.sh
Launch script at Pi boot.
You can add the script in this file :
/etc/profile.d/10-emulationstation.sh/home/pi/initDsiplay sleep 5 [ "`tty`" = "/dev/tty1" ] && emulationstation
How it's work :
tvservice -n check if you got a HDMI plug.
if yes, it's check if you got lcd_rotate=2 on your config.txt file. if yes, it copy the hdmi config.txt and reboot pi with good settings.
It's the same for LCD display.it's not a perfect solution, but it's working fine for me.
Note : you can also change audio conf.
Note 2 : I use lcd_rotate=2 and hdmi_drive=2, you can change it by : "HDMI_CONFIG" and "LCD_CONFIG" if you put these keyword on the good config_display.txt :) -
I had the same issue. I did something very low tech as a solution. if you disconnect power to the screen (i.e. remove the jumper), the signal will go to the TV. Promise :-). I put a rocker switch on the power cable as a "display" switch. So when I use the screen, the switch is powered on. When I want to use the HDMI to the TV, i hit the rocker switch (cutting power to the Pi Screen) and the signal goes to the HDMI cable. It is not very techie, but it works well and the display rocker switch works every time. Let me know if you want me to post pics. Enjoy the day!
-
I was Googling and see a lot of electrical rocker switches. Any suggestions?
Thank you
-
Thanks for the script. I made some tweaks, put it in
/opt/initDisplay/initDisplay.sh
and start it via/etc/rc.local
instead. I added a check to not do endless loop if something breaks, so for the second time when PI is booted the configuration is not checked. In addition if there's a file called/opt/initDisplay/skipcheck
the check is also not performed, plus I added delay of 3 seconds before reboot. So if something is wrong, user is able to quickly SSH into the PI and make it skip the script on next reboot.Note that now script checks if below lines exist in
/boot/config.txt
to distinguish which config is present:for HDMI:
# this is config HDMI
for LCD:# this is config LCD
I added that lines in first line of the config. Here's tweaked script:
#!/usr/bin/env bash ROOT_FOLDER=/opt/initDisplay if [ -f $ROOT_FOLDER/skipcheck ]; then exit 0 fi if [ -f $ROOT_FOLDER/justbooted ]; then rm $ROOT_FOLDER/justbooted exit 0 fi timeout=3 rm -f hdmi.name tvservice -n > $ROOT_FOLDER/hdmi.name 2>&1 HDMI_NAME=`cat $ROOT_FOLDER/hdmi.name` echo $HDMI_NAME if [ "$HDMI_NAME" == "[E] No device present" ]; then LCD_ON=`cat /boot/config.txt | grep "# this is config HDMI"` if [ "$LCD_ON" == "# this is config HDMI" ]; then echo "reboot to configuration LCD, press ESC to cancel" 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 while [ "$timeout" -gt "0" ]; do echo -n " $timeout" if read -n1 -t1 -r -s x; then echo " ...canceled" exit 0 fi let timeout-- done echo "skip reboot" > $ROOT_FOLDER/justbooted echo " Reboot now!" sudo reboot -n else echo "LCD/HDMI configuration OK (no HDMI)" fi else HDMI_ON=`cat /boot/config.txt | grep "# this is config LCD"` echo $HDMI_ON if [ "$HDMI_ON" == "# this is config LCD" ]; then echo "reboot to configuration HDMI, press ESC to cancel" 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 while [ "$timeout" -gt "0" ]; do echo -n " $timeout" if read -n1 -t1 -r -s x; then echo " ...canceled" exit 0 fi let timeout-- done echo "skip reboot" > $ROOT_FOLDER/justbooted echo " Reboot now!" sudo reboot -n else echo "LCD/HDMI configuration OK (HDMI $HDMI_NAME)" fi fi
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.