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.
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.
Before investing time to backup my current OS image and flash the board back with a fresh installation of Jetpack, I just started back the GUI desktop as follow:
$ sudo systemctl start gdm3.service
then I run xrandr with the VGA monitor plugged in. Here is the output:
$ xrandr
Screen 0: minimum 8 x 8, current 1024 x 768, maximum 32767 x 32767
HDMI-0 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 300mm x 230mm
1024x768 60.01*+
1920x1080 60.00 59.95
1440x900 74.99 59.89
1360x768 60.02
1280x1024 85.03 60.00
1280x960 60.00
1280x800 59.81
1280x720 120.00 60.00 59.94
720x480 59.94
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
The fact is even though tegra can get your monitor edid (in hotplug case), It does not have a 640x480 mode on the list. Xrandr does not have it and previously the “modes” inside the sysfs also doesn’t have 640x480.
If you still want to check, we can dig into why it does not appear in the kernel driver. However, this requires you to add some debug print, re-build the kernel and apply it to the device.
I am not sure if you are okay to do that. The basic logic here is, if one specific mode does not appear inside the list, while your edid says it has, it probably means the mode timing from the edid is rejected by the tegra display driver.
If a mode is rejected by the driver, it probably means that mode violates some timing restriction inside the driver. I wouldn’t suggest to try that mode anymore.
However, if you still want to hack it and don’t care about the output gives out some noise on the screen, then you can go further.
Tegra does not get the EDID from my monitor as the HDMI to VGA adapter overwrites it by sending its own EDID data to Tegra (the ones you see listed above with xrandr). I’ve never seen the EDID from my VGA monitor, but I know from the datasheet that this monitor is doing 640x480. Also, when I plug a regular HDMI screen to the board, xrandr is listing the 640x480 mode.
Do you think that another HDMI to VGA adapter could do what I need? If not, I will appreciate some guidance about how to hack it.
From the beginning I said we don’t validate any HDMI to VGA adapter.
So the answer from me is negative. I don’t know if changing another adapter would get what you want or not. Maybe work, maybe not.
If you are really sure about this monitor can output 640x480, you can use the fallback method to write a hack edid inside the driver.