=== SAM113101 is now known as sam113101_afk === sam113101_afk is now known as sam113101 [03:26] duflu: do you know if FSM stand for "finite state machine" in the context of this bp ? https://blueprints.launchpad.net/ubuntu/+spec/client-1404-mir-rootlessx [03:26] kgunn: Sounds like a good guess :) [03:27] I don't know any other "FSM" [03:31] I think the "synaptics FSM" is something I've proposed fixes to in the past actually. The touch stuff is obviously a state machine [03:46] kgunn: I'd just note Synaptics is a brand and most devices using that code are not Synaptics. So maybe libsomethingelse is more appropriate. [03:48] It would be awesome if more devices used Synamtics, but seems more common are the cheaper Alps and Elan [06:02] duflu, you ok with me top-approving https://code.launchpad.net/~vanvugt/mir/fix-r1049-regressions/+merge/191776 [06:02] ? [06:02] tvoss: Yep [06:02] duflu, done [06:06] * tvoss -> airport [06:17] alf_: Froze? [06:19] duflu: yes, back again [06:19] alf_: OK, meeting done I guess [06:38] alf_: I've never used a GL context in two threads simultaneously before like Mir does. How safe is it? [06:40] alf_: Oh. Apparently very safe as each DisplayBuffer gets a separate context :) [06:40] duflu: Mir uses different shared contexts in different threads, which is safe. The only caveat is that you need to synchronize the creation of resource ids (e.g. textures) [06:41] alf_: Yes it was the texturing that worried me. But that's OK if it really is a separate context per display [06:48] alf_: Seen this? 1234563 [06:48] bug 1234563 [06:48] bug 1234563 in Mir "mir_demo_standalone_render_surfaces crashes in glDrawArrays" [Medium,Triaged] https://launchpad.net/bugs/1234563 [06:50] duflu: let me try... is it consistently reproducible? [06:50] alf_: On saucy desktop it seems. Even after a full reinstall [06:56] duflu: confirmed [06:57] Joy [06:58] Huh. That race condition I thought I saw... would only exist if display buffer compositors shared a renderer. But they don't === dandrader is now known as dandrader|afk === dandrader|afk is now known as dandrader [10:09] Sigh. Maybe I can make better progress in the kitchen than I have in code today. === dandrader is now known as dandrader|lunch === alan_g is now known as alan_g|lunch === dandrader|lunch is now known as dandrader [14:06] alf_, hello! You around? === alan_g|lunch is now known as alan_g [14:07] mterry: Hi! [14:07] alf_, OK, I have questions for you and/or alan_g about nested Mir... [14:08] mterry: ask it then [14:08] alf_, so I tried to get a unity8 shell to talk to USC using the new-style MIR_SOCKET=fd://XX mode [14:09] And I ran into an error about Mir connection not being made. Upon investigation, it seems like qtubuntu and friends are designed for either being mirserver or mirclient, but not both. So I manually put in a mir_connect() call into unity8 for testing [14:10] Which presumably consumes the MIR_SOCKET fd. But then it looks like part of qtubuntu does later want to use MIR_SOCKET for its server parts later [14:10] And I get a Bad file descriptor error [14:11] mterry: there's an example of using the fd mode in the mir_demo_server_basic example. [14:11] alf_, alan_g: I guess my question is, have you guys only tested on pure Mir, or have you actually got a qtubuntu-using app to do nested server mode? [14:11] I'm not sure what you're doing with USC - I know robert_ansell was working on it at one point [14:12] mterry: we've only done testing with the mir_demo_* [14:12] alan_g, yeah he was. USC is basically just the root Mir server. He's got some branches where it talks to lightdm and passes back fds for lightdm to hand to other sessions as MIR_SOCKET [14:13] mterry: a qtubuntu app shouldn't care about whether it is talking to a nested or host server [14:13] I'm using those. It seems to work a little bit, but qtubuntu doesn't anticipate this use case, and I'm trying to see the easiest way to make it work [14:13] mterry: or in this case app==unity8? [14:13] alf_, app==unity8 [14:14] alf_, there are ubuntumirclient and ubuntumirserver QPA plugins. And they each seem to assume it's only client or only server [14:15] I can propose a fix, I just am still uncertain what that fix is yet. I guess I'll look at the demo code. === dandrader is now known as dandrader|afk [14:17] mterry: why does unity8 need both ubuntumirclient and ubuntmirserver? It does all the rendering in-process so ubuntumirserver should be the only one it needs. Mir hides the details of being nested or not. [14:17] alf_, well, I guess that's my problem. It doesn't seem to [14:18] mterry: does unity8 use both plugins in the non-nested case? [14:19] Because it shouldn't know anything about being nested [14:23] alan_g, alf_: sorry, got disconnected. Not sure what you saw latest. But: should a nested Mir need to call mir_connect? [14:23] (on app/shell-side code) [14:23] mterry: no [14:23] alan_g, OK. So my error I saw was probably unity-mir making assumptions and calling a piece of Mir code that required mir_connect... I'll dig into that side of things [14:24] Rather than go down the road of calling mir_connect myself [14:24] mterry: it shouldn't do anything differently than in the standalone case [14:24] alan_g, OK, good to know === dandrader_ is now known as dandrader [14:51] Good mirning! [14:56] Good afternoon [15:16] alan_g, so during mir::run_mir (called by unity-mir), I'm getting that "connect not called" error. I think during DisplayServer construction. I wouldn't expect such an error during a mir-internal call, right? [15:19] alf_, ^ [15:19] mterry: just looking for whre that comes from [15:20] sure [15:21] mterry: it sounds like mir is using the nested path, but something isn't going as expected [15:22] mterry: sounds like the connection doesn't get established. Does the fd actually exist in the nested process? [15:23] alan_g, theoretically. robert_ancell's branches do some clever fd passing around to make sure. What posix call tests fd existence? [15:24] mterry: is it feasible to launch unity8 using mir_demo_server_basic --launch-client unity8 - and avoid USC? [15:25] Or does it need some other setup? [15:26] alan_g, I could, as a test, sure. Let me get back to you [15:27] mterry: obviously you need any switches to get it into nested mode [15:27] alan_g, well, mir_demo_server_basic sets MIR_SOCKET, right? That should auto-switch to nested-mode. [15:27] fcntl(fd, F_GETFD is the FD test [15:28] racarr, ah cool. I'll test that after this demo server test [15:28] mterry: It does - I just didn't know if that was all you need [15:29] racarr: Maybe we should use that to give a more helpful error message. [15:32] Seems useful. [15:34] The way the platform-api symbols are is a little weird for stuff like this [15:34] if you accidentally link libplatform-api-mirclient and libplatform-api-mirserver (nested unity8 shouldn't need platform API mirclient) [15:35] I guess you are going to get the wrong symbols? [15:35] maybe not, because we have the two different build QPAs with explicit linkage that are opened at runtime... [15:35] not sure how Qt loads them [15:35] *shrug* [15:44] alan_g, going through the demo, I get "Address already in use"... [15:45] alan_g, in about the same spot (DisplayServer constructor) [15:45] mterry: try mir_demo_server_basic --standalone etc [15:46] alan_g, the server should fallback to standalone, since it doesn't have MIR_SOCKET, but ok [15:47] I'll also add --no-file [15:48] mterry: Doh! that's the one I was thinking of [15:50] alan_g, aha! OK. That worked with --no-file. So the fd being bad somehow leads to the "mir not connected" message? [15:51] alan_g, so lightdm/usc must be fucking up the fd passing [15:51] mterry: It seems that way - but Mir should be giving a better diagnostic [15:52] I suspect it is hanging (or failing in some other bad way) in the connect call to a duff socket [15:54] * alan_g thinks he should log a bug [16:10] perhaps old news to other people but I finally figured out how to get a a good terminal on the phone. lol. adb shell is always weird with some terminal programs (i.e. text editors tend to not work). ssh over nexus 4 wifi sucks [16:11] adb shell service ssh start [16:11] is where it's at [16:11] adb forward tcp:2222 tcp:22 [16:11] adb forward tcp:3768 tcp:3768 [16:11] ssh phablet@127.0.0.1 -p 2222 [16:11] err ignore the 3768 [16:11] thats some unity qml debug stuff lol [16:29] kdub: @display-construction-overhaul2, do we need to access the native types outside of any of the other resources created with them? [16:31] the fb and the hwc? [16:31] kdub: yes the native android types [16:33] i don't think so (if i understand the question properly :) ) [16:41] kdub: DisplayCommander, nice [16:41] hah :) i like that one too [16:51] greyback: it's not immediately obvious to me which packages I need to compile unity-mir - so could you answer a quick question? Why does src/unity-mir/surfacecontroller.cpp need the line "#include "? AFAICS it never uses the SurfaceStackModel definition. [16:52] alan_g: "sudo mk-build-deps -ir debian/control" should install what you need, no? [16:52] greyback: ack was just remembering that [16:53] alan_g: it's needed for the constructor of the SurfaceController, so ms::SurfaceStackModel is defined [16:54] But it only needs a declaration [16:54] greyback, haven't tried in a while, but have we sorted out how to cross compile those components? [16:54] apologies for asking again :) [16:55] greyback: I still see "qmirserverapplication.h:20:27: fatal error: QGuiApplication: No such file or directory" [16:55] kdub: tbh I've not tried since you last asked. But I agree we need to solve this story. A properly working pbuilder arm chroot would be very nice [16:56] alan_g: have you "qtbase5-dev" installed? [16:57] greyback: yes [16:57] alan_g: make clean, re-run 'qmake' and see if that works [16:57] and make ofc [16:59] greyback: no change (and no target ofc) [17:00] greyback: I'm hitting EOD anyway. Maybe it will work in the morning. (But I'm pretty sure that header isn't needed) === alan_g is now known as alan_g|EOD [17:01] alan_g: ok, talk tomorrow [17:02] alan_g|EOD: if I remove that header, it fails to build. [17:02] What's the error? [17:03] greyback: What's the error? [17:04] alan_g|EOD: error: invalid use of incomplete type 'class mir::surfaces::SurfaceStackModel' [17:04] alan_g|EOD: EOD, we can deal with this tomorrow :) [17:04] sorry :D [17:04] np [17:05] * alan_g|EOD wishes for the line number. But has to take wife out to eat. ;) [18:20] racarr, (just bouncing naming suggestions around), how about "MonitorTraits" instead of "DisplayInfo" [18:27] kdub: I don't like monitor because monitors don [18:27] 't have a number_of_framebuffers_available [18:28] which is why I thought Output was nice. [18:28] yeah, but output is pretty overloaded [18:28] hmm [18:29] I think within the mga:: namespace it's relatively clear, Mir, graphics, android, output attributes [18:29] but not totally. [18:30] I didn't think DisplayInfo was that unclear [18:31] I think Attributes...to me carries a little more connotation that this is the configured information (i.e. the configured size, etc) [18:31] and not just the capabilities [18:31] which I think of as 'Info' but I'm not sure if the dictionary would back me up on that one aha [18:32] I think maybe it's just a struct instead of an interface [18:33] kdub: Hmm [18:33] is it just [18:33] the DisplayConfiguration? [18:33] eh, not quite [18:34] why? [18:34] i'd say a configuration would be the most expansive, so would include multimonitor configuration [18:34] an OutputConfiguration then perhaps [18:34] lets see what terms gbm has.. [18:34] I mean, it's the configuration of a single display/output/monitor and some properties which resutl from that configuration (i.e. number of framebuffers available) [18:34] but the thing is, presumably in multimonitor scenarios [18:34] this changes [18:35] which is why I thought the word "Configuration" might make sense [18:35] you don't expect the information for a display to change but of course the configuration does [18:37] in multimonitor, it doesn't change [18:38] its just the class for the attributes/traits of each monitor [18:38] kdub: Are you sure? I mean [18:38] if I have an external display hooked up [18:38] am I guaranteed the same number of framebuffers [18:38] at various resolutions etc [18:38] also...the size can change right? [18:38] size can't really change [18:39] oh yeah [18:39] I forgot android hal doesn't really do sophisticated monitor configuration [18:43] kdub: I will let it toss around in my head a little more...DisplayInfo isn't bad though [18:44] I do think that a struct with constant data members [18:44] is perhaps a little more clear [18:45] because it's more like just some immutable piece of info than an object right [18:45] eh, have to think about that [18:45] essentially, thats what it is already [18:46] ? from the consumer perspective the values can chance [18:46] change [18:46] they are just const member functions now right? or did I misread [18:48] they are const member functions [18:49] even at that though, i'd rather have the interface [18:51] I think it's better to enforce the immutability, and the struct is a little better for tests [18:51] because you don't have to write these, mock the interface, set the getter functions to return values [18:51] type tests...which I think [18:52] are more strong coupling than good tests [18:52] in many cases [18:56] it makes for more test structure, but doesn't increase coupling in the production code [18:56] if i want to rename a struct member vs rename a class function, same amount of churn [18:57] i guess i could make a struct with its copy/assign deleted [19:01] kdub: Except, you don't have to update the tests that are passing in literals like {size, format, number} [19:02] I mean if you were writing the test first, you wouldn't write some class like Stub or MockDisplayInfo and set it up to return the three const values right [19:02] you would pass them as a literal tuple to the consumer [19:02] and then verify the state [19:02] as opposed to the interaction (consumer calls get_size(), which really isn't actually very interesting) [19:03] i'm sure i did just that at one point, but i probably wrote the DisplayInfo tests before the other ones [19:04] :) I mean at this point with an existing code base, and refactoring v new stuff writing the tests first of course becomes blurry [19:04] but I just mean, in the ideal, if you were sitting down to write some new class [19:05] and you knew it needed to do some computation based on the display size, pixel format, and number of frame buffers [19:05] well I feel like I would probably use a struct and literals and not an interface [19:05] but *shrug* [19:08] i guess i have to program that struct in different ways [19:09] and don't know if i want to have two constructors for the struct [19:12] ? If the values don't change shouldn't you initialize it with [19:12] the values themselves [19:12] and not the objects which contain the state [19:12] these classes are wrappers around two different HAL's (which actually own the state) [19:14] HWCInfo does a bit more than FBInfo [19:28] kdub: That seems kind of strange to me and it feels more like two different objects using the HALs should pack the same kind of struct [19:28] but [19:28] I will do a deeper read of the code [19:28] and comment on launchpad [19:28] because im not sure exactly how it all links up [23:14] I think it's something about powerd with the android integration tests failing [23:14] kdub: The symtoms are pretty weird. If you 'stop unity8' while the screen is blanked...about 9/10 times [23:14] integration tests will then fail with the error to post to fb device [23:14] unity8 will not start back, etc [23:15] yeah, i'm not convinced we have that architecture worked out just yet [23:15] if you press power button, even though unity8 is dead [23:15] something happens [23:15] because now the integration tests will all pass [23:15] except the binary will hang while exiting [23:15] and that's as far as I've gotten [23:15] you cant kill it at that point lol [23:16] reading through powerd now [23:19] static void update_internal_state(void) [23:19] .... [23:19] .... [23:20] that is not the best function name ;) [23:30] racarr, you know how to use powerd-cli? [23:37] kdub: Oh. I sort of do now :p [23:40] kdub: Maybe I dont :p I was hoping to turn the display on with it [23:40] but it hangs [23:40] i just do 'powerd-cli display on', seems to work [23:41] kdub: After stopping unity8 while the display was off? [23:42] i just do that to keep the display on once its gotten to the on state [23:44] oh I see