=== mibofra is now known as Guest24484 === davmor2_ is now known as davmor2 === marcusto_ is now known as marcustomlinson === alan_g is now known as alan_g|lunch === Guest24484 is now known as mibofra === alan_g|lunch is now known as alan_g === mibofra is now known as Guest46448 === Guest46448 is now known as mibofra === mibofra is now known as Guest29234 [15:57] hello, so im running into an interesting issue. [15:58] on a barebone system, i've set up a lightdm session that runs unity-system-compositor, the mir server starts up just fine [15:58] but when i attempt to run a demo on it by (export MIR_SOCKET=/run/lightdm-mir-0) it only renders the first frame [15:58] then goes black [15:59] soo things that take a second to swap buffers last longer such as the eglflash [15:59] so after the first swap buffers nothing else renders === Guest29234 is now known as mibofra [16:30] bschaefer: a Mir server connects to USC and a client to that server? Or you're connecting the client direct to USC? [16:31] alan_g, hmm im connecting directly the socket that was produced by USC [16:31] /usr/sbin/unity-system-compositor.sleep --file '/run/lightdm-mir-0' --from-dm-fd 12 --to-dm-fd 15 --vt 7 --enable-hardware-cursor=true [16:32] bschaefer: I can't remember the details but USC gets instructions what to display over dbus [16:32] alan_g, i suppose i dont see a mir server it self running processes wise, but i kind of though USC was a server? (Since it had a cursor) [16:32] bschaefer: it is [16:32] alan_g, o .. hmm who would be good to poke about that? [16:33] As it would be nice to connect directly, but if i need to go through dbus [16:34] bschaefer: on recent versions of USC you can "bypass" the dbuss stuff with --debug-without-dm & --debug-active-session-name [16:35] But that's not intended for production scenarios [16:35] alan_g, name client connects with being the username? [16:35] alan_g, well shots, as this would be for a kiosk type system [16:35] where we have no unity8 [16:35] bschaefer: No, the name it gives in the connection call [16:36] o i see, i can give that a try to figure out if thats the issue [16:36] thanks! [16:39] vogons: I think we'll have to merge this one manually: https://code.launchpad.net/~michael.nelson/mir/snappy-packaging-fix-makefile/+merge/262415 [16:40] AlbertA: +1 [16:41] AlbertA, because the dest (sanppy-packaging branch) is not configured for autolanding? Makes sense. [16:43] alan_g, USC doesn't seem to know those args [16:44] bschaefer: I guess they haven't hit archive yet [16:44] alan_g, yeah thats what i was thinking shoot [16:44] yeah im running 15.04 [16:44] (in the VM) [16:44] alan_g, i just find it strange i get 1 frame (which would be a poor security authenticator) [16:44] if 1 frame keeps leaking [16:45] Yes, that would be a bug [16:45] Could you use mir_demo_server instead of USC? (Although the 0.14 series would be more useful) [16:46] Or do you need e.g. the display manager support [16:46] ? [16:46] alan_g, i need the ... upstart session [16:46] from lightd [16:47] lightdm ---> usc [16:47] IIRC [16:47] as i need the dbus session for the ubuntu SDK [16:49] In that case you need to get the display manager to tell USC to show your client. [16:50] alan_g, how does one do that? dbus? [16:50] AlbertA: have you looked at how that^ happens? [16:50] what is the difference between the display manager and USC? [16:51] AlbertA, i have an entire ubuntu 15.04 image with the issue on it :) (reproducible) [16:51] bregma: I think that's what the --from-dm-fd --to-dm-fd sockets given to USC connect to [16:52] what is the display manager then? Do i even have one? [16:52] or the USC is doing that, and passes that to the mir server? [16:52] LightDM is the display manager [16:52] * alan_g thinks it is intended (by someone long ago) behaviour [16:52] i see [16:52] LightDM == "light display manager" [16:52] duh [16:53] but all LightDM should do is fork off USC and pass its socket name into the session [16:53] USC should be the display server [16:53] right, but something has to be *actively* causing the demos to render black (or render over the client) [16:54] * bschaefer assumes the background could be rendering over the client [16:54] but if it's been too intimate with its first cousin Unity8 there may be a problem [16:54] yeah [16:54] * bregma cues up some banjo music [16:54] haha [16:54] bregma, maybe theres some argument i can add to lightdm [16:54] So USC gets told (over dbus I think) "active-session-name='something'" and then 'something' is allowed to show [16:54] to idk...something [16:55] alan_g, i see [16:55] i could attempt to figure out how to send dbus message to USC [16:55] But I've only seen the USC end of the code [16:55] (And stubbed it out for debugging) [16:56] alan_g, would that be RAOF department? I could always poke him later today [16:56] alan_g: I don't remember at the moment.... [16:56] bschaefer: yeah he'll most likely point you in the right direction :) [16:57] I'm not sure. I know alf_ reworked some of the dbus internals and AlbertA looked at some related parts of the stack. [16:57] AlbertA, cool thanks! [16:57] yeah... ill try to send some dbus stuff through to test around [16:57] bschaefer: or mterry may also know [16:57] alan_g, were those args you gave before for dbus or the command line args when starting the server [16:58] i think seb was also working with lightdm/unity-next stuff [16:58] They're USC command line (to bypass all the dbus stuff so I could run the damn thing as Mir server) [16:58] alan_g, yeah they must not be in main yet :( [16:58] thanks again! [16:58] yw [17:00] bschaefer: well in touch - it is whoever calls usc-wrapper in /usr/share/ubuntu-touch-session.... [17:00] AlbertA, for .. the dbus stuff? [17:00] AlbertA, i wont have that though since im not using unity8 [17:00] bschaefer: no I mean the --from-dm-fd --to-dm-fd options [17:00] or ubuntu-touch [17:01] i think at this point i just need to figure out ... what unity8 is doing [17:01] that it no longer is doing that is required for rendering [17:01] as i need to fill in those roles if needed [17:01] does USC only work if it's hosting a nested Mir server maybe? [17:01] AlbertA, bregma those folders dont exists on my VM [17:01] bregma, maybe i need to start a "session" server? [17:02] ie. nested... [17:02] bregma: it works as long as something supplied "active-session-name='something'" and it gets a session called 'something' [17:02] the session is named session-0 [17:02] i get that from logs [17:02] too much mystery here [17:02] maybe the active session isn't being set [17:02] haha yeah... === alan_g is now known as alan_g|EOD [17:03] bschaefer: maybe you can reverse engineer from here :) [17:03] http://bazaar.launchpad.net/~phablet-team/ubuntu-touch-session/trunk/files [17:04] AlbertA, ill see what i can find! Thanks! [17:04] http://bazaar.launchpad.net/~phablet-team/ubuntu-touch-session/trunk/view/head:/52-ubuntu-touch.conf [17:04] looks like thats doing something lightdm related [17:04] seb128, heeey, soo did you have any issues with lightdm/USC and rending? [17:04] rendering* [17:05] bschaefer, ECONTEXT [17:05] when? [17:05] seb128, :), soo [17:05] using what? [17:05] right, let me fill you in [17:05] :-) [17:05] so, i've a 15.04 system. I've install lightdm/USC and configured it such that USC is running on boot (and auto logins) [17:05] i see the hardware cursor [17:06] seb128, from there when i run a demo client i only see 1 frame rendered before it goes black [17:06] seb128, my guess is you didnt run into this since you're using unity8 which fills in those holes [17:06] right [17:06] but wanted to double check :) [17:06] cool, soo it has to be something unity8 is doing [17:06] ill dig through what AlbertA gave me [17:30] AlbertA, so interestingly if i set the spinner to a mir demo client it renders fine [17:30] soo im assuming the USC is rendering its own surface that is being forced to the top [17:30] drawing over the demos when they are first asked to render on the USC [17:30] bschaefer: yeah USC has logic to either show "the spinner" when there's no session active [17:30] or hide it [17:30] once a session name arrives and its activated [17:31] AlbertA, soo i think thats the issue then... how do we "start the session" [17:31] alan_g|EOD, was talking about it [17:31] bschaefer: that's the part I'm not familiar with...it's a message that arrives through that dm socket [17:31] specified when usc is started.... [17:32] but I'm not sure who sends it [17:32] AlbertA, cool, thanks! (slowly making progress haha) [17:43] bschaefer: so examining processes in ubuntu-touch phone device [17:43] it's a pipe, [17:44] with lightdmroot at one end [17:44] lightdm...sorry [17:44] not sure if that helps :) [17:44] AlbertA, all info is helpful :) [17:44] soo a pipe from lightdm ... so bregma was thinking it was a rasied signal [17:45] that USC was waiting for [17:45] that unity8 usually does when its up and running [17:48] bschaefer: no a message containing the expected session name is received.. [17:48] and the session name is "session-0" [17:49] through that pipe... [17:49] hmm bregma is talking about logind now [17:49] which would [17:49] write to that FD [17:50] bschaefer, it's LightDM that writes the sessionId [17:51] I dunno where LightDM gets it from yet, but I'm assuming it;s related to logind or similar [17:52] well i have: [17:52] [+0.14s] DEBUG: Session pid=803: Started with service 'lightdm-autologin', username 'ubuntu' [17:52] [+0.17s] DEBUG: Seat seat0: Session authenticated, running command [17:52] [+0.17s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0 [17:52] things like that [17:52] im not sure if... [17:53] the session starting from lightdm "means" the session we want [17:53] bschaefer, is that from /var/log/lightdm? [17:54] bregma, yeah [17:54] * bschaefer pastes the whole log [17:55] http://paste.ubuntu.com/11758128/ [17:57] bschaefer, what does /usr/bin/mir-barebone-session do? [17:58] bregma, simple: http://paste.ubuntu.com/11744099/ [17:58] starts upstart [17:58] and set a couple ENV vars [17:58] the log in the pastebin shows LightDM activates session c1, which means it sends the required stuff to USC over the aforementioned socket of love [17:58] http://bazaar.launchpad.net/~phablet-team/ubuntu-touch-session/trunk/view/head:/ubuntu-touch-session [17:59] which does a few more things but nothing i saw we needed needed [18:02] bregma, this is the USC log: http://paste.ubuntu.com/11758157/ [18:02] the biggest thing i see is: set_active_session 'session-0' [18:02] which means ... i seems to be getting set the active session [18:02] AlbertA, ^ [18:03] it seems* [18:03] which means the spinner should stop but hmm [18:03] maybe something else is missing [18:03] I'm wondering if something needs to tell USC to switch to the next session, since the spinner is the first session? [18:04] that makes sense [18:04] * bschaefer looks at unity8 [18:04] bschaefer: right, so once the mir client connects...it checks if the name matches the given session name...and shows that.... [18:04] hides the spinner... [18:04] AlbertA, this would be done in lp:unity8? most likely? [18:04] * bschaefer hopes [18:04] bschaefer: probably qtmir [18:04] it could be done when it creates its nested server... [18:05] AlbertA, o right, cool thanks ill look through there [18:05] probably names it session-0 [18:05] * bschaefer hopes it gets grepped [18:06] the term 'session' seems to be woefully overloaded here [18:06] AlbertA, no hard coded "session-0" [18:06] very [18:06] we should call everything a 'thing' [18:06] Thing 1 and Thing 2 [18:06] that would make more sense, since thing doesnt mean anything explicitly... [18:07] neither does 'session' at this point [18:07] yeah [18:07] bregma, that has a nice ring to it ! i'm all for it ... espectially shine everything will then have an internet too :) [18:07] *since [18:08] bschaefer: so probably an upstart configuration? [18:08] 1188 results found for session [18:08] AlbertA, oo good idea, i can check around [18:08] http://www.cliparthut.com/clip-arts/350/thing-1-2-350883.jpg [18:08] haha [18:08] haha [18:08] hehe... [18:09] though i think we should namespace them "that thing", "other thing" ... istead of just numbering ... thats so unpersonal [18:09] bregma: there are always 2 things [18:11] gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.UpdateActivationEnvironment "@a{ss} {'MIR_SOCKET': '$MIR_SERVER_FILE'}" [18:11] looks somewhat ... [18:11] o nm [18:11] thats to point to a different mir socket [18:12] bregma: https://www.youtube.com/watch?v=biW9BbWJtQU [18:14] * bregma raised a passel of kids and is only too familiar with the trouble caused by Things [18:16] bregma, if you look at /usr/share/upstart/unity8.conf [18:16] we might need something like this [18:17] it raises the signal [18:17] im not 100% sure if that dbus signal is needed [18:17] USC could wait for that dbus call [18:17] for all we know :( [18:18] bregma, i could try to ... make a eglplasma upstart conf [18:18] where it exec a mir demo instead of unity8 and see what happens... [18:18] (hopefully it'll stop the demo) [18:19] I see no signal in that file? [18:20] bregma, o duh i mean: [18:20] # Tell unity-mir to raise SIGSTOP after we start [18:20] initctl set-env UNITY_MIR_EMITS_SIGSTOP=1 [18:20] soo we'll have to create a program that [18:20] does that... [18:21] bschaefer, you can try sending a SIGSTOP from the command line, but I suspect that whole SIGSTOP thing is at a higher level than running a Mir demo on USC [18:21] if its even needed... i suppose i should look at USC [18:21] bregma, possibly [18:22] never hurts to try... [18:22] bregma, you send the signal at USC right? [18:22] bschaefer, I do no such thing [18:22] bregma, haha... [18:23] i mean the signal needs to be sent to USC? [18:23] I do not believe so [18:23] I see nothing in the code that catches SIGSTOP [18:24] I think the whole SIGSTOP thing is a u-a-l thing [18:24] we're trying to avoid that level [18:24] yeah [18:24] and sending a sigstop at UCS... (i cant believe it does this) but stops the spinner anything else trying to render :( [18:25] * bschaefer inserts sarcasm above [18:25] bregma, im just going to look at USC to see if see a wait [18:25] or see something talks to it to ... idk stop the spinner stuff [18:25] onces the spinner hides everything shuld work [18:28] bschaefer: USC receives a session name, stores it internally [18:28] then when somebody connects to USC (i.e. mir_connect(...) ) [18:28] that connection api takes a name... [18:29] when it makes it to the server...USC checks if that session name is the active session or not... [18:29] if it's not then it's not shown [18:29] AlbertA, shouldnt i be getting a denied somewhere then? [18:29] it continues to run that app just fine [18:29] bschaefer: it probably should be denied...but it's just simply not shown [18:30] yeah [18:30] http://bazaar.launchpad.net/~unity-system-compositor-team/unity-system-compositor/trunk/view/head:/src/session_switcher.cpp [18:30] http://bazaar.launchpad.net/~unity-system-compositor-team/unity-system-compositor/trunk/view/head:/src/session_switcher.cpp#L95 [18:30] AlbertA, i was just looking through that file [18:31] i just dont know how to "add" a sesssion to it [18:31] AlbertA, and it looks like session-0 is being added (which could just be the spinner it self) [18:32] * bschaefer tracks down how something would actually add [18:32] bschaefer: right so that part is ok... [18:33] the part that you will be missing is when your client connects to usc... [18:33] that session name [18:33] should match the session name given by lightdm [18:33] AlbertA, is there something you can add to clients like --session-name? haha [18:33] AlbertA, so if i run a client on the command line, what session name would it have? [18:34] * bschaefer assumes undefined i suppose [18:34] bschaefer: right...currently [18:34] it's mir_connect(..., app_name) [18:34] app_name = "egldemo" [18:34] and the ... is the socket path [18:34] but theres no session name [18:34] so you should probably be able to see that in the unity system-compositor log [18:35] ooo [18:35] AlbertA, that makes sense: Opening session egldemo [18:35] i've been seeing that [18:35] soo i need to add egldemo to the session list [18:35] (somehow) [18:35] either that...or change the name in the examples.... :) [18:35] haha true :) [18:36] AlbertA, but ideally, there would be some sort of dispatcher that would run any client and add each session name [18:36] to the USC session list [18:36] ./launcher_app [18:36] but then... [18:36] thats pretty much what unity8 does with UAP [18:36] bschaefer: yeah...just don't know what that is.... [18:36] :) [18:36] IIRC [18:37] AlbertA, cool, thanks for the help! [18:38] bschaefer: np [18:40] bschaefer: oh BTW...the name used for nested...is configurable through --name or I suppose also MIR_NAME [18:40] so somewhere, there should be a MIR_NAME=session-0 [18:41] AlbertA, but we dont have a nested server atm... do we NEED a nested server? [18:41] the nested configuration will use that to specify the connection name to the host server [18:41] bschaefer: no...just in case you want to figure who is setting that connection name in the case of unity8 [18:41] AlbertA, oo right, thanks! [18:42] * AlbertA heads out to late lunch === charles_ is now known as charles [19:31] AlbertA, after further looking into things... we are just going to use the mir_demo_server for the server (for now) [19:32] until we look at re-making the USC (as we need a super basic server) [19:32] the only issue i can see is the mir socket needs permissions for a user to run a demo on it [19:32] (ie. i need to do chmod 777 /run/mir_socket) [22:33] robert_ancell, hey, i've got a lightdm question. Try to create a bar minimal mir server (right now just attempting with the mir_demo_server). The only [22:34] issue is its not getting to the session part, where upstart get started [22:34] bschaefer, what does lightdm.log say? [22:34] if i use a config to start USC its fine and the session script starts [22:34] robert_ancell, its loads the mir server fine [22:34] * bschaefer looks again [22:34] just not the session script [22:35] bschaefer, what is the contents of the session .desktop file? [22:35] And using autologin? [22:35] robert_ancell, http://paste.ubuntu.com/11744105/ [22:35] robert_ancell, yup autologin [22:36] That looks good [22:36] robert_ancell, http://paste.ubuntu.com/11759515/ [22:36] robert_ancell, nothing to crazy, and the mir server did start [22:36] the only difference is i skip the $@ arguments when i run the mir_server [22:37] vs USC [22:37] * bschaefer pastebins the lightdm conf [22:37] robert_ancell, http://paste.ubuntu.com/11759518/ [22:37] if i do the run-mir-* it does no run the session script [22:37] if i run the USC wrapper the session script runs [22:38] (big issue being that upstart doesnt start) [22:38] bschaefer, oh, you don't want to run a compositor at all, i.e. just a single Mir server? [22:38] robert_ancell, yup! [22:39] bschaefer, have you set up permissions so a user can run mir_demo_server fine? [22:39] robert_ancell, thats an issue, and we were thinking of creating a small USC type program [22:39] that will manually 777 the socket (like USC does) [22:39] robert_ancell, is that the issue? [22:40] bschaefer, the main issue is getting access to /dev/input [22:40] robert_ancell, the server works besides the mir socket it self needing 777 manually [22:40] cursor input (this is in a VM as well) [22:40] ok, should be all set up then I guess [22:40] robert_ancell, the only issue is i cant get upstart --user to run [22:41] bschaefer, why do you need upstart? [22:41] since the session script doesn't work with i just run my mir demo (which upstart is needed for the dbus session for the ubuntu SDK) [22:41] ah [22:41] fun stuff going against everything mir is atm :) [22:41] USC depends on unity8 to do stuff soo figured it might be easier to do a simple server [22:42] but now ... im not 100% sure why the session script ie. mir-barebone-session doesn't run [22:42] if and only if i run the mir-demo-server, if i run USC the session script runs fine [22:42] bschaefer, it might be easiest to make a simple compositor (i.e. mir-barebone-compositor) [22:42] robert_ancell, well what does lightdm need? The umm [22:42] It wouldn't have to do much, just take USC and gut out everything [22:43] --from-dm-fd 12 --to-dm-fd 15 [22:43] bschaefer, LightDM just needs to be able to tell the compositor which session to set as active [22:43] yeah, and theres a small binary protocol that runs over that [22:43] robert_ancell, hmm i see, and with out that, it wouldn't know that the session is set as active? [22:43] meaning it never runs the session script? [22:43] (since its not active?) [22:43] * robert_ancell looks [22:44] but yes, there is some signalling across that [22:44] robert_ancell, what would be required for a barebone compositor? [22:44] err rather what library/dbus interface do i need to hook up with [22:44] * bschaefer guess USC has all that is needed [22:45] ah, yes. LightDM waits for the compositor to say it is "ready" [22:45] robert_ancell, i see, thats all i really need? [22:45] to get the session to be active? [22:46] bschaefer, The compositor has two messages to send to LightDM - READY (i.e. started) and SESSION_CONNECTED (i.e. the child Mir server has connected to the compositor) [22:46] * bschaefer is trying to avoid the whole USC session list/accept stuff [22:46] robert_ancell, hmm so if i only use 1 mir server.. i suppose once lightdm starts up the mir server i can just send both [22:46] since i dont need a nested server [22:46] A barebone compositor would just have to accept all connections, make their surfaces fullscreen and switch between them on request of LightDM [22:47] Yes, you could just fake it and LightDM would be fairly happy [22:47] robert_ancell, cool thanks ill look into making that :) [22:47] robert_ancell, i mean ... i dont think i need i need a nest server? [22:47] * bschaefer doesn't 100% understand why i would need one [22:48] robert_ancell, mainly my goal is to create a snappy image such that a bare bone mir server is running [22:48] and the ubuntu SDK works on it [22:48] You can use one server in theory, but that requires LightDM to be more aware of how that would work. [22:48] allowing for a kiosk type system to be set up [22:48] Sure [22:48] robert_ancell, as long as i can fake it atm [22:48] i think that'll be good [22:48] just need to send the right signals off [22:48] My guess is based on the current setup a simplistic compositor will be the easiest path [22:49] robert_ancell, yeah sounds reasonable, it would start the mir server it self? [22:49] vs the mir_demo_server [22:49] just like USC? [22:49] * bschaefer would prefer that anyway [22:49] so i can change the socket to 777 [22:49] The sockets would all be set up correctly so you wouldn't have to do any hacks there [22:50] robert_ancell, USC set the socket to 777 it self :) [22:50] Yes, there's an open bug about doing it properly :) [22:50] system_compositor.cpp:111: if (server->public_socket() && chmod(server->get_socket_file().c_str(), 0777) == -1) [22:50] :) [22:50] robert_ancell, but cool i can dig through that and rip out everything that is not needed [22:50] thanks! [22:50] np, let me know how you go [22:51] will do, ill most likely get stuck somewhere along the way