/srv/irclogs.ubuntu.com/2015/07/14/#ubuntu-mir.txt

=== chihchun_afk is now known as chihchun
=== ara is now known as Guest67693
=== chihchun is now known as chihchun_afk
greyback_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:16
kdubgreyback_, it looks like mg::Display::configure() is plumbed up12:19
greyback_kdub: ok cool, just wanted to make sure12:20
greyback_thanks12:20
kdubgreyback_, np12:20
=== marcusto_ is now known as marcustomlinson
=== chihchun_afk is now known as chihchun
greyback_@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 world13:11
kdubsure, for the systems settings, we have some interfaces that apply policy to when the display gets configured13:15
kdubthat we hazily? thought a security-concerned shell would mediate13:15
greyback_sure, it's more the how to mediate. Who knows what client can do what13:17
kduband with screenshotting, there's src/server/frontend/unauthorized_screencast.cpp13:17
kdubwell, I guess mir wouldn't know which particular client is authorized13:18
anpok_greyback_: I always thought those scenarios are handled by asking the shell whether a given session is allowed to do things..?13:26
greyback_anpok_: sure, but how does the shell know to give permission or not13:26
greyback_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 decisions13:27
kdubgreyback_, doesnt this have to be an ubuntu policy?13:27
kdublike, some sort of permissions system involving other system components13:28
anpok_hum by asking trust store?13:28
greyback_kdub: yes13:29
anpok_or is that for different use cases?13:29
greyback_dbus has appArmor to impose permissions13:30
greyback_if appArmor had an API for shell to see what permissions a client has, then that might be enough13:30
kdubgreyback_, 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 protocol13:32
kduband that pid+dbus/apparmor/etc+ the overrides for mf::DisplayChanger and mf::Screencast are the levers involved13:34
Chipacai get http://pastebin.ubuntu.com/11877784/ on the demo server when trying to connect, what am i doing wrong?13:50
* tedg listens13:51
greyback_Chipaca: I just ran demo server & a demo mir client, all ok. What are the commands you're running?13:59
tedggreyback_, We're trying to get a QML snap working14:00
tedggreyback_, So we have a bit more convoluted setup14:00
tedggreyback_, I guess our question is more about "how do we figure out what is happening" more than "you have an issue"14:00
tedgWe're probably broken here :-)14:00
greyback_tedg: from the log, you trying to run a mir server and it is failing14:01
greyback_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
greyback_default socket /tmp/mir_socket14:03
tedgHere is the client side: http://pastebin.ubuntu.com/11877751/14:04
tedgIt's saying that the connection to the server failed.14:04
greyback_can define MIR_SERVER_HOST_SOCKET=/something to tell mir a custom socket14:04
greyback_tedg: is the server running tho?14:05
tedgI think the default snap is using /run/mir_socket14:05
greyback_why would an application snap bring up a mir server?14:05
tedgNo, the mir snap14:05
greyback_shouldn't a snap framework be providing that?14:05
greyback_ah ok14:05
tedgSo Chipaca shut that down so he could easily start/restart it14:06
tedgBut trying to keep things the same.14:06
greyback_tedg: default mir socket is /tmp/mir_socket here14:06
tedgHuh, looking at the strace it looks like we might be closing the socket earlier?14:08
tedgI think that it's FD 4, and we're closing it at line 2714:09
tedggreyback_, What is /usr/lib/x86_64-linux-gnu/mir/client-platform ?14:10
tedgIt looks like we're reading that directory, but then not opening anything in it.14:11
greyback_tedg: used by mir clients, I don't think a mir server needs that14:12
tedggreyback_, Yeah, I think the client might be failing in this case.14:12
greyback_tedg: so the server is working?14:14
greyback_your original paste suggests it isn't14:14
tedggreyback_, It works in the sense that it runs without error :-)14:14
tedgOh, that may have been a mistake then.14:15
greyback_tedg: you on desktop? Can you see a mouse pointer and move it?14:15
tedggreyback_, 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:17
Chipacagreyback_: tedg: am back14:57
tedgChipaca, Cool, so I want to get setup with what you have.14:59
Chipacagreyback_: the server works in the sense that i get a cursor and can move it around14:59
Chipacatedg: ok, let me push the files. meanwhile you get snapcraft :)14:59
Chipacaor, hey, i'll make it a branch14:59
Chipaca1 sec :)14:59
Chipacatedg: lp:~chipaca/snapcraft/simpleqml15:00
Chipacatedg: and i'll pastebin the other bits15:01
Chipacatedg: http://pastebin.ubuntu.com/11878101/15:03
Chipacatedg: and http://pastebin.ubuntu.com/11878104/ on the device15:03
=== chihchun is now known as chihchun_afk
greyback_Chipaca: ok, but that socket error the server reports still worries me. If the mir socket not correct, then clients will be unable to connect15:03
conyoo:'(15:07
conyoowhen/after using mirscreencast the keyboard stops working unity shell (wily)15:08
conyoo~faild to mmap buffer15:08
greyback_conyoo: could you try it with "-m /run/lightdm-mir-0"15:10
greyback_may need to run as root too15:10
conyoothat's what i'm doing :P i get the same error with or without root15:13
conyoolet me copy the full error text (from tty to irssi in terminal app)15:14
conyooMirBufferStreamAPI: Cought exception at client library boundary (in mir_buffer_stream_get_graphics_region): etc15:17
conyoothis is silly :D where can i find the log15:17
conyoowhere is this error logged? it has a time stamp [14312312.123123 <ERROR>MirBufferStreamAPI ... etc15:19
greyback_conyoo: you're talking to unity-system-compositor, so if anything printed will be in /var/log/lightdm/unity-system-compositor.log15:20
=== dandrader is now known as dandrader|afk
=== conyoo_ is now known as conyoo
seb128when is the new mir supposed to land in wily?15:39
seb128the one in silo 00415:39
seb128kgunn, ^ do you know?15:40
kgunnseb128: soon, it's being tested today15:40
kgunnseb128: what's up? blocking you?15:41
seb128kgunn, it's blocking the gtk-mir backend update which includes quite some good fixes and improvements from attente15:44
kgunnseb128: 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 it15:45
seb128good, thanks15:45
camakoseb128, kgunn, testing looks good so far. Just a couple of USC features yet to be tested, then we'll greenlight it.15:53
camakoanpok ^15:53
seb128camako, thanks15:55
Chipacagreyback_: ok, i got the demo client to connect (not sure it's doing anything, but it connected)15:55
Chipacagreyback_: mir_demo_client_cursors just draws a weird (glitchy?) static box15:56
Chipacaand my actual cursor is gone15:56
greyback_Chipaca: sounds about right, that demo tests custom cursors. egltriangle a little less confusing15:56
Chipacaah, eglcounter shows a counter15:56
Chipacaworks15:56
Chipacatedg: ^15:56
Chipacamvo: and your patched xkbcommon is what allows that to work :)15:57
Chipacanext step, see why qt isn't working :)15:57
Chipacatedg: have you been able to reproduce this?15:58
tedgChipaca, Getting there.15:58
tedgNot yet15:58
* Chipaca bbiab16:00
=== dandrader|afk is now known as dandrader
mvoChipaca: yaaaaay!16:04
tedgIs there a key combination that'll cause the Mir demo server to shutdown?16:12
tedgCtrl+Alt+Backspace, yes!16:12
racarrMorning!16:21
Chipacamvo: not there yet though :)16:39
Chipacaoh, that's interesting17:14
Chipacatedg: if I manually start a demo client from the mir snap, e.g.,17:15
ChipacaMIR_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_eglcounter17:15
Chipacatedg: it works17:15
Chipacatedg: but if instead i point to the qml apps' libs, with everything else staying the same, it fails to connect:17:16
Chipaca$ 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_eglcounter17:16
ChipacaCan't get connection17:16
Chipacatedg: so my current working hypothesis is that I should go and make dinner17:17
dandradera 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:51
dandraderI mean, is a mir client ensured to eventually find a buffer matching the size of the last surface resize event it received?17:52
anpok_yes17:53
anpok_or yes I see that behavior on wily17:53
anpok_and was debugging it17:53
anpok_wait .. here is a trace.. http://paste.ubuntu.com/11877355/17:57
dandraderanpok_, you also debugging https://bugs.launchpad.net/qtubuntu/+bug/1473720 ?18:00
ubot5Ubuntu bug 1473720 in qtubuntu "keyboard stops working, maliit and unity8 consuming cpu" [High,In progress]18:00
anpok_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:00
anpok_the redraw seems to block the event loop.. so thread 1 seems be always waiting for something in qtcore or qtquick...18:01
anpok_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 again18:01
dandraderanpok_, 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
anpok_i believe so.. but not sure.. I manage to bypass the problem by blocking the render thread in the right places..18:02
anpok_noticed that while testing 0.14.0 on desktop18:03
anpok_oh keyboard going away is a resize..18:10
anpok_so this on the phone too18:10
dandraderanpok_, the only way it could happen is if QWindowSystemInterfacePrivate::handleWindowSystemEvent is synchonous18:10
dandraderanpok_, no the keyboard going away animation is not done by resize18:11
dandraderanpok_, the resize happens then unity8 hides or shows the indicators bar at the top18:11
anpok_yes.. the default impl says async.. but hmm thats the next thing to look into..18:11
anpok_ah18:11
dandraderanpok_, as unity8 makes the input method surface match the screen size - the top bar size18:11
anpok_maybe the render thread is just faster in releasing the lock and looking for new stuff18:12
anpok_and locks again18:12
dandraderanpok_, has a higher priority or something...18:12
dandraderanpok_, that's interesting. I'll play around with some algorithms after lunch18:14
dandraderanpok_, to solve that impasse18:14
=== dandrader is now known as dandrader|lunch
kgunnpcoca: are you trying on an amd64 arch ?18:49
pcocayes18:49
pcocaamd64 VM18:49
pcocabuilding the snaps on 15.0418:49
pcocaand when I install (--allow-unauthenticated) I don't get the display18:50
kgunnpcoca: ah...you know what, i had a problem to working with the phablet-tools on vivid....I think they have diverged to the point18:50
kgunnwhere the wily phablet-tools are no longer kosher on vivid18:50
kgunni updated my machine here to wily and everything magically worked18:51
pcocaOK, I will rebuild the snaps on 15.10 then and give it a try :)18:51
pcocathanks kgunn18:51
kgunnpcoca: 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:51
pcocai'm building the snaps on another VM18:52
pcocaso I will delete 15.04 VM and build everything from scratch on 15.1018:53
greyback__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.18:59
=== dandrader_ is now known as dandrader
dandradergreyback__, yeah, I was about to investigate why we were resizing it in the first place. but I think you got the reason19:16
greyback__yep. Still this resize bug is nasty19:16
dandradergreyback__, yes, will fix it first19:17
greyback__thanks19:17
kgunnpcoca: ok, let me know your results, very interested19:26
racarrhttps://twitter.com/xlibfunctions20:05
racarrXkbGetMods(3): returns the moderators of the X11 mailing list, but ensures they are real and not virtual (unlike XkbGetVirtualMods(3)).20:05
racarrlol20:05
kgunnracarr: those are pretty funny20:13
dandrader_anpok_, think I got a fix for this bug20:14
dandrader_anpok_, and it's great as it essentially just deletes code :)20:14
anpok_yay20:15
anpok_is it the weird orientation change guess?20:15
dandrader_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 up20:16
dandrader_s/and and sent/and are sent20:16
dandrader_anpok_, ie, when I get a resize event I just trigger a "please redraw" event to qt and that's it]20:17
dandrader_anpok_, instead of redrawing until the buffer size match the size advertised by the last mir-resize-event that got consumed.20:17
dandrader_just have to do some more testing to be sure20:19
=== dandrader_ is now known as dandrader
anpok_ok .. so the important thing for mir would be that it never skips a resize event20:20
dandraderanpok_, and I think it doesn't20:20
dandraderanpok_, 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:21
dandraderanpok_, so the actual size information in a resize event is kinda useless20:22
=== dandrader is now known as dandrader|afk
=== dandrader|afk is now known as dandrader
greyback__dandrader: fix looks reasonable, but haven't tested it yet. Will do so tomorrow morning21:29
dandradergreyback__, tested on my laptop and on mako. works nicely21:29
greyback__dandrader: there a big rush? Should I try now?21:30
dandradergreyback__, you should be offline doing whatever you do after work :)21:30
dandraderit sure can wait till tomorrow21:31
greyback__dandrader: someone has to cover the hole that Saviq left us with ;)21:31
* Saviq not here21:32
dandraderjesus....21:32
dandraderyou guys are nuts :)21:32
racarrI 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 doing21:58
racarrin hopes of deleting it in a few weeks for the21:58
racarrlibinput platform...21:58
racarrsoooo21:58
racarrI decided to see how long it would take to just add relative pointer axis and put off raw events until21:59
racarrafter libinput21:59
racarrthe answer is not long at all I think its done21:59
racarrtesting ;)21:59
kgunnracarr: can you parse your last blurb a little more?22:26
kgunnare we now making libinput a pre-req for raw events?22:27
racarrkgunn: Well maybe, but providing a way to unblock unity822:32
racarrimmediately as well22:32
kgunnracarr: you know what i like :)22:33
kgunnthanks22:34

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!