HDMI disabled in Android - how to enable?


#21

Here is some more detailed information from another EDID tool:

Vendor/Product Identification:

	Monitor Name : 	MPI5008
	Monitor Serial Number : 	B3432845
	Manufacturer Name : 	MPI
	Product Id : 	5008
	Serial Number : 	16843009
	Week Of Manufacture : 	34
	Year Of Manufacture : 	2011
	EDIDVersion : 	V1.3
	Number Of Extension Flag : 	1

Display parameters:

	Video Input Definition : 	Digital Signal
	DFP1X Compatible Interface : 	False
	Max Horizontal Image Size : 	410 mm
	Max Vertical Image Size : 	260 mm
	Max Display Size : 	19.1 Inches

Power Management and Features:

	Standby : 	Supported
	Suspend : 	Supported
	ActiveOff : 	Supported
	Video Input : 	1
	sRGB Default ColorSpace : 	True
	Default GTF : 	Not Supported
	Prefered Timing Mode : 	True

Gamma/Color and Etablished Timings:

	Display Gamma : 	2.2
	Red : 	x = 0.64 - y = 0.334
	Green : 	x = 0.286 - y = 0.599
	Blue : 	x = 0.154 - y = 0.077
	White : 	x = 0.313 - y = 0.329

	Etablished Timings : 	
		640 x 480 @ 75Hz (VESA)
		640 x 480 @ 72Hz (VESA)
		640 x 480 @ 60Hz (IBM, VGA)
		720 x 400 @ 70Hz (IBM, VGA)

	Display Type : 	RGB Color Display

Standard Timing:


Preferred Detailed Timing:

	Pixel Clock : 	29.57 Mhz

	Horizontal Active : 	800 pixels
	Horizontal Blanking : 	192 pixels
	Horizontal Sync Offset : 	16 pixels
	Horizontal Sync Pulse Width : 	80 pixels
	Horizontal Border : 	0 pixels
	Horizontal Size : 	255 mm

	Vertical Active : 	480 lines
	Vertical Blanking : 	17 lines
	Vertical Sync Offset : 	1 lines
	Vertical Sync Pulse Width : 	3 lines
	Vertical Border : 	0 lines
	Vertical Size : 	255 mm

	Input Type : 	Digital Separate
	Interlaced : 	False
	VerticalPolarity : 	True
	HorizontalPolarity : 	False

Monitor Range Limit:

	Maximum Vertical Frequency : 	76 Hz
	Minimum Vertical Frequency : 	50 Hz
	Maximum Horizontal Frequency : 	81 KHz
	Minimum Horizontal Frequency : 	30 KHz
	Maximum Pixel Clock : 	140 MHz

Stereo Display:

	Stereo Display : 	Normal display (no stereo)

RAW Data:

0x00	 00 FF FF FF FF FF FF 00 36 09 08 50 01 01 01 01	
0x10	 22 15 01 03 80 29 1A 78 EE E5 B5 A3 55 49 99 27	
0x20	 13 50 54 AC 00 00 01 01 01 01 01 01 01 01 01 01	
0x30	 01 01 01 01 01 01 8D 0B 20 C0 30 E0 11 10 10 50	
0x40	 13 00 FF FF 00 00 00 1C 00 00 00 FC 00 4D 50 49	
0x50	 35 30 30 38 0A 20 20 20 20 20 00 00 00 FD 00 32	
0x60	 4C 1E 51 0E 00 0A 20 20 20 20 20 20 00 00 00 FF	
0x70	 00 42 33 34 33 32 38 34 35 0A 20 20 20 20 01 6F

#22

OK, so that must be happening.

First dump :

Second dump :

Is it on each run that 800x480 is not listed under “Established Timings” ?
But is further down, under “Preferred Detailed Timing:”


#23

I think this is normal.

This display device is not a HDMI device (TV like), it is a DVI-D device (computer monitor like). A computer monitor EDID has a bitfield containing the industry standard (a.k.a. established) timings is supports together with a list of constraints (min/max Hfreq, min/max Vfreq) that can be used to automatically derive non-standard video modes if needed. Finally there is a preferred timing which gives the “best” settings for the monitor (for LCD devices this is typically the native resolution).

800x480 is omitted from the established timings because this is not a permitted established timing.

I suspect something in this EDID is confusing the display stack (though I haven’t yet figured out what).


#24

The most significant problem I can see is that the Hfreq of the Preferred Detailed Timing (which is 800x480@60) is not within this monitors own specification. Specifically with a pixel clock of 29.570Khz and 992 clocks per line results in a Hfreq of 29.81 which is below the minimum horizontal frequency!

Out of interest what happens if you request 800x480@72, 800x480@64 or 800x480@65 on the kernel command line?


#25

I’ve just tried the following options:

800x480@72 = desktop shows, but flickering black lines
800x480@64 = initially swapping black image/blue image/ no signal but after a reboot desktop shows cleanly
800x480@65 = desktop shows, but flickering black lines

So 800x480@64 seem ok with density 80. Not sure why 64 works?

Anyway, it works so just need to try and force into portrait mode now. For some reason these options aren’t having any effect:

persist.demo.hdmirotation=portrait
persist.demo.hdmirotationlock=false

Is this because the display isn’t true HDMI, as mentioned above?


#26

I’m afraid I don’t really have any clue about forcing Android to stay in portrait/landscape format. In fact for a long time I used to have the opposite problem, after running a portrait-only app my hikey960 was stuck in portrait mode and it was hard to switch back… until I found that running a landscape only media player could turn it back.

Having said that I think its extremely unlikely to be related to HDMI versus DVI-D. Once the video mode is established the internal data flow is very similar and I doubt Android is aware of the difference.


#27

ro.sf.hwrotation=90

I note that you suggested 270, which is hit or miss. PHONES, for instance, typically have 270 disabled, because you don’t want to be holding it upside down when a call comes in and put the thing on your head wrong with the microphone up and speaker down.

I think I recall once seeing somewhere in an overlay (not for this device) where the permitted rotations are listed. Its been a long time though.


#28

@daviddean
If hi3660-hikey960.dts and hi3660.dtsi (from the mainline Linux kernel source tree) were in the HiKey Linux kernel source tree
EDIT: I looked in the wrong place. Those 2 files are included (1 x *.dts and 5 x *.dtsi) : Linux kernel source tree for HiKey, HiKey960 and HiKey970

You maybe could have passed kernel parameters like “video” in the hi3660-hikey960.dts file in the "chosen"node.
Parameter “video=” docs and parameter “vga=” docs.
EDIT: vesa driver : vga=999, or vga=ask. uvesa driver : uvesa_mode=480x800, and uvesa_option=. hardware accelerated driver : video=HDMI-A-1:480x800-32 d.

Or :

You maybe could have added support for your panel to the 2 HiKey 960 Device Tree files mentioned earlier.
Similar to the display timings doc file and VIA VT8500/VT8505 SoC examples.
And by lowering the *-porch values (which should be mentioned in your panel’s docs) you can free up bandwidth (pixel clock).
But you would probably have to make a definition for the HDMI port instead of the SoC.

There are some more examples in the 32-bit Qualcomm Linux kernel source tree for vt8500, wm8505, wm8650, and wm8850.

*.dts is for on-board hardware, and *.dtsi is for SoC (and is included from *.dts and merged). Values in *.dts are used when specified in both *.dts and *.dtsi.


#29

I’ve managed to get a functional display with the following:

device/linaro/hikey/hikey960/BoardConfig.mk
BOARD_KERNEL_CMDLINE += video=HDMI-A-1:800x480@64

The above kernel option gave a usable display via HDMI.

Then to force portrait mode I changed function setInitialDisplaySize():

frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java

at line 2199 change:
if (width > height) {
to
if (false && width > height) {

…which I know is a bit hacky but it’s the only way the display would rotate.

Finally I changed the density via adb to 128 to get a decent looking image.

wm density 128

So now at least I have a working display. The touchscreen interface isn’t working, but I can use a mouse for now.

Thanks for all your help, can’t believe it took so long to get the display working! It would be hugely helpful if there was a reference list of support displays and touchscreens along with a link to where they could be puchased.


#30

Cool that it’s working now. Enjoy! :tada: :gift:


#31

Thanks for this problem & the answer !
The problem happen to me , make me confused!


#32

Hello everyone after connecting hikey960 to hdmi this hdmi lcd is showing like above, but i am not getting back and clear options in side can anyone tell me how to solve this issue


#33

That’s a very low resolution monitor. Try changing the density setting. Its a system property;
ro.sf.lcd_density=xxx

If you set it to a lower density (for instance, 120), then Android thinks that the display is physically larger, and will display things a little bit smaller. This will result in moving the button bar from the side to the bottom of the screen, which will allow all 3 buttons to display correctly.


#34

Can u plz explain how change that density… M not getting how to solve that


#35

My hikey960’s HDMI also became no signals,before a mouth,HDMI worked well with debian(downloaded from lemaker.org),
Idle for some time,HDMI became no signals when I boot it again,green led keeps flashing and blue led can flicker several times.

At first, it was suspected that debian was broken,so I flashed android 8.0 and android master (hikey960-linaro-2018.09.01-factory-b6afd976.zip) , but everything is the same,no signals!

Anyone knows how to detect this faults?


#36

There is some message may provide useful information:

hikey960:/ # uname -a
Linux localhost 4.9.113-07887-geb8dbd1 #1 SMP PREEMPT Wed Aug 1 02:16:21 UTC 2018 aarch64
hikey960:/ # cat /sys/class/drm/card0-HDMI-A-1/enabled
enabled
hikey960:/ #
hikey960:/ # dmesg | grep -i hdmi
[ 2.878058] [drm] wait for external HDMI bridge driver.
[ 6.791655] [drm] client change to HDMI
[ 7.940446] asoc-simple-card soc:sound: hdmi-hifi.0 <-> hisi_i2s2 mapping ok
hikey960:/