/srv/irclogs.ubuntu.com/2014/04/21/#ubuntu-mir.txt

=== chihchun_afk is now known as chihchun
ice9how efficient is Mir currently?11:47
ogra_ice9, efficient eough to be the default on all tablet and phone images12:12
ice9ogra_: I mean the desktop sorry12:13
ogra_yeah, no idea about that ...12:13
ogra_(since there is no desktop that could use Mir yet)(12:13
mterryWhat's the best way for USC to tell a session to "freeze" -- i.e. don't render any frames.  I thought it was hide(), but it seems that doesn't stop it from swapping buffers.  In 0.1.9, I'm guessing I use lifecycle events.  But what about 0.1.8?13:25
kgunnmterry: do you want everyone to freeze ? i would assume yes13:36
mterrykgunn, in this particular instance I want to be able to freeze a whole session -- all its surfaces.  So not quite everyone (not all sessions)13:36
* mterry goes afk real quick13:38
kgunnmterry: i would have thought hide as well....is it really about the rendering ? or you just want a still frame ? e.g. the analogy  hear would be unity-mir using snapshots i think13:38
kgunnmterry: so out of curiosity i started to poke, wonder if set_lifecycle_state on session is what you'd want to use...altho, good news bad news, the i/f kinda sounds right, but not sure if anything acts on it13:47
kgunnAlbertA: camako ...am i reading the code correct ? ^ do the states of set_lifecycle_state not really get acted on?13:48
camakokgunn: checking13:48
kgunni see where it makes it to protobuf_life_event and the state gets set, but then i don't really see any action taken on it...13:54
camakokgunn: I don't see set_lifecycle_state being called from anywhere13:55
kgunncamako: right, well...i was thinking it might server mterry's purpose (he's shell like in a sense with the greeter sitting on top of u-s-c)13:56
kgunnu-s-c==unity-system-compositor13:56
kgunnhe wanted to halt apps (sessions) from rendering...13:56
kgunnnot completely sure why yet...but seemed a sensible thing to want to do as a shell-like-thing13:57
kgunncamako: mterry ...so it's actually called in unity-mir, wonder if its an opaque msg (e.g. mir not acting on it but passed to platform-api)14:00
mterrykgunn, heyo, back.  So in 0.1.8, lifecycles don't seem to do much.  That might change in 0.1.9?14:03
mterrykgunn, the reason I want this is for split greeter boot animation -- on boot, we don't show the greeter session until both the greeter and user session are ready to go (i.e. we don't want to show the greeter without the user session behind it ready to go) but...14:03
mterrykgunn, the greeter also has a "fade in animation" that we want to have happen when the user sees it -- so ideally when the greeter is ready, I could "freeze" it until the user session is also ready so the user sees the full fade in animation -- as is today, the user may miss the animation because the greeter was running through it while waiting for the user session.  Make sense?14:04
mterrykgunn, this may be yet another blocker for split mode from the design side14:05
mterrykgunn, sometimes the user session is ready before the greeter, so there's no problem.  But not always.  So it's a bit of a race and design prefers the animation always happen, naturally14:05
kgunnmterry: afaik, w 0.1.9, only additional mgmt atm is coming with qtubuntu where the exposeEvent is triggered14:07
mterrykgunn, I really did think hide() did that though.  I'd like to hear if it's intended to do that and I'm making some mistake or if that's just not the API I want14:07
kgunnmterry: yeah...makes sense....basically, when the greeter is ready "well before" the user session, there's no fade, and it just looks like a hard switch/hard transition animation (14:08
mterryYeah.  "well before" can be on the order of just a second though.  Fade in animation isn't super long14:08
kgunnmterry: my only fear there, is hide won't "halt renders" in 0.1.914:09
kgunnthis is the whole point of the non-block swap14:09
kgunnmterry: all this being said....sounds like a sensible control for a shell-like thing to have14:09
mterrykgunn, right.  But lifecycle would replace that, eh?14:09
mterrykgunn, or yeah, maybe we need to add a tiny bit of API14:10
mterrykgunn, this seems like a reasonable use case14:10
mterrykgunn, I'll file a feature bug, not sure who can work on it though14:10
kgunnmterry: my worry on life cycle even with 0.1.9...is that, the side channel is racy also... so, you end up getting some "renders you don't see"14:10
mterrykgunn, I see14:10
kgunnmterry: actually...when was the last time you dealt with lifecycle events ?....i do see some handling of it in platform-api as well...ubuntu_application_api_mirclient.cpp14:14
mterrykgunn, I tried to use them for this purpose last Friday14:16
mterrykgunn, didn't seem to do anything that I could see (I still saw swap_buffers being called for the client after I used lifecycle calls)14:16
kgunnhmmm....14:17
mterrykgunn, bug 1310637 is the feature request, which might just get closed with a "this can already be done" comment14:17
kgunnmterry: wonder if this is a failing of nested ?14:17
ubot5bug 1310637 in mir (Ubuntu) "Allow a server to halt rendering in a client session" [Undecided,New] https://launchpad.net/bugs/131063714:17
AlbertAkgunn: well it's a feature of non-blocking15:00
AlbertA"feature"15:00
kgunnAlbertA: yes yes...15:01
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
kgunnAlbertA: i wouldn't drive yourself too crazy optimizing that 2% out before putting up MP's for the switching bundle change15:13
kgunne.g. propose 1 set...then you can always propose a subsequent optimizATION SET15:14
kgunnoops...sorry cap lock strike15:14
AlbertAkgunn: o15:14
AlbertAkgunn: ok15:14
kgunndang it... camako, could you share that acceptance test hit-list you, alan, kdub created ?15:18
kgunnor share the name i can search...15:19
racarr__Nah. thanks though.15:19
racarr__err kgunn ^15:19
racarr__went in to wrong channel15:19
kgunni forgot to save the link15:19
racarr__lol15:19
kgunnracarr__: :)15:19
AlbertAkgunn: should be in e-mail15:19
kgunnduh...15:19
camakokgunn :https://docs.google.com/document/d/17T4H5IhbfIPK3hErFz7VCmXReOywrHQnWwt_dTxe0kI/edit?usp=sharing15:20
=== chihchun is now known as chihchun_afk
racarr__https://www.youtube.com/watch?v=16EYejUic_0 - Great Code Review music.15:22
AlbertAracarr__: :(15:55
AlbertAracarr__: I mean :)15:55
AlbertAmterry: kgunn: the greeter has to listen to lifecycle events and stop its own rendering loop16:00
AlbertAmterry: kgunn: mir won't do anything to prevent that16:01
AlbertAmterry: kgunn: with the non-block swap behavior16:01
kgunncamako: as and when people start to free up and ask for things todo... i think items #1, #3, #4, #10 in your acceptance test doc make the most sense...16:03
kdub6 is more of a sub-bullet for 316:04
mterryAlbertA, OK...  Does 0.1.8 already have the ability for it to do that?16:04
AlbertAmterry: non-blocking?16:05
AlbertAmterry: that will be coming in 0.1.916:05
mterryAlbertA, for the greeter to listen to lifecycle events16:05
AlbertAmterry: you could do that now, that's what gerry is using for qtubuntu16:05
racarr__The QPA is handling that for clients at least. Is it different because greeter is using qtubuntu-mirserver?16:05
camakokgunn: I'll keep that in mind16:06
mterryracarr__, greeter is using unity-mir/mirserver.  I guess that makes it different?16:06
AlbertAracarr__: oh it's in-process?16:06
racarr__Ci16:06
racarr__But using qtubuntu16:06
racarr__so the logic should be there, so maybe its just flipped off for in process? not sure hwo the shell16:06
racarr__is handling render stop16:07
AlbertAmterry: greeter is qml?16:07
AlbertAmterry: the new version?16:07
AlbertAmterry: I mean the new split version of the greeter?16:07
mterryAlbertA, yeah, it basically runs same code as unity8, just different plugins/qml16:09
AlbertAmterry: you probably want to ping greyback then on how he uses the lifecyle to stop rendering16:09
AlbertAhttps://code.launchpad.net/~gerboland/qtubuntu/surface-visible-hidden-side-channel/+merge/21588416:11
AlbertAmterry: ^16:11
racarr__https://code.launchpad.net/~josharenson/mir/install_glmark2/+merge/21650416:12
racarr__jenkins was ignoring16:12
racarr__this branch...wonder why16:12
racarr__(I just manually requested a CI review)16:12
racarr__but there was none pending16:12
mterryAlbertA, thanks, will poke around16:14
mterryAlbertA, oh right.  But I remember talking about the side channel for lifecycles and it is too slow -- can't rely on when it stops rendering16:28
AlbertAmterry: oh the 3 sec delay?16:29
mterryAlbertA, greyback's comments greyback's indicate that hide() *should* do what I want.  but it doesn't seem to16:29
mterrymaybe he's talking about Qt's hide16:29
AlbertAmterry: yeah beginning with 0.1.9 hide means don't show in screen16:29
AlbertAmterry: but apps can still render16:29
mterryAlbertA, 3 seconds?  I dunno.  I remember hearing it was "racy" in the sense that some frames might be rendered before the client handles lifecycle event16:29
mterryAlbertA, right.  So I think I need a new API added -- stop_rendering() or some such that a server can tell a client session16:30
mterryAlbertA, I filed bug 131063716:30
ubot5bug 1310637 in mir (Ubuntu) "Allow a server to halt rendering in a client session" [Undecided,New] https://launchpad.net/bugs/131063716:30
AlbertAmterry: and this is for in-process clients right?16:31
mterryAlbertA, i'm not sure about that term.  It's USC talking to the greeter.  So separate processes?16:31
AlbertAmterry: oh...16:32
racarr__Yes, greeter is its own16:32
racarr__mirsrever instance though correct?16:32
racarr__ /it was16:32
mterryracarr__, yes16:32
racarr__:)16:32
mterryracarr__, but from USC perspective, it doesn't care what the session is, it just wants to stop it from doing anything16:33
mterrymaybe I should just send a SIGSTOP...16:33
mterryThat actually doesn't sound so dumb...16:34
AlbertAmterry: but that would introduce the same issues we are trying to resolve16:34
mterryStill a bit racy I guess16:34
AlbertAmterry: with non-blocking16:34
mterryAlbertA, this is a specific use case, not a general thing that USC always wants to do16:34
mterryAlbertA, I'm specifically trying to synchronize rendering between two sessions16:34
racarr__mm...which is making me kind of think there16:35
racarr__I mean if its literally just a fade16:35
racarr__then the fade could be done16:35
racarr__server side16:35
racarr__with set_alpha16:35
AlbertAmterry: but the problem is the animation will be already over16:35
mterryNot just a fade.  Different elements grow and become more opaque, each on their own timer16:35
mterryracarr__, ^16:35
AlbertAmterry: in the greeter16:35
racarr__Mm -.-16:35
mterryAlbertA, sorry, how do you mean?16:35
AlbertAmterry: is it just a fade? or some other cutesy stuff?16:36
mterryAlbertA, I mean, that's the problem I have today that I'm trying to solve yeah16:36
AlbertAmterry: I'm thinking more in general terms16:36
AlbertAmterry: that may change in the future16:36
mterryAlbertA, cutesy stuff.  Panel drops down from top, clock time grows from 0.8 to 1.0 size and goes from 0 to 1 opacity16:36
mterryclock fades in similarly16:36
AlbertAmterry: yeah that's what I mean, you couldn't do that at the mir server side16:36
AlbertAmterry: qt controls all that16:36
AlbertAmterry: but is it possible for the greeter to start in hide mode (hide in qt sense)16:37
mterryAlbertA, right.  But I just want to have USC send a message to the session that says "don't handle any buffers" so that Qt will stop until we unfreeze it16:37
AlbertAmterry: right - but that kinda goes agains the non-blocking decision16:37
mterryAlbertA, I agree as a general thing.  But I'm saying there is a specific use case where we do actually want the ability to block16:38
racarr__this is only in the specific case though, triggered by shell code in USC16:38
racarr__mm16:38
mterryAlbertA, this isn't about app lifecycle16:38
AlbertAkgunn: mterry: where it was decided that mir would not enforce at all rendering loop behavior implicitly by blocking16:38
AlbertAmterry: I guess if its short lived it should be ok16:39
AlbertAmterry: so you can't tell QT to not render at all when creating the greeter stuff? it always starts rendering no matter what?16:40
AlbertAmterry: just curious16:40
mterryAlbertA, well.  I could have the greeter start in frozen mode.  But then I'd need a signal to unfreeze it.  Which is this same problem, just much more app-specific16:41
AlbertAmterry: plus in any case, it would be hard to do frame level synch transitions to screen16:42
mterryAnd the problem is really a compositor specific one.  Not really greeter-specific.  I feel like the abstraction for this belongs in mir compositor code16:42
AlbertAmterry: you most likely would get some black frames at the beginning16:42
AlbertAmterry: maybe if we send transition events to each of the sessions that are transitioning from each other16:44
AlbertAmterry: and we wait until the transition event is acked16:44
AlbertAmterry: like one for being transitioned to16:45
AlbertAmterry: and one for being transitioned out of16:45
mterryAlbertA, it would be useful if a mir client knew it was being transitioned away from (we will eventually want to know this for the tiny boot animation app so it can fade out too)16:45
AlbertAmterry: so we send transition out of - wait until ack - the client receives it16:46
mterryclient fades out, acks back16:46
AlbertAmterry: does its cutesy shutdown transition animation, finishes and acks the message16:46
mterryyeah, that would be ideal16:46
AlbertAmterry: and the other client receives transition to16:46
AlbertAmterry: and same deal16:46
mterryAlbertA, except...  I'm not sure what we do there.16:47
mterryAlbertA, that seems like a separate problem from being able to freeze it until ready?16:47
mterryAlbertA, the greeter appears before we're ready to transition to it16:47
AlbertAmterry: well maybe we could block until a first ack is received16:48
AlbertAmterry: or something....16:48
AlbertAmterry: maybe begin transition into16:48
AlbertAmterry: server blocks until begin transition into acks16:48
mterryAlbertA, yeah, we could add a special message for 'freeze' that is part of this set of messages16:49
AlbertAmterry: and only for sessions that have registered for transition notifications16:49
tvossAlbertA, mterry seems like waiting for the first swap buffers call after the transition has been initiated is the trigger you are looking for here17:28
AlbertAtvoss: yeah that would be more sensible, because waiting for an ack would be "dangerous" for misbehaving clients17:30
tvossAlbertA, yup, exactly.17:30
mterrytvoss, AlbertA: I do hook into swap_buffers calls.  That's how I know a client is ready to display to the screen.  But how do I stop the client from doing anything after that point?17:37
tvossmterry, that would require an occlusion event17:38
tvossmterry, AlbertA something we would need to add anyway17:38
AlbertAtvoss: yep17:40
mterrytvoss, meaning we don't have that yet, OK17:43
tvossmterry, yup17:43
mterrytvoss, occlusion being a way to tell a client it isn't actually visible on screen?  That sounds exactly the semantics of my situation indded17:48
* kdub makes an argument the scene would be the best one to compute occlusion17:51
tvosskdub, +117:57
kdubi guess though, for max flexibility, the compositor should submit an occlusion scanner or something like that17:59
tvossmterry, yup, I think we should implement such a fundamental feature "the right way" (tm) :) Out of curiosity: why isn't the usc process lifecycled and thus stopped by usc?17:59
mterrytvoss, you mean why isn't the greeter process lifecycled?18:00
mterrytvoss, I tried using lifecycle events for this, but they didn't do what I wanted.  Maybe because I'm still testing with mir 0.1.818:00
mterrytvoss, but even if they did do what I wanted, I hear that the sidechannel is 'racy' in the sense that the client may still render some frames before being lifecycled18:00
mterrytvoss, and ideally this would be frame-perfect18:01
tvossmterry, that is surely the case, but then: we expect clients receiving a lifecycle event to prepare a "final" good rendering18:02
mterrytvoss, but in this case, I'm not sure that makes sense.  That would mean having the greeter 'reset' itself to frame zero if it gets a suspend event near the beginning of its lifespan?  Seems finicky18:16
mterryor maybe just any suspend event.  I suppose we could redo the animation on screen wake too...18:17
tvossmterry, so is that a viable option for you?18:17
mterrytvoss, I think so...?  Let me look into it18:20
tvossmterry, ack, drop me a mail with your ideas/thoughts, so we can pick up the discussion tomorrow18:20
anpokkdub: +1 - for flexibility you could add an optional - filterfilter that resurrects false negatives..19:13
kdubi'm always very pleased when I get to do matrix stuff20:40
kdub'all that math was worth it!' :P20:40
racarr__You mean like dodging bullets, etc?20:41
racarr__:p20:41
kdublol20:45
=== beidl_ is now known as beidl
kgunninteresting...i've been testing xmir w/ non-blocking swap all day...and comparing to good ol' x21:13
kgunni don't think  x today works the way duflu says...21:13
kgunni find plenty that still renders when occluded and screen blank even in x21:13
racarr__I agree re: occlusion21:18
racarr__thought screen off would block swap buffers in composited GLX/compiz but who knows21:19
anpokhmm .oO(X11 terrible times .. years ago when I once messed with xlib - I never managed to properly treat the expose and damage events)21:22
racarr__lol21:26
RAOFracarr__: Yo!23:40
RAOFracarr__, kgunn_: Whether or not screen off blocks GLX_swap_buffers is driver dependent!23:44
RAOFYay!23:44
racarr__RAOF: Morning!23:51
RAOFracarr__: And a fine Easter Monday to you!23:53

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!