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