Mir

Black screen on Nexus4 with CM10.1.2(Android 4.2.2)

Bug #1211694 reported by Albert Astals Cid
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mir
Invalid
High
Kevin DuBois
touch-preview-images
Fix Released
Critical
Ricardo Salveti

Bug Description

When running Mir on the Nexus 4 with today's image i only get a black screen, it used to work fine around two weeks ago.
It's been confirmed in duflu on IRC that he has the same problem

Tags: hal
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Confirmed, after doing a full phablet re-flash and updates.

Changed in mir:
status: New → Confirmed
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Same here.

Revision history for this message
Michael Zanetti (mzanetti) wrote :

I tried the exact same steps on a Galaxy Nexus and it works fine there. It's really something on the Nexus 4 that is messed.

Michał Sawicz (saviq)
Changed in mir:
importance: Undecided → Critical
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

After:

   root@ubuntu-phablet:/# mir_demo_server&

The socket tmp/mir_socket isn't created and, after some seconds we see:

ERROR: /build/buildd/mir-0.0.9+13.10.20130813/src/server/graphics/android/android_framebuffer_window.cpp(75): Throw in function virtual void* mir::graphics::android::AndroidFramebufferWindow::android_display_egl_config(EGLDisplay) const
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: could not select EGL config for use with framebuffer

This is new behaviour by the image. I've tried both an old image (loaded last week) and this one with the current trunk binaries . I see the same problem on the current image.

Olli Ries (ories)
Changed in mir:
assignee: nobody → Robert Carr (robertcarr)
Revision history for this message
kevin gunn (kgunn72) wrote :

just to clarify alan's comment above
mir (old or new) fails on the new image
mir (old or new) works on the old image

hinting at a potential kernel/android tree update introducing a behavior change to the egldisplay config

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yes, confirmed it seems like a change in the phablet image.

The new flipped phablet images were working perfectly for Mir at least around the start of August. Then in the first or second week of August, Mir stopped working (for those who installed new phablet images).

Changed in mir:
status: Confirmed → In Progress
Revision history for this message
kevin gunn (kgunn72) wrote :

couple of things from racarr's investigations
* failing errors are all over the map. altough on the very latest image today, consistently it would fail the first time with "failure to blank display"...like permission denied. but then subsequently rebooting it, it would simply not respond...not hang...just no drawing...fail silently. if a mir_demo client was lanched subsequent to this, it would get an egl context and draw to the fb no problem.

* the headers for hardware.h, fb.h, hwcomposer.h, hwcomposer_defs.h are quite different between the mir in tree headers (3rd_party/android/hardware/) vs the ones on the device (/usr/include/android....which if you look in the source its in /ubuntu/hybris/hybris/include/android/hardware directory)
although, these have been different before....so not conclusive this is actually the problem

* on the bisecting front....narrowed to 20 packages, somewhere between jul 26 & aug 8
list of potential offenders http://pastebin.ubuntu.com/6005189/
tedious bisecting has ruled out any mir dep's....at the moment, still bisecting, top suspects are ubuntu-touch-generic-initrd & ubuntu-touch-session

Revision history for this message
Robert Carr (robertcarr) wrote :

Summary was as follows:

Started bisecting images. Found july 26th worked and august 12 fails (august 8 may fail but requires confirmation).

Ran out of images

Started from working uly 26th images and began updating chunks of packages. Witnessed failing system. Reset to working system and started trying to bisect group of packages that triggered the failure, installed them all but things were still working.

Started over from working image. Began installing packages in groups of 10. Witnessed 2 intermittent failures that required a restart (terminal hung even) but things continued to work until I had fully upgraded.

Things worked on fully upgraded nexus 4 installed from july 26th image! Strange, so I went to check nothing had changed in archive, and flashed a new image, and then upgraded (only a few random packages) and tested mir: failure!

The next step would be to confirm
1. Flashing july 26th image works, and still works after doing a full dist upgrade (can do it all in one chunk).
2. Flashing current image does not work.

What has changed in the images? More eyes!

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

So after some more debugging I was able to find out that the cause was the Android 4.2.2 code migration done at phablet.u.c, which was around August 5th.

The code for the qcom display driver changed quite a bit, and which makes mir to always come up with just a black screen. It also has a ENOMEM error (via logcat, when setting up fb2), which can be fixed with a newer kernel (from CM 10.1.2/4.2.2), but that doesn't help the black screen issue.

As this is a critical issue, I just basically reverted the qcom graphics display libraries to use the previous code available in phablet-10.1 (4.2.1 based). That unblocks the issue, but it's not yet the real fix, as I believe we're probably missing something in MIR itself, as surfaceflinger always work.

You can compare both branches at:
Current: http://phablet.ubuntu.com/gitweb?p=CyanogenMod/android_hardware_qcom_display.git;a=shortlog;h=refs/heads/phablet-saucy
Black Screen (4.2.2): http://phablet.ubuntu.com/gitweb?p=CyanogenMod/android_hardware_qcom_display.git;a=shortlog;h=refs/heads/phablet-saucy-mir-black-screen

Some of the most intrusive changes with the black-screen branch:
http://phablet.ubuntu.com/gitweb?p=CyanogenMod/android_hardware_qcom_display.git;a=commit;h=167a2c9b4b1ce0a3594fd81d37b2bb01b679b865
http://phablet.ubuntu.com/gitweb?p=CyanogenMod/android_hardware_qcom_display.git;a=commit;h=2c49d47fb7a61d11af8224800d30625bb29d36a2

Guess kdub can probably did a bit further when he's back from vacation.

I also triggered a new build for the Android side, and you can get at:
http://s-jenkins:8080/job/ubuntu-touch-image-phablet-saucy/33/artifact/archive/saucy-preinstalled-armel+mako.zip

Should hopefully be in tomorrow's image by default.

Changed in mir:
status: In Progress → Confirmed
importance: Critical → High
assignee: Robert Carr (robertcarr) → Kevin DuBois (kdub)
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Changing summary, and adding bug task to the touch-preview-images project so we can track the revert done in the Android side as a workaround.

summary: - Black screen on Nexus4
+ Black screen on Nexus4 with CM10.1.2(Android 4.2.2)
Changed in touch-preview-images:
status: New → Fix Committed
importance: Undecided → Critical
assignee: nobody → Ricardo Salveti (rsalveti)
Rex Tsai (chihchun)
tags: added: hal
Revision history for this message
Albert Astals Cid (aacid) wrote :

Image 20130821 works for me :-)

Revision history for this message
Albert Astals Cid (aacid) wrote :

I'm going to mark this as fix released as it works fine on the released images for me now

Changed in mir:
status: Confirmed → Invalid
Changed in touch-preview-images:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.