Page 1 of 1

How to switch from HDMI to Composite?

Posted: Mon Jan 27, 2014 5:18 am
by BlindSquirrel
For awhile I have been using my hd tv with my Pi. Now I have found a good screen that is compatible with the Pi. When I plug it into the pi composite slot, the monitor is blank. I believe this is because I booted my pi with HDMI. How can I change to composite?

Re: How to switch from HDMI to Composite?

Posted: Mon Jan 27, 2014 6:21 am
by lafalken
Hi!

I think that you find those settings in the raspy-config file which you looked at in the very first of your installation.

sudo raspi-config

Best regards Leilf

Re: How to switch from HDMI to Composite?

Posted: Mon Jan 27, 2014 7:23 am
by rpdom
The easiest way to switch to Composite video out is to disconnect the HDMI cable and reboot.

If you installed using NOOBS, then there may be (as lafalken said) a line in config.txt that is forcing HDMI and that would need to be changed or commented out.

There is a way to change outputs while running, using the tvservice command plus a couple of other commands (fbset twice and xrefresh if you are running a desktop at the time).

I can't find the options required, but tvservice -o will turn off the current video output, then one of the tvservice options is to turn on the selected video output and type, I think it is tvservice -e PAL or something, then you will need to reset the screen dimensions by updating the frame buffer with fbset --depth 8 and then setting it to the correct size with fbset --depth 16 --geometry "XxY" with the correct X and Y for your composite mode (PAL or NTSC), and finally just xrefresh if using a desktop to force the desktop to redraw.

Note that you probably won't be able to see anything on the screen after typing the first tvservice command, until the last fbset or xrfresh.

Re: How to switch from HDMI to Composite?

Posted: Mon Jan 27, 2014 8:26 am
by FTrevorGowen
To add to @rpdom's comments:
If you installed via NOOBS either boot into NOOBS' recovery mode (hold or toggle the 'Shift' key during boot up) and use NOOBS' own editor to edit config.txt, or, when using your HDMI screen, boot and login as normal and then edit config.txt via sudo nano /boot/config.txt . FWIW, examples of tvservice's use, and config.txt editing can be found at:
http://www.cpmspectrepi.webspace.virgin ... tings.html
(Whilst the NOOBS' auto-generated settings are shown, at the moment the examples are for HDMI monitors, TV's and an HDMI to VGA converter - I hope to add composite video examples sometime later this week)
HTH,
Trev.

Re: How to switch from HDMI to Composite?

Posted: Mon Jan 27, 2014 3:08 pm
by BlindSquirrel
I booted into configuration mode. Went to config editor text fine. Edited line of text that says
"# uncomment if hdmi display is not detected and composite it being output
#hdmi_force_hotplug=1"

I removed the comment on the "hdmi_force_hotplug=1" and rebooted. No change..

Re: How to switch from HDMI to Composite?

Posted: Mon Jan 27, 2014 3:13 pm
by redhawk
That's because hdmi_force_hotplug=1 forces HDMI mode instead of being auto-detected as it was.
To select composite mode you need to edit config.txt usually via sudo /boot/config.txt and adding the line sdtv_mode=2 for PAL or sdtv_mode=1 for NTSC and make sure hdmi_force_hotplug=1 is commented out with the # prefix.
If you're using NOOBS just boot the Pi while holding the left shift key and you should be able to edit the same configuration file in there.

Richard S.

Re: How to switch from HDMI to Composite?

Posted: Mon Jan 27, 2014 3:49 pm
by BlindSquirrel
Still nothing. Out of curiosity, I booted another SD Card with NOOBS and only plugged the pi into composite.

Here is my hook-up.

Image

Still nothing. The screen is an old portable DVD player. Brand new. No problems. The input is an in/out, so it should be working. See any stupid mistakes?

Re: How to switch from HDMI to Composite?

Posted: Mon Jan 27, 2014 4:02 pm
by redhawk
Swap the yellow for white or red, if the video is working then your speakers should make a buzzing sound.

Richard S.

Re: How to switch from HDMI to Composite?

Posted: Mon Jan 27, 2014 4:09 pm
by BlindSquirrel
Yes, there is a slight buzz. Would it work to buy an RCA to HDMI?

Re: How to switch from HDMI to Composite?

Posted: Mon Jan 27, 2014 4:18 pm
by FTrevorGowen
BlindSquirrel wrote:Still nothing. Out of curiosity, I booted another SD Card with NOOBS and only plugged the pi into composite.
...
NOOBS can be a "little tricky" when working with composite video - assuming you held/toggled key '3' or (more likely, given your location) '4' on "first-boot" did you manage to see anything like I show here:
http://www.cpmspectrepi.webspace.virgin ... ellow.html
If not, and thus you wouldn't have made composite video mode "permanent", NOOBS would then have defaulted to HDMI mode. (This is a known issue, recommended to be addressed in the next release)
Trev.

Re: How to switch from HDMI to Composite?

Posted: Mon Jan 27, 2014 4:28 pm
by BlindSquirrel
[/quote]
NOOBS can be a "little tricky" when working with composite video - assuming you held/toggled key '3' or (more likely, given your location) '4' on "first-boot" did you manage to see anything like I show here:
http://www.cpmspectrepi.webspace.virgin ... ellow.html
If not, and thus you wouldn't have made composite video mode "permanent", NOOBS would then have defaulted to HDMI mode. (This is a known issue, recommended to be addressed in the next release)
Trev.[/quote]

---

Yes. I reloaded SD Card, inserted, powered, held 4 on my keyboard, and still nothing. I'm starting to think the DVD player is a bust. Might just take the screen off and splice an HDMI onto the screen and plug that into the Pi.

Re: How to switch from HDMI to Composite?

Posted: Mon Jan 27, 2014 7:30 pm
by BlindSquirrel
Thanks for the help guys, but it's a problem with the screen. I completely reset an SD card snd only plugged in the composite. Still not working.

Re: How to switch from HDMI to Composite?

Posted: Sat Mar 25, 2017 12:35 pm
by john.t
rpdom wrote:The easiest way to switch to Composite video out is to disconnect the HDMI cable and reboot.

If you installed using NOOBS, then there may be (as lafalken said) a line in config.txt that is forcing HDMI and that would need to be changed or commented out.

There is a way to change outputs while running, using the tvservice command plus a couple of other commands (fbset twice and xrefresh if you are running a desktop at the time).

I can't find the options required, but tvservice -o will turn off the current video output, then one of the tvservice options is to turn on the selected video output and type, I think it is tvservice -e PAL or something, then you will need to reset the screen dimensions by updating the frame buffer with fbset --depth 8 and then setting it to the correct size with fbset --depth 16 --geometry "XxY" with the correct X and Y for your composite mode (PAL or NTSC), and finally just xrefresh if using a desktop to force the desktop to redraw.

Note that you probably won't be able to see anything on the screen after typing the first tvservice command, until the last fbset or xrfresh.


Hi
Ive search the internet about switching from hdmi to composite and back while running but i can't find the right commands to tell rpi to switch between to outputs , i dont boot to my desktop. i have a program that automatically runs during boot.so i would like to switch between the two output.could you maybe help me with this?thank you

Re: How to switch from HDMI to Composite?

Posted: Sat Mar 25, 2017 12:57 pm
by mahjongg
you probably have two problems, first NOOBS having set up the wrong video mode
see viewtopic.php?p=590644#p590644

secondly using the wrong AV cable, with wrong wiring inside.
see viewtopic.php?p=714304#p714304

Re: How to switch from HDMI to Composite?

Posted: Sat Mar 25, 2017 1:10 pm
by john.t
Hello
Is there a way to switch between composite video output and HDLMi while pi is running? in other words switching without rebooting pi
thnx

Re: How to switch from HDMI to Composite?

Posted: Sat Mar 25, 2017 1:41 pm
by FTrevorGowen
Maybe with a couple of tvservice commands but I'm not certain of that.
Trev.

Re: How to switch from HDMI to Composite?

Posted: Sat Mar 25, 2017 6:13 pm
by rpdom
It certainly used to be possible with a couple of tvservice commands, some fbset commands and an xrefresh.

There is also a program that can change the overscan values dynamically.

Re: How to switch from HDMI to Composite?

Posted: Sat Mar 25, 2017 8:04 pm
by FTrevorGowen
rpdom wrote:It certainly used to be possible with a couple of tvservice commands, some fbset commands and an xrefresh.
There is also a program that can change the overscan values dynamically.
Thanks for that - I thought that another command or two might be needed, but couldn't recall the details ('tis not something I've ever needed to do).
Trev.