=== renato_ is now known as Guest91990 === chihchun_afk is now known as chihchun === benonsoftware is now known as Guest69253 [10:04] dednick: re ..._trusted socket. I think the essentials are done (I need some tests around starting up providers - but it ought to "just work" as a side effect of the production changes). Let me know if you try it: lp:~alan-griffiths/mir/permissions-and-error-handling-for-prompt-sessions [10:05] alan_g: thanks. i'll take a look [10:05] dednick: Sorry, wrong branch in paste buffer... lp:~alan-griffiths/mir/spike-trusted-helper-socket === doko_ is now known as doko [10:43] greyback: Hi! In case you know... why are using a QCoreApplication in USC? Is it a left-over? Are we going to need it in the near future? [10:43] alf_: I don't know. mterry would [10:44] greyback: yes, but US is on vacation today :) thanks [10:49] alf_: sorry, I've barely looked as USC code [10:49] greyback: no, worries, I will just remove it and we can put it back if needed [10:51] alf_: it's mainly just adds an event loop so you can use qt signal/slots - it's not used for GUIs [10:53] greyback: ahh, it's used by our dbus infrastructure in USC [10:54] alf_: yeah, would be needed for that too [11:15] alf_: can I ask you some questions on mir, gl configs & mesa? [11:16] greyback: of course [11:16] alf_: the qtcompositor code right now just uses the gl context that Mir chooses for it. Which is perfect on phablet devices as GLES is supported [11:16] alf_: but on desktop, Qt compiled with only desktop GL support. [11:17] alf_: I know in qtubuntu we had a hack to call eglBindAPI(OPEN_GL) which persuaded Mesa to let us use a GLES context with GL shaders and stuff [11:17] alf_: was that it? Nothing else had to be done? [11:18] I'm trying to do the same thing for QtComp but am not having success. [11:20] greyback: I don't recall the detail, only that this was a hack that just happened to work with Mesa. The issue is that since Mir uses GLES2 it links with libGLES2. If qtcompositor comes and indirectly links with libGL (which offers many of the same symbols) there could be trouble. [11:21] alf_: that's an idea. Perhaps there's some lib preloading happening somewhere to get around that [11:26] Oh dear I just realized that default window positioning depends on whether you’re using an LTR or an RTL language [11:27] greyback: but ideally Qt should support selecting GL vs GLES2 at runtime... I think they have made some first steps to support this? [11:27] alf_: qt5.3 does, but our packaging hasn't turned it on [11:32] alf_: ah, it's windows only :( So no change there [11:33] greyback: So, what kind of errors are you getting? [11:37] alf_: http://pastebin.ubuntu.com/7746717/ just a snippit (bit messy, I've debug code in) [11:44] greyback: ok, how about creating a new GL context shared from the GLES2 context that Mir gives you and using that with Qt? [11:45] alf_: that's what qtcomp is doing actually [11:46] http://bazaar.launchpad.net/~mir-team/qtmir/trunk/view/head:/src/platforms/mirserver/miropenglcontext.cpp [11:47] combined with http://bazaar.launchpad.net/~mir-team/qtmir/trunk/view/head:/src/platforms/mirserver/mirserverintegration.cpp#L124 [11:47] greyback: it seems though, that Qt produces a fragment shader for GL but is being compiled with a GLES2 context, and thus complains about missing precision [11:48] alf_: right. So I tried calling eglBindAPI(EGL_OPENGL_BIT) before makeCurrent and swapBuffers, but no good [11:49] err eglBindAPI(EGL_OPENGL_API) [11:49] but same error [11:50] so a difference I see is that in qtubuntu, eglBindAPI is also called before the context is created [11:54] greyback: I don't see how the code in miropenglcontext sets the context to desktop GL. It eventually calls DisplayBuffer::make_current() which will use the built-in mir context (which is GLES2) [11:55] alf_: it doesn't. I had thought that Mesa would "force" a GLES context to accept desktop GL [11:56] alf_: I can confirm, if I hack Mir to use a desktop GL context, this works fine [11:56] this = Qt Comp on desktop [11:56] it's just the GL/GLES mismatch that I'm fighting [11:57] and I'm trying to emulate what qtubuntu does [11:57] greyback: From what I understand, what Mesa accepts is linking against libGLESv2 and asking for a desktop GL context and vice versa and it works [11:58] greyback: but if the current context is GLES2 you can't do GL stuff with it [11:59] alf_: which makes sense to me. [12:00] alf_: so is qtubuntu actually creating a desktopGL context: http://bazaar.launchpad.net/~phablet-team/qtubuntu/trunk/view/head:/src/platforms/base/context.cc#L55 [12:00] just by having bound the api before eglCreateContext [12:00] ? [12:03] greyback: right [12:03] alf_: ok. Then that's my problem then so. Mir creates GLES2 context, but Qt needs desktopGL. === alan_g is now known as alan_g|lunch [12:10] greyback: what do you change in Mir to force a GL context? Only the eglBindAPI() call in display_helpers? [12:11] alf_: I hacked Mir to choose GL context, just to prove to myself Qt would work with it on desktop. I've not tried this eglBindAPI thing before [12:12] greyback: right, I mean how did you hack it, do you have a diff? [12:13] alf_: all extremely messy: http://pastebin.ubuntu.com/7746824/ I hope you can see what I'm attempting though [12:17] greyback: You also mentioned that you hacked Mir itself to produce a desktop GL context. Do you have a diff for that? [12:17] alf_: ah. Maybe, lemme see if I kept it. It was several months ago now [12:19] alf_: I doubt it'll apply cleanly: http://pastebin.ubuntu.com/7746849/ [12:20] it was to add a compile-time option to mir, similar to what Qt had. Think it broke more than it solved overall [12:21] EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT, <- the main bit really [12:26] greyback: If you can confirm that just changing EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT and eglBindAPI(EGL_OPENGL_API) in display_helpers.cpp (while still building mir against libGLESv2) works for you, we can provide a workaround in Mir [12:26] greyback: with the understanding that this is the WRONG way to do it :) [12:26] alf_: it is, definitely [12:29] greyback: but barring Qt having runtime GL vs GLESv2 selection (or perhaps Mir having it?) there is not much we can do, other than take advantage of this fortunate quirk in Mesa [12:29] alf_ yeah. If I can manage to exploit the Mesa quirk, I might be happy enough for now [12:30] greyback: ok, so try just hacking EGL_OPENGL_BIT and eglBindAPI(EGL_OPENGL_API) in display_helpers.cpp and if it works let me know [12:32] greyback: (I want to stress again the "while still building mir against libGLESv2" part) [12:32] alf_: sure === alan_g|lunch is now known as alan_g [13:06] Greetings! [13:09] I'm constantly getting the error "libEGL warning: unsupported platform (null)" when trying to run a mir-client (using mir_demo_server_basic from lp:mir) on my desktop machine (ATI Radeon, driver: Gallium 0.4) [13:09] I also tried passing EGL_PLATFORM=mir, but that doesn't fix it. [13:09] starting a mir-client on this very system used to work just fine a couple of weeks ago. [13:10] What changed in the required procedure to make that work? [13:10] MacSlow: I don't think the error is related, we have been getting it forever (on working systems) [13:11] alf_, I'll try some other clients just for cross-checking... [13:12] MacSlow: How exactly are you are running the server and client, are you using you own build, or packages? [13:12] alf_, hm... the egltriangle example from lp:mir works [13:12] odd [13:13] alf_, the mir-client I'm trying to get to work is the unity-system-compositor-spinner... which works fine on the phone (N4) [13:13] alf_, guess i've to dig deeper === Guest91990 is now known as renato___ === chrisccoulson_ is now known as chrisccoulson === alan_g is now known as alan_g|tea === alan_g|tea is now known as alan_g [14:55] How would one start a mir-client on a current UbuntuTouch image running the unity-system-compositor? [15:03] MacSlow: I think USC still exports a socket to the filesystem, so check you have +rw access and supply that via "-m" [15:06] alan_g, sudo ./unity-system-compositor-spinner -m /run/mir_socket [15:06] alan_g, is what I try to execute... but it fails and only spits out... [15:06] Current active output is 2560x1600 +0+0 [15:06] Server supports 3 of 6 surface pixel formats. Using format: 1 [15:06] and then exits [15:06] running mir-clients used to be a piece of cake some weeks ago [15:08] MacSlow: ls -l /run/mir_socket? [15:10] srwxrwxrwx 1 root root 0 Jul 4 16:50 /run/mir_socket= [15:10] I just tried MIR_SOCKET=/run/mir_socket /usr/bin/unity-system-compositor-spinner [15:10] which did not fail or exit... but the greeter is unresponsive to touch-inputs... I'm restarting the N10 [15:15] MacSlow: how does a demo client behave? E.g. mir_demo_client_display_config -m /run/mir_socket [15:18] alan_g, I've a way to test it... greyback suggested to kill lightdm/unity-system-compositor and start the mir_demo_server_shell [15:18] alan_g, with that as basis it allows me to get my mir-client running and visible [15:19] MacSlow: if you can work with mir_demo_server_shell it eliminate a bunch of code from the mix. [15:21] hm... but oddly the locally compiled unity-system-compositor-spinner (from lp:unity-system-compositor) segfaults while the system-wide installed one does work [15:23] Are they built with the same compiler? [15:24] MacSlow: alan_g: Confirmed, I get the same behavior [15:26] MacSlow: ==9958== Invalid read of size 4 [15:26] ==9958== at 0x50C5D60: cairo_surface_status (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11301.0) [15:26] cairo_surface_status() crashes according to the backtrace [15:26] ==9958== by 0x4032FB: uploadTexture (eglspinner.c:150) [15:26] ==9958== by 0x403BA1: main (eglspinner.c:365) [15:26] ==9958== Address 0x1c is not stack'd, malloc'd or (recently) free'd [15:30] MacSlow: cmake .. -DCMAKE_INSTALL_PREFIX=/usr [15:30] MacSlow: it can't find the png file otherwise [15:32] MacSlow: of course it should just print a nice error message instead of crashing :) [15:33] alf_, I'll add something while I'm fixing the issue I initially wanted to address :) [15:41] dednick: any feedback on lp:~alan-griffiths/mir/spike-trusted-helper-socket? (I've MP'd it now) [15:42] alan_g: hm. I was waying for tyhicks, but just realised that he's on holiday today. 4th July. [15:42] s/waying/waiting [15:42] greyback, alan_g, alf_: got all issues sorted out (on N10 and desktop) soaring away with the optimization for the spinner now... thanks! [15:43] MacSlow: great, have fun :) [15:43] good to hear [15:43] dednick: ack [15:43] alan_g: he's back on monday [15:43] MacSlow: \o/ [15:45] dednick: while that discussion might obsolete the approach I think we need something like this short term. [15:46] alan_g: yes. i agree. I can try take a look at the MP this afternoon === alan_g is now known as alan_g|EOW