/srv/irclogs.ubuntu.com/2014/03/24/#ubuntu-mir.txt

RAOFStupid bastard of an acceptance test! Last time I ran you, you worked!01:29
RAOFOh, oops.01:38
=== duflu_ is now known as duflu
RAOFHey, cool. My touchpad really does support two-finger multitouch.02:48
* tvoss watches Linux Action Show07:53
duflutvoss: Good idea, till I realized how long it was :)08:09
tvossduflu, last third :)08:09
anpokis there a way to batch surface changes together... i.e. move show hide..08:40
anpokand have only one notification08:41
dufluanpok: Not yet. But I did design in the expectation that mir events could arrive in batches. Don't think that's implemented yet09:14
anpokhm I believe the shell would need an API to batch those changes together.09:27
dufluanpok: It's probably a good idea for throughput. But (a) We don't yet have evidence that event throughput is a problem; and (b) It's hard to decide how long to batch events. You could easily cause all sorts of lag bugs09:32
dufluIn theory, any delay could be detrimental to client performance09:32
anpokduflu: ah, no.. thats not what I meant..09:35
dufluanpok: You mean atomic?09:35
anpokin the split greeter switch between greeter and session and on boot09:36
anpokfor these swtiches there is now "spinner" showing a loading screen09:36
anpokand it seems like if u-s-c does spinner->hide() .. check states of surfaces .. greeter or session->show() there seems to be a wrong frame in between..09:37
Saviqguys, do you know the "Qt queues events when rendering blocked" bug from last week?09:38
Saviqthere's a reply from one of the Qt folks that we might need to argue against (or agree and implement...)09:38
Saviqhttps://bugreports.qt-project.org/browse/QTBUG-37677?focusedCommentId=237009&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-23700909:38
anpokhum09:41
tvossSaviq, I can see the need for synchronizing to swap buffers, but I'm a bit hesitant to provide all apps with information about the screen's state09:43
Saviqtvoss, well, it's not about the screen's state, but about the app surface's state09:43
Saviqtvoss, so there's two things... on one hand we're SIGSTOP'ing the apps soon after anyway09:45
Saviqtvoss, so even if they don't care about that, we're fine09:45
Saviq(that == the opaque/expose)09:45
anpokso we would need to send an event when the buffer is not going to be consumed, because it is occuled, and if the screen is turned off09:46
Saviqon the other, shell is affected already, but that we can control and make sure that it does honor those events09:46
tvossSaviq, just to cross-check: the whole app is effectively blocked if swap-buffers does not return, correct?09:47
Saviqtvoss, yes09:47
anpokonly the gui/qml thread and the renderer I though?09:47
anpok+t09:48
Saviqanpok, yes09:48
Saviqanpok, but everything in QML happens on the GUI thread effectively09:48
tvossanpok, which is by default linked to everything else in the process iiuc09:48
anpokor would that also affect other QThreads created, as they do dispatch events through QApplication?09:48
tvossanpok, everything else, too, unless explicitly decoupled09:48
w00ttvoss: no. if you have a thread created yourself, with no synchronisation, that's not going to magically become blocked09:48
w00tthe gui thread is blocked because it's waiting on the render thread to signal completion, which is actually blocked09:49
tvossw00t, sure, fair point. I'm referring to elements being implicitly tied to the gui thread09:49
tvossSaviq, so the music player app issue should be fixed with the media-hub iiuc09:50
Saviqtvoss, sure, but that's just one issue09:51
Saviqtvoss, shell is also affected by that - no volume buttons, no alarms working09:51
Saviqand there's probably more we don't know about09:51
anpokwill qt clients that run animations inside their frame bisbehave with 5.2/5.1 if we dont support them with these events?09:51
tvossSaviq, yup, but I think that it would be easier for us to solve in the shell than for *all* apps09:51
anpoki.e. qt games..09:51
tvossanpok, they won't be running anyway09:52
Saviqanpok, yeah, when screen off they're SIGSTOP'ed, so doesn't *really* matter09:52
tvossanpok, in this particular scenario, they are sigstop'd pretty soon09:52
tvossSaviq, so the only real issue is the shell, correct?09:52
Saviqtvoss, well, no, the issue is that we're disagreeing with Qt on what we do09:53
Saviqtvoss, we need to either convince them to not sync (which must not have been happening in 5.0)09:54
tvossSaviq, at least making it configurable would be handy09:54
Saviqor we need to implement the supported behaviour and not block the rendering thread09:54
tvossSaviq, yeah, my point was that generating the exposure/obscure event for/in the shell is certainly doable09:56
anpokbut the QtQuick renderer thread has to receive that occlusion event before he goes into the blocking eglSwapBuffers call..09:56
Saviqtvoss, not sure why we'd special case it, though...09:56
Saviqanpok, there can't be no blocking eglSwapBuffers call, that's the thing09:56
anpokand that sounds like an easry race condition to run into09:56
anpokok - a failing eglSwapBuffers then?09:57
Saviqor an ignored one...09:57
dufluRemember anything that's not a client or a nested server is "bling". To sync that perfectly to compositing you have to render it in the compositor (i.e. don't use Surfaces)09:58
dufluSee the demo-shell decorations :)09:58
SaviqI'm not sure on what would be the right / correct thing to do here, but obviously what they're saying is that a blocking eglSwapBuffers call is not supported09:59
Saviqat least while the surface is allowed to render, I'd say09:59
Saviqbut yeah ↑ that'd be racy09:59
dufluSwapBuffers is designed to (and must) work asynchronously behind the scenes. If you make it synchronous like a glFinish() then performance is unacceptable10:01
tvossSaviq, hmmm, agreed, it's difficult to say, but using exposure events to encode possible reasons why a call to swap buffers might block/return an error10:06
tvossdoes not seem to be right to me10:06
Saviqtvoss, yeah, it seems they're working under the assumption that swap buffers will always work10:06
duflutvoss, Saviq: eglSwapBuffers always blocks once you've filled the queue. That's how to throttle clients to the refresh rate :)10:07
Saviqduflu, yeah, sure, but that's a "special case"10:07
duflu... which happens "all the time"10:07
Saviqduflu, in our case we're telling the app effectively that the queue is filled when screen is off10:07
tvossSaviq, which actually is quite sensible :)10:08
* duflu goes away to try and finish his work for the evening10:08
Saviqtvoss, not necessarily10:08
Saviqtvoss, not if the assumption from Qt is that the app stops when that happens10:08
Saviqunless we first "tell it" that there's not going to be more swaps possible (with expose/occlude)10:09
Saviqbut that's dangerous10:09
tvossSaviq, it is, and kind of goes against the defined of eglSwapBuffers10:09
tvoss+behavior10:09
Saviqindeed10:09
tvossSaviq, so Qt always assumes the "good" path when calling eglSwapBuffers unless otherwise told10:10
tvossSaviq, races and timings aside, this sounds fragile.10:10
Saviqtvoss, well, not if what it does is just wait for stuff to settle again, and process everything when swapping is possible again10:11
Saviqtvoss, especially when you consider the swapping to only not return when buffer is filled, and indeed you don't want to do unnecessary work until you can swap again10:11
tvossSaviq, what do you mean with "wait for stuff to settle again"?10:11
tvossSaviq, the definition of "unneccessary" becomes quite broad though, if you block the overall event processing on the rendering10:12
Saviqtvoss, well, if you're a GUI app, and are expecting to be able to draw10:12
Saviqtvoss, your GUI thread blocking on you not being able to draw...10:13
Saviqmakes sense to me10:13
Saviqif you're told that you won't be able to draw (expose/occlude), that's another matter10:13
tvossSaviq, hmmm, I think both approaches are valid, i.e., block and not block, where block could be a safe default10:14
Saviqtvoss, sure, we need to come up with a solution, though ;)10:28
Saviqtvoss, as this is the last known 5.2 issue that we need to fix10:29
Saviqtvoss, or well, we at least need guidance on whether we want to argue with Qt folk or not10:33
tvossSaviq, how about proposing making the blocking optional to the qt folks10:39
Saviqtvoss, TBH I'm not convinced, so I wouldn't like to argue that point :)10:40
tvossSaviq, and I'm likewise not convinced that switching off the screen equates to an obscure event10:41
Saviqtvoss, well, in our case it does, as we're unfocusing the app / putting the lock screen on10:41
Saviqtvoss, btw, definition of the expose event http://qt-project.org/doc/qt-5/qwindow.html#exposeEvent10:42
Saviqtvoss, I'd say that that makes sense, as exposed is a broader event than obscured10:43
tvossSaviq, okay, and we would be required to send a resize event?10:43
Saviqtvoss, not sure, why?10:43
tvossSaviq, doc says so10:43
Saviqtvoss, first time10:43
tvossSaviq, hmmm ...10:43
Saviqtvoss, I'd say we're actually sending exposeEvent already10:43
Saviqtvoss, otherwise we'd never draw10:43
Saviqor qt wouldn't10:44
Saviqor maybe we don't, nothing in qtubuntu apparently10:44
tvossSaviq, it's still racy to send the expose event10:45
Saviqtvoss, not if we don't block swap buffers subsequently10:45
Saviqtvoss, so that's the real, architectural, question - should we be ever blocking swap buffers10:46
SaviqQt seems to think we should not10:46
Saviqnot if we want the GUI thread to run10:47
Saviqwhich we want, at least for the shell10:47
tvossSaviq, we should, and we have to ... it's absolutely normal behavior to throttle clients with that10:47
Saviqtvoss, _throttle_10:48
Saviqtvoss, we don't need to throttle if we don't want them to render at all10:48
Saviqand we're SIGSTOP'ing them anyway10:49
Saviqtvoss, don't get me wrong, I'm the devil's advocate here10:49
Saviqtvoss, and that's why I don't want to argue with Qt folk, 'cause it's not me that made (makes) that decision10:49
tvossSaviq, sure, that's fine. I still think that an assumption on eglSwapBuffers not blocking is fragile10:49
Saviqtvoss, and that's what you need to argue with them on :)10:50
tvossSaviq, I guess you are putting the focus on *you* here ;)10:51
Saviqtvoss, I just don't know enough about this10:52
Saviqtvoss, and it's kind of an architectural question10:52
tvossSaviq, sure, no problem. Just created an account in Jira10:52
Saviqand then... you're the architect! :D10:52
tvossSaviq, yup. According to http://www.khronos.org/registry/egl/sdk/docs/man/xhtml/eglSwapBuffers.html10:52
tvossSaviq,  a way of returning early would be to return false and raise EGL_CONTEXT_LOST10:53
tvossSaviq, which is really expensive10:53
Saviqtvoss, sounds so, yeah10:54
tvossSaviq, replied11:22
Saviqtvoss, thanks11:24
Saviqtvoss, btw, I think I found the commit https://qt.gitorious.org/qt/qtdeclarative/commit/a7f61f712:02
* Saviq tries to see if reverting that helps for the time being12:03
Saviqtvoss, FYI: Gunnar replied12:24
tvossSaviq, thanks12:31
tvossSaviq, is qt-project the qt channel I should go to?12:51
Saviqtvoss, #qt-labs12:51
tvossSaviq, thanks12:51
Saviqtvoss, or #qt-quick12:51
Saviqtvoss, maybe the latter, as this seems to be a qml-specific thing12:52
=== alan_g is now known as alan_g|lunch
=== alan_g|lunch is now known as alan_g
=== greyback is now known as greyback|lunch
Saviqtvoss, FYI it's actually https://qt.gitorious.org/qt/qtdeclarative/commit/ebe8b9408cfcd953fae80514aa67e49221541bed that introduces the syncing, I doubt we can revert that with any certainty that it's gonna work14:25
Saviqit does _almost_ apply -R, but I'd really rather not...14:25
=== dandrader is now known as dandrader|afk
=== pete-woods is now known as pete-woods-lunch
=== dandrader|afk is now known as dandrader
=== greyback|lunch is now known as greyback
tvossSaviq, that's indeed looking too complicated to just revert it15:19
=== alan_g is now known as alan_g|tea
=== alan_g|tea is now known as alan_g
=== pete-woods-lunch is now known as pete-woods
mterryracarr, poke!  I figure you might be starting your day soon.  I was curious if that PPA helped with testing the "screen turns back on" bug.  I tested myself with your runServerWithGreeterClient branches to see if they helped, but they didn't.  Not sure why this problem cropped up again (I thought it was already solved)15:59
kgunntvoss: Saviq ...so what's preventing us from using the expose event? seems like that is the given answer ?16:08
tvosskgunn, we certainly can, but it's still racy16:08
kgunntvoss: agreed...i think its a _terrible_ idea16:08
kgunnin general16:08
kgunnbut just living with the "make it happy" moment16:09
kgunn:)16:09
tvosskgunn, specifically when dealing with applications, we would need to wait for the apps to acknowledge the event before we can stall the pipeline16:09
kgunnyeah...long halting sequence16:09
greybackalf__: hey, Mir fails to start on me frequently with this error: std::exception::what: Error opening DRM device16:09
greyback-22, "Unknown error -22"16:09
tvosskgunn, I think we can leverage the expose event in the shell easier, though16:10
greybackalf__: it's a nouveau machine, if that's any help/hindrance16:10
tvosskgunn, and for apps: the music hub will solve the immediate issue of missing EOS16:10
alf__greyback: hmm, I think we have a bug for this, let me see16:10
kgunntvoss: and iiuc, at the base qwindowsysinterface class gives you some guarantees you handling...so no misbehaved apps16:11
tvosskgunn, got difficulties parsing that sentence16:11
tvoss:)16:11
kgunntvoss: just meaning @dealing with applications/waiting for ack's16:12
kgunntvoss: i'm understanding from his response that there's a guarantee for handlling16:12
tvosskgunn, mir would have to deal with that16:12
tvosskgunn, you have to synchronize that across process boundaries16:13
kgunntvoss: right...but from the app side too16:13
tvosskgunn, well, on the app side it's simple16:13
tvosskgunn, what is really challenging is getting that straight over process boundaries16:13
tvosssuddenly, we would need timeouts and stuff16:13
kgunntvoss: sure...and it doesn't solve  the potential race you highlighted to them16:14
alf__greyback: Hmm, I can't find a bug for this exactly (error opening DRM device + error 22 (EINVAL)), but I do remember people were discussing some issues with nouveau16:19
greybackalf__: ok, I'll log a bug anyway16:19
alf__greyback: "fails to start frequently", which I guess means sometimes works?16:19
greybackalf__: yeah, seems to16:19
greybackalf__: so I do a fresh boot, "sudo stop lightdm" and try mir_demo_server_shell16:20
greybackalf__: I'm not missing anything obvious, am I?16:21
alf__greyback: ok, btw you don't need to stop lightdm, you can start mir in e.g. VT1 (although if you get a strange crash you may not be able to vt away in some cases), so keep an ssh connection ready16:22
alf__greyback: what happens if you don't stop lightdm, does it help?16:22
alf__greyback: ok, do you run sudo mir_demo_server_shell?16:23
alf__greyback: s/ok/oh/16:23
greybackalf__: just rebooting to try without stopping lightdm, gimme a min. Yep always sudo16:23
alf__greyback: ok, thanks16:24
greybackalf__: "address already in use" - aha USC is running as mir server....16:27
* greyback digs into help file to find right switch to use nesting16:28
alf__greyback: hmm, so you are running USC... I guess in that case you should stop lightdm, but I wonder if doing so properly stops USC.16:31
greybackalf__: if I stop lightdm, USC still running. Killing bad16:36
alf__greyback: killing bad, for it or for your session? :)16:37
greyback alf__ if I kill, I get the DRM error16:37
greybackand general life rule16:37
alf__greyback: if you leave it running can you run the demo server normally?16:38
greybackalf__: nested mode should work with this, right: sudo mir_demo_server_shell --host-socket /tmp/mir_socket -f /tmp/another_mir_socket16:40
alf__greyback: right, although note that nested servers live inside the context of the host server, so only visible in the host server's VT16:42
greybackalf__: I didn't know that16:43
greybackmakes sense tho16:43
alf__greyback: they work by using a surface the same way a normal application does16:43
alf__greyback: but that (host) mir surface is the framebuffer for all apps connecting to the nested server16:44
greybackalf__: gotcha16:44
alf__greyback: but in any case, stopping USC and starting a demo server should work. In which VT are you trying to start the demo server?16:45
greybackalf__: it is working as nested anyway16:47
greybackalf__: so seems killing lightdm screws up the DRM state16:47
greybackI want to find a clean way to stop USC16:48
=== dandrader is now known as dandrader|lunch
greybackmterry where are you...16:57
kgunngreyback:  i think mterry has the worst wifi ever16:58
greybackwill resort to mail16:59
greybackalf__: I suspect that USC is hanging on shutdown, and so not cleaning up the DRM state. Have asked mterry about it, will see what he says17:09
alf__greyback: ok, ensure it's getting stopped normally (not -9)17:11
greybackalf__: right, it's not. I gets a SIGTERM, but just sits there. So teardown isn't happening for some reason17:12
=== alan_g is now known as alan_g|afk
=== dandrader_ is now known as dandrader
=== alan_g|afk is now known as alan_g
=== dandrader is now known as dandrader|bbl
=== dandrader|bbl is now known as dandrader

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