=== mibofra is now known as Guest89474 === Cimi_ is now known as cimi [09:54] Hello folks! How I can join to alpha testing of https://www.youtube.com/watch?v=c3PUYoa1c9M&feature=youtu.be&t=2m45s ? [10:05] Hi. I'm trying to force landscape orientation in an SDL2 game on Ubuntu Phone. I've found I can obtain a MirConnection* and a MirSurface*, and was wondering if either of those pointers are worth investigating to force a change in orientation? I don't know much about Mir and don't want to be chasing a dead-end [10:07] mcphail: Yes, I believe we added APIs that will help you. Let me check === shiznix_ is now known as shiznix [10:07] duflu: great! [10:08] mcphail: I think it is: mir_surface_set_preferred_orientation(MirSurface *surface, MirOrientationMode orientation); [10:08] Although never used it myself so don't know if it's fully wired up [10:09] duflu: ooh - that sounds like it. Do you happen to know which version of Mir that first appears? Is it available on the Mir running on vivid phones? [10:10] mcphail: It will take a minute to check [10:11] duflu: cheers. I greatly appreciate this [10:12] (bzr is far too slow) [10:12] mcphail: you could look in mir_toolkit/mir_surface.h to see what's available [10:12] alan_g: I'll do that. Thanks for the hint [10:13] mcphail: Yes it is in Mir 0.12 (vivid) [10:14] But also relies on the server to honour it. Which Unity8 should by now [10:14] duflu: that's brilliant news! Look forward to trying this out this evening [10:14] No problem.... 'night... [10:14] Thanks duflu, alan_g et al [10:23] u_glide: I know there were a lot of experimental branches to different components in that proof-of-concept - while some of that has landed I think I don't think there's yet a version with it all integrated. [10:23] hey there [10:24] is there any documentation on starting unity8 manually/in debug mode? [10:25] trying to debug http://paste.ubuntu.com/11763124/ [10:25] "ERROR: QMirServer - Mir failed to start" [10:25] on a snappy personal image [10:25] the mir demo server works on the same machine and I can start a gtk application and use it [10:38] seb128: normally I'd suggest asking greyback but I've not seen him around recently [10:43] alan_g, right, seems he's on vac this week [10:49] seb128: may no longer be current but... "Aug 27 17:44:04 camako: MIR_SERVER_NAME=session-0 MIR_SOCKET=/run/mir_socket QT_QPA_PLATFORM=mirserver /usr/bin/unity8" [10:50] Aug 27 17:46:17 camako: it's started by upstart usually. "start unity8" does the job. /usr/share/upstart/sessions/unity8.conf the config file [10:50] HTH [10:53] alan_g, thanks === alan_g is now known as alan_g|lunch === alan_g|lunch is now known as alan_g === Guest89474 is now known as mibofra === ValicekB_ is now known as ValicekB === dandrader is now known as dandrader|lunch [16:09] Mornng [16:11] Afternoon === alan_g is now known as alan_g|EOD === dandrader|lunch is now known as dandrader [18:37] dandrader, can you tells us anything about how the Mir server nested in Unity 8 connects with the system compositor? [18:39] bregma, that's quite a vague question. but the unity-system-compositor puts a socket file that unity8 connects to [18:40] bregma, I think mir guys are better suited to answer that [18:40] dandrader, yeah, that much is clear [18:40] bregma, when it comes to mir details, I know very little. [18:40] dandrader, we're trying to connect a client directly to the system compositor witout Unity 8, we're just having trouble finding where in the whole Unity 8 stack the mir_connect gets called [18:41] bregma, it's in qtmir [18:41] there is no mir_connect call in qtmir [18:41] or mir_connect_* [18:42] bregma, but it's all done there, one way or another [18:42] * dandrader checks [18:42] somewhere in src/platforms/mirserver [18:42] bregma, so, on startup, mir will try to connect as a nested server from options given to it [18:43] havent looked into how that's negotiated, let me poke around qtmir quickly [18:43] the trick is somehow it gets the environment variable MIR_SERVER_NAME and passes that to mir_connect(), but neither the enviroment variable nor the mir_connect call appear in the qtmir code [18:44] right mir can process that from the environment [18:44] or the command line [18:45] I don't see qtmir forcing nested mode either [18:46] maybe it's in the upstart session [18:46] naturally obfiscated code [18:47] eh, just too many ways to pass in options :) [18:48] the obfuscation is that most of the functionality is implicit and elsewhere rather than explicit and readable by humans with the code in front of them [18:48] zen coding [18:49] bregma, I think magic is in the env vars set by /usr/share/upstart/sessions/unity8.conf [18:49] dandrader, no, the env vars are set by LightDM, but it's how they're used that stymies us [18:54] It's not obfuscated it's intentionally abstracted [18:54] because unity8 doesn't know if its running nested or on [18:54] a real hardware platform or on [18:54] an offscreen platform [18:54] or whatever [18:55] mir_demo_server_minimal --help has all the default mir options with a description [19:02] bregma, the connect code is in the nested code within mir...specifically src/server/graphics/nested/mir_client_host_connection.cpp [19:03] the connection name can either come from a --name cmd line option [19:03] or a MIR_NAME env variable [19:03] MIR_SERVER_NAME [19:04] kdub: oh right the prefix is MIR_SERVER... [19:06] soo in a sense we'll need a nest server to render into mir? Or change how USC works (which doesnt seem like a small task) [19:06] nested* [19:07] as it just sits there waiting for "next_name" (which seems to be waiting for a session name of "session-0") [19:07] to say its ready to display, and no longer booting [19:07] if, instead of a mir_server I attempted just a mir client with the same session name/app name.... [19:08] how problematic would that be haha... [19:08] a mir client with a connection name of "session-0" would work assuming you have permissions to the socket [19:08] AlbertA, it has to push a frame correct? As i made a very simple client that just connected and waited for ever [19:08] and didnt do anything :( [19:10] bschaefer: why wouldn't you draw? [19:10] AlbertA, well mainly ... we just want to boot process to be over [19:10] ie. we want freedom to do w/e we want on the socket :) [19:10] * bschaefer just renames the spinner app the session-0 [19:10] and sees what happens [19:11] bscahefer: oh...does USC wait to pong lightdm until the first frame? [19:11] AlbertA, it looks like theres a hackish stuff in umm shell? Or surface observeer [19:11] where it waits for 2 frames to post [19:11] bschaefer: the archive version waits until a couple of frames [19:11] to say the surface is ready [19:11] yeah [19:11] yeah to work around a black frame bug.... [19:11] AlbertA, i've to use an older version 15.04 [19:12] yeah, but ill try renaming the spinner to session-0 and see what happens :) [19:12] you could try just swapping buffers without drawing at all [19:12] AlbertA, well i would need to set up egl etc [19:12] thats what i was avoiding, set egl, pick the correct pf create the surface [19:12] * bschaefer was being lazy [19:12] there's a mir_buffer_stream_swap_buffers() [19:13] not in 15.04 :( [19:13] no 0.13 [19:13] mir [19:13] * bschaefer should just move this dang snappy image to 15.10 [19:13] in 0.12: mir_surface_swap_buffers_sync [19:13] right, but i still need egl set up [19:13] otherwise it'll do nothing (in the driver, i would think) [19:13] nah, it'll just think you're a software client [19:13] o [19:14] true, i was thinking i needed at lease a created mir surface [19:14] * bschaefer tries that [19:14] kdub, AlbertA thanks! [19:16] o no... i guess next_name is "" for me... meaning ... im never getting set_next_session ... which is what it looks like session switcher is using to figure out if [19:16] is_session_ready_for_display(next_name) [19:17] bschaefer: ummm...that comes from lightdm right? [19:18] AlbertA, yeah [19:18] now im just thinking...do i have something messed up in the confs hmm [19:18] racarr: can I get a review for https://code.launchpad.net/~mir-team/platform-api/remove-mirserver/+merge/262284 ? [19:19] thing is this is bregma USC log http://paste.ubuntu.com/11765460/ [19:19] racarr: it's on top of your delete-deprecations branch [19:19] and i dont see any mention of a next session setup [19:19] but unity8 is working hmm well ill try just making a client with session-0 and go from there [19:20] maybe i've been looking at the wrong code... ... i mean ... session switch makes sense since it talks about booting [19:20] AlbertA: On it [19:21] ooo nm [19:21] if (allowed_to_display_active && is_session_ready_for_display(active_name)) [19:21] * bschaefer missed that part [20:03] soo i have the session setup in such as way that [20:03] is_session_ready_for_display == true [20:03] Allowed to display active == true [20:03] booting == false [20:03] show_spinner == false [20:04] but still only 1 frame of my demos are renderering :( [20:04] 1 frame renderers then goes back to a black mir server [20:05] * bschaefer doesn't really under stand why only 1 frames renders ... if the session is active and ready for display [20:05] bschaefer: it will only composite the session/connection named "session-0" [20:05] any surfaces created over that connection (well probably only the first) will be rendered [20:06] AlbertA, that make sense... so i've to create a launcher in a sense [20:06] dang [20:06] soo now i need to create a new mir server to render w/e i want haha [20:08] bschaefer, surely all you need to do is make sure your client connects as session-0? [20:08] bregma, yeah [20:08] but ... that would mean w/e app we now connect we need to make sure its name is "session-0" [20:08] i suppose ... that is hackable... [20:08] bschaefer, yeah, that's "all" [20:09] will there be issues if more then 1 app shares the same appname? [20:09] * bschaefer doesn't think so [20:09] since all demos share the same name [20:10] bschaefer, we do not expect that to ever happen with what we're doing [20:10] bregma, true [20:10] but just a thought [20:10] * bschaefer should have thought about doing this earlier [20:11] though the spinner will be an issue since it'll keep opening/closing (since once the session-0 goes down it opens the spinner up) [20:11] bregma, so im just going to do, once a session is opened and the shell/window manager sees it [20:12] im going to change its name to "session-0" ... should give a free pass to all [20:12] or w/e app we write [20:12] will need the app name "session-0" [20:12] bschaefer, (1) there is no shell or window managers and (2) a free pass for all is a security hole bigger than Windows itself [20:13] bregma, thats what USC does [20:13] err [20:13] USC is the simple shell/window manager [20:13] (or attempts to be) [20:13] USC is just a compositor [20:13] Unity8 is a shell and window manager [20:14] but to make a server you need to add the shell/window manger bits (from what im reading) [20:15] bregma, [20:15] http://bazaar.launchpad.net/~unity-system-compositor-team/unity-system-compositor/trunk/view/head:/src/window_manager.cpp [20:15] though i think thats just basic compositing.... [20:15] bschaefer, all we want is an app running full screen: no shell, no window management [20:15] right [20:16] bregma, i think we can make USC do that [20:19] bregma, yup (hacking the session-0 as the name for all new session opening works but thats just to test thats the real issue...) [20:19] soo from here... [20:19] get the SDK working [20:19] * bschaefer goes back a week === dandrader is now known as dandrader|afk === dandrader|afk is now known as dandrader [21:15] bschaefer: Hi. I'm still trying to be able to set the orientation to landscape for an SDL2 game on the phone. I can use the SDL_SysWMinfo to get a MirConnection* and MirSurface*, but mir_surface_set_preferred_orientation() doesn't seem to do anything useful. Any hints on what else I can try? [21:16] mcphail, not sure if thats really working on pure mir [21:16] IIRC its done in qtmir but not yet done for pure mir surfaces [21:17] bschaefer: the Neverball game in the store sets orientation, but I'm not sure how it does it. That is SDL2 rather than qt [21:17] hmm it must be doing something... unless it was forced in qml [21:17] (somehow) [21:17] if you force all surfaces in qml to be landscape [21:18] * bschaefer isnt 100% sure how its getting landscaped through neverball [21:18] racarr, would you happen to know about landscapes and surfaces? [21:18] bschaefer: it doesn't seem to have any Qt/QML at all. Just a pure SDL app [21:18] popey, you run neverball on unity8 right? [21:19] mcphail, i know it works on pure mir, not sure if you tested it out your self or if you watched popey video [21:19] bschaefer: tested neverball? I have it installed on the phone [21:20] hmm and on your phone you're just running a bare mir_demo_server? [21:20] or through a *.desktop file? [21:20] bschaefer: I launches through a .desktop file hook [21:20] it [21:21] mcphail, when i say running through qtmir/qml i mean if you're running it on the phone it goes through our qt compositor [21:21] aah [21:21] so on the phone when you get a surface its composited by qtmir [21:21] the layers of abstarction are confusing [21:21] very hahaha [21:21] *abstraction [21:21] * bschaefer gets lost all the time [21:22] heh [21:22] so I need to poke qtmir in some way? [21:22] (yes, I run it on the phone) [21:22] that im not sure, i think ... *think* qtmir/qml handles the rotation [21:22] which then you would request a surface for that rotation (not sure how to) or how thats handled [21:23] so when you grab the surface from SDL2 [21:23] the unity8 doesnt like you messing with the "orientation" [21:23] since unity8 is what reallly controls things, all you can do is merely suggest what you want [21:23] so by the time SDL2 gets the surface, the orientation is already a fait accompli? [21:23] through the mir API [21:24] mcphail, sdl2 requests a surface from the mir server [21:25] from there it gets generated by the server and handed back, the W/H might be differnet as well IIRC [21:25] its all confusing :( [21:25] bschaefer: you're not wrong there [21:25] i had an issue with the title eating up space [21:25] etc, but that should be handled correctly now [21:26] as far as actually getting things to rotate im not sure, and ... someone who is better versed at unity8/qtmir would be more helpful ... possibly [21:26] ie. greyback would know this answer (but hes not here) [21:26] bschaefer: Ha! thanks anyway. I'll lurk and post if I see him [21:27] mcphail, good luck! [21:27] Cheers. Thanks for your advice [21:28] mcphail, also if you figure your question out let me know! (would like to know how to do that as well :) [21:28] Will do :). Really need to track down the neverball dev [21:29] you can always dig through the source :) [21:29] and check the SDL calls [21:30] mcphail, what it could do it do landscape on its own [21:30] ie. it renders based on H/W [21:30] soo it could do that internally [21:31] * bschaefer hasn't tried neverball [21:33] bschaefer: from what I've made out from the source on github, there isn't anmything fancy done to force orientation. I'm not sure if that source matches the finished product, though [21:33] you can always try apt-get source neverball to see what its like in main [21:33] (could be different) [21:34] there is a separate touch branch from the main trunck. I've had a look through the git diff for that [21:34] *trunk [21:35] I think I'm going to have to look again [22:03] mcphail: good spot on the swiping in that bug [22:06] popey: does that clear up neverball for you? [22:23] bschaefer: looks as if you are right about neverball. I think it is hard coded to render "fake" landscape orientation, so it isn't a general solution for all sdl apps [22:27] mcphail, yeeah was afraid of that :( [22:29] aww [22:29] mcphail: no, not tried, just impressed you stumbled upon that "fix" [22:29] popey: it only fixes it until you release your finger :) [22:29] get more fingers [22:30] MAX_FINGERS=11 [22:30] ha! [22:30] thats bregma joke...but i think it was actually true