tekn0
Posts: 8
Joined: Mon Jun 20, 2016 6:01 pm

Re: Custom HDMI modes

Mon Jun 20, 2016 10:15 pm

wmlooi wrote:Hi dom,

When I used CEA mode, my monitor can shows a image. But for DMT mode, the monitor just blank during boot. I can see the Pi Zero are booting because the LED is blinking. That's why I want to create a custom CEA mode that suite my monitor to solve the "Input Signal Out of Range" problem.
Thanks.
It looks like he added it in an older post "It will appear as the last hdmi_mode (87 for DMT, 65 for CEA). Use hdmi_group to determine CEA or DMT." Did hdmi_mode=65 work for you?

I have a similar issue where if I set hdmi_group=2/hdmi_mode=87 and I use hdmi_timings my pi goes blank after reboot with hdmi to component converter. Even the network is out. It's almost like it wont boot and I have to reflash the card.

TobiBS
Posts: 3
Joined: Fri Jul 01, 2016 9:47 pm

Re: HOWTO: Create Custom HDMI modes

Fri Jul 01, 2016 10:03 pm

I am trying to make a display work with the DPI interface via GPIO, hence I am using my own HDMI mode for configuration. My problem is, that when trying to set the mode with any frequency as low as 18MHz (according to datasheet), there is no clock or other output from Raspberry on GPIOs whatsoever. Might it be, that there is an internal check with the aspect ratio, that calculates a minimum frequency and forbids to set "too low frequencies"? The settings start to work somewhere around 32MHz, which is already too fast according to the spec (signals highs are too short according to spec).

Right now the display is displaying console and desktop, but with a lot of blurries and vertically displaced, so my guess is, that the readings are just not sharp enough. Or might there be another issue with dpi_output_format as well?

TobiBS
Posts: 3
Joined: Fri Jul 01, 2016 9:47 pm

Re: HOWTO: Create Custom HDMI modes

Sat Jul 02, 2016 2:47 pm

TobiBS wrote:forbids to set "too low frequencies"? The settings start to work somewhere around 32MHz, which is already too fast according to the spec (signals highs are too short according to spec).
I found an answer somewhere else, it seems only specific values are allowed, have alook at:
viewtopic.php?p=996243#p996243

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7339
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: HOWTO: Create Custom HDMI modes

Sat Jul 02, 2016 3:02 pm

TobiBS wrote:I am trying to make a display work with the DPI interface via GPIO, hence I am using my own HDMI mode for configuration. My problem is, that when trying to set the mode with any frequency as low as 18MHz (according to datasheet), there is no clock or other output from Raspberry on GPIOs whatsoever. Might it be, that there is an internal check with the aspect ratio, that calculates a minimum frequency and forbids to set "too low frequencies"? The settings start to work somewhere around 32MHz, which is already too fast according to the spec (signals highs are too short according to spec).
Are you using hdmi_cvt?
There is a min frequency of 25MHz. When below that the clock is doubled and pixel doubling is enabled.
You can override that with the 8th parameter of hdmi_cvt. E.g. include 1000000 at the end of the hdmi_cvt list.

TobiBS
Posts: 3
Joined: Fri Jul 01, 2016 9:47 pm

Re: HOWTO: Create Custom HDMI modes

Sat Jul 02, 2016 10:40 pm

dom wrote:Are you using hdmi_cvt?
No, I am using hdmi_timings as described in https://www.raspberrypi.org/documentati ... /README.md

My config is like the one mentioned there, with modified parameters for my display (not at hand, I am away from the Raspberry during the weekend, therefore from memory):

Code: Select all

dpi_group=2
dpi_mode=87
dpi_output_format=18BIT_666_CFG1,DPI_RGB_ORDER_RGB,output_enable_polarity inverted
hdmi_timings=960 0 173 8 0 160 0 40 10 0 0 0 0 60 0 19200000 8
dom wrote:There is a min frequency of 25MHz. When below that the clock is doubled and pixel doubling is enabled. You can override that with the 8th parameter of hdmi_cvt. E.g. include 1000000 at the end of the hdmi_cvt list.
Does that happen with hdmi_timings as well and how can it be disabled there? Because that could explain my strange output, while I can not find any of the other settings to change something.

aje_fr
Posts: 10
Joined: Fri May 27, 2016 10:18 pm

Re: HOWTO: Create Custom HDMI modes

Sun Jul 03, 2016 10:25 pm

Hello,

I didn't had answer on my own topic, so i'm trying here :? (ie dom, please help me, you are my only hope)

Well, I have two problems :
- How could I update hdmi_timings when the system has already booted, I need to update screen resolution while system alive.
It's for use with a cathodic monitor and is mandatory in my application (emulation on arcade cabinet)
- Did the pixel doubling / 4x is available thru parameters, maybe "pixel_rep" but it didn't change anything when I try to change this value. It may help me to achieve specific resolutions.

Thanks !!

Grasshopper2
Posts: 14
Joined: Sat Feb 20, 2016 11:54 am

Re: HOWTO: Create Custom HDMI modes

Thu Jul 14, 2016 11:57 am

aje_fr wrote:Hello,

I didn't had answer on my own topic, so i'm trying here :? (ie dom, please help me, you are my only hope)

Well, I have two problems :
- How could I update hdmi_timings when the system has already booted, I need to update screen resolution while system alive.
It's for use with a cathodic monitor and is mandatory in my application (emulation on arcade cabinet)
- Did the pixel doubling / 4x is available thru parameters, maybe "pixel_rep" but it didn't change anything when I try to change this value. It may help me to achieve specific resolutions.

Thanks !!
Hi aje_fr,

Unfortunately, I'm in the same position as you.

Dom, if you're monitoring this thread, is there some official means by which we can request the RPi foundation to look into this issue?

The ability to modify HDMI timings on the fly (i.e. without having to carry out a reboot) is essential for anyone who is using the RPi to emulate old hardware, and that's a very large percentage of RPi users.

At the moment, the only way to emulate a custom screen mode on the fly is to downscale an existing HDMI mode either in software (which reduces the CPU bandwidth available for other aspects of the emulation), or by utilising the RPi's built in GPU.

Unfortunately, there are also limitations with the RPi's GPU driver that make it impossible to create a custom mode with an arbitrary pixel aspect ratio. I explained this in more detail earlier in the thread. Could this issue be looked into as well?

Thanks

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7339
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: HOWTO: Create Custom HDMI modes

Thu Jul 14, 2016 12:20 pm

TobiBS wrote:
dom wrote:Are you using hdmi_cvt?
dom wrote:There is a min frequency of 25MHz. When below that the clock is doubled and pixel doubling is enabled. You can override that with the 8th parameter of hdmi_cvt. E.g. include 1000000 at the end of the hdmi_cvt list.
Does that happen with hdmi_timings as well and how can it be disabled there? Because that could explain my strange output, while I can not find any of the other settings to change something.
No, hdmi_timings doesn't enforce a min frequency and pixel doublng. It will do what you specify.
Only hdmi_cvt does this as it doesn't allow pixel doubling to be specified.

aBUGSworstnightmare
Posts: 9722
Joined: Tue Jun 30, 2015 1:35 pm

Re: HOWTO: Create Custom HDMI modes

Sun Jul 17, 2016 8:12 am

TobiBS wrote:I am trying to make a display work with the DPI interface via GPIO, hence I am using my own HDMI mode for configuration. My problem is, that when trying to set the mode with any frequency as low as 18MHz (according to datasheet), there is no clock or other output from Raspberry on GPIOs whatsoever. Might it be, that there is an internal check with the aspect ratio, that calculates a minimum frequency and forbids to set "too low frequencies"? The settings start to work somewhere around 32MHz, which is already too fast according to the spec (signals highs are too short according to spec).

Right now the display is displaying console and desktop, but with a lot of blurries and vertically displaced, so my guess is, that the readings are just not sharp enough. Or might there be another issue with dpi_output_format as well?
Hi,
using a custom HDMI mode will allow you do connect even quite unusual display resolutions to RPi.
Here is an example of an 768x128pixel TFT module.
6in1demo_04_small.jpg
Sharp LQ060B3DW02 connected to Raspberry Pi Zero
6in1demo_04_small.jpg (59.94 KiB) Viewed 66198 times
Although the display resolution is 768x128pixels only my hdmi_timings looks like this:

Code: Select all

hdmi_timings=800 0 30 10 30 480 0 10 3 10 0 0 0 60 0 32000000 6
As you can see the timing lets the RPI think there is an WVGA display (800x480pixels) display connected. The timing is also not matching the values from the data sheet (https://www.sharpsde.com/fileadmin/prod ... 27402A.pdf) but were 'tweaked' to give a clear/crisp picture.

The rest of 'the magic' is then done by frame buffer and oversan settings. This is what it looks like for this display:

Code: Select all

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
overscan_left=0
overscan_right=32
overscan_top=0
overscan_bottom=352

# uncomment to force a console size. By default it will be display's size minus
# overscan.
framebuffer_width=768
framebuffer_height=128
To make it complete:

Code: Select all

dpi_output_format=454661
So, not only stick with the timing setting, use frame buffer and overscan settings in addition.
Start with timing first and change values until you have a stable image (test with primary colors (!) to check that mapping is correct), then change frame buffer to the display resolution and start to 'move' it by using overscan.
Note: Front- Backporch changes can have the same result as changing oversan.

Cheers
aBUGSworstnightmare

EDIT:
made a small video showing the RPi Zero displaying 4 videos on the screen simultaneously:
6in_4video.jpg
6in_4video.jpg (36 KiB) Viewed 66028 times
The video is here: https://youtu.be/trY4hLSOpjw
8-)
Last edited by aBUGSworstnightmare on Wed Jul 27, 2016 4:40 am, edited 1 time in total.

safir_na
Posts: 1
Joined: Wed Jul 20, 2016 5:55 am

Re: HOWTO: Create Custom HDMI modes

Wed Jul 20, 2016 7:34 am

hi my friend..

i have a question..

i got a LCD with model name claa103wa0110.3.. it have 1280x480 resolution.. how can i show this resolution on raspberry pi 3??

i try every way i can.. still i can't show this resolution on my device..

thank you for helping me..

aBUGSworstnightmare
Posts: 9722
Joined: Tue Jun 30, 2015 1:35 pm

Re: HOWTO: Create Custom HDMI modes

Mon Jul 25, 2016 2:49 am

safir_na wrote:hi my friend..

i have a question..

i got a LCD with model name claa103wa0110.3.. it have 1280x480 resolution.. how can i show this resolution on raspberry pi 3??

i try every way i can.. still i can't show this resolution on my device..

thank you for helping me..
You need to have the data sheet of the display; timing details need to be known to start 'working' on hdmi_timings.
Possible starting point is 1280x800 pixels in timing, reducing framebuffer to 1280x480.

aje_fr
Posts: 10
Joined: Fri May 27, 2016 10:18 pm

Re: HOWTO: Create Custom HDMI modes

Tue Aug 02, 2016 9:47 pm

Grasshopper2 wrote: Hi aje_fr,

Unfortunately, I'm in the same position as you.

Dom, if you're monitoring this thread, is there some official means by which we can request the RPi foundation to look into this issue?

The ability to modify HDMI timings on the fly (i.e. without having to carry out a reboot) is essential for anyone who is using the RPi to emulate old hardware, and that's a very large percentage of RPi users.

At the moment, the only way to emulate a custom screen mode on the fly is to downscale an existing HDMI mode either in software (which reduces the CPU bandwidth available for other aspects of the emulation), or by utilising the RPi's built in GPU.

Unfortunately, there are also limitations with the RPi's GPU driver that make it impossible to create a custom mode with an arbitrary pixel aspect ratio. I explained this in more detail earlier in the thread. Could this issue be looked into as well?

Thanks

@dom
Please, could you let us know if there is any possibility to achieve this.
We are many to look for a way to update hdmi_timing while the system is alive.
As the firmware is closed, no revealant datasheet available, you may be the only one to know how to do, could you share your knowledge :lol:

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7339
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: HOWTO: Create Custom HDMI modes

Wed Aug 03, 2016 3:23 pm

aje_fr wrote:
Grasshopper2 wrote: Please, could you let us know if there is any possibility to achieve this.
We are many to look for a way to update hdmi_timing while the system is alive.
As the firmware is closed, no revealant datasheet available, you may be the only one to know how to do, could you share your knowledge :lol:
No current way from the firmware driver. It may be possible using the experimental arm side driver, but that's obviously experimental.

It may be possible to provide a vcgencmd that allows updating the current custom hdmi mode, so the next HDMI mode change to the custom mode will use the new settings.
Open a github firmware issue requesting this and I'll try to look into it.

Grasshopper2
Posts: 14
Joined: Sat Feb 20, 2016 11:54 am

Re: HOWTO: Create Custom HDMI modes

Thu Aug 04, 2016 7:38 pm

dom wrote: No current way from the firmware driver. It may be possible using the experimental arm side driver, but that's obviously experimental.

It may be possible to provide a vcgencmd that allows updating the current custom hdmi mode, so the next HDMI mode change to the custom mode will use the new settings.
Open a github firmware issue requesting this and I'll try to look into it.
@dom, Thanks for looking into this for us. I've now added both issues to the RPi firmware github issues list.

aje_fr
Posts: 10
Joined: Fri May 27, 2016 10:18 pm

Re: HOWTO: Create Custom HDMI modes

Mon Aug 08, 2016 10:49 am

dom wrote:
aje_fr wrote:
Grasshopper2 wrote: Please, could you let us know if there is any possibility to achieve this.
We are many to look for a way to update hdmi_timing while the system is alive.
As the firmware is closed, no revealant datasheet available, you may be the only one to know how to do, could you share your knowledge :lol:
No current way from the firmware driver. It may be possible using the experimental arm side driver, but that's obviously experimental.

It may be possible to provide a vcgencmd that allows updating the current custom hdmi mode, so the next HDMI mode change to the custom mode will use the new settings.
Open a github firmware issue requesting this and I'll try to look into it.
Hello,
Thanks for the answer, if you have any beta test program to try, I will be glad to give a try.
Best regards

User avatar
jacksonliam
Posts: 181
Joined: Tue Feb 07, 2012 10:09 pm

Re: HOWTO: Create Custom HDMI modes

Sat Sep 10, 2016 4:48 pm

Anyone know what the units are supposed to be for the custom HDMI timings?

Code: Select all

<h_active_pixels> = horizontal pixels (width)
<h_sync_polarity> = invert hsync polarity
<h_front_porch>   = horizontal forward padding from DE acitve edge
<h_sync_pulse>    = hsync pulse width in pixel clocks
<h_back_porch>    = vertical back padding from DE active edge
<v_active_lines>  = vertical pixels height (lines)
<v_sync_polarity> = invert vsync polarity
<v_front_porch>   = vertical forward padding from DE active edge
<v_sync_pulse>    = vsync pulse width in pixel clocks
<v_back_porch>    = vertical back padding from DE active edge
<v_sync_offset_a> = leave at zero
<v_sync_offset_b> = leave at zero
<pixel_rep>       = leave at zero
<frame_rate>      = screen refresh rate in Hz
<interlaced>      = leave at zero
<pixel_freq>      = clock frequency (width*height*framerate)
<aspect_ratio>    = *
As I'm not sure whether the unit for v_sync_pulse is actually pixel clocks.
I've seen a lot of people using 2 or 3 for the v_sync_pulse - but the datasheets seem to show that parameter in the unit of 'lines' or T^H, not in pixel clocks.

So are people just running their display out of spec and getting away with it or is the unit supposed to be 'lines'?

User avatar
mihalop
Posts: 28
Joined: Thu Sep 03, 2015 7:04 am

Re: HOWTO: Create Custom HDMI modes

Sat Sep 10, 2016 8:46 pm

jacksonliam wrote:As I'm not sure whether the unit for v_sync_pulse is actually pixel clocks.
I've seen a lot of people using 2 or 3 for the v_sync_pulse - but the datasheets seem to show that parameter in the unit of 'lines' or T^H, not in pixel clocks.
AFAIK, it's scanlines. Check the diagram on this post.
Yodeck - Digital Signage on the Raspberry Pi
Free Raspberry Pi 3 Player for all screens on Annual Plan

kruuth
Posts: 41
Joined: Sun Oct 14, 2012 2:07 am

Re: HOWTO: Create Custom HDMI modes

Mon Sep 19, 2016 3:37 pm

Has anyone been able to get the PI to scan down to NTSC 320x240@ 15khz? I'm trying to put a PI into my arcade cabinet and so far I haven't had any luck. I was planning on using a VGA adapter and running wires off the R/G/B/S lines.

ironic-FR
Posts: 6
Joined: Fri Aug 26, 2016 8:12 pm

Re: HOWTO: Create Custom HDMI modes

Tue Sep 20, 2016 2:03 am

Hi.
I run my Rpi to 15Khz TV.
I use a VGA666 and a VGA to SCART cable.

You cant use this in config.txt

Code: Select all

# Only for Enable VGA666 #
dtoverlay=vga666
enable_dpi_lcd=1
display_default_lcd=1
#######################

# Custom 15kHz mode
dpi_group=2
dpi_mode=87
hdmi_timings=320 1 17 33 34 224 1 14 8 18 0 0 0 60 0 6400000 1


# OR Hi RES

# For 50Hz 
# hdmi_timings=1010 1 24 96 120 288 1 3 10 6 0 0 0 50 0 19200000 1

# For 60Hz
# hdmi_timings=1068 1 10 62 72 256 1 2 4 2 0 0 0 60 0 19200000 1
It must works with HDMI to VGA adapter.

kruuth
Posts: 41
Joined: Sun Oct 14, 2012 2:07 am

Re: HOWTO: Create Custom HDMI modes

Tue Sep 20, 2016 10:34 am

I'm not sure I follow. I can or can't use that with an hdmi to vga adapter?

ironic-FR
Posts: 6
Joined: Fri Aug 26, 2016 8:12 pm

Re: HOWTO: Create Custom HDMI modes

Wed Sep 21, 2016 12:29 pm

With a HDMI adapter, you can use :

dpi_group=2
dpi_mode=87
hdmi_cvt=320 240 60 1 0 0 0

kruuth
Posts: 41
Joined: Sun Oct 14, 2012 2:07 am

Re: HOWTO: Create Custom HDMI modes

Wed Sep 21, 2016 1:14 pm

Ah ok...will that drop the refresh rate to 15khz?

ironic-FR
Posts: 6
Joined: Fri Aug 26, 2016 8:12 pm

Re: HOWTO: Create Custom HDMI modes

Thu Sep 22, 2016 6:57 pm

Yes, 15.4Khz.

With a HDMI to VGA adapter (Or a VGA666 to output VGA from GPIO) and a VGA to SCART cable (a good cable), you get a 15Khz frequency. Perfect for CRT TV PAL or NTSC.

But, i can't confirm if it will work with your HDMI adapter.


Few resolutions i use with my Rpi2 and my old CRT TV :

512x288x50Hz
hdmi_timings=512 1 16 48 64 288 1 3 5 6 0 0 0 50 0 9600000 1

512x244x60Hz
hdmi_timings=512 1 22 32 54 244 1 3 5 6 0 0 0 60 0 9600000 1

1010x288x50Hz
hdmi_timings=1010 1 24 96 120 288 1 3 10 6 0 0 0 50 0 19200000 1

1068x256x60Hz
hdmi_timings=1068 1 10 62 72 256 1 2 4 2 0 0 0 60 0 19200000 1

320x244x60Hz
hdmi_timings=320 1 17 33 34 224 1 14 8 18 0 0 0 60 0 6400000 1

Don't forget, there is an overscan...

User avatar
ab1jx
Posts: 927
Joined: Thu Sep 26, 2013 1:54 pm
Location: Heath, MA USA

Re: HOWTO: Create Custom HDMI modes

Fri Oct 07, 2016 9:00 pm

I don't think it's possible to change HDMI modes on the fly because that's set by the GPU, which boots the CPU when it's done booting. I worked out a script to step through group 2 modes from 1 to 86 at viewtopic.php?f=28&t=160769&p=1045039#p1045039 which works by storing a mode number in a file plus generating a config.txt then rebooting to set that mode. You have 5 seconds to hit Y on each boot that works to log it as a working mode. The EDID isn't parsed correctly on 2 of 3 of my monitors so I wanted to log working modes. You could change some other parameter instead of mode number.

I found a list of VESA standards at http://www.vesa.org/vesa-standards/standards-summaries/, the ones marked with an * you can download free after registering. There are things in there like "Sub 7-inch Panel Standard-Version 1" that might be useful.

Driving a display with the GPIO has to consume a lot of CPU cycles though, even if you do it in assembly language. There are some serial ones that might be more practical, or look into programming the GPU.

mortaca
Posts: 7
Joined: Fri Oct 14, 2016 11:11 am

Re: HOWTO: Create Custom HDMI modes

Fri Oct 14, 2016 12:19 pm

Hi, PetteriB ¿how you create the correct hdmi_timings? still I do not understand, in my EDID not find me anything to be using an DIY adapter GPIO>VGA.

Your hdmi_timings I have worked in my 15kHz arcade monitor. But I am very interested to have 640x480i and can not find a way to generate it.

Thank you very much in advance.

Return to “Advanced users”