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

Re: STICKY: HOWTO: Create Custom HDMI modes

Mon Apr 27, 2020 6:10 am

That's not related to the raspberry pi! It's your controller board which is - most likely - violating the display power down and/or the power up timing.

Sure, it can be related to incorrect settings as well, that's why you should remove below from your config.txt and then report if you still see the issue.
hdmi_drive=2
hdmi_cvt=2560 1600 50 5 0 0 1

I would also suggest to add 'hdmi_enable_4kp60=1' to your config.txt because of your high resolution. Once this is enabled test if removing hdmi_pixel_freq_limit=222000000 makes a difference.

And.. runo these tests without any overclock settings (as they can have side effects)

Doug_
Posts: 37
Joined: Tue Oct 08, 2019 6:40 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Mon Apr 27, 2020 11:13 am

Thank you aBUGSworstnightmare, I have implemented your recommendations reducing the changes to config.txt to the following:

Code: Select all

hdmi_enable_4kp60=1
hdmi_group=2
hdmi_mode=87
hdmi_timings=2560 0 50 64 100 1600 0 10 5 5 0 0 0 50 0 222000000 5
gpu_mem=128
The display is powering up and working correctly but I'll need to report back on any changes these give on the display power down/up cycle flicker issue.

I agree it is likely to be the display controller or perhaps even the display contributing to the problem but I need to be sure there is nothing more I can do from the PI end. The support person in China is very responsive and helpful but yet to come up to speed with this issue.

I have to say the display is spectacular.

Doug

Doug_
Posts: 37
Joined: Tue Oct 08, 2019 6:40 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Tue Apr 28, 2020 9:23 am

Sadly these config changes did not resolve the flicker following the power off then on cycle. The longer the display remains in the off state the worse the flicker and the longer the recovery takes.
Doug

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

Re: STICKY: HOWTO: Create Custom HDMI modes

Tue Apr 28, 2020 4:39 pm

Your interface board is not doing correct power down/power up. Your timing will not be able to solve this issue!

bobgardner
Posts: 41
Joined: Sat Apr 04, 2020 2:00 am
Location: Orlando
Contact: AOL

Re: STICKY: HOWTO: Create Custom HDMI modes

Thu Apr 30, 2020 5:00 pm

Hi Dom. I too am trying to concoct a timing for a 480x480 2" diam round tft using dpi18 and mode 5 666rgb. Saves the last 5 gpios for some buttons and a 3 wire bitbanger. My display ctlr is an ST77701S and I have a 232 byte init table of cmd() data() that the mfgr says gets sent in 9 bit spi 3 wire mode. So I wrote a python program to send this out after the desktop boots, and I can see the pins wiggle on the scope. Question 1: Can you (Dom) reply with your best educated guess on a config.txt for this tft? Question 2: I'd like to ask some config.txt internals guy like you or Phil: can I put a #comment on the right hand side of a config.txt line? Question 3: Is there a 'rule of thumb' on how to estimate front and back porch times as a function of clock freq and line time? Question3: During development, is there a way of flipping back to hdmi mode to edit, then reboot and have it wake up in rgb666-dpi18 mode to test? I'm an old microcontroller c programmer that doesnt know enough unix to be dangerous. Thanks

joyrider3774
Posts: 48
Joined: Sun Mar 13, 2016 12:21 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Sat May 02, 2020 8:09 pm

is it somehow possible to read the values needed for hdmi_timings from a system where the screen works on ?

The reason i'm asking is because i have a screen that works on the rpi3 but fails on rpi4 nomatter what i've tried. I have this screen but can't find more info on it https://shop.pimoroni.com/products/hdmi ... t-1024x768

here's the
edid.zip
(150 Bytes) Downloaded 23 times
from rpi3. It seems the edid info is borked

Code: Select all

Enabling fuzzy format match...
Parsing edid.dat...
HDMI:EDID version 1.4, 0 extensions, screen size 16x12 cm
HDMI:EDID features - videodef 0xa2 standby !suspend !active off; colour encoding:RGB444; sRGB is not default colourspace; preferred format is not native; support discrete frame rate
HDMI:EDID ignored unknown descriptor tag 0x10
HDMI:EDID ignored unknown descriptor tag 0x10
HDMI:EDID ignored unknown descriptor tag 0x10
HDMI:EDID does not yet know monitor vertical range, setting to default 24 to 120Hz
HDMI:EDID found unknown detail timing format: 0x0p hfp:0 hs:0 hbp:0 vfp:0 vs:0 vbp:0 pixel clock:0 MHz
HDMI:EDID established timing I/II bytes are 21 08 80
HDMI:EDID found DMT format: code 4, 640x480p @ 60 Hz in established timing I/II
HDMI:EDID found DMT format: code 9, 800x600p @ 60 Hz in established timing I/II
HDMI:EDID found DMT format: code 16, 1024x768p @ 60 Hz in established timing I/II
HDMI:EDID standard timings block x 8: 0x0100 0100 0100 0100 0100 0100 0100 0100
HDMI:EDID unknown standard timing 256x160 @ 60 Hz aspect ratio (16:10)
HDMI:EDID unknown standard timing 256x160 @ 60 Hz aspect ratio (16:10)
HDMI:EDID unknown standard timing 256x160 @ 60 Hz aspect ratio (16:10)
HDMI:EDID unknown standard timing 256x160 @ 60 Hz aspect ratio (16:10)
HDMI:EDID unknown standard timing 256x160 @ 60 Hz aspect ratio (16:10)
HDMI:EDID unknown standard timing 256x160 @ 60 Hz aspect ratio (16:10)
HDMI:EDID unknown standard timing 256x160 @ 60 Hz aspect ratio (16:10)
HDMI:EDID unknown standard timing 256x160 @ 60 Hz aspect ratio (16:10)
HDMI:EDID filtering formats with pixel clock unlimited MHz or h. blanking unlimited
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 best score mode is now DMT (9) 800x600p @ 60 Hz with pixel clock 40 MHz (score 57600)
HDMI:EDID best score mode is now DMT (16) 1024x768p @ 60 Hz with pixel clock 65 MHz (score 94370)
HDMI0:EDID preferred mode is updated to DMT (16) 1024x768p @ 60 Hz with pixel clock 65000000 Hz
HDMI:EDID has only DVI support and no audio support
/opt/vc/bin/edidparser exited with code 0

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

Re: STICKY: HOWTO: Create Custom HDMI modes

Sun May 03, 2020 6:00 am

joyrider3774 wrote:
Sat May 02, 2020 8:09 pm
is it somehow possible to read the values needed for hdmi_timings from a system where the screen works on ?

The reason i'm asking is because i have a screen that works on the rpi3 but fails on rpi4 nomatter what i've tried. I have this screen but can't find more info on it https://shop.pimoroni.com/products/hdmi ... t-1024x768

here's the edid.zip from rpi3. It seems the edid info is borked

Code: Select all

Enabling fuzzy format match...
Parsing edid.dat...
HDMI:EDID version 1.4, 0 extensions, screen size 16x12 cm
HDMI:EDID features - videodef 0xa2 standby !suspend !active off; colour encoding:RGB444; sRGB is not default colourspace; preferred format is not native; support discrete frame rate
HDMI:EDID ignored unknown descriptor tag 0x10
HDMI:EDID ignored unknown descriptor tag 0x10
HDMI:EDID ignored unknown descriptor tag 0x10
HDMI:EDID does not yet know monitor vertical range, setting to default 24 to 120Hz
HDMI:EDID found unknown detail timing format: 0x0p hfp:0 hs:0 hbp:0 vfp:0 vs:0 vbp:0 pixel clock:0 MHz
HDMI:EDID established timing I/II bytes are 21 08 80
HDMI:EDID found DMT format: code 4, 640x480p @ 60 Hz in established timing I/II
HDMI:EDID found DMT format: code 9, 800x600p @ 60 Hz in established timing I/II
HDMI:EDID found DMT format: code 16, 1024x768p @ 60 Hz in established timing I/II
HDMI:EDID standard timings block x 8: 0x0100 0100 0100 0100 0100 0100 0100 0100
HDMI:EDID unknown standard timing 256x160 @ 60 Hz aspect ratio (16:10)
HDMI:EDID unknown standard timing 256x160 @ 60 Hz aspect ratio (16:10)
HDMI:EDID unknown standard timing 256x160 @ 60 Hz aspect ratio (16:10)
HDMI:EDID unknown standard timing 256x160 @ 60 Hz aspect ratio (16:10)
HDMI:EDID unknown standard timing 256x160 @ 60 Hz aspect ratio (16:10)
HDMI:EDID unknown standard timing 256x160 @ 60 Hz aspect ratio (16:10)
HDMI:EDID unknown standard timing 256x160 @ 60 Hz aspect ratio (16:10)
HDMI:EDID unknown standard timing 256x160 @ 60 Hz aspect ratio (16:10)
HDMI:EDID filtering formats with pixel clock unlimited MHz or h. blanking unlimited
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 best score mode is now DMT (9) 800x600p @ 60 Hz with pixel clock 40 MHz (score 57600)
HDMI:EDID best score mode is now DMT (16) 1024x768p @ 60 Hz with pixel clock 65 MHz (score 94370)
HDMI0:EDID preferred mode is updated to DMT (16) 1024x768p @ 60 Hz with pixel clock 65000000 Hz
HDMI:EDID has only DVI support and no audio support
/opt/vc/bin/edidparser exited with code 0
how did you read this edid into a file? Use 'edid-decode' to see if this makes a difference.

Have you tried to add below to your config.txt?
hdmi_group=2
hdmi_mode=16

joyrider3774
Posts: 48
Joined: Sun Mar 13, 2016 12:21 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Sun May 03, 2020 11:24 am

aBUGSworstnightmare wrote:
Sun May 03, 2020 6:00 am

how did you read this edid into a file? Use 'edid-decode' to see if this makes a difference.

Have you tried to add below to your config.txt?
hdmi_group=2
hdmi_mode=16
using

Code: Select all

tvservice -d edid.dat
have not tried edid-decode.

But i had a great idea after reading that config_hdmi_boost value is ignored on the rpi4 and seeing a led on the lcd driver board indicating signal received never lights up. I was thinking the pi4's hdmi signal was not strong enough to power on the screen. so i had this hdmi switcher laying around which needed to be power up using extra power source and i attached it between rpi 4 screen cable and my rpi4 cable and hello screen turned on. To my amazement an hdmi switcher can actually amplify the hdmi signal. To make things even better i noticed that when i unhooked the power source of the hdmi switcher that leds on the hdmi switcher were still shining bright so i'm guessing hdmi cables can power devices sometimes and guess what even without a power source and the cables and hdmi switcher hooked up like before the screen still turns on.

I have now ordered a passive / non hdmi switcher signal amplifier and will see how that it goes. If it works i'll let you guys know about it

loscanones
Posts: 7
Joined: Sun May 17, 2020 5:12 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Mon May 18, 2020 10:54 am

Need some help with VGA output for a New Net City arcade monitor...
I`m using a PI 3 with VGA 666 adapter.
320 resolution timings-found on forums -working fine but cannot figure out how to change it to 640x480 ( dpi_mode=4 gave me a blank screen).
Tried various combinations but all with same result: blank screen.

used timings for 320x240:

dtoverlay=vga666
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
hdmi_timings=320 1 16 30 34 240 1 2 3 22 0 0 0 60 0 6400000 1 #240p

Any idea will be greatly appreciated.

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

Re: STICKY: HOWTO: Create Custom HDMI modes

Mon May 18, 2020 5:44 pm

What is your monitors resolution?
And ... you need ro change hdmi_timings to dpi_timings ... Because hdmi_timings us used for custom HDMi timing, means your DPI display wont be initialised at all

loscanones
Posts: 7
Joined: Sun May 17, 2020 5:12 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Tue May 19, 2020 8:24 am

Thanks for reply.
Monitor is arcade try sync 15/24/31 kHz Toshiba PF D29C051 (found on Sega New Net City). Actually i need it on 800x600-60hz resolution to play a short video.

So far i`ve got boot image with following settings (found on forums):

Code: Select all

hdmi_timings=960 1 24 96 120 248 1 3 10 6 0 0 0 60 0 19200000 1                -working     
hdmi_timings=968 1 24 96 120 288 1 10 10 10 0 0 0 50 0 19200000 1           -working
hdmi_timings=320 1 16 30 34 240 1 2 3 22 0 0 0 60 0 6400000 1 #240p       -working
dpi_timings=506 1 8 44 52 264 1 6 10 6 0 0 0 60 0 9600000 1                        -working
Tried to compute values for 800x600 on this page https://tomverbeure.github.io/video_timings_calculator
Still no image.
Used settings for 800x600:

Code: Select all

dpi_timings=800 0 24 72 96 600 0 3 10 14 0 0 0 50 0 19200000 1              not working
Looks like hdmi_timings is somehow initializing monitor, however i tested dpi_timings as suggested and got same results (some resolutions are working, some not).
Probably because i used "dpi" to define group-mode

Code: Select all

dpi_group=2
dpi_mode=87
It`s obvious i have wrong values but can`t figure out which ones...

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

Re: STICKY: HOWTO: Create Custom HDMI modes

Tue May 19, 2020 6:30 pm

loscanones wrote:
Tue May 19, 2020 8:24 am
Thanks for reply.
Monitor is arcade try sync 15/24/31 kHz Toshiba PF D29C051 (found on Sega New Net City). Actually i need it on 800x600-60hz resolution to play a short video.

So far i`ve got boot image with following settings (found on forums):

Code: Select all

hdmi_timings=960 1 24 96 120 248 1 3 10 6 0 0 0 60 0 19200000 1                -working     
hdmi_timings=968 1 24 96 120 288 1 10 10 10 0 0 0 50 0 19200000 1           -working
hdmi_timings=320 1 16 30 34 240 1 2 3 22 0 0 0 60 0 6400000 1 #240p       -working
dpi_timings=506 1 8 44 52 264 1 6 10 6 0 0 0 60 0 9600000 1                        -working
Tried to compute values for 800x600 on this page https://tomverbeure.github.io/video_timings_calculator
Still no image.
Used settings for 800x600:

Code: Select all

dpi_timings=800 0 24 72 96 600 0 3 10 14 0 0 0 50 0 19200000 1              not working
Looks like hdmi_timings is somehow initializing monitor, however i tested dpi_timings as suggested and got same results (some resolutions are working, some not).
Probably because i used "dpi" to define group-mode

Code: Select all

dpi_group=2
dpi_mode=87
It`s obvious i have wrong values but can`t figure out which ones...
you have no glue how this DPI thing is working, don't you?

Here's a timing for SVGA =800*600 (LQ121S1LG81)

dpi_timings=800 1 168 2 86 600 1 43 2 21 0 0 0 60 0 40000000 1
dpi_output_format=458791

loscanones
Posts: 7
Joined: Sun May 17, 2020 5:12 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Tue May 19, 2020 8:08 pm

I must confess: I`m an old man trying to learn a little bit of everything but realized that you cannot know everything, even after after a lifetime....
LQ121S1LG81 is LCD display and i have a CRT monitor. Totally different approach - as far as i understood...
Your suggestion return -unfortunately- same blank screen as the other ones....
Any more ideas, please?

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

Re: STICKY: HOWTO: Create Custom HDMI modes

Wed May 20, 2020 5:11 am

You are using a CRT monitor which is connected via VGA666 to the Raspberry's DPI interface.

This timing for SVGA is working, what you need to adjust is the magic number, because the one posted is for DPI24 = RGB88 = 8bit per color, but VGA666 only uses DPI18 = RGB666 = 6bit per color

maybe this is a good starting point for you https://github.com/PiSupply/Gert-VGA-666, with all the details on DPI here https://www.raspberrypi.org/documentati ... /README.md

Here on the forum you can look at viewtopic.php?t=94424

As you see: configuring the DPI in the right way is the solution, regardless if your 'target' is CRT or TFT

loscanones
Posts: 7
Joined: Sun May 17, 2020 5:12 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Wed May 20, 2020 9:43 am

As you see: configuring the DPI in the right way is the solution
what you need to adjust is the magic number
Thanks for this "wise sentences". I just woke up and realized i`m wasting time here.

Provided links i already checked BEFORE posting here and i must say this matter is poorly documented or completely missing.
Numerous forums held the same discussions about arcade CRT`s and so far i did not found any explanations or guide. Just confusion and
contradictions.
For example, this is mostly specified on forums and found on calculation sheets: h_front_porch+h_sync_pulse=h_back_porch ( settings tested by me -and working- are following this rule).
Your settings: 168+2=86, clear like fog, isn`t it? Is this rule applicable or not? Who`s wrong, you or the other guys?
By the way, seems that PI4 and old ones have different firmware, therefore output is not working the same way.

This being said, i`ll try with HDMI to VGA adapter and after that i`ll dump the project.
I do not intend to graduate in DPI programming just to get an image on monitor. There are always different ways to skin a cat.

Thanks again for stopping me wasting time here.

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

Re: STICKY: HOWTO: Create Custom HDMI modes

Wed May 20, 2020 12:36 pm

Well .... the question is 'who told you that 'Horizontal front porch + Horizontal Sync width = horiontal back porch'?

These values were defined during the TFT development process, and - by chance - your rule might be applicable.

And, as you were arguing on the timing shared by me, here are some details:
Horizontal Total (HT) = 1056
Horizontal active (HA) = 800
Horizontal front porch (HF)= 168
Horizontal sync pulse (HS)= 2
Horzontal Back porch (HB)= 86

HT = HB + HA + HS + HF = 86 + 2 + 168 + 800 --> calculate total yourself

Or, the Google Nexus 7 timing (HV070WX2-1E0, you can find the data sheet linked on this forum if you're interested in):
Horizontal Total (HT) = 864
Horizontal active (HA) = 800
Horizontal front porch (HF)= 16
Horizontal sync pulse (HS)= 16
Horzontal Back porch (HB)= 32

HT = HB + HA + HS + HF = 16 + 16 + 32 + 800
Here your rule applies by chance

But, do what you need to do! Good luck!
Last edited by aBUGSworstnightmare on Wed May 20, 2020 4:53 pm, edited 1 time in total.

loscanones
Posts: 7
Joined: Sun May 17, 2020 5:12 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Sun May 24, 2020 5:59 pm

Since this forum was a waste of time-for me- regarding the the problems encountered with PI running 31Khz on Arcade monitor i will -briefly- share my experience - in case other users need this info. I saw numerous posts with 0 -ZERO- answers - asking same questions as i did or even worst -wrong answers
Many articles are debating VGA monitors ( PC monitors and LCD monitors). Very few about TV used as monitor, and none about tri-sync monitors.
Many people never used PI on tri-sync but they keep advise and push settings suitable for LCD`s. Wrong.

I`m NOT a DPI master graduate specialist (like most of people here) but here is my experience:

-I did not used the "magic number" like everybody advised me. You don`t need it.
-A scope was used to check the Horizontal waveform generated by Pi with various settings. All settings found on forums were generating 15Khz. I wanted 31Khz for my video presentation. So i modified dpi_timings values for Horizontal ( there are 3 values, Front porch-
Sync pulse-Back porch ) until i`ve got 31.5Khz - the needed value. Nothing complicated - it took 5 minutes. Image was little bit out of phase to left (one inch) but this is just a detail to be adjusted later.
This way you can be sure you`re not ""frying"the monitor with wrong values and when you plug it there are no emotions: it will work.
-<pixel_freq> - set to 32Khz (32000000) even i read that you cannot use that value. It works even with small increments. Don`t know if the new firmware allows this changes since on old PI you cannot do it. This subject is not documented very well (from my point of view).

config settings:

Code: Select all

dtoverlay=vga666
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
dpi_timings= 800 1 62 66 88 480 1 13 3 32 0 0 0 61 0 32000000 1                  #ok 31khz
- Noticed that RPI output is 1,5V lower than should be for Arcade monitor (5V).
-Apparently this is creating a small issue while switching video signals between Mame PC and RPI (with a video switcher), sometimes it`s "bumpless" and sometimes it will take few seconds with blank and resolution change. 3.4V is too low and i will boost it to 5V.
-HDMI boost (as explained on various forums) is not working for VGA. Voltage remains the same. I probably made confusion while changed that parameter, it`s adjusting something else and not the voltage. It was just a thought.
-I used the scope to compare Sega Naomi console, MAME PC and RPI. Pictures attached.
RPI 3.jpg
Pi 3 with VGA666 adapter
RPI 3.jpg (178.72 KiB) Viewed 857 times
Mame PC.jpg
Mame PC - 31Khz
Mame PC.jpg (182.97 KiB) Viewed 857 times
Sega Naomi.jpg
Sega Naomi - 15Khz
Sega Naomi.jpg (120.27 KiB) Viewed 857 times
This info is posted just as reference. Feel free to use it or to delete my post. Your choice.

HeavyWeight
Posts: 1
Joined: Fri Jun 26, 2020 6:22 am

Re: STICKY: HOWTO: Create Custom HDMI modes

Fri Jun 26, 2020 6:25 am

mosoto wrote:
Tue Mar 12, 2019 12:53 am
I have a Samsung Ultra Widescreen Monitor s34e790c (3440 x 1440 resolution) and I was recently struggling to get it to work with my raspberry pi 3b+ at that resolution. I finally got it to work so I figured I'd share my findings here in case it helps anyone else.

Ultimately, what helped me the most was running:

Code: Select all

/opt/vc/bin/tvservice -d edid.dat; /opt/vc/bin/edidparser edid.dat
This dumped the various modes for the monitor including a 50hz 3440x1440 and a 30hz 3440x1440 which were unrecognized. Running at 30hz worked right off the bat with a custom hdmi timing.

Code: Select all

hdmi_drive=2
hdmi_ignore_edid=0xa5000080
hdmi_group=2
hdmi_mode=87
hdmi_timings=3440 0 48 32 80 1440 1 3 10 8 0 0 0 30 0 157788000 7
max_framebuffer_width=3440
max_framebuffer_height=1440
framebuffer_width=3440
framebuffer_height=1440
Trying to run it at 50hz, however, was another matter. The edidparser dump showed that this should be the timings:

Code: Select all

hdmi_timings=3440 1 48 32 80 1440 0 3 10 21 0 0 0 50 0 265320000 7
hdmi_pixel_freq_limit=265320000
I adjusted the hdmi pixel freq limit since I read in one of these pages that the limit is somewhere around 160mhz. Unfortunately, did this not work. The monitor would continously fail.

Ultimately, I found that I needed to overclock the raspberry pi to get it to work. I suppose this is too high a resolution for the standard raspberry pi settings. This is what I ended up using for the overclocking. I can't claim to understand all of it and I wouldn't recommend doing this but I'll paste them in case anyone wants to play around with it.

Code: Select all

gpu_mem=256
force_turbo=1
hdmi_ignore_cec_init=1
arm_freq=1050
core_freq=500
sdram_freq=600
over_voltage=6
gpu_freq=500
This page was useful in understanding some of this:
https://elinux.org/RPiconfig

With the overclock and I did get the monitor to work at 50hz though ultimately I reverted to 30hz as I'm not sure what the overclocking will do to the longevity of my pi.

Anyway, hope that is useful.
Having a similar issue with a Samsung 2013 LED Smart TV ( UN60F7100AFXZA)
Screen is half the LED other half does not display. 1920x1080 60hz

alanbork
Posts: 34
Joined: Thu Apr 23, 2020 11:18 pm

Re: Custom HDMI modes

Tue Jul 14, 2020 3:04 am

quarterturn wrote:
Fri Jan 01, 2016 5:43 pm
As a follow-up to my above post, I set the HDMI-component converter back up with my laptop and TV. I don't think the adapter can actually output an interlaced signal. With the following modeline "sudo xrandr --newmode "720x480@30i" 13.5 720 736 799 858 480 486 492 525 interlace -hsync -vsync" there is a nice, stable picture, but it's definitely not interlaced.

I could live with this for mame, where most games are fine with something like 200 or 240 lines, but I still have no idea how to set the custom mode. I guess if I really want this working right I'll have to try a different HDMI adapter.
I realize this is ancient (read 4 years old!) history, but did you ever get 480i output over x11 working? I'm trying to get it to work on the Pi4 without luck.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8757
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Custom HDMI modes

Tue Jul 14, 2020 6:54 am

alanbork wrote:
Tue Jul 14, 2020 3:04 am
quarterturn wrote:
Fri Jan 01, 2016 5:43 pm
As a follow-up to my above post, I set the HDMI-component converter back up with my laptop and TV. I don't think the adapter can actually output an interlaced signal. With the following modeline "sudo xrandr --newmode "720x480@30i" 13.5 720 736 799 858 480 486 492 525 interlace -hsync -vsync" there is a nice, stable picture, but it's definitely not interlaced.

I could live with this for mame, where most games are fine with something like 200 or 240 lines, but I still have no idea how to set the custom mode. I guess if I really want this working right I'll have to try a different HDMI adapter.
I realize this is ancient (read 4 years old!) history, but did you ever get 480i output over x11 working? I'm trying to get it to work on the Pi4 without luck.
If you're using xrandr to change modes then you need to have either "dtoverlay=vc4-fkms-v3d" or "dtoverlay=vc4-kms-v3d" in /boot/config.txt. vc4-kms-v3d isn't quite ready for use on the Pi4 as the hardware has changed significantly, but vc4-fkms-v3d gained support for interlaced modes a couple of weeks back.
Normal warnings apply over using rpi-update on non-critical systems, but that will give you a 5.4 kernel that supports it. Whether any hardware you attach to the HDMI output can handle interlacing is a different question.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

alanbork
Posts: 34
Joined: Thu Apr 23, 2020 11:18 pm

Re: Custom HDMI modes

Tue Jul 14, 2020 9:43 pm

6by9 wrote:
Tue Jul 14, 2020 6:54 am
If you're using xrandr to change modes then you need to have either "dtoverlay=vc4-fkms-v3d" or "dtoverlay=vc4-kms-v3d" in /boot/config.txt. vc4-kms-v3d isn't quite ready for use on the Pi4 as the hardware has changed significantly, but vc4-fkms-v3d gained support for interlaced modes a couple of weeks back.
Normal warnings apply over using rpi-update on non-critical systems, but that will give you a 5.4 kernel that supports it. Whether any hardware you attach to the HDMI output can handle interlacing is a different question.

Ok, I've tried this now. The result is kind of a mess, but perhaps useful as a debugging step?

root@raspberrypi:~# uname -a
Linux raspberrypi 5.4.51-v7l+ #1325 SMP Mon Jul 13 13:47:17 BST 2020 armv7l GNU/Linux

boot/config.txt:

dtoverlay=vc4-fkms-v3d
max_framebuffers=1
hdmi_force_hotplug=1
hdmi_group=1
hdmi_mode=6

result: boots into 480i, but seems to be rendering to a stretched 240p buffer- in the sense that every pixel (in the console anyway) is 2 tall and 1 wide. My TV handles true 480i just fine as outputted by the pi0. tvservice seems to suggest doubling too:

root@raspberrypi:~# tvservice -s
state 0xa [HDMI CEA (6) RGB lim 4:3 x2], 720x480 @ 60.00Hz, interlaced

480p is fine:

root@raspberrypi:~# tvservice -s
state 0xa [HDMI CEA (2) RGB lim 4:3], 720x480 @ 60.00Hz, progressive

not all interlaced is messed up:

Powering on HDMI with explicit settings (CEA mode 5)
root@raspberrypi:~# tvservice -s
state 0xa [HDMI CEA (5) RGB lim 16:9], 1920x1080 @ 60.00Hz, interlaced



can't test with x11: starting x11 just gives a blank screen, every time.


root@raspberrypi:~# startx


X.Org X Server 1.20.4
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.15.0-48-generic armv8l Raspbian
Current Operating System: Linux raspberrypi 5.4.51-v7l+ #1325 SMP Mon Jul 13 13:47:17 BST 2020 armv7l
Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1 video=HDMI-A-1:720x480M@60i,margin_left=32,margin_right=32,margin_top=32,margin_bottom=32 smsc95xx.macaddr=DC:A6:32:62:36:CA vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 console=tty1 root=PARTUUID=d3188030-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
Build Date: 05 June 2019 12:49:54PM
xorg-server 2:1.20.4-1+rpt1 (https://www.debian.org/support)
Current version of pixman: 0.36.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Jul 14 12:42:20 2020
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
Last edited by alanbork on Tue Jul 14, 2020 10:16 pm, edited 1 time in total.

alanbork
Posts: 34
Joined: Thu Apr 23, 2020 11:18 pm

Re: STICKY: HOWTO: Create Custom HDMI modes

Tue Jul 14, 2020 9:48 pm

errata: the console doesn't always come up on reboot now that I've updated to the new firmware. Plus, the behavior observed using tvservice actually is the same as it was on the old (raspbian default) firmware - doubled (x2) 480i.

which gives me an idea: maybe if i run startx 10 times one of them will actually work and not just give me a blank screen... And yes: it worked! but only for a minute, not long enough to add an interlaced mode and test it.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8757
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: STICKY: HOWTO: Create Custom HDMI modes

Wed Jul 15, 2020 6:44 am

Looking at https://github.com/raspberrypi/linux/bl ... did.c#L749, CEA modes 5 & 6 both have DRM_MODE_FLAG_DBLCLK set, and that's not currently plumbed in. That would explain your stretch.
I'll see what I can do about supporting it.

And now I see your double posting on viewtopic.php?f=29&t=279978 as well. Please don't. I'm now ignoring this thread.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “Advanced users”