vadbut
Posts: 1
Joined: Mon Jun 12, 2017 10:29 pm

Re: HOWTO: Create Custom HDMI modes

Mon Jun 12, 2017 10:32 pm

Is there a way to specify a custom resolution for CEA mode?
As far as I understood 'hdmi_cvt' config is not valid for CEA...

Cheers

User avatar
peterjohnhunt
Posts: 12
Joined: Wed Apr 29, 2015 11:48 pm
Location: Chicago, IL
Contact: Website

Re: HOWTO: Create Custom HDMI modes

Sat Jun 17, 2017 4:06 pm

Trying to create a custom timing mode for an apple ipad mini LCD. Not exactly sure how to convert the data from the Timing sheet and EDID parse into a correct hdmi_timings value. Especially for landscape view.

Timing Datasheet: http://www.datasheetspdf.com/datasheet/LP079qx.html

EDID Parse:

Code: Select all

HDMI:EDID version 1.0, 0 extensions, screen size 16x12 cm
HDMI:EDID features - videodef 0xa2 standby suspend active off; colour encoding:RGB444|YCbCr444; sRGB is default colourspace; preferred format is native; does not support GTF
HDMI:EDID ignored unknown descriptor tag 0x10
HDMI:EDID found monitor ascii descriptor tag 0xfe
HDMI:EDID found monitor name descriptor tag 0xfc
HDMI:EDID monitor name is Color_LCD
HDMI:EDID does not yet know monitor vertical range, setting to default 24 to 120Hz
HDMI:EDID failed to find a matching detail format for 1536x2048p hfp:12 hs:16 hbp:48 vfp:8 vs:4 vbp:8 pixel clock:202 MHz
HDMI:EDID calculated refresh rate is 61 Hz
HDMI:EDID guessing the format to be 1536x2048p @60 Hz
HDMI:EDID found unknown detail timing format: 1536x2048p hfp:12 hs:16 hbp:48 vfp:8 vs:4 vbp:8 pixel clock:202 MHz
HDMI:EDID established timing I/II bytes are 00 00 00
HDMI:EDID standard timings block x 8: 0x0101 0101 0101 0101 0101 0101 0101 0101 
HDMI:EDID adding mandatory support for DMT (4) 640x480p @ 60Hz
HDMI:EDID filtering formats with pixel clock > 162 MHz or h. blanking > 1023
HDMI:EDID no known preferred format has been set
HDMI:EDID filtering preferred group has been changed from Invalid to DMT
HDMI:EDID best score mode initialised to DMT (4) 640x480p @ 60 Hz with pixel clock 25 MHz (score 0)
HDMI:EDID best score mode is now DMT (4) 640x480p @ 60 Hz with pixel clock 25 MHz (score 36864)
HDMI:EDID preferred mode is updated to DMT (4) 640x480p @ 60 Hz with pixel clock 25200000 Hz
HDMI:EDID has only DVI support and no audio support
edid_parser exited with code 0
Current config.txt:

Code: Select all

# For more options and information see
# http://rpf.io/configtxtreadme
# 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=1536
framebuffer_height=2048
max_framebuffer_width=1536
max_framebuffer_height=2048

# 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=2
hdmi_mode=87

# 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
hdmi_ignore_edid=0xa5000080
hdmi_timings=1536 0 150 5 5 2048 0 8 1 8 0 0 0 60 0 210337920 1
hdmi_pixel_freq_limit=400000000
#display_rotate=1

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
gpu_mem=128
start_x=1
Its working somewhat for portrait mode, but there are vertical lines that show up when a window is open.

Here are a couple pics:

Image
Image

Any thoughts / suggestions?

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

Re: HOWTO: Create Custom HDMI modes

Fri Jun 23, 2017 9:55 am

1.) How do you drive the Display (A/D-board connected via HDMI i.e)?

2.) Timing data taken from page 9 in the data sheet --> why can't you use this Timing?

<h_active_pixels> = 1536
<h_sync_polarity> = 0
<h_front_porch> = 12
<h_sync_pulse> = 16
<h_back_porch> = 48
<v_active_lines> = 2048
<v_sync_polarity> = 0
<v_front_porch> = 8
<v_sync_pulse> = 4
<v_back_porch> = 8
<v_sync_offset_a> = 0
<v_sync_offset_b> = 0
<pixel_rep> = 0
<frame_rate> = 60
<interlaced> = 0
<pixel_freq> = 200020000
<aspect_ratio> = 1

User avatar
peterjohnhunt
Posts: 12
Joined: Wed Apr 29, 2015 11:48 pm
Location: Chicago, IL
Contact: Website

Re: HOWTO: Create Custom HDMI modes

Fri Jun 23, 2017 3:28 pm

aBUGSworstnightmare wrote:1.) How do you drive the Display (A/D-board connected via HDMI i.e)?

2.) Timing data taken from page 9 in the data sheet --> why can't you use this Timing?

<h_active_pixels> = 1536
<h_sync_polarity> = 0
<h_front_porch> = 12
<h_sync_pulse> = 16
<h_back_porch> = 48
<v_active_lines> = 2048
<v_sync_polarity> = 0
<v_front_porch> = 8
<v_sync_pulse> = 4
<v_back_porch> = 8
<v_sync_offset_a> = 0
<v_sync_offset_b> = 0
<pixel_rep> = 0
<frame_rate> = 60
<interlaced> = 0
<pixel_freq> = 200020000
<aspect_ratio> = 1
Hey @aBUGSworstnightmare, Thanks for the insights. After doing research and learning about the timings etc, i built out a hdmi_timings identical to what you posted. It works well enough for portrait mode, however when i display_rotate=1 it clips the sides. a fbset -v shows it at 1536x1536 which is weird. I have tried ever combination of max_framebuffer and frramebuffer to try and get it to fill the screen. Any thoughts?

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

Re: HOWTO: Create Custom HDMI modes

Mon Jul 10, 2017 2:12 am

You need to change your framebuffer from 1536x2048 to 2048x1536 when you want to use it landscape. The timing needs to stay portrait (as per spec).

Btw: display_rotate=3

User avatar
peterjohnhunt
Posts: 12
Joined: Wed Apr 29, 2015 11:48 pm
Location: Chicago, IL
Contact: Website

Re: HOWTO: Create Custom HDMI modes

Mon Jul 10, 2017 2:51 pm

aBUGSworstnightmare wrote:You need to change your framebuffer from 1536x2048 to 2048x1536 when you want to use it landscape. The timing needs to stay portrait (as per spec).

Btw: display_rotate=3
Thanks again for following up @aBUGSworstnightmare. Appreciate it. I have tried changing the framebuffer while leaving the timings per the spec, but unfortunately it clips to 1536x1536. if i also change the max_framebuffer to inverted (which to me would make sense to why it was clipping to 1536x1536) then it won't boot up at all (stuck on the rainbow preboot splash page).

I'm guessing maybe that is the correct configuration but there isn't enough ram for the GPU to display that big rotated? thoughts?

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

Re: HOWTO: Create Custom HDMI modes

Mon Jul 10, 2017 8:21 pm

Which Pi are you using and how much RAM have you allocated for the GPU?

User avatar
peterjohnhunt
Posts: 12
Joined: Wed Apr 29, 2015 11:48 pm
Location: Chicago, IL
Contact: Website

Re: HOWTO: Create Custom HDMI modes

Mon Jul 10, 2017 9:19 pm

I've tried with a RPI Zero W set to 256mb as well as a RPI 2b set to 512mb with no luck as of yet.

noggin
Posts: 25
Joined: Sun Feb 21, 2016 1:55 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Thu Aug 24, 2017 9:06 am

I've had success with a Pi 3, stock Rasbian Jessie, and an iPad Retina 3/4 9.7" eDP screen via a Displayport adaptor PCB (Abusemark model) using a UGreen HDMI->DP adaptor (£20 from Amazon) This appears to be a 2048x1536 landscape panel - is the iPad Mini Retina panel natively running 1536x2048 portrait ? (I know there are issues with this panel and some Intel GPUs over Displayport so it is different)

My config.txt relevant timings are here :

Code: Select all

overscan_left=0
overscan_right=0
overscan_top=0
overscan_bottom=0
#disable_overscan=1
hdmi_drive=1
hdmi_ignore_edid=0xa5000080
hdmi_group=2
hdmi_mode=87
#60Hz
hdmi_pixel_freq_limit=206000000
hdmi_timings=2048 0 150 5 5 1536 0 3 1 9 0 0 0 60 0 205210000 1
max_framebuffer_width=2048
max_framebuffer_height=1536
display_rotate=0
framebuffer_width=2048
framebuffer_height=1536
These match the datasheet for the LG panel I'm using.

(I've also had success using it with an Intel Compute Stick (m3 model) but I had to use an EDID override application called Custom User Resolution to add an HDMI extension block to the EDID before the Intel driver would accept it could drive it over HDMI it seems.)

*** EDIT - Pi Zero also works fine. Just booted the same uSD card on a Zero and have a full 2048x1536 Raspbian desktop. Not speedy - but it does work ***
Last edited by noggin on Thu Sep 21, 2017 7:47 am, edited 1 time in total.

edcatley
Posts: 1
Joined: Wed Sep 06, 2017 2:27 am

Re: STICKY: HOWTO: Create Custom HDMI modes

Mon Sep 11, 2017 4:37 pm

Did you ever make any more progress on rotating a portrait display without the black bars? I'm attempting to do the same and getting the exact same issue.

User avatar
peterjohnhunt
Posts: 12
Joined: Wed Apr 29, 2015 11:48 pm
Location: Chicago, IL
Contact: Website

Re: STICKY: HOWTO: Create Custom HDMI modes

Tue Sep 12, 2017 12:59 pm

I haven't tested it as of yet, but hoping to do so this weekend. Although the additional comments / suggestions have been for an iPad 3/4 screen, not a iPad mini screen, so not sure if it will translate. Will keep you updated!

aeneas
Posts: 9
Joined: Thu Jan 22, 2015 8:23 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Tue Sep 19, 2017 10:34 am

dom wrote:
Tue Dec 04, 2012 11:03 pm
We've had a steady stream of requests for supporting HDMI modes that aren't from the official CEA/DMT list of modes.

I've implemented CVT:
http://en.wikipedia.org/wiki/Coordinated_Video_Timings
You specify the new mode in config.txt with the following config string:

Code: Select all

hdmi_cvt=<width> <height> <framerate> <aspect> <margins> <interlace> <rb>
width        width in pixels
height       height in pixels
framerate    framerate in Hz
aspect       aspect ratio 1=4:3, 2=14:9, 3=16:9, 4=5:4, 5=16:10, 6=15:9
margins      0=margins disabled, 1=margins enabled
interlace    0=progressive, 1=interlaced
rb           0=normal, 1=reduced blanking
The first three arguments are required. The remaining ones are optional. aspect defaults to 16:9 if not specified.

It should appear if you do

Code: Select all

tvservice -m DMT
An example:

Code: Select all

hdmi_cvt=1680 1050 60 5 0 0 1

Code: Select all

tvservice -m DMT
...
mode 87: 1680x1050 @ 60Hz 16:10, clock:119MHz progressive
(The custom mode will be 87). You might want to test it:

Code: Select all

tvservice -e "DMT 87"
fbset -depth 8 && fbset -depth 16
(The fbset gets the console back after closing the display).

You can also do the usual:

Code: Select all

hdmi_group=2
hdmi_mode=87
to make the custom mode the default.

Please note. There is no guarantee your display will support the resolution/framerate produced by this.
But if you are currently running a monitor at a non native resolution, then this may be worth a try.
This is years after the quoted post, but does this hdmi_cvt feature
work in the current Raspberry Pi 3 ?
I have an oddball small display I need to connect to hdmi
which could this feature but after editing this into /boot/config.txt ,
the post-boot resulting DMT and CEA lists
do not include the new resolution.

noggin
Posts: 25
Joined: Sun Feb 21, 2016 1:55 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Thu Sep 21, 2017 7:35 am

My iPad 3/4 custom mode 87 works fine on my Raspberry Pi 3, running Jessie (I did my tests just before Stretch was released)

aeneas
Posts: 9
Joined: Thu Jan 22, 2015 8:23 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Thu Sep 21, 2017 8:27 am

If there is an error in the operation of hdmi_cvt within
the boot execution of /boot/config.txt , where would the error messages
be posted ?

noggin
Posts: 25
Joined: Sun Feb 21, 2016 1:55 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Fri Sep 22, 2017 12:15 pm

aeneas wrote:
Thu Sep 21, 2017 8:27 am
If there is an error in the operation of hdmi_cvt within
the boot execution of /boot/config.txt , where would the error messages
be posted ?
Are you using hdmi_cvt or hdmi_timings as per my post ? I can confirm that what I did works with my unusual resolution panel.

What happens if you use a version of my config.txt block with my timings and pixel clocks altered for your display?

aeneas
Posts: 9
Joined: Thu Jan 22, 2015 8:23 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Fri Sep 22, 2017 1:15 pm

noggin wrote:
Fri Sep 22, 2017 12:15 pm
aeneas wrote:
Thu Sep 21, 2017 8:27 am
If there is an error in the operation of hdmi_cvt within
the boot execution of /boot/config.txt , where would the error messages
be posted ?
Are you using hdmi_cvt or hdmi_timings as per my post ? I can confirm that what I did works with my unusual resolution panel.

What happens if you use a version of my config.txt block with my timings and pixel clocks altered for your display?
You are saying that during Boot, a panel appears on the desktop
and allows user to confirm the resolution selected in the hdmi_cvt
command ?

Alec006
Posts: 1
Joined: Sun Sep 24, 2017 6:43 am

Re: STICKY: HOWTO: Create Custom HDMI modes

Sun Sep 24, 2017 6:52 am

Hi I'm a noob sorry if I make an stupid question! I have a pvm-14m4u connected with a pi2scart and I'm looking tu run a resolution of 400x254 at 52hz or something near to get native resolution.

now i'm using this
hdmi_timings=506 1 8 44 52 240 1 6 10 6 0 0 0 60 0 9600000 1
is it possible to get something near that wierd one?
thanks in advance
this is all the info I have
Image

noggin
Posts: 25
Joined: Sun Feb 21, 2016 1:55 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Tue Sep 26, 2017 9:31 am

aeneas wrote:
Fri Sep 22, 2017 1:15 pm
noggin wrote:
Fri Sep 22, 2017 12:15 pm
aeneas wrote:
Thu Sep 21, 2017 8:27 am
If there is an error in the operation of hdmi_cvt within
the boot execution of /boot/config.txt , where would the error messages
be posted ?
Are you using hdmi_cvt or hdmi_timings as per my post ? I can confirm that what I did works with my unusual resolution panel.

What happens if you use a version of my config.txt block with my timings and pixel clocks altered for your display?
You are saying that during Boot, a panel appears on the desktop
and allows user to confirm the resolution selected in the hdmi_cvt
command ?
No - my mention of panel was the LCD screen panel. If you look at my posted timings you will see I use hdmi_timings not hdmi_cvt in my config.txt file.

My question was whether you had tried using the same options as I have in my config.txt.

noggin
Posts: 25
Joined: Sun Feb 21, 2016 1:55 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Tue Sep 26, 2017 9:36 am

Alec006 wrote:
Sun Sep 24, 2017 6:52 am
Hi I'm a noob sorry if I make an stupid question! I have a pvm-14m4u connected with a pi2scart and I'm looking tu run a resolution of 400x254 at 52hz or something near to get native resolution.

now i'm using this
hdmi_timings=506 1 8 44 52 240 1 6 10 6 0 0 0 60 0 9600000 1
is it possible to get something near that wierd one?
thanks in advance
this is all the info I have
Image
Isn't the PVM-14M4U an SD CRT broadcast monitor?

If so are you sure it looks at such a low line rate?

Most SD CRTs will look at 15.625kHz (which is the 625/50 line scan - with 575/576 active lines) or 15734.25kHz (which is the 525/59.94 line scan with 480-486 active lines). You can run at 288/50p and 240-243/59.94p if you don't interlace, but you need to keep your active line count at around 312.5 or 262.5 respectively if you run at p50/59.94 rather than i25/29.97.

I'm not sure what you mean by 'native resolution' on a CRT. Are you trying to treat each phosphor triad/triple as a pixel? If so - that's really not how CRTs are used.

Return to “Advanced users”

Who is online

Users browsing this forum: No registered users and 10 guests