Jetson TK1 Android HDMI to DVI issue

Hi,

I am using Jetson TK1 for Android. I am facing an issue display resolution mismatch issue for HDMI to DVI. The below is the link for snapshot of the issue.

https://drive.google.com/open?id=0B4bn5jgyjOp6RFpyblFzVTAya00

Below are my observation on this issue.

  1. It seems that 480P resolution is set by Android even though my monitor supports 1600 X 900
  2. This issue occurring for all the same type of Monitor. (Here I am using Dell )
  3. When I tested with another monitor (Acer) this issue is not occurring.
  4. This issue is not happening in HDIM monitor. Only happening when using HDMI to DVI that too for certain monitors alone.
  5. When I look into the log message using logcat it seems hwcomposer is setting the wrong resolution. See below for the log messsge.
(standard input):87:D/hwcomposer(  145): Composite policy set to: auto
(standard input):88:D/hwcomposer(  145): composite_fallback set to: 1
(standard input):89:D/hwcomposer(  145): Overriding minimum_fps, new value = 8
(standard input):90:D/hwcomposer(  145): imp_enable set to: 1
(standard input):91:D/hwcomposer(  145): Display 0: found 1 modes
(standard input):92:D/hwcomposer(  145): matched: 1920 x 1200 @ 59.98 Hz
(standard input):93:D/hwcomposer(  145): display type 0: vblank period = 16671166 ns
(standard input):94:D/hwcomposer(  145): dc_blank: display 0, [-1 -> 1]
(standard input):100:D/hwcomposer(  145): Display 1: found 12 modes
(standard input):101:D/hwcomposer(  145): unmatched: 1600 x 900 @ 59.98 Hz
(standard input):102:D/hwcomposer(  145): unmatched: 720 x 400 @ 70.05 Hz
(standard input):103:D/hwcomposer(  145): matched: 640 x 480 @ 60.00 Hz
(standard input):104:D/hwcomposer(  145): unmatched: 640 x 480 @ 75.00 Hz
(standard input):105:D/hwcomposer(  145): unmatched: 800 x 600 @ 60.32 Hz
(standard input):106:D/hwcomposer(  145): unmatched: 800 x 600 @ 75.00 Hz
(standard input):107:D/hwcomposer(  145): unmatched: 1024 x 768 @ 60.01 Hz
(standard input):108:D/hwcomposer(  145): unmatched: 1024 x 768 @ 75.08 Hz
(standard input):109:D/hwcomposer(  145): unmatched: 1280 x 1024 @ 75.03 Hz
(standard input):110:D/hwcomposer(  145): unmatched: 1152 x 864 @ 75.00 Hz
(standard input):111:D/hwcomposer(  145): unmatched: 1280 x 1024 @ 60.02 Hz
(standard input):112:D/hwcomposer(  145): unmatched: 1600 x 900 @ 59.99 Hz
(standard input):113:W/hwcomposer(  145): No supported resolution higher than 3, use Max resolution
(standard input):114:D/hwcomposer(  145): display type 1: vblank period = 16666440 ns
(standard input):115:D/hwcomposer(  145): dc_blank: display 1, [-1 -> 1]
(standard input):116:D/hwcomposer(  145): Setting vblank display to Internal, new vblank period 16671166 ns
(standard input):117:E/hwcomposer(  145): /sys/devices/platform/host1x/tegradc.0/smartdimmer/enable: open failed: Permission denied
(standard input):118:E/hwcomposer(  145): Failed to set initial DIDIM status to enable
(standard input):119:E/hwcomposer(  145): /sys/devices/platform/host1x/tegradc.0/smartdimmer/aggressiveness: open failed: Permission denied
(standard input):120:E/hwcomposer(  145): Failed to set DIDIM aggressiveness
(standard input):121:D/hwcomposer(  145): Creating nvcap video capture service
(standard input):122:D/hwcomposer(  145): display type 2: vblank period = 16666214 ns
(standard input):123:D/hwcomposer(  145): Display 0 layer clip is 1920 x 1200
(standard input):124:D/hwcomposer(  145): Display 0 device clip is 1920 x 1200
(standard input):125:W/hwcomposer(  145): No supported resolution higher than 3, use Max resolution
(standard input):126:D/hwcomposer(  145): Display 1 layer clip is 640 x 480
(standard input):127:D/hwcomposer(  145): Display 1 device clip is 640 x 480
(standard input):129:D/hwcomposer(  145): config[0].x = 1920
(standard input):130:D/hwcomposer(  145): config[0].y = 1200
(standard input):131:D/hwcomposer(  145): config[1].x = 640
(standard input):132:D/hwcomposer(  145): config[1].y = 480
(standard input):152:D/hwcomposer(  145): hwc_blank: display 0: unblank
(standard input):153:D/hwcomposer(  145): hwc_blank_display: display 0: [1 -> 0]
(standard input):154:D/hwcomposer(  145): Display 0 layer clip is 1920 x 1200
(standard input):155:D/hwcomposer(  145): Display 0 device clip is 1920 x 1200
(standard input):156:D/hwcomposer(  145): dc_blank: display 0, [1 -> 0]

So can you please explain me, why this issue is occurring and how to solve this issue?

Thanks
Gopinath S

I’m not sure how to debug under Android, but the log obviously shows that EDID is being read…apparently the monitor is responding with modes it is capable of, but most of the modes are being rejected. This tends to validate that EDID is reading ok.

Sometimes cables have issues with causing EDID read failure for whatever reason…perhaps the monitor is newer and the DVI-HDMI adapter is older and the standards end up being insufficient for proper passing of EDID, but in general DVI is not an issue (cables do turn up as an issue at times, which includes DVI adapters). Because EDID was indirectly showing through the log that it was read, I doubt this is the problem.

In many cases the monitor itself will indicate compatibility with some modes which do not fit nicely onto the screen. When that happens the monitor works but some portion of an edge is clipped. I suspect that the mode you are looking at has that issue and that the monitor just does not work as an exact fit to that mode.

As to all of the other modes which were shown available but rejected I don’t know where to work on that. Possibly the kernel driver…I do not know much about Android.

Hi,

Thanks for the suggestion. Here are few other observations and updates.

  1. We are using same kernel for both android and Linux Jetson TK1. The same monitor is working fine in Linux Jetson TK1. Its means kernel driver is supporting that monitor and resolution.

  2. Also no issues with cable. Same cable working fine in other monitors.

  3. The log messages are from hwcomposer (hwcomposer.tegra.so) it seems.

  4. Also I am able set the kernel driver resolution manually to any value ( here 1600 X 900 @ 60P ). But even though the hwcomposer still in 640 x 480 @ 60.00 Hz. So output is not good.

  5. Below are the different monitors working fine in Android.

Dell

Dell ST2420L
Dell E2214H

Acer
acer S220HQL
acer V203H
acer S240HL

So far Dell IN2030M is not working.

Does it means, hwcomposer.tegra.so is not supporting for this monitor? Also we don’t have source code for hwcomposer.tegra.so.

May be issues with hwcomposer.tegra.so ?

Regards,

Gopinath

hwcomposer.tegra.so is part of Android, and does not exist in L4T. So I assume source code for that is available via Android, and is consistent with the idea that this file is the issue since the monitor works outside of Android (e.g., L4T). It seems as though what you need is a debug version of that library, or at least a version with logging in which you can add logging statements to. I have no knowledge of how Android deals with graphics, e.g., compared to ordinary X11 on Linux, but I have to wonder about this as well because it is generally the graphics software which looks for and sets up for different video modes.

I am facing the same issue.

I have a HDMI monitor with 1920x1920 resolution and plug into Jetson TK1,
but when I run Android on Jetson TK1 the screen is output with 1920x1080 resolution.

I type adb logcat and see the hwcomposer log with edid info:

D/hwcomposer(  140): hdmi_primary set to: 1

D/hwcomposer(  140): cursor_enable set to: 1

D/hwcomposer(  140): didim_enable set to: 1

D/hwcomposer(  140): didim_normal set to: 3

D/hwcomposer(  140): didim_video set to: 5

W/hwcomposer(  140): Invalid display_resolution property: ""

D/hwcomposer(  140): HDMI preferred resolution set to: Max_60Hz

D/hwcomposer(  140): Compositor set to: glcomposer

D/hwcomposer(  140): Composite policy set to: auto

D/hwcomposer(  140): composite_fallback set to: 1

D/hwcomposer(  140): Overriding minimum_fps, new value = 8

D/hwcomposer(  140): imp_enable set to: 1

D/hwcomposer(  140): void nvfb_event_process_pipe(void*): processing pipe fd

E/hwcomposer(  140): failed to enumerate adf devices: Success

D/hwcomposer(  140): Using DC driver

D/hwcomposer(  140): void nvfb_event_process_pipe(void*): processing pipe fd

D/hwcomposer(  140): Display 0: found 1 modes

D/hwcomposer(  140): display type 0: vblank period = 16671166 ns

D/hwcomposer(  140): virtual int dc_display::set_blank(int): display 0, [1 -> 1]

D/hwcomposer(  140): Display 1: found 18 modes

D/hwcomposer(  140): unmatched: 1920 x 1920 @ 59.96 Hz

D/hwcomposer(  140): unmatched: 1920 x 1920 @ 29.94 Hz

D/hwcomposer(  140): unmatched: 720 x 400 @ 70.05 Hz

D/hwcomposer(  140): matched: 640 x 480 @ 60.00 Hz

D/hwcomposer(  140): unmatched: 800 x 600 @ 60.32 Hz

D/hwcomposer(  140): unmatched: 1024 x 768 @ 60.01 Hz

D/hwcomposer(  140): unmatched: 1920 x 1200 @ 60.00 Hz

D/hwcomposer(  140): matched: 1920 x 1080 @ 60.00 Hz

D/hwcomposer(  140): unmatched: 1600 x 1200 @ 60.01 Hz

D/hwcomposer(  140): unmatched: 1600 x 900 @ 59.99 Hz

D/hwcomposer(  140): unmatched: 1280 x 1024 @ 60.02 Hz

D/hwcomposer(  140): unmatched: 1280 x 960 @ 60.00 Hz

D/hwcomposer(  140): matched: 1280 x 720 @ 59.67 Hz

D/hwcomposer(  140): unmatched: 2048 x 2048 @ 59.43 Hz

D/hwcomposer(  140): matched: 1920 x 1080 @ 60.00 Hz

D/hwcomposer(  140): matched: 1280 x 720 @ 60.00 Hz

D/hwcomposer(  140): matched: 720 x 480 @ 59.94 Hz

D/hwcomposer(  140): unmatched: 640 x 480 @ 61.05 Hz

D/hwcomposer(  140): display type 1: vblank period = 16666650 ns

E/hwcomposer(  140): HDCP: hdcp_open failed, error 1

D/hwcomposer(  140): Setting vblank display to Internal, new vblank period 16666650 ns

D/hwcomposer(  140): display type 2: vblank period = 0 ns

W/hwcomposer(  140): failed to load libnvcap_video.so: dlopen failed: library "libnvcap_video.so" not found

D/hwcomposer(  140): Display 0 layer size is 1920 x 1080

D/hwcomposer(  140): Display 0 device size is 1920 x 1080

D/hwcomposer(  140): Display 0 device clip is (0, 0, 1920, 1080)

D/hwcomposer(  140): config[0].x = 1920

D/hwcomposer(  140): config[0].y = 1080

D/hwcomposer(  140): int hwc_blank(hwc_composer_device_1*, int, int): display 0: unblank

D/hwcomposer(  140): void hwc_blank_display(nvhwc_context*, int, int): display 0: [1 -> 0]

D/hwcomposer(  140): Display 0 device size is 1920 x 1080

D/hwcomposer(  140): Display 0 device clip is (0, 0, 1920, 1080)

D/hwcomposer(  140): virtual int dc_display::set_blank(int): display 1, [1 -> 0]

The log shows the monitor supports 1920x1920 resolution, but there is a “unmatched” log but I don’t understand what it means.

And there is another problem that the Android SurfaceFlinger only render the 1920x1080 buffer:

h/w composer state:

  h/w composer present and enabled

Hardware Composer state (version 01030000):

  mDebugForceFakeVSync=0

  Display[0] configurations (* current):

    * 0: 1920x1080, xdpi=320.000000, ydpi=320.000000, refresh=16666650

  numHwLayers=6, flags=00000000

    type   |  handle  | hint | flag | tr | blnd |   format    |     source crop (l,t,r,b)      |          frame         | name 

-----------+----------+------+------+----+------+-------------+--------------------------------+------------------------+------

       HWC | b6317f00 | 0000 | 0000 | 00 | 0100 | RGBA_8888   |    0.0,  125.0, 1920.0, 1132.0 |    0,   25, 1920, 1032 | com.android.systemui.ImageWallpaper

       HWC | b3f633c0 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |    0.0,   25.0, 1920.0, 1032.0 |    0,   25, 1920, 1032 | com.android.launcher/com.android.launcher2.Launcher

       HWC | b2314c80 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |    0.0,    0.0, 1920.0,   25.0 |    0,    0, 1920,   25 | StatusBar

       HWC | b23148c0 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |    0.0,    0.0, 1920.0,   48.0 |    0, 1032, 1920, 1080 | NavigationBar

       HWC | b34c6940 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |    0.0,    0.0,   22.0,   28.0 | 1007,  754, 1029,  782 | Sprite

 FB TARGET | b4dcf400 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |    0.0,    0.0, 1920.0, 1080.0 |    0,    0, 1920, 1080 | HWC_FRAMEBUFFER_TARGET

  Nvidia HWC:

    Display 0 (PRIMARY):

	Resolution: 1920 x 1080

	Blank: false

	Protected: false

	Compositor: glcomposer

	Composition: 5 layers in a scratch buffer

	Window 0 (phys 2 caps 63): unused

	Window 1 (phys 1 caps 63): unused

	Window 2 (phys 0 caps 99 blend 0x105 xform 0x0): scratch containing 5 layers

		src (0.0,0.0,1920.0,1080.0), dst (0.0,0.0,1920.0,1080.0)

	Cursor (max 256): unused

    Display 1 (EXTERNAL):

	disabled

    Composite policy: auto

    Idle machine: detection enabled, composite enabled

Allocated buffers:

0xb2314780:  360.00 KiB | 1920 (1920) x   48 |        1 | 0x00000b00

0xb23148c0:  360.00 KiB | 1920 (1920) x   48 |        1 | 0x00000b00

0xb2314c80:  187.50 KiB | 1920 (1920) x   25 |        1 | 0x00000b00

0xb34c4280: 7740.00 KiB | 1920 (1920) x 1032 |        1 | 0x00000b00

0xb34c4780: 7740.00 KiB | 1920 (1920) x 1032 |        1 | 0x00000b00

0xb34c6940:    7.00 KiB |   22 (  64) x   28 |        1 | 0x00008933

0xb34c6bc0:  360.00 KiB | 1920 (1920) x   48 |        1 | 0x00000b00

0xb3f633c0: 7740.00 KiB | 1920 (1920) x 1032 |        1 | 0x00000b00

0xb3ff9d40:  187.50 KiB | 1920 (1920) x   25 |        1 | 0x00000b00

0xb3ff9e80: 8100.00 KiB | 1920 (1920) x 1080 |        1 | 0x00001a00

0xb4dcf400: 8100.00 KiB | 1920 (1920) x 1080 |        1 | 0x00001a00

0xb6317500:    0.25 KiB |    1 (  64) x    1 |        1 | 0x00000933

0xb6317780:  187.50 KiB | 1920 (1920) x   25 |        1 | 0x00000b00

0xb6317f00: 9600.00 KiB | 1920 (1920) x 1280 |        1 | 0x00000b00

0xb652a3c0: 8100.00 KiB | 1920 (1920) x 1080 |        1 | 0x00000933

Total allocated (estimate): 58769.75 KB

Nvidia Gralloc

	Compression: on

	Decompression: lazy

	GPU mapping cache: on

	Continuous property scan: off

After I google this problem in the internet, I found a system property called “persist.sys.display.resolution” can adjust the SurfaceFlinger buffer size.

I set this property to 1920x1920 and rebuild and run Android. The logcat shows:

D/hwcomposer(  138): hdmi_primary set to: 1

D/hwcomposer(  138): cursor_enable set to: 1

D/hwcomposer(  138): didim_enable set to: 1

D/hwcomposer(  138): didim_normal set to: 3

D/hwcomposer(  138): didim_video set to: 5

D/hwcomposer(  138): Null display size set to: 1920x1920

D/hwcomposer(  138): HDMI preferred resolution set to: Max_60Hz

D/hwcomposer(  138): Compositor set to: glcomposer

D/hwcomposer(  138): Composite policy set to: auto

D/hwcomposer(  138): composite_fallback set to: 1

D/hwcomposer(  138): Overriding minimum_fps, new value = 8

D/hwcomposer(  138): imp_enable set to: 1

E/hwcomposer(  138): failed to enumerate adf devices: Success

D/hwcomposer(  138): Using DC driver

D/hwcomposer(  138): Display 0: found 1 modes

D/hwcomposer(  138): display type 0: vblank period = 16671166 ns

D/hwcomposer(  138): void nvfb_event_process_pipe(void*): processing pipe fd

D/hwcomposer(  138): void nvfb_event_process_pipe(void*): processing pipe fd

D/hwcomposer(  138): virtual int dc_display::set_blank(int): display 0, [1 -> 1]

D/hwcomposer(  138): Display 1: found 18 modes

D/hwcomposer(  138): unmatched: 1920 x 1920 @ 59.96 Hz

D/hwcomposer(  138): unmatched: 1920 x 1920 @ 29.94 Hz

D/hwcomposer(  138): unmatched: 720 x 400 @ 70.05 Hz

D/hwcomposer(  138): matched: 640 x 480 @ 60.00 Hz

D/hwcomposer(  138): unmatched: 800 x 600 @ 60.32 Hz

D/hwcomposer(  138): unmatched: 1024 x 768 @ 60.01 Hz

D/hwcomposer(  138): unmatched: 1920 x 1200 @ 60.00 Hz

D/hwcomposer(  138): matched: 1920 x 1080 @ 60.00 Hz

D/hwcomposer(  138): unmatched: 1600 x 1200 @ 60.01 Hz

D/hwcomposer(  138): unmatched: 1600 x 900 @ 59.99 Hz

D/hwcomposer(  138): unmatched: 1280 x 1024 @ 60.02 Hz

D/hwcomposer(  138): unmatched: 1280 x 960 @ 60.00 Hz

D/hwcomposer(  138): matched: 1280 x 720 @ 59.67 Hz

D/hwcomposer(  138): unmatched: 2048 x 2048 @ 59.43 Hz

D/hwcomposer(  138): matched: 1920 x 1080 @ 60.00 Hz

D/hwcomposer(  138): matched: 1280 x 720 @ 60.00 Hz

D/hwcomposer(  138): matched: 720 x 480 @ 59.94 Hz

D/hwcomposer(  138): unmatched: 640 x 480 @ 61.05 Hz

D/hwcomposer(  138): display type 1: vblank period = 16666650 ns

E/hwcomposer(  138): HDCP: hdcp_open failed, error 1

D/hwcomposer(  138): Setting vblank display to Internal, new vblank period 16666650 ns

D/hwcomposer(  138): display type 2: vblank period = 0 ns

W/hwcomposer(  138): failed to load libnvcap_video.so: dlopen failed: library "libnvcap_video.so" not found

D/hwcomposer(  138): Display 0 layer size is 1920 x 1920

D/hwcomposer(  138): Display 0 device size is 1920 x 1080

D/hwcomposer(  138): Display 0 device clip is (420, 0, 1500, 1080)

D/hwcomposer(  138): config[0].x = 1920

D/hwcomposer(  138): config[0].y = 1080

D/hwcomposer(  138): int hwc_blank(hwc_composer_device_1*, int, int): display 0: unblank

D/hwcomposer(  138): void hwc_blank_display(nvhwc_context*, int, int): display 0: [1 -> 0]

D/hwcomposer(  138): Display 0 device size is 1920 x 1080

D/hwcomposer(  138): Display 0 device clip is (420, 0, 1500, 1080)

D/hwcomposer(  138): virtual int dc_display::set_blank(int): display 1, [1 -> 0]

The log of dumpsys SurfaceFlinger shows SurfaceFlinger render the 1920x1920 buffer:

h/w composer state:

  h/w composer present and enabled

Hardware Composer state (version 01030000):

  mDebugForceFakeVSync=0

  Display[0] configurations (* current):

    * 0: 1920x1920, xdpi=320.000000, ydpi=320.000000, refresh=16666650

  numHwLayers=3, flags=00000000

    type   |  handle  | hint | flag | tr | blnd |   format    |     source crop (l,t,r,b)      |          frame         | name 

-----------+----------+------+------+----+------+-------------+--------------------------------+------------------------+------

       HWC | b6417b40 | 0000 | 0000 | 00 | 0100 | RGBA_8888   |    0.0,    0.0, 1920.0, 1920.0 |    0,    0, 1920, 1920 | com.android.systemui.ImageWallpaper

       HWC | b6418040 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |    0.0,    0.0, 1920.0, 1920.0 |    0,    0, 1920, 1920 | StatusBar

 FB TARGET | b40f9e80 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |    0.0,    0.0, 1920.0, 1920.0 |    0,    0, 1920, 1920 | HWC_FRAMEBUFFER_TARGET

  Nvidia HWC:

    Display 0 (PRIMARY):

	Resolution: 1920 x 1080

	Blank: false

	Protected: false

	Compositor: glcomposer

	Composition: 2 layers in a scratch buffer

	Window 0 (phys 2 caps 63): unused

	Window 1 (phys 1 caps 63): unused

	Window 2 (phys 0 caps 99 blend 0x105 xform 0x0): scratch containing 2 layers

		src (0.0,0.0,1080.0,1080.0), dst (420.0,0.0,1500.0,1080.0)

	Cursor (max 256): unused

    Display 1 (EXTERNAL):

	disabled

    Composite policy: auto

    Idle machine: detection enabled, composite enabled

Allocated buffers:

0xb35c4280: 14400.00 KiB | 1920 (1920) x 1920 |        1 | 0x00000b00

0xb40f9e80: 14400.00 KiB | 1920 (1920) x 1920 |        1 | 0x00001a00

0xb4dcf400: 14400.00 KiB | 1920 (1920) x 1920 |        1 | 0x00001a00

0xb6417b40: 14400.00 KiB | 1920 (1920) x 1920 |        1 | 0x00000b00

0xb6417dc0: 14040.00 KiB | 1920 (1920) x 1872 |        1 | 0x00000b00

0xb6417f00: 14040.00 KiB | 1920 (1920) x 1872 |        1 | 0x00000b00

0xb6418040: 14400.00 KiB | 1920 (1920) x 1920 |        1 | 0x00000b00

0xb662a3c0:    0.25 KiB |    1 (  64) x    1 |        1 | 0x00000933

0xb662a500: 14400.00 KiB | 1920 (1920) x 1920 |        1 | 0x00000933

0xb662ab40: 14040.00 KiB | 1920 (1920) x 1872 |        1 | 0x00000b00

Total allocated (estimate): 128520.25 KB

Nvidia Gralloc

	Compression: on

	Decompression: lazy

	GPU mapping cache: on

	Continuous property scan: off

There still a problem is that hwcomposer still use 1920x1080 resolution output and the “unmatched” log still exist.

Does anyone know how to solve this problem ?
Is there have any system property I can set or any method I can try to adjust hwcomposer to output with right resolution ?

I saw this in another thread…but basically I wonder if 1920x1920 even exists…1920x1080 is valid, but to get 1920x1920 you need a custom monitor and custom edited EDID. Are you sure 1920x1920 is really the monitor’s resolution? Is this a special monitor of some sort?

Yes, it’s a special monitor and I can see the 1920x1920 option in the /sys/graphic/fbx/modes.

After I force change sysfs mode setting to 1920x1920 resolution, the monitor is change to 1920x1920 resolution but hwcomposer still render the buffer with 1920x1080 resolution.

Unfortunately I know far less about Android. One thing I’m wondering is if some of the modes are in software framebuffer only? Does the Android support installing of or query with the equivalent of “glxinfo”?