Mir

Galaxy Nexus rendering performance is too low

Bug #1182930 reported by Gerry Boland
70
This bug affects 13 people
Affects Status Importance Assigned to Milestone
Mir
Won't Fix
High
Kevin DuBois
touch-preview-images
Fix Released
Undecided
Unassigned

Bug Description

Summary: It appears eglSwapBuffers is slow on the Nexus with Qt - and CPU usage is higher than expected.

Steps to reproduce:

1: on phone
----------------
Update your phone to be up-to-date. Add Mir PPA and install extra packages like this:
sudo add-apt-repository ppa:mir-team/staging
sudo apt-get update
sudo apt-get install mircommon-dev libmirserver-dev libmirclient-dev
Now fetch and install the packages in
https://chinstrap.canonical.com/~gerboland/mir/server
Packages built against lp:mir at revision 688.
Probably best to reboot phone here.

2: on PC
-------------
Checkout
  lp:~unity-team/unity/phablet-integrate-mir/
Then can run
   ./run_on_device -s
to prepare a build environment on the device (only needed once). To run Unity do:
   ./run_on_device -m
which copies the Unity source to the phone, compiles it and executes it (via Mir with the -m switch).

Unity should appear on the phone - and in your console you should get frame generation information.

Right now, it takes Qt about 3-10ms to generate the frame, but the time to display the frame is often >25ms. The extra time is mostly taken up with a call to eglSwapBuffers, which appears to be the source of the 15ms+ delay.

Let me know if more info is needed.

Changed in mir:
importance: Undecided → High
milestone: none → 0.0.4
tags: added: unity
Changed in mir:
status: New → Triaged
Changed in mir:
milestone: 0.0.4 → 0.0.5
Changed in mir:
milestone: 0.0.5 → 0.0.6
Changed in mir:
milestone: 0.0.6 → 0.0.7
Revision history for this message
kevin gunn (kgunn72) wrote :

lowering priority as this seems to be HW specific, relating to eglswapbuffers on Galaxy Nexus. If the same concern issue is witnessed on Nexus4, please ping me.

Changed in mir:
importance: High → Medium
Changed in mir:
milestone: 0.0.7 → 0.0.8
Changed in mir:
milestone: 0.0.8 → 0.0.9
Changed in mir:
milestone: 0.0.9 → 0.0.10
Changed in mir:
milestone: 0.0.10 → 0.0.11
summary: - Unity8 low framerate running on Mir on Galaxy Nexus
+ [mir] Galaxy Nexus rendering performance is too low
Revision history for this message
kevin gunn (kgunn72) wrote : Re: [mir] Galaxy Nexus rendering performance is too low

kdub, maybe some cycles will free up enough to begin to look more closely at maguro.
at least we need to begin to work on android bypass which should help.

Changed in mir:
importance: Medium → High
assignee: nobody → Kevin DuBois (kdub)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think we need to get basic composition right before talking about bypass. This means solving the key problem; "the time to display the frame is often >25ms".

Changed in mir:
milestone: 0.0.11 → 0.0.13
Changed in mir:
milestone: 0.0.13 → none
summary: - [mir] Galaxy Nexus rendering performance is too low
+ Galaxy Nexus rendering performance is too low
tags: added: galaxynexus
Revision history for this message
Oliver Grawert (ogra) wrote :

unlike surfaceflinger, Mir keeps the PVR driver in a state where it generates a uevent for every VSync

(other drivers do not do this, and SF on OMAP calls https://android.googlesource.com/platform/frameworks/native/+/03e407270c7ad76632f982c886d0776bed9e9b4c/services/surfaceflinger/DisplayHardware/PowerHAL.cpp to switch this off ... )

i assume that can have some influence on performance (see also bug 1235649)

tags: added: performance
Revision history for this message
Kevin DuBois (kdub) wrote :
Kevin DuBois (kdub)
Changed in mir:
status: Triaged → Won't Fix
Changed in powerd:
status: New → Fix Released
kevin gunn (kgunn72)
Changed in touch-preview-images:
status: New → Fix Released
Changed in mir:
status: Won't Fix → Invalid
Revision history for this message
Kevin DuBois (kdub) wrote :

I've been told what I was remembering in comment #5 is potentially something different. still have to investigate before putting the bug to a resolved state

no longer affects: powerd
Changed in mir:
status: Invalid → New
kevin gunn (kgunn72)
Changed in mir:
status: New → Triaged
Revision history for this message
Cris Dywan (kalikiana) wrote :

Not resolved for me, it's horribly slow even after a freshly flashed image.

Revision history for this message
Cris Dywan (kalikiana) wrote :

Btw work-around "adb shell 'rm -f /home/phablet/.display-mir'" works for me

Revision history for this message
Kai Mast (kai-mast) wrote :

The work-around really resolves the problem :)

What does it do? Re-enable surface flinger?

Revision history for this message
Oliver Grawert (ogra) wrote :

yes, and disables a bunch of platform features due to that, in case you develop apps and want to test them against the full featureset, you should put the file back in place and reboot for testing your stuff under Mir ...

Revision history for this message
kevin gunn (kgunn72) wrote :

due to our evolution of unity8 features, we are at the point of breaking/ending unity8 compatibility with surfaceflinger.
this means that there is a complete reliance on mir.
galaxy-nexus has fundamental performance problems relating to hw.
for more information on some analysis supporting that fact see
https://plus.google.com/116997345010659023379/posts/cWSUVkvpGax

Also, the employment of surfaceflinger vs mir for ubuntu is diff. for instance haven't yet enabled bypass or use of hwc layers. this is work that is currently under development and covered in blueprints.

at any rate, with the eventual complete disabling of surfaceflinger, folks relying on galaxy-nexus will need to understand there's no going back. Note, Nexus 4 works great if you find the performance debilitating.

Revision history for this message
Kai Mast (kai-mast) wrote :

Updated manually using apt. Surfaceflinger stopped working for me. I only get a black screen.

Mir works but the performance is still awesome :(

Revision history for this message
Kai Mast (kai-mast) wrote :

Ah something about lxc-android-config broke, so I guess that is thre reason surfaceflinger doesn't work properly.

Revision history for this message
kevin gunn (kgunn72) wrote :

marking this as a won't fix since galaxy is now off our list.
see my previous comments about the hw itself, there's only so much we can do considering no access to gpu source etc.

Changed in mir:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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