/srv/irclogs.ubuntu.com/2013/10/23/#ubuntu-mir.txt

=== SAM113101 is now known as sam113101_afk
=== sam113101_afk is now known as sam113101
kgunnduflu: 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-rootlessx03:26
duflukgunn: Sounds like a good guess :)03:26
dufluI don't know any other "FSM"03:27
dufluI think the "synaptics FSM" is something I've proposed fixes to in the past actually. The touch stuff is obviously a state machine03:31
duflukgunn: I'd just note Synaptics is a brand and most devices using that code are not Synaptics. So maybe libsomethingelse is more appropriate.03:46
dufluIt would be awesome if more devices used Synamtics, but seems more common are the cheaper Alps and Elan03:48
tvossduflu, you ok with me top-approving https://code.launchpad.net/~vanvugt/mir/fix-r1049-regressions/+merge/19177606:02
tvoss?06:02
duflutvoss: Yep06:02
tvossduflu, done06:02
* tvoss -> airport06:06
duflualf_: Froze?06:17
alf_duflu: yes, back again06:19
duflualf_: OK, meeting done I guess06:19
duflualf_: I've never used a GL context in two threads simultaneously before like Mir does. How safe is it?06:38
duflualf_: Oh. Apparently very safe as each DisplayBuffer gets a separate context :)06:40
alf_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:40
duflualf_: Yes it was the texturing that worried me. But that's OK if it really is a separate context per display06:41
duflualf_: Seen this? 123456306:48
duflubug 123456306:48
ubot5bug 1234563 in Mir "mir_demo_standalone_render_surfaces crashes in glDrawArrays" [Medium,Triaged] https://launchpad.net/bugs/123456306:48
alf_duflu: let me try... is it consistently reproducible?06:50
duflualf_: On saucy desktop it seems. Even after a full reinstall06:50
alf_duflu: confirmed06:56
dufluJoy06:57
dufluHuh. That race condition I thought I saw... would only exist if display buffer compositors shared a renderer. But they don't06:58
=== dandrader is now known as dandrader|afk
=== dandrader|afk is now known as dandrader
dufluSigh. Maybe I can make better progress in the kitchen than I have in code today.10:09
=== dandrader is now known as dandrader|lunch
=== alan_g is now known as alan_g|lunch
=== dandrader|lunch is now known as dandrader
mterryalf_, hello!  You around?14:06
=== alan_g|lunch is now known as alan_g
alf_mterry: Hi!14:07
mterryalf_, OK, I have questions for you and/or alan_g about nested Mir...14:07
alan_gmterry: ask it then14:08
mterryalf_, so I tried to get a unity8 shell to talk to USC using the new-style MIR_SOCKET=fd://XX mode14:08
mterryAnd 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 testing14:09
mterryWhich 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 later14:10
mterryAnd I get a Bad file descriptor error14:10
alan_gmterry: there's an example of using the fd mode in the mir_demo_server_basic example.14:11
mterryalf_, 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
alan_gI'm not sure what you're doing with USC - I know robert_ansell was working on it at one point14:11
alan_gmterry: we've only done testing with the mir_demo_*14:12
mterryalan_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_SOCKET14:12
alf_mterry: a qtubuntu app shouldn't care about whether it is talking to a nested or host server14:13
mterryI'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 work14:13
alf_mterry: or in this case app==unity8?14:13
mterryalf_, app==unity814:13
mterryalf_, there are ubuntumirclient and ubuntumirserver QPA plugins.  And they each seem to assume it's only client or only server14:14
mterryI can propose a fix, I just am still uncertain what that fix is yet.  I guess I'll look at the demo code.14:15
=== dandrader is now known as dandrader|afk
alf_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
mterryalf_, well, I guess that's my problem.  It doesn't seem to14:17
alan_gmterry: does unity8 use both plugins in the non-nested case?14:18
alan_gBecause it shouldn't know anything about being nested14:19
mterryalan_g, alf_: sorry, got disconnected.  Not sure what you saw latest.  But:  should a nested Mir need to call mir_connect?14:23
mterry(on app/shell-side code)14:23
alan_gmterry: no14:23
mterryalan_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 things14:23
mterryRather than go down the road of calling mir_connect myself14:24
alan_gmterry: it shouldn't do anything differently than in the standalone case14:24
mterryalan_g, OK, good to know14:24
=== dandrader_ is now known as dandrader
racarrGood mirning!14:51
alan_gGood afternoon14:56
mterryalan_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:16
mterryalf_, ^15:19
alan_gmterry: just looking for whre that comes from15:19
mterrysure15:20
alf_mterry: it sounds like mir is using the nested path, but something isn't going as expected15:21
alan_gmterry: sounds like the connection doesn't get established. Does the fd actually exist in the nested process?15:22
mterryalan_g, theoretically.  robert_ancell's branches do some clever fd passing around to make sure.  What posix call tests fd existence?15:23
alan_gmterry: is it feasible to launch unity8 using mir_demo_server_basic --launch-client unity8 - and avoid USC?15:24
alan_gOr does it need some other setup?15:25
mterryalan_g, I could, as a test, sure.  Let me get back to you15:26
alan_gmterry: obviously you need any switches to get it into nested mode15:27
mterryalan_g, well, mir_demo_server_basic sets MIR_SOCKET, right?  That should auto-switch to nested-mode.15:27
racarrfcntl(fd, F_GETFD is the FD test15:27
mterryracarr, ah cool.  I'll test that after this demo server test15:28
alan_gmterry: It does - I just didn't know if that was all you need15:28
alan_gracarr: Maybe we should use that to give a more helpful error message.15:29
racarrSeems useful.15:32
racarrThe way the platform-api symbols are is a little weird for stuff like this15:34
racarrif you accidentally link libplatform-api-mirclient and libplatform-api-mirserver (nested unity8 shouldn't need platform API mirclient)15:34
racarrI guess you are going to get the wrong symbols?15:35
racarrmaybe not, because we have the two different build QPAs with explicit linkage that are opened at runtime...15:35
racarrnot sure how Qt loads them15:35
racarr*shrug*15:35
mterryalan_g, going through the demo, I get "Address already in use"...15:44
mterryalan_g, in about the same spot (DisplayServer constructor)15:45
alan_gmterry: try mir_demo_server_basic --standalone etc15:45
mterryalan_g, the server should fallback to standalone, since it doesn't have MIR_SOCKET, but ok15:46
mterryI'll also add --no-file15:47
alan_gmterry: Doh! that's the one I was thinking of15:48
mterryalan_g, aha!  OK.  That worked with --no-file.  So the fd being bad somehow leads to the "mir not connected" message?15:50
mterryalan_g, so lightdm/usc must be fucking up the fd passing15:51
alan_gmterry: It seems that way - but Mir should be giving a better diagnostic15:51
alan_gI suspect it is hanging  (or failing in some other bad way) in the connect call to a duff socket15:52
* alan_g thinks he should log a bug15:54
racarrperhaps 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 sucks16:10
racarradb shell service ssh start16:11
racarris where it's at16:11
racarradb forward tcp:2222 tcp:2216:11
racarradb forward tcp:3768 tcp:376816:11
racarrssh phablet@127.0.0.1 -p 222216:11
racarrerr ignore the 376816:11
racarrthats some unity qml debug stuff lol16:11
alf_kdub: @display-construction-overhaul2, do we need to access the native types outside of any of the other resources created with them?16:29
kdubthe fb and the hwc?16:31
alf_kdub: yes the native android types16:31
kdubi don't think so (if i understand the question properly :) )16:33
racarrkdub: DisplayCommander, nice16:41
kdubhah :) i like that one too16:41
alan_ggreyback: 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 <mir/surfaces/surface_stack_model.h>"? AFAICS it never uses the SurfaceStackModel definition.16:51
greybackalan_g:  "sudo mk-build-deps -ir debian/control" should install what you need, no?16:52
alan_ggreyback: ack was just remembering that16:52
greybackalan_g: it's needed for the constructor of the SurfaceController, so ms::SurfaceStackModel is defined16:53
alan_gBut it only needs a declaration16:54
kdubgreyback, haven't tried in a while, but have we sorted out how to cross compile those components?16:54
kdubapologies for asking again :)16:54
alan_ggreyback: I still see "qmirserverapplication.h:20:27: fatal error: QGuiApplication: No such file or directory"16:55
greybackkdub: 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 nice16:55
greybackalan_g: have you "qtbase5-dev" installed?16:56
alan_ggreyback: yes16:57
greybackalan_g: make clean, re-run 'qmake' and see if that works16:57
greybackand make ofc16:57
alan_ggreyback: no change (and no target ofc)16:59
alan_ggreyback: I'm hitting EOD anyway. Maybe it will work in the morning. (But I'm pretty sure that header isn't needed)17:00
=== alan_g is now known as alan_g|EOD
greybackalan_g: ok, talk tomorrow17:01
greybackalan_g|EOD: if I remove that header, it fails to build.17:02
alan_g|EODWhat's the error?17:02
alan_g|EODgreyback: What's the error?17:03
greybackalan_g|EOD: error: invalid use of incomplete type 'class mir::surfaces::SurfaceStackModel'17:04
greybackalan_g|EOD: EOD, we can deal with this tomorrow :)17:04
greybacksorry :D17:04
alan_g|EODnp17:04
* alan_g|EOD wishes for the line number. But has to take wife out to eat. ;)17:05
kdubracarr, (just bouncing naming suggestions around), how about "MonitorTraits" instead of "DisplayInfo"18:20
racarrkdub: I don't like monitor because monitors don18:27
racarr't have a number_of_framebuffers_available18:27
racarrwhich is why I thought Output was nice.18:28
kdubyeah, but output is pretty overloaded18:28
racarrhmm18:28
racarrI think within the mga:: namespace it's relatively clear, Mir, graphics, android, output attributes18:29
racarrbut not totally.18:29
racarrI didn't think DisplayInfo was that unclear18:30
racarrI think Attributes...to me carries a little more connotation that this is the configured information (i.e. the configured size, etc)18:31
racarrand not just the capabilities18:31
racarrwhich I think of as 'Info' but I'm not sure if the dictionary would back me up on that one aha18:31
racarrI think maybe it's just a struct instead of an interface18:32
racarrkdub: Hmm18:33
racarris it just18:33
racarrthe DisplayConfiguration?18:33
kdubeh, not quite18:33
racarrwhy?18:34
kdubi'd say a configuration would be the most expansive, so would include multimonitor configuration18:34
racarran OutputConfiguration then perhaps18:34
kdublets see what terms gbm has..18:34
racarrI 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
racarrbut the thing is, presumably in multimonitor scenarios18:34
racarrthis changes18:34
racarrwhich is why I thought the word "Configuration" might make sense18:35
racarryou don't expect the information for a display to change but of course the configuration does18:35
kdubin multimonitor, it doesn't change18:37
kdubits just the class for the attributes/traits of each monitor18:38
racarrkdub: Are you sure? I mean18:38
racarrif I have an external display hooked up18:38
racarram I guaranteed the same number of framebuffers18:38
racarrat various resolutions etc18:38
racarralso...the size can change right?18:38
kdubsize can't really change18:38
racarroh yeah18:39
racarrI forgot android hal doesn't really do sophisticated monitor configuration18:39
racarrkdub: I will let it toss around in my head a little more...DisplayInfo isn't bad though18:43
racarrI do think that a struct with constant data members18:44
racarris perhaps a little more clear18:44
racarrbecause it's more like just some immutable piece of info than an object right18:45
kdubeh, have to think about that18:45
kdubessentially, thats what it is already18:45
racarr? from the consumer perspective the values can chance18:46
racarrchange18:46
racarrthey are just const member functions now right? or did I misread18:46
kdubthey are const member functions18:48
kdubeven at that though, i'd rather have the interface18:49
racarrI think it's better to enforce the immutability, and the struct is a little better for tests18:51
racarrbecause you don't have to write these, mock the interface, set the getter functions to return values18:51
racarrtype tests...which I think18:51
racarrare more strong coupling than good tests18:52
racarrin many cases18:52
kdubit makes for more test structure, but doesn't increase coupling in the production code18:56
kdubif i want to rename a struct member vs rename a class function, same amount of churn18:56
kdubi guess i could make a struct with its copy/assign deleted18:57
racarrkdub: Except, you don't have to update the tests that are passing in literals like {size, format, number}19:01
racarrI 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 right19:02
racarryou would pass them as a literal tuple to the consumer19:02
racarrand then verify the state19:02
racarras opposed to the interaction (consumer calls get_size(), which really isn't actually very interesting)19:02
kdubi'm sure i did just that at one point, but i probably wrote the DisplayInfo tests before the other ones19:03
racarr:) I mean at this point with an existing code base, and refactoring v new stuff writing the tests first of course becomes blurry19:04
racarrbut I just mean, in the ideal, if you were sitting down to write some new class19:04
racarrand you knew it needed to do some computation based on the display size, pixel format, and number of frame buffers19:05
racarrwell I feel like I would probably use a struct and literals and not an interface19:05
racarrbut *shrug*19:05
kdubi guess i have to program that struct in different ways19:08
kduband don't know if i want to have two constructors for the struct19:09
racarr? If the values don't change shouldn't you initialize it with19:12
racarrthe values themselves19:12
racarrand not the objects which contain the state19:12
kdubthese classes are wrappers around two different HAL's (which actually own the state)19:12
kdubHWCInfo does a bit more than FBInfo19:14
racarrkdub: That seems kind of strange to me and it feels more like two different objects using the HALs should pack the same kind of struct19:28
racarrbut19:28
racarrI will do a deeper read of the code19:28
racarrand comment on launchpad19:28
racarrbecause im not sure exactly how it all links up19:28
racarrI think it's something about powerd with the android integration tests failing23:14
racarrkdub: The symtoms are pretty weird. If you 'stop unity8' while the screen is blanked...about 9/10 times23:14
racarrintegration tests will then fail with the error to post to fb device23:14
racarrunity8 will not start back, etc23:14
kdubyeah, i'm not convinced we have that architecture worked out just yet23:15
racarrif you press power button, even though unity8 is dead23:15
racarrsomething happens23:15
racarrbecause now the integration tests will all pass23:15
racarrexcept the binary will hang while exiting23:15
racarrand that's as far as I've gotten23:15
racarryou cant kill it at that point lol23:15
racarrreading through powerd now23:16
racarrstatic void update_internal_state(void)23:19
racarr....23:19
racarr....23:19
racarrthat is not the best function name ;)23:20
kdubracarr, you know how to use powerd-cli?23:30
racarrkdub: Oh. I sort of do now :p23:37
racarrkdub: Maybe I dont :p I was hoping to turn the display on with it23:40
racarrbut it hangs23:40
kdubi just do 'powerd-cli display on', seems to work23:40
racarrkdub: After stopping unity8 while the display was off?23:41
kdubi just do that to keep the display on once its gotten to the on state23:42
racarroh I see23:44

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