Force resolution on VGA monitor using HDMI to VGA adapter

Hi,

I am on a Jetson AGX Xavier dev kit and need to display a 640x480 image on a 640x480 VGA monitor with the X server turned off (I’m booting in text mode). To hook up the monitor on the dev kit, I use a HDMI to VGA adapter (TRIPP LITE model P131-06N).

Now I list the supported modes with:

cat /sys/class/graphics/fb0/modes

but I have the same results from that command either if I plug only the HDMI->VGA adapter or if I plug the HDMI->VGA adapter + VGA monitor, so I am guessing the listed modes are those exposed by the HDMI->VGA adapter only and 640x480 resolution is not part of that list.

The monitor is currently displaying at a resolution listed by the adapter.

$ cat /sys/class/graphics/fb0/mode
U:1024x768p-60

I need to force that resolution to 640x480.

I tried setting the resolution with:

echo 4 > /sys/class/graphics/fb0/blank  # Turn screen off
echo "V:640x480p-60" > /sys/class/graphics/fb0/mode  # Set text console resolution
echo 0 > /sys/class/graphics/fb0/blank  # Turn screen on

While this is working on another HDMI monitor that I got (no adapter involved), it does not on the VGA monitor. As soon as I plug the HDMI->VGA adapter, the resolution falls back to U:1024x768p-60. Is there a way I can force the resolution to 640x480 permanently?

Another thing I tried is I plugged the VGA monitor to a VGA port on a Windows PC (no adapter involved here) and I can force the 640x480 resolution successfully.

The monitor is a “near eye display” and is not the kind that is widely available commercially. Changing that monitor is not an option.

More details here. The following commands were done with the HDMI to VGA adapter + VGA monitor connected.

$ dmesg | grep hdmi
[    0.920117] vdd-hdmi-5v0: 5000 mV
[    1.782632] tegradc 15200000.nvdisplay: hdmi: invalid prod list prod_list_hdmi_board
[    1.782641] tegradc 15200000.nvdisplay: hdmi: tegra_hdmi_tmds_range_read(bd) failed
[    2.998440] tegradc 15200000.nvdisplay: hdmi: plugged
$ cat /sys/class/graphics/fb0/modes
D:1024x768p-60
D:1920x1080p-60
D:1360x768p-60
V:1024x768p-60
S:1280x1024p-60
S:1280x960p-60
S:1280x800p-60
S:1440x900p-60
S:1280x1024p-85
S:1280x720p-60
U:1280x720p-120
S:1440x900p-75
D:720x480p-59
U:1920x1080p-60
U:720x480p-59
S:1280x720p-60
U:1920x1080p-60
$ cat /sys/class/graphics/fb0/mode
U:1024x768p-60
$ sudo find /sys/ -name edid
/sys/kernel/debug/tegradc.2/edid
/sys/kernel/debug/tegradc.1/edid
/sys/kernel/debug/tegradc.0/edid
$ sudo cat /sys/kernel/debug/tegradc.0/edid
 00 ff ff ff ff ff ff 00 04 ef 01 00 31 30 4e 43
 2d 17 01 03 a0 1e 17 61 ea e4 de 9e 54 4a 97 23
 1c 4c 54 00 08 00 81 80 81 40 81 00 01 01 95 00
 01 01 01 01 01 01 64 19 00 40 41 00 26 30 18 88
 36 00 00 c0 10 00 00 18 02 3a 80 18 71 38 2d 40
 58 2c 45 00 dd 0c 11 00 00 1e 66 21 50 b0 51 00
 1b 30 40 70 36 00 32 31 34 00 00 1e 00 00 00 fa
 00 81 99 81 c0 81 fc 01 01 01 01 95 0f 0a 01 3c
 02 03 1b 61 23 09 07 07 83 01 00 00 67 03 0c 00
 20 00 80 2d 43 90 84 02 e2 00 0f 8c 0a d0 8a 20
 e0 2d 10 10 3e 96 00 a0 5a 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 29
$ sudo cat /sys/kernel/debug/tegradc.1/edid
No EDID
$ sudo cat /sys/kernel/debug/tegradc.2/edid
No EDID

I used the EDID reader at http://www.edidreader.com/ to parse the data and I can see that the Timing Bitmap is listing 640x480 (see figure below)

Can you paste the full log without changing anything? I mean you just connect the monitor and turn on the xavier. Do no change anything on fb0.

Also, please do not parse any log when you don’t know which info is really needed.

Ok, so I plugged in the VGA monitor via the HDMI to VGA adapter and booted. Here is the log.
log.txt (69.5 KB)

It looks like the display driver is not able to get programmed correctly.

2.643927] tegradc 15200000.nvdisplay: dc_poll_register 0x41: timeout
[ 2.643931] tegradc 15200000.nvdisplay: timeout waiting for postcomp init state to promote
[ 2.695924] tegradc 15200000.nvdisplay: dc_poll_register 0x41: timeout
[ 2.695927] tegradc 15200000.nvdisplay: timeout waiting for win assignments to promote
[ 2.695930] tegradc 15200000.nvdisplay: tegra_nvdisp_head_enable, failed head enable
[ 2.695941] tegradc 15200000.nvdisplay: update windows ret = -14
[ 2.695944] tegradc 15200000.nvdisplay: sync windows ret = -14
[ 2.698750] extcon-disp-state external-connection:disp-state: cable 51 state 1

Actually, we don’t validate any adapters over jetson. Thus, we don’t guarantee the functionality of it.

If possible, please use native HDMI monitor.

Hi WayneWWW,

Thank you very much for your help.

As I said in my first post. The VGA monitor is in fact a military “near eye display” and changing it is not an option.

I know this is feasible with some tweaks, but I am not a linux guru yet ;) I get that the EDID data from the monitor doesn’t get through the HDMI to VGA adapter, but there must be a way to force the display driver to output a specific resolution (640x480)? Can I configure the display driver to ignore EDID?

Can you try a hotplug case and tell me if you can see anything on the screen in such case? or can you tell me did you see anything on the screen so far? Please just use pure jetpack release without modifying anything.

Boot up the device without connecting any monitor. Connect the cable after you are sure that the device is booting into kernel.

If you can see the screen in such case, then show me the log again.

So I booted up the device without any monitor connected. Then I hotplugged the monitor. Here is the log below.

log_hotplug.txt (70.1 KB)

I can see the console on the monitor but it is not the right resolution:

$ cat /sys/class/graphics/fb0/mode
U:1024x768p-60

Why do you only see the “console”? Are you sure you are using pure jetpack release without modification?

Start from the GUI desktop first please.

Like I said in my first post, I’m booting in text mode (no X server). I configured this behavior with the following command:

$ sudo systemctl set-default multi-user.target
Removed /etc/systemd/system/default.target.
Created symlink /etc/systemd/system/default.target -­> /lib/systemd/system/multi-user.target

The application we are developing is displaying directly on the framebuffer. I need to force the framebuffer resolution to 640x480.

Thanks for your help

Please fallback to graphic mode. And check the result from xrandr first.

That is why I said using the pure jetpack.