=== chihchun_afk is now known as chihchun === ara is now known as Guest67693 === chihchun is now known as chihchun_afk [12:16] hey folks, does unity8 as a nested server have the ability to change the display configuration of the system server? I know the client API allows that, but has a nested server access to that somehow? [12:19] greyback_, it looks like mg::Display::configure() is plumbed up [12:20] kdub: ok cool, just wanted to make sure [12:20] thanks [12:20] greyback_, np === marcusto_ is now known as marcustomlinson === chihchun_afk is now known as chihchun [13:11] @vogons were there ever discussions on privileged mir clients? How to allow a system settings app or a screenshot tool, without giving those abilities to the world [13:15] sure, for the systems settings, we have some interfaces that apply policy to when the display gets configured [13:15] that we hazily? thought a security-concerned shell would mediate [13:17] sure, it's more the how to mediate. Who knows what client can do what [13:17] and with screenshotting, there's src/server/frontend/unauthorized_screencast.cpp [13:18] well, I guess mir wouldn't know which particular client is authorized [13:26] greyback_: I always thought those scenarios are handled by asking the shell whether a given session is allowed to do things..? [13:26] anpok_: sure, but how does the shell know to give permission or not [13:27] I know mir gives a shell the ability to reject such things. I'm asking if you ever thought how a shell would know to make those decisions [13:27] greyback_, doesnt this have to be an ubuntu policy? [13:28] like, some sort of permissions system involving other system components [13:28] hum by asking trust store? [13:29] kdub: yes [13:29] or is that for different use cases? [13:30] dbus has appArmor to impose permissions [13:30] if appArmor had an API for shell to see what permissions a client has, then that might be enough [13:32] greyback_, right, iirc, we give the pid of the client that is connecting from the kernel as the secure way the shell can know that the client that it has launched is actually the one that connects over the mir protocol [13:34] and that pid+dbus/apparmor/etc+ the overrides for mf::DisplayChanger and mf::Screencast are the levers involved [13:50] i get http://pastebin.ubuntu.com/11877784/ on the demo server when trying to connect, what am i doing wrong? [13:51] * tedg listens [13:59] Chipaca: I just ran demo server & a demo mir client, all ok. What are the commands you're running? [14:00] greyback_, We're trying to get a QML snap working [14:00] greyback_, So we have a bit more convoluted setup [14:00] greyback_, I guess our question is more about "how do we figure out what is happening" more than "you have an issue" [14:00] We're probably broken here :-) [14:01] tedg: from the log, you trying to run a mir server and it is failing [14:03] looking at hte code, it is trying to read a message from the socket, but that is failing. Is it able to create the socket at all? [14:03] default socket /tmp/mir_socket [14:04] Here is the client side: http://pastebin.ubuntu.com/11877751/ [14:04] It's saying that the connection to the server failed. [14:04] can define MIR_SERVER_HOST_SOCKET=/something to tell mir a custom socket [14:05] tedg: is the server running tho? [14:05] I think the default snap is using /run/mir_socket [14:05] why would an application snap bring up a mir server? [14:05] No, the mir snap [14:05] shouldn't a snap framework be providing that? [14:05] ah ok [14:06] So Chipaca shut that down so he could easily start/restart it [14:06] But trying to keep things the same. [14:06] tedg: default mir socket is /tmp/mir_socket here [14:08] Huh, looking at the strace it looks like we might be closing the socket earlier? [14:09] I think that it's FD 4, and we're closing it at line 27 [14:10] greyback_, What is /usr/lib/x86_64-linux-gnu/mir/client-platform ? [14:11] It looks like we're reading that directory, but then not opening anything in it. [14:12] tedg: used by mir clients, I don't think a mir server needs that [14:12] greyback_, Yeah, I think the client might be failing in this case. [14:14] tedg: so the server is working? [14:14] your original paste suggests it isn't [14:14] greyback_, It works in the sense that it runs without error :-) [14:15] Oh, that may have been a mistake then. [14:15] tedg: you on desktop? Can you see a mouse pointer and move it? [14:17] greyback_, I don't have this setup, I've been working with Chipaca to debug his setup. We might have to wait for him to get back for that question. [14:57] greyback_: tedg: am back [14:59] Chipaca, Cool, so I want to get setup with what you have. [14:59] greyback_: the server works in the sense that i get a cursor and can move it around [14:59] tedg: ok, let me push the files. meanwhile you get snapcraft :) [14:59] or, hey, i'll make it a branch [14:59] 1 sec :) [15:00] tedg: lp:~chipaca/snapcraft/simpleqml [15:01] tedg: and i'll pastebin the other bits [15:03] tedg: http://pastebin.ubuntu.com/11878101/ [15:03] tedg: and http://pastebin.ubuntu.com/11878104/ on the device === chihchun is now known as chihchun_afk [15:03] Chipaca: ok, but that socket error the server reports still worries me. If the mir socket not correct, then clients will be unable to connect [15:07] :'( [15:08] when/after using mirscreencast the keyboard stops working unity shell (wily) [15:08] ~faild to mmap buffer [15:10] conyoo: could you try it with "-m /run/lightdm-mir-0" [15:10] may need to run as root too [15:13] that's what i'm doing :P i get the same error with or without root [15:14] let me copy the full error text (from tty to irssi in terminal app) [15:17] MirBufferStreamAPI: Cought exception at client library boundary (in mir_buffer_stream_get_graphics_region): etc [15:17] this is silly :D where can i find the log [15:19] where is this error logged? it has a time stamp [14312312.123123 MirBufferStreamAPI ... etc [15:20] conyoo: you're talking to unity-system-compositor, so if anything printed will be in /var/log/lightdm/unity-system-compositor.log === dandrader is now known as dandrader|afk === conyoo_ is now known as conyoo [15:39] when is the new mir supposed to land in wily? [15:39] the one in silo 004 [15:40] kgunn, ^ do you know? [15:40] seb128: soon, it's being tested today [15:41] seb128: what's up? blocking you? [15:44] kgunn, it's blocking the gtk-mir backend update which includes quite some good fixes and improvements from attente [15:45] seb128: ok, i was just telling the guys we do need to test this thoroughly, but we will land as soon as we feel good about it [15:45] good, thanks [15:53] seb128, kgunn, testing looks good so far. Just a couple of USC features yet to be tested, then we'll greenlight it. [15:53] anpok ^ [15:55] camako, thanks [15:55] greyback_: ok, i got the demo client to connect (not sure it's doing anything, but it connected) [15:56] greyback_: mir_demo_client_cursors just draws a weird (glitchy?) static box [15:56] and my actual cursor is gone [15:56] Chipaca: sounds about right, that demo tests custom cursors. egltriangle a little less confusing [15:56] ah, eglcounter shows a counter [15:56] works [15:56] tedg: ^ [15:57] mvo: and your patched xkbcommon is what allows that to work :) [15:57] next step, see why qt isn't working :) [15:58] tedg: have you been able to reproduce this? [15:58] Chipaca, Getting there. [15:58] Not yet [16:00] * Chipaca bbiab === dandrader|afk is now known as dandrader [16:04] Chipaca: yaaaaay! [16:12] Is there a key combination that'll cause the Mir demo server to shutdown? [16:12] Ctrl+Alt+Backspace, yes! [16:21] Morning! [16:39] mvo: not there yet though :) [17:14] oh, that's interesting [17:15] tedg: if I manually start a demo client from the mir snap, e.g., [17:15] MIR_SOCKET=/run/mir_socket LC_ALL=C XKB_CONFIG_ROOT=./xkbcommon/data/ LD_LIBRARY_PATH=$PWD/xkbcommon:/apps/mir/snap1/debs/usr/lib/x86_64-linux-gnu/:/apps/mir/snap1/debs/usr/lib/x86_64-linux-gnu/mesa-egl/ /apps/mir/snap1/debs/usr/bin/mir_demo_client_eglcounter [17:15] tedg: it works [17:16] tedg: but if instead i point to the qml apps' libs, with everything else staying the same, it fails to connect: [17:16] $ MIR_SOCKET=/run/mir_socket LC_ALL=C XKB_CONFIG_ROOT=./xkbcommon/data/ LD_LIBRARY_PATH=$PWD/xkbcommon:/apps/qmlapp.sideload/0/usr/lib/x86_64-linux-gnu/:/apps/qmlapp.sideload/0/usr/lib/x86_64-linux-gnu/mesa-egl/ /apps/mir/snap1/debs/usr/bin/mir_demo_client_eglcounter [17:16] Can't get connection [17:17] tedg: so my current working hypothesis is that I should go and make dinner [17:51] a client get a mir resize event of, say (100,100). but as it keeps swapping buffers it never ever reaches a buffer of that size. is it possible? [17:52] I mean, is a mir client ensured to eventually find a buffer matching the size of the last surface resize event it received? [17:53] yes [17:53] or yes I see that behavior on wily [17:53] and was debugging it [17:57] wait .. here is a trace.. http://paste.ubuntu.com/11877355/ [18:00] anpok_, you also debugging https://bugs.launchpad.net/qtubuntu/+bug/1473720 ? [18:00] Ubuntu bug 1473720 in qtubuntu "keyboard stops working, maliit and unity8 consuming cpu" [High,In progress] [18:00] dandrader: the first resize and the buffer matches.. but since there is a new size it needs to redraw to the destination size 399,524.. meanwhile the user keeps resizing and again the exchanged buffer has a new size.. [18:01] the redraw seems to block the event loop.. so thread 1 seems be always waiting for something in qtcore or qtquick... [18:01] when I manage to get back to the original expected destination size 399,524 (in the trace above) .. it stops requesting a redraw and mirevents are processed again [18:02] anpok_, so you mean that unity8 did sent all the mir-surface-resize events but the client just didn't process them all for some reason? [18:02] i believe so.. but not sure.. I manage to bypass the problem by blocking the render thread in the right places.. [18:03] noticed that while testing 0.14.0 on desktop [18:10] oh keyboard going away is a resize.. [18:10] so this on the phone too [18:10] anpok_, the only way it could happen is if QWindowSystemInterfacePrivate::handleWindowSystemEvent is synchonous [18:11] anpok_, no the keyboard going away animation is not done by resize [18:11] anpok_, the resize happens then unity8 hides or shows the indicators bar at the top [18:11] yes.. the default impl says async.. but hmm thats the next thing to look into.. [18:11] ah [18:11] anpok_, as unity8 makes the input method surface match the screen size - the top bar size [18:12] maybe the render thread is just faster in releasing the lock and looking for new stuff [18:12] and locks again [18:12] anpok_, has a higher priority or something... [18:14] anpok_, that's interesting. I'll play around with some algorithms after lunch [18:14] anpok_, to solve that impasse === dandrader is now known as dandrader|lunch [18:49] pcoca: are you trying on an amd64 arch ? [18:49] yes [18:49] amd64 VM [18:49] building the snaps on 15.04 [18:50] and when I install (--allow-unauthenticated) I don't get the display [18:50] pcoca: ah...you know what, i had a problem to working with the phablet-tools on vivid....I think they have diverged to the point [18:50] where the wily phablet-tools are no longer kosher on vivid [18:51] i updated my machine here to wily and everything magically worked [18:51] OK, I will rebuild the snaps on 15.10 then and give it a try :) [18:51] thanks kgunn [18:51] pcoca: can you afford to work on wily? it would be a good second data point to prove that theory (e.g. phablet-tools for wily need to run on wily) [18:52] i'm building the snaps on another VM [18:53] so I will delete 15.04 VM and build everything from scratch on 15.10 [18:59] dandrader|lunch: with shell rotation landed, I see no reason why the OSK surface needs to resize at all. It could be fullscreen all the time. === dandrader_ is now known as dandrader [19:16] greyback__, yeah, I was about to investigate why we were resizing it in the first place. but I think you got the reason [19:16] yep. Still this resize bug is nasty [19:17] greyback__, yes, will fix it first [19:17] thanks [19:26] pcoca: ok, let me know your results, very interested [20:05] https://twitter.com/xlibfunctions [20:05] XkbGetMods(3): returns the moderators of the X11 mailing list, but ensures they are real and not virtual (unlike XkbGetVirtualMods(3)). [20:05] lol [20:13] racarr: those are pretty funny [20:14] anpok_, think I got a fix for this bug [20:14] anpok_, and it's great as it essentially just deletes code :) [20:15] yay [20:15] is it the weird orientation change guess? [20:16] anpok_, since there's no synchronicity whatsoever between the processing of mir-resize-events and the consumption of buffers (buffer swapping) as they happen in different threads and and sent through different IPC channels, I just have to loose things up [20:16] s/and and sent/and are sent [20:17] anpok_, ie, when I get a resize event I just trigger a "please redraw" event to qt and that's it] [20:17] anpok_, instead of redrawing until the buffer size match the size advertised by the last mir-resize-event that got consumed. [20:19] just have to do some more testing to be sure === dandrader_ is now known as dandrader [20:20] ok .. so the important thing for mir would be that it never skips a resize event [20:20] anpok_, and I think it doesn't [20:21] anpok_, but it can easily happen in a resize animation that by the time the main thread reads a resize event that info is already outdated (ie, the render thread is already past that size) [20:22] anpok_, so the actual size information in a resize event is kinda useless === dandrader is now known as dandrader|afk === dandrader|afk is now known as dandrader [21:29] dandrader: fix looks reasonable, but haven't tested it yet. Will do so tomorrow morning [21:29] greyback__, tested on my laptop and on mako. works nicely [21:30] dandrader: there a big rush? Should I try now? [21:30] greyback__, you should be offline doing whatever you do after work :) [21:31] it sure can wait till tomorrow [21:31] dandrader: someone has to cover the hole that Saviq left us with ;) [21:32] * Saviq not here [21:32] jesus.... [21:32] you guys are nuts :) [21:58] I hit the point yesterday where I was really starting to question continuing to hack up the android stack and write complex tests for what I was doing [21:58] in hopes of deleting it in a few weeks for the [21:58] libinput platform... [21:58] soooo [21:59] I decided to see how long it would take to just add relative pointer axis and put off raw events until [21:59] after libinput [21:59] the answer is not long at all I think its done [21:59] testing ;) [22:26] racarr: can you parse your last blurb a little more? [22:27] are we now making libinput a pre-req for raw events? [22:32] kgunn: Well maybe, but providing a way to unblock unity8 [22:32] immediately as well [22:33] racarr: you know what i like :) [22:34] thanks