Booting Hikey960 without display attached?

Hi,

After building latest AOSP master (Apr, 23rd “known good” manifest) and K4.14, I get Android successfully booted when an HDMI display is attached.

But… For some reason I need to boot the board without any display.
This was actually possible with earlier AOSP master (last Sep, 2018) and K4.9 without any tweak.

For example, the sys.boot_completed property is not set,
and getting such periodic error message when no display attached:

console:/ $ [ 390.397635] init: starting service ‘netd’…
[ 390.407552] init: Created socket ‘/dev/socket/netd’, mode 660, user 0, group 1000
[ 390.416555] init: Created socket ‘/dev/socket/dnsproxyd’, mode 660, user 0, group 3003
[ 390.425637] init: Created socket ‘/dev/socket/mdns’, mode 660, user 0, group 1000
[ 390.432286] init: starting service ‘zygote’…
[ 390.434047] init: Created socket ‘/dev/socket/fwmarkd’, mode 660, user 0, group 3003
[ 390.444460] init: Created socket ‘/dev/socket/zygote’, mode 660, user 0, group 1000
[ 390.452056] init: starting service ‘zygote_secondary’…
[ 390.453619] init: Created socket ‘/dev/socket/blastula_pool’, mode 660, user 0, group 1000
[ 390.462809] init: starting service ‘audioserver’…
[ 390.706846] logd: logdr: UID=1000 GID=1003 PID=8150 n tail=50 logMask=8 pid=8102 start=0ns timeout=0ns
[ 390.718821] logd: logdr: UID=1000 GID=1003 PID=8150 n tail=50 logMask=1 pid=8102 start=0ns timeout=0ns
[ 390.750836] logd: logdr: UID=1000 GID=1003 PID=8150 n tail=0 logMask=8 pid=8102 start=0ns timeout=0ns
[ 390.764385] logd: logdr: UID=1000 GID=1003 PID=8150 n tail=0 logMask=1 pid=8102 start=0ns timeout=0ns
[ 390.804684] binder: release 8102:8102 transaction 42122 in, still active
[ 390.811423] binder: release 8102:8102 transaction 42117 out, still active
[ 390.818366] binder: send failed reply for transaction 42122 to 2518:2646
[ 390.825341] binder: 2518:2646 transaction failed 29189/0, size 4-0 line 3050
[ 390.832443] binder: send failed reply for transaction 42117, target dead

Any hint with kernel build configuration, or command line is appreciated!

Thanks & Regards.

or maybe is this bug related ?
https://bugs.96boards.org/show_bug.cgi?id=830

Hi Baou,

Did you manage to resolve this issue? I am running to the same problem. It is nice to know that a previous ROM boots without the screen. I do however wish to run the latest image + 4.14 kernel if possible.

Hi,

Unfortunately no, I don’t have a solution for this and it’s gating migrating to K4.14 on my side. I’m still looking at solutions, if I find something I let you know on this thread.

Cheers.

As I know, we have a temporary solution to boot Android without HDMI connection, which needs to enable virtual frame buffer.

Firstly, need enable kernel configuration:

CONFIG_FB_VIRTUAL=y

Secondly, add additional bootargs in kernel command line:

 video=vfb:640x480-32@30 vfb.videomemorysize=3145728

Please be aware, I tested this method a while back at last year; I don’t test this on the latest code base.

Ideally (and I do note that you specified it as a “temporary solution”), it would be possible to force enable the HDMI using something similar to video=HDMI-A-1:1920x1080@60e (i.e., note the “e” for “force Enable”). The parameter written this way SHOULD be able to force the HDMI port on, as if a monitor were actually connected, even if it isn’t. Being enabled in this manner would allow you to plug in an HDMI monitor later on and have it work.

After add ‘video=HDMI-A-1:1920x1080@60e’ into the kernel command line, the Android’s boot_completed flag still will not be set:

console:/ # getprop sys.boot_completed

I can see now HIkey960 support this mode. At beginning, the HDMI port doesn’t attach cable, and later after system boot up I insert HDMI cable and I can see HDMI port is enabled and HDMI monitor can display properly.

I think it is a good suggestion that if kernel command line contains ‘video=HDMI-A-1:1920x1080@60e’, we can enable HDMI always and also can read back ‘sys.boot_completed’ successfully, no matter if really attach HDMI cable or not.

@jstultz, could you take a look for this is good idea or not?

Hi,

Thanks @doitright @leo-yan for your advices.
Interestingly it seemed to work for me (adding video=HDMI-A-1:1920x1080@60e to kernel command line), with no display attached. I get the sys.boot_completed property set and I can see some display init activity in boot log:

My kernel version is 4.14.101-g56136f5a7cad

[ 11.277363] [drm] client change to HDMI
[ 11.283126] [drm] hotplug_event!!!
[ 11.717922] capability: warning: `main’ uses 32-bit capabilities (legacy support in use)
[ 12.475668] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=6,+++
[ 12.481547] [I/hisi_pd] pd_dpm_handle_pe_event unkonw event
[ 12.487759] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=5,+++
[ 12.493619] Pending event is same --> ignore this event 2
[ 12.499160] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=3,+++
[ 13.072627] random: crng init done
[ 13.076056] random: 7 urandom warning(s) missed due to ratelimiting
[ 13.321473] healthd: battery none chg=
[ 13.325541] healthd: battery none chg=
[ 13.344080] healthd: battery none chg=
[ 13.448089] [drm] mode->clock(org) = 40000
[ 13.452244] [drm] dss_pxl0_clk = 40000
[ 13.516510] [drm] host attach, client name=[adv7533], id=0
[ 13.538837] [drm] Expected : lane_clock = 320 M
[ 13.543410] [drm] Config : lane_clock = 320000000
[ 13.548131] [drm] PHY clock_lane and data_lane config :
[ 13.548131] rg_vrefsel_vcm=85
[ 13.548131] clk_pre_delay=0
[ 13.548131] clk_post_delay=31
[ 13.548131] clk_t_hs_prepare=3
[ 13.548131] clk_t_lpx=6
[ 13.548131] clk_t_hs_zero=13
[ 13.548131] clk_t_hs_trial=6
[ 13.548131] data_pre_delay=33
[ 13.548131] data_post_delay=0
[ 13.548131] data_t_hs_prepare=4
[ 13.548131] data_t_lpx=6
[ 13.548131] data_t_hs_zero=7
[ 13.548131] data_t_hs_trial=7
[ 13.548131] data_t_ta_go=4
[ 13.548131] data_t_ta_get=5
[ 13.596203] [drm] clk_lane_lp2hs_time=35
[ 13.596203] clk_lane_hs2lp_time=44
[ 13.596203] data_lane_lp2hs_time=59
[ 13.596203] data_lane_hs2lp_time=14
[ 13.596203] phy_stop_wait_time=38
[ 13.613990] [drm] hsa_time=128, hbp_time=88, hline_time=1056
[ 13.619664] [drm] lane_byte_clk=40000000, pixel_clk=40000000
[ 13.625345] [drm] dsi_mipi_init ok

Cheers.

1 Like

That is actually very surprising, since the patch to fix hotplug hasn’t actually been added to the AOSP kernel yet, see https://bugs.96boards.org/show_bug.cgi?id=830 (first post has a patch as attachment). I think the last time I tried that parameter was more than a year ago, and it didn’t work at the time.

I suggest it not so much that it is “a good idea”, but that is actually the specified behavior of that parameter; https://www.kernel.org/doc/Documentation/fb/modedb.txt

1 Like

Excellent.
I’m surprised that it works.

Hi,

Let me refine a bit my answer:
1/ Booting the board without hdmi cable now works till sys.boot_completed assertion, which was my primary intent. Now if I hot-plug the hdmi cable while booted, display remains black, I assume because of mentioned missing hotplug detection patch. But again this is not an issue to me as I have no usage of display in my use cases.

2/ Booting the board with an hdmi cable initially plugged, ends up properly displaying android desktop as expected.

Cheers.

Ah, ok. That’s more consistent with what I would expect.