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

Re: STICKY: HOWTO: Create Custom HDMI modes

Wed Apr 04, 2018 3:43 pm

steinerlein wrote:
Wed Apr 04, 2018 11:10 am
So far so good, the backlight switches on and it doesn't seem to fail right away. However, I am having some issues with displaying an image on the display. It always shows only the topmost line. My suspicion is that the pixel clock frequency is too high for the display. The datasheet specifies 9Mhz typ and 15Mhz max.
You do seem to be hitting a firrmware bug when frequencies below oscillator frequency (19.2MHz) come out as zero.
I have a test firmware you could try that allows your hdmi_timings line to boot with what appears to be the correct frequency:

Code: Select all

$ vcgencmd measure_clock pixel
frequency(29)=9600000
Can you test it?

EDIT: This fix is now included in rpi-update firmware.

steinerlein
Posts: 12
Joined: Thu Mar 21, 2013 4:59 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Mon Apr 09, 2018 9:07 am

dom wrote:
Wed Apr 04, 2018 3:43 pm
steinerlein wrote:
Wed Apr 04, 2018 11:10 am
So far so good, the backlight switches on and it doesn't seem to fail right away. However, I am having some issues with displaying an image on the display. It always shows only the topmost line. My suspicion is that the pixel clock frequency is too high for the display. The datasheet specifies 9Mhz typ and 15Mhz max.
You do seem to be hitting a firrmware bug when frequencies below oscillator frequency (19.2MHz) come out as zero.
I have a test firmware you could try that allows your hdmi_timings line to boot with what appears to be the correct frequency:

Code: Select all

$ vcgencmd measure_clock pixel
frequency(29)=9600000
Can you test it?

EDIT: This fix is now included in rpi-update firmware.
I didn't give an update last week, but I have gotten the pixel clock clock to be what I want. With these settings in config.txt I can measure 9Mhz on the clock line.
hdmi_ignore_edid=0xa5000080
hdmi_timings=480 0 2 41 43 272 0 2 12 2 0 0 0 60 0 9000000 3
hdmi_group=2
hdmi_mode=87
In hindsight, the display simply didn't turn on with 9.6Mhz pixel clock, but it did with 9Mhz.
I am now experiencing another problem: The display turns on fine and then slowly goes black around the edges, much like vignetting in photography. I am not sure what the cause is.. I'd be thankful for any hints!

steinerlein
Posts: 12
Joined: Thu Mar 21, 2013 4:59 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Thu Apr 12, 2018 11:05 am

hey dom

I am posting here again, because I am not having much success with the display I am trying to drive.
I'm pretty certain that the timings are not correct yet. Here is what is provided in the datasheet:

Code: Select all

Item			MIN	TYP	MAX	Unit
––––––––––––––––––––––––––––––––––––––––––––––––––––––––
DCLK frequency: 		9	15	Mhz
DCLK Period:		66.7ns	111.1		ns
Horizontal frequency: 		17.14		KHz
Vertical frequency:	50	59.94	70	Hz
H Pulse Width:		2	41	41	DCLK
H Back Porch:		4	43	82	DCLK
H Front Porch:		2	2	82	DCLK
H Blank Period HBP+HFP:	45	45	125	DCLK
H Display Area:		480	480	480	DCLK
H Cycle:		525	525	605	DLCK
V Pulse Width:		1	10	11	HCycle
V Back Porch:		2	12	22	HCycle
V Front Porch:		1	2	227	HCycle
V Blanking Period VBP+VFP:	14		HCycle
V Display Area:		272	272	272	HCycle
V Cycle:		285	286	399	HCycle
––––––––––––––––––––––––––––––––––––––––––––––––––––––––
And these are the timings I am using right now:

Code: Select all

hdmi_timings:480 0 2 41 43 272 0 2 10 12 0 0 0 60 0 9000000 3
Unfortunately, the image quality is very bad:
photo_2018-04-12_13-02-21.jpg
photo_2018-04-12_13-02-21.jpg (135.77 KiB) Viewed 1313 times
photo_2018-04-12_13-02-18.jpg
photo_2018-04-12_13-02-18.jpg (123.35 KiB) Viewed 1313 times
As you can see, the image has horizontal striping and gets darker from the outside inwards. This darkening effect happens over time and can get "inverted" after a reboot of the pi.

I'd be thankful for thoughts or ideas on how to improve this.

frankievalentine
Posts: 1
Joined: Fri May 04, 2018 5:32 am

Re: Custom HDMI modes

Fri May 04, 2018 5:37 am

shookis wrote:
Sat Apr 01, 2017 10:10 pm
darseneau wrote:
dom wrote: 2560x1080 is not possible. 1920x1200 is the maximum resolution supported.
Is that a firmware limitation at present, as I had supposed, or a hardware limit of the gpu?
I have an LG 2560x1080 display and I was able to get it working using the following:
hdmi_timings=2560 0 48 32 80 1080 0 7 20 12 0 0 0 52 0 159838855 7
hdmi_group=2
hdmi_mode=87
hdmi_drive=2
framebuffer_width=2560
max_framebuffer_width=2560
framebuffer_height=1080
hdmi_pixel_freq_limit=160000000

I know this hdmi_timings from a somewhat painful experience in getting the same display to work with a somewhat older mac mini (mid 2011) which didn't support it out of the box.

Thank you!!!! You saved me with this one shookis. Much appreciated for posting these setttings.

rfried
Posts: 1
Joined: Sun Apr 15, 2018 7:19 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Tue May 22, 2018 9:18 pm

Thanks for the config.txt info by frankievalentine and all others.
I adapted it for my screen and got working 3840x1600 @30Hz
on a LG Electronics 38UC99-W 21:9 monitor connected to
a Raspberry Pi 3 Model B+.

config.txt:

Code: Select all

hdmi_drive=2
hdmi_ignore_edid=0xa5000080
hdmi_group=2
hdmi_mode=87
hdmi_aspect_21_9=7
hdmi_pixel_freq_limit=400000000
hdmi_cvt=3840 1600 30 7 0 0 1
max_framebuffer_width=3840
max_framebuffer_height=1600
framebuffer_width=3840
framebuffer_height=1600
(24Hz was also ok)

cnlohr
Posts: 12
Joined: Fri Feb 12, 2016 10:34 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Thu Jun 14, 2018 2:43 am

Does anyone know what the new maximum pixel clock is for the 3B+'s? Based on many other posts, it's definitely not 140 MHz anymore. But, I am trying to find out if it can get up to the 297 for the Vive. If not it certainly can come close.

EDIT: Apparently it's right at the edge, and requires overclocking the pi, but, the 297MHz dot clock of the vive is totally achievable.

felixre7
Posts: 1
Joined: Thu Aug 02, 2018 3:50 am

Yamaski Catleap

Thu Aug 02, 2018 4:06 am

Just wanted to post here with my working config.txt for a 2k yamaski catleap monitor. I think they are sold under some other names but it took many hours of research, never finding a datasheet, to figure out what settings i needed. In the hopes of sparing someone from that same fate here they are:

Code: Select all

# For more options and information see
# http://rpf.io/configtxt
# 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
hdmi_ignore_edid=0xa5000080
#hdmi_edid_file=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=0
overscan_right=0
overscan_top=0
overscan_bottom=0

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720
framebuffer_depth=24
framebuffer_ignore_alpha=1
max_framebuffer_width=2560
max_framebuffer_height=1440
start_x=1
gpu_mem=192

# 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_force_mode=1
hdmi_cvt=2560 1440 59 3 0 0 1
hdmi_group=2
hdmi_mode=87
edid_content_type=0
hdmi_pixel_freq_limit=260000000
#this is yamaski catleap magic right here
hdmi_timings=2560 1 48 32 112 1440 0 3 10 65 0 0 0 59 0 237670880 3

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
hdmi_drive=1

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
config_hdmi_boost=7

# 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
I tried so many things i think most of this doesn't matter except for:

Code: Select all

hdmi_force_mode=1
hdmi_cvt=2560 1440 59 3 0 0 1
hdmi_group=2
hdmi_mode=87
hdmi_pixel_freq_limit=260000000
#this is yamaski catleap magic right here
hdmi_timings=2560 1 48 32 112 1440 0 3 10 65 0 0 0 59 0 237670880 3
this successfully runs the catleap at 59Hz on my rPi 2 B+, i had to divine the porch sizes and other settings. here are the websites that really helped me learn what was going on and might help other people in the future figuring out weird monitors:

how the hdmi timings line works: https://www.raspberrypi.org/documentati ... /README.md
THIS: <pixel_freq> = clock frequency (width*height*framerate)

nice config.txt explainer: https://github.com/raspberrypi/documen ... /video.md

yamaski specific info that helped me figure out the timings line, you can find the back porch size by subtracting the total pixel count by the resolution and the front porch. in addition windows could display on this monitor because it was magically figuring out the settings, you can steal some info from there (like the sync pulse widths).
https://forums.overclockers.com.au/thre ... s.1184364/
https://www.overclock.net/forum/44-moni ... b-113.html

ibeeby
Posts: 7
Joined: Mon Jul 02, 2012 7:04 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Tue Aug 07, 2018 4:31 pm

Right, I know that there has been a lot of traffic on this topic but I may have a new query (or not)...

I am trying to re-use an old Apple PowerBook Titanium LCD panel. It has a VGA input and the native resolution is 1280x854 at 24 bits per pixel.

Any thoughts as to the config.txt configuration for such a display?

The connection is via the RPi HDMI connector and an HDMI to VGA adapter (a cheap eBay unit).

I get a display at 1280x800 but the top part of the screen is duplicated at the bottom. Also, there are some severe colour rendition issues (using default 16-bit or 24-bits per pixel). I am satisfied that the display was working perfectly before I scrapped the computer which was obsolete.

I also have a PowerBook Aluminium lcd panel which is a later model and although it has the same resolution I should be able to get an HDMI driver for it. However, first job is to get the earlier panel working if possible.

Grateful for any thoughts.

Ian

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20281
Joined: Sat Jul 30, 2011 7:41 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Tue Aug 07, 2018 4:52 pm

What are your current config settings?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

User avatar
davidcoton
Posts: 3125
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: STICKY: HOWTO: Create Custom HDMI modes

Tue Aug 07, 2018 4:58 pm

jamesh wrote:
Tue Aug 07, 2018 4:52 pm
What are your current config settings?
Congrats Jamsh on reaching 20K posts. Keep up the good work (sorry if this is too off-topic)!
"Thanks for saving my life." See https://www.raspberrypi.org/forums/viewtopic.php?p=1327656#p1327656
“Raspberry Pi is a trademark of the Raspberry Pi Foundation”

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20281
Joined: Sat Jul 30, 2011 7:41 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Tue Aug 07, 2018 5:05 pm

davidcoton wrote:
Tue Aug 07, 2018 4:58 pm
jamesh wrote:
Tue Aug 07, 2018 4:52 pm
What are your current config settings?
Congrats Jamsh on reaching 20K posts. Keep up the good work (sorry if this is too off-topic)!
Arghhh. Missed it!

Thanks!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

ibeeby
Posts: 7
Joined: Mon Jul 02, 2012 7:04 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Thu Aug 09, 2018 6:25 pm

I'm using the standard config.txt settings - I have tried to set the resolution to 1280x854 but it doesn't seem to do anything - so tried 1280x900 and 1280x800 but the position has not improved.

I think that there must be some setting to give actual 1280x854 out of the device or the display will not work properly - its an LCD panel with fixed native resolution of 1280x854.

Ian

ibeeby
Posts: 7
Joined: Mon Jul 02, 2012 7:04 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Tue Aug 14, 2018 2:32 pm

Folks,

Thanks for the input.

I have just received the driver board for my second display which is from a 15" Aluminium PowerBook G4. The displays have, allegedly, the same resolution. However, the later panel requires different driver hardware and this hardware includes an HDMI connector. On a quick assessment I can report that the newer display panel works right out of the box, so to say, with my Raspberry Pi.

I don't have time to do it now but I think that the best approach will be to see what the HDMI data is for the newer panel and see if I can replicate that on the older panel via the VGA adapter route. I hope, since the native resolutions are the same, that this ought to work.

It seems that the HDMI resolution being used on the newer panel is 1280x900 (panel is 1280x854) but I cannot see any part of the display missing and the colours etc are just as they are on a 'normal' display.

More when I have time...

Ian

Hiles
Posts: 1
Joined: Wed Aug 22, 2018 4:26 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Wed Aug 22, 2018 5:40 pm

steinerlein wrote:
Thu Apr 12, 2018 11:05 am
hey dom

I am posting here again, because I am not having much success with the display I am trying to drive.
I'm pretty certain that the timings are not correct yet. Here is what is provided in the datasheet:

Code: Select all

Item			MIN	TYP	MAX	Unit
––––––––––––––––––––––––––––––––––––––––––––––––––––––––
DCLK frequency: 		9	15	Mhz
DCLK Period:		66.7ns	111.1		ns
Horizontal frequency: 		17.14		KHz
Vertical frequency:	50	59.94	70	Hz
H Pulse Width:		2	41	41	DCLK
H Back Porch:		4	43	82	DCLK
H Front Porch:		2	2	82	DCLK
H Blank Period HBP+HFP:	45	45	125	DCLK
H Display Area:		480	480	480	DCLK
H Cycle:		525	525	605	DLCK
V Pulse Width:		1	10	11	HCycle
V Back Porch:		2	12	22	HCycle
V Front Porch:		1	2	227	HCycle
V Blanking Period VBP+VFP:	14		HCycle
V Display Area:		272	272	272	HCycle
V Cycle:		285	286	399	HCycle
––––––––––––––––––––––––––––––––––––––––––––––––––––––––
And these are the timings I am using right now:

Code: Select all

hdmi_timings:480 0 2 41 43 272 0 2 10 12 0 0 0 60 0 9000000 3
Unfortunately, the image quality is very bad:
photo_2018-04-12_13-02-21.jpg
photo_2018-04-12_13-02-18.jpg

As you can see, the image has horizontal striping and gets darker from the outside inwards. This darkening effect happens over time and can get "inverted" after a reboot of the pi.

I'd be thankful for thoughts or ideas on how to improve this.
Hello steinerlein ,

Your case looks very similar to mine. So far I guess you are using a display which is more or less a clone of the LCD module of the Sony PSP. I have the same device and the same symptoms.

You say something about "inverted" but I'm not sure to understand clearly. In my case the entire display seems to start randomly in a "reverse video" mode.

Do you have a "Data enable" signal on your display ? (none in my case). I suspect something related to this detail :(.

I also noticed the following. Increasing the V pulse width to very high values (e.g. 5000) virtually slows down the refresh rate. Doing this shows clearly that one line out of 2 stays grey. And this changes every frame. On one frame, the odd lines are ok, the other ones grey. One the next frame, the even lines are ok.

Strange na ?

Return to “Advanced users”

Who is online

Users browsing this forum: No registered users and 15 guests