=== chihchun_afk is now known as chihchun [11:47] how efficient is Mir currently? [12:12] ice9, efficient eough to be the default on all tablet and phone images [12:13] ogra_: I mean the desktop sorry [12:13] yeah, no idea about that ... [12:13] (since there is no desktop that could use Mir yet)( [13:25] What'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:36] mterry: do you want everyone to freeze ? i would assume yes [13:36] kgunn, 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:38] * mterry goes afk real quick [13:38] mterry: 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 think [13:47] mterry: 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 it [13:48] AlbertA: camako ...am i reading the code correct ? ^ do the states of set_lifecycle_state not really get acted on? [13:48] kgunn: checking [13:54] i 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:55] kgunn: I don't see set_lifecycle_state being called from anywhere [13:56] camako: 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] u-s-c==unity-system-compositor [13:56] he wanted to halt apps (sessions) from rendering... [13:57] not completely sure why yet...but seemed a sensible thing to want to do as a shell-like-thing [14:00] camako: 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:03] kgunn, heyo, back. So in 0.1.8, lifecycles don't seem to do much. That might change in 0.1.9? [14:03] kgunn, 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:04] kgunn, 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:05] kgunn, this may be yet another blocker for split mode from the design side [14:05] kgunn, 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, naturally [14:07] mterry: afaik, w 0.1.9, only additional mgmt atm is coming with qtubuntu where the exposeEvent is triggered [14:07] kgunn, 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 want [14:08] mterry: 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] Yeah. "well before" can be on the order of just a second though. Fade in animation isn't super long [14:09] mterry: my only fear there, is hide won't "halt renders" in 0.1.9 [14:09] this is the whole point of the non-block swap [14:09] mterry: all this being said....sounds like a sensible control for a shell-like thing to have [14:09] kgunn, right. But lifecycle would replace that, eh? [14:10] kgunn, or yeah, maybe we need to add a tiny bit of API [14:10] kgunn, this seems like a reasonable use case [14:10] kgunn, I'll file a feature bug, not sure who can work on it though [14:10] mterry: 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] kgunn, I see [14:14] mterry: 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.cpp [14:16] kgunn, I tried to use them for this purpose last Friday [14:16] kgunn, 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:17] hmmm.... [14:17] kgunn, bug 1310637 is the feature request, which might just get closed with a "this can already be done" comment [14:17] mterry: wonder if this is a failing of nested ? [14:17] bug 1310637 in mir (Ubuntu) "Allow a server to halt rendering in a client session" [Undecided,New] https://launchpad.net/bugs/1310637 [15:00] kgunn: well it's a feature of non-blocking [15:00] "feature" [15:01] AlbertA: yes yes... === chihchun is now known as chihchun_afk === chihchun_afk is now known as chihchun [15:13] AlbertA: i wouldn't drive yourself too crazy optimizing that 2% out before putting up MP's for the switching bundle change [15:14] e.g. propose 1 set...then you can always propose a subsequent optimizATION SET [15:14] oops...sorry cap lock strike [15:14] kgunn: o [15:14] kgunn: ok [15:18] dang it... camako, could you share that acceptance test hit-list you, alan, kdub created ? [15:19] or share the name i can search... [15:19] Nah. thanks though. [15:19] err kgunn ^ [15:19] went in to wrong channel [15:19] i forgot to save the link [15:19] lol [15:19] racarr__: :) [15:19] kgunn: should be in e-mail [15:19] duh... [15:20] kgunn :https://docs.google.com/document/d/17T4H5IhbfIPK3hErFz7VCmXReOywrHQnWwt_dTxe0kI/edit?usp=sharing === chihchun is now known as chihchun_afk [15:22] https://www.youtube.com/watch?v=16EYejUic_0 - Great Code Review music. [15:55] racarr__: :( [15:55] racarr__: I mean :) [16:00] mterry: kgunn: the greeter has to listen to lifecycle events and stop its own rendering loop [16:01] mterry: kgunn: mir won't do anything to prevent that [16:01] mterry: kgunn: with the non-block swap behavior [16:03] camako: 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:04] 6 is more of a sub-bullet for 3 [16:04] AlbertA, OK... Does 0.1.8 already have the ability for it to do that? [16:05] mterry: non-blocking? [16:05] mterry: that will be coming in 0.1.9 [16:05] AlbertA, for the greeter to listen to lifecycle events [16:05] mterry: you could do that now, that's what gerry is using for qtubuntu [16:05] The QPA is handling that for clients at least. Is it different because greeter is using qtubuntu-mirserver? [16:06] kgunn: I'll keep that in mind [16:06] racarr__, greeter is using unity-mir/mirserver. I guess that makes it different? [16:06] racarr__: oh it's in-process? [16:06] Ci [16:06] But using qtubuntu [16:06] so the logic should be there, so maybe its just flipped off for in process? not sure hwo the shell [16:07] is handling render stop [16:07] mterry: greeter is qml? [16:07] mterry: the new version? [16:07] mterry: I mean the new split version of the greeter? [16:09] AlbertA, yeah, it basically runs same code as unity8, just different plugins/qml [16:09] mterry: you probably want to ping greyback then on how he uses the lifecyle to stop rendering [16:11] https://code.launchpad.net/~gerboland/qtubuntu/surface-visible-hidden-side-channel/+merge/215884 [16:11] mterry: ^ [16:12] https://code.launchpad.net/~josharenson/mir/install_glmark2/+merge/216504 [16:12] jenkins was ignoring [16:12] this branch...wonder why [16:12] (I just manually requested a CI review) [16:12] but there was none pending [16:14] AlbertA, thanks, will poke around [16:28] AlbertA, oh right. But I remember talking about the side channel for lifecycles and it is too slow -- can't rely on when it stops rendering [16:29] mterry: oh the 3 sec delay? [16:29] AlbertA, greyback's comments greyback's indicate that hide() *should* do what I want. but it doesn't seem to [16:29] maybe he's talking about Qt's hide [16:29] mterry: yeah beginning with 0.1.9 hide means don't show in screen [16:29] mterry: but apps can still render [16:29] AlbertA, 3 seconds? I dunno. I remember hearing it was "racy" in the sense that some frames might be rendered before the client handles lifecycle event [16:30] AlbertA, right. So I think I need a new API added -- stop_rendering() or some such that a server can tell a client session [16:30] AlbertA, I filed bug 1310637 [16:30] bug 1310637 in mir (Ubuntu) "Allow a server to halt rendering in a client session" [Undecided,New] https://launchpad.net/bugs/1310637 [16:31] mterry: and this is for in-process clients right? [16:31] AlbertA, i'm not sure about that term. It's USC talking to the greeter. So separate processes? [16:32] mterry: oh... [16:32] Yes, greeter is its own [16:32] mirsrever instance though correct? [16:32] /it was [16:32] racarr__, yes [16:32] :) [16:33] racarr__, but from USC perspective, it doesn't care what the session is, it just wants to stop it from doing anything [16:33] maybe I should just send a SIGSTOP... [16:34] That actually doesn't sound so dumb... [16:34] mterry: but that would introduce the same issues we are trying to resolve [16:34] Still a bit racy I guess [16:34] mterry: with non-blocking [16:34] AlbertA, this is a specific use case, not a general thing that USC always wants to do [16:34] AlbertA, I'm specifically trying to synchronize rendering between two sessions [16:35] mm...which is making me kind of think there [16:35] I mean if its literally just a fade [16:35] then the fade could be done [16:35] server side [16:35] with set_alpha [16:35] mterry: but the problem is the animation will be already over [16:35] Not just a fade. Different elements grow and become more opaque, each on their own timer [16:35] racarr__, ^ [16:35] mterry: in the greeter [16:35] Mm -.- [16:35] AlbertA, sorry, how do you mean? [16:36] mterry: is it just a fade? or some other cutesy stuff? [16:36] AlbertA, I mean, that's the problem I have today that I'm trying to solve yeah [16:36] mterry: I'm thinking more in general terms [16:36] mterry: that may change in the future [16:36] AlbertA, cutesy stuff. Panel drops down from top, clock time grows from 0.8 to 1.0 size and goes from 0 to 1 opacity [16:36] clock fades in similarly [16:36] mterry: yeah that's what I mean, you couldn't do that at the mir server side [16:36] mterry: qt controls all that [16:37] mterry: but is it possible for the greeter to start in hide mode (hide in qt sense) [16:37] AlbertA, 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 it [16:37] mterry: right - but that kinda goes agains the non-blocking decision [16:38] AlbertA, I agree as a general thing. But I'm saying there is a specific use case where we do actually want the ability to block [16:38] this is only in the specific case though, triggered by shell code in USC [16:38] mm [16:38] AlbertA, this isn't about app lifecycle [16:38] kgunn: mterry: where it was decided that mir would not enforce at all rendering loop behavior implicitly by blocking [16:39] mterry: I guess if its short lived it should be ok [16:40] mterry: 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] mterry: just curious [16:41] AlbertA, 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-specific [16:42] mterry: plus in any case, it would be hard to do frame level synch transitions to screen [16:42] And the problem is really a compositor specific one. Not really greeter-specific. I feel like the abstraction for this belongs in mir compositor code [16:42] mterry: you most likely would get some black frames at the beginning [16:44] mterry: maybe if we send transition events to each of the sessions that are transitioning from each other [16:44] mterry: and we wait until the transition event is acked [16:45] mterry: like one for being transitioned to [16:45] mterry: and one for being transitioned out of [16:45] AlbertA, 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:46] mterry: so we send transition out of - wait until ack - the client receives it [16:46] client fades out, acks back [16:46] mterry: does its cutesy shutdown transition animation, finishes and acks the message [16:46] yeah, that would be ideal [16:46] mterry: and the other client receives transition to [16:46] mterry: and same deal [16:47] AlbertA, except... I'm not sure what we do there. [16:47] AlbertA, that seems like a separate problem from being able to freeze it until ready? [16:47] AlbertA, the greeter appears before we're ready to transition to it [16:48] mterry: well maybe we could block until a first ack is received [16:48] mterry: or something.... [16:48] mterry: maybe begin transition into [16:48] mterry: server blocks until begin transition into acks [16:49] AlbertA, yeah, we could add a special message for 'freeze' that is part of this set of messages [16:49] mterry: and only for sessions that have registered for transition notifications [17:28] AlbertA, mterry seems like waiting for the first swap buffers call after the transition has been initiated is the trigger you are looking for here [17:30] tvoss: yeah that would be more sensible, because waiting for an ack would be "dangerous" for misbehaving clients [17:30] AlbertA, yup, exactly. [17:37] tvoss, 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:38] mterry, that would require an occlusion event [17:38] mterry, AlbertA something we would need to add anyway [17:40] tvoss: yep [17:43] tvoss, meaning we don't have that yet, OK [17:43] mterry, yup [17:48] tvoss, occlusion being a way to tell a client it isn't actually visible on screen? That sounds exactly the semantics of my situation indded [17:51] * kdub makes an argument the scene would be the best one to compute occlusion [17:57] kdub, +1 [17:59] i guess though, for max flexibility, the compositor should submit an occlusion scanner or something like that [17:59] mterry, 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? [18:00] tvoss, you mean why isn't the greeter process lifecycled? [18:00] tvoss, 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.8 [18:00] tvoss, 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 lifecycled [18:01] tvoss, and ideally this would be frame-perfect [18:02] mterry, that is surely the case, but then: we expect clients receiving a lifecycle event to prepare a "final" good rendering [18:16] tvoss, 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 finicky [18:17] or maybe just any suspend event. I suppose we could redo the animation on screen wake too... [18:17] mterry, so is that a viable option for you? [18:20] tvoss, I think so...? Let me look into it [18:20] mterry, ack, drop me a mail with your ideas/thoughts, so we can pick up the discussion tomorrow [19:13] kdub: +1 - for flexibility you could add an optional - filterfilter that resurrects false negatives.. [20:40] i'm always very pleased when I get to do matrix stuff [20:40] 'all that math was worth it!' :P [20:41] You mean like dodging bullets, etc? [20:41] :p [20:45] lol === beidl_ is now known as beidl [21:13] interesting...i've been testing xmir w/ non-blocking swap all day...and comparing to good ol' x [21:13] i don't think x today works the way duflu says... [21:13] i find plenty that still renders when occluded and screen blank even in x [21:18] I agree re: occlusion [21:19] thought screen off would block swap buffers in composited GLX/compiz but who knows [21:22] hmm .oO(X11 terrible times .. years ago when I once messed with xlib - I never managed to properly treat the expose and damage events) [21:26] lol [23:40] racarr__: Yo! [23:44] racarr__, kgunn_: Whether or not screen off blocks GLX_swap_buffers is driver dependent! [23:44] Yay! [23:51] RAOF: Morning! [23:53] racarr__: And a fine Easter Monday to you!