Subject: Running Mir on phablet

From: Daniel van Vugt <[email-masked]>
Date: Tue, 30 Jul 2013 16:06:12 +0800

Kevin, anyone,

I notice running Mir on the latest phablet images (Nexus 4) is still not 
foolproof. Half the time, when I stop Unity8, that completely blanks the 
screen which prevents any Mir server from starting.

Mir can only start, it seems, if the screen is not fully blanked. If it 
is blanked then I get permission errors (failed to unblank display), 
even running as root.

What's the trick/recommended approach? It seems my old tricks don't work 
any more now the phablet images are "flipped".

- Daniel

---

From: Kevin Gunn <[email-masked]>
Date: Tue, 30 Jul 2013 03:24:24 -0500

Hey Daniel,
I'm no expert, but is there a chance you're fighting with
surfaceflinger...this is what the intended Kevin usually says. Apparently
its fairly stubborn about being killed (and tries aggressively restart)

Also, mterry had put together some updated instructions
https://wiki.ubuntu.com/Touch/Testing/Mir
just in case things have change from what process you might be following.
it has some surface flinger related instructions at the bottom...hoping it
helps.

br,kg

On Tue, Jul 30, 2013 at 3:06 AM, Daniel van Vugt <
[email-masked]> wrote:

> Mir can only start, it seems, if the screen is not fully blanked. If it is
> blanked then I get permission errors (failed to unblank display), even
> running as root.
>
> --
> Mir-devel mailing list
> [email-masked]
> Modify settings or unsubscribe at: https://lists.ubuntu.com/**
> mailman/listinfo/mir-devel<https://lists.ubuntu.com/mailman/listinfo/mir-devel>
>

---

From: Daniel van Vugt <[email-masked]>
Date: Tue, 30 Jul 2013 16:38:01 +0800

SurfaceFlinger actually coexists with Mir so long as it's not being used 
(Unity8). It's quite happy to let Mir flip buffers when it's not (stop 
ubuntu-touch-session USER=phablet).

My issue is that I can't start Mir if it happens that the screen has 
been turned off (locked/screensaver). Mir doesn't have the smarts to 
know how to turn it on. Unless I'm doing something wrong...

This issue was first reported as part of:
https://bugs.launchpad.net/mir/+bug/1188504

On 30/07/13 16:24, Kevin Gunn wrote:
> surfaceflinger...this is what the intended Kevin usually says.
> Apparently its fairly stubborn about being killed (and tries
> aggressively restart)
>
> it has some surface flinger related instructions at the bottom...hoping
> it helps.
>
> br,kg
>
>
> On Tue, Jul 30, 2013 at 3:06 AM, Daniel van Vugt
> <[email-masked] <mailto:[email-masked]>>
> wrote:
>
>     Kevin, anyone,
>
>     I notice running Mir on the latest phablet images (Nexus 4) is still
>     not foolproof. Half the time, when I stop Unity8, that completely
>     blanks the screen which prevents any Mir server from starting.
>
>     Mir can only start, it seems, if the screen is not fully blanked. If
>     it is blanked then I get permission errors (failed to unblank
>     display), even running as root.
>
>     What's the trick/recommended approach? It seems my old tricks don't
>     work any more now the phablet images are "flipped".
>
>     - Daniel
>
>     --
>     Mir-devel mailing list
>     [email-masked] <mailto:[email-masked]>
>     Modify settings or unsubscribe at:
>     https://lists.ubuntu.com/__mailman/listinfo/mir-devel
>     <https://lists.ubuntu.com/mailman/listinfo/mir-devel>
>
>

---

From: Daniel van Vugt <[email-masked]>
Date: Tue, 30 Jul 2013 16:52:59 +0800

On the other hand, if you follow mterry's instructions for disabling 
surfaceflinger, the screen never locks. So it seems like a good 
workaround...

We should make the instructions [1] a bit clearer and add them to the 
docs in lp:mir.

[1] 
https://wiki.ubuntu.com/Touch/Testing/Mir#Switch_from_SurfaceFlinger_to_Mir

---

From: Kevin DuBois <[email-masked]>
Date: Wed, 31 Jul 2013 09:42:51 -0700

Sorry for the day-long delay, i have a bad habit about forgetting
about the gmail labels outside of the inbox :)

Anyways, the approach described in the wiki article there looks like
it would work. I usually will move the surfaceflinger executable all
together so it can't be found, which stops the blanking issues
mentioned as well (a low-brow approach :) )

Basically, I've found that a good general rule-of-thumb is that if
surfaceflinger, /or any client of surfaceflinger/ is still running,
you might have problems with starting mir. The drivers all preserve
their color buffer resources a bit differently, and if it just so
happens that the driver that you have running is holding some
resources from the surfaceflinger session, it might give mir some
messages back about not getting a resource it needs. I know on some
drivers this is less of a problem than with others, but I always make
sure surfaceflinger hasn't started so I don't get headaches about what
the system is doing.

Kevin

On Tue, Jul 30, 2013 at 1:52 AM, Daniel van Vugt
<[email-masked]> wrote:
> We should make the instructions [1] a bit clearer and add them to the docs
> in lp:mir.
>
> [1]
> https://lists.ubuntu.com/mailman/listinfo/mir-devel