/srv/irclogs.ubuntu.com/2013/09/06/#ubuntu-mir.txt

racarrOne option is that advance_buffer becomes an error instead of blocking while display is off00:00
racarrbut this is really just shoving the problem to the client00:00
kdubracarr, we say that the advance buffer could block00:01
kdubso if the client wants to blank/unblank then, it seems the client is the only one that can sort that out00:01
racarrkdub: Yes. its generally ok, but here is the specific problem00:01
racarrits the blocking on the server side,00:01
racarri.e. you call, display off, then call advance buffer00:01
racarryour server side socket session is blocked there00:02
racarrso you can never turn display back on00:02
racarrbecause all messages are processed in order00:02
racarrone solution would be to seperate messages in to channels, and read them as fast as we can and ensure messages are executed in order per channel00:02
racarri.e. the surface channel, and so you can't execute a resize message while you are executing a swap buffers message00:02
racarrbut the display channel, you can turn off the display while your surface is being resized00:03
kdubseems complicated00:03
racarrthat's kind of invasive though00:03
racarryeah00:03
kdubwhy not just have an error be returned00:03
kdubif the client tries to swapbuffers while they've paused?00:03
kdubwell, actually, i take that back00:04
racarrthats what I was saying, is one option00:04
racarrbut ideally I think, swap buffers really would just block00:05
racarrbut assuming you are doing it asynchronously you should be able to go on to do00:05
racarrother things like reconfigure the displays00:05
robert_ancellRAOF, hey, been thinking we can abuse the application lifecycle API for XMir input dropping instead of focus - it will probably work better. racarr confirmed the API is there (mir_connection_set_lifecycle_event_callback)00:06
robert_ancellRAOF, since it's per connection it should be more clear than focus00:06
racarrkdub: toyds would never have this problem00:07
kdubi was just thinking about toyds yesterday00:07
racarr:D00:07
robert_ancellthomi, also, is Jenkins locked up? https://code.launchpad.net/~robert-ancell/lightdm/coverity-fixes/+merge/18404300:09
racarrmaybe the different message channels aren't that hard00:09
racarrinstead of waiting for the session mediator to process messages before starting the next async read00:09
racarryou read them as fast as you can00:09
racarrthen the session mediator has locks i.e.00:10
racarrsurface_channel_mutex, display_channel_mutex00:10
racarrto ensure you only process one message from each channel00:10
racarrexcept it doesnt work because how do you know that in between reading a message from the socket and invoking the session mediator that your thread wont yield to another thread which will process a message ahead of you that should have been behind00:11
RAOFrobert_ancell: Oooh, yes!00:13
robert_ancellRAOF, at the moment it doesn't handshake, but I suspect that will have to come at some time00:13
RAOFWe might as well get the handshake in sooner rather than later.00:14
dufluRAOF: Can you please sanity check these comments?... https://bugs.freedesktop.org/show_bug.cgi?id=6896901:48
ubot5Freedesktop bug 68969 in Driver/intel "xf86-video-intel 2.99.901 + XMir + multimonitors = all displays black" [Normal,Resolved: notourbug]01:49
RAOFduflu: Hm.02:22
duflurobert_ancell: I just noticed why so many bug reports lack logs...02:24
dufluUnitySystemCompositorLog: Error: [Errno 13] Permission denied: '/var/log/lightdm/unity-system-compositor.log'02:24
dufluLightDMLog: Error: [Errno 13] Permission denied: '/var/log/lightdm/lightdm.log'02:24
robert_ancellduflu, huh, I thought apport collected them as root02:25
robert_ancellduflu, do you have an example bug report with that error?02:51
duflurobert_ancell: https://bugs.launchpad.net/bugs/121505302:54
ubot5Launchpad bug 1208250 in Mir "duplicate for #1215053 Graphic corruption on Intel Mobile Corp Mobile 4 chipsets" [Critical,Incomplete]02:54
=== chihchun_afk is now known as chihchun
robert_ancellduflu, https://code.launchpad.net/~robert-ancell/unity-system-compositor/apport-root-files/+merge/18422403:09
tvoss_good morning :)05:14
alf_RAOF: I have been trying to add eglCreateImageKHR support for gbm_bo to platform_mir, but I get some erratic behavior with this failing either during image creation or rendering in intel_do_flush_locked. It seems there may be some race/timing related issue going on... any ideas or known caveats about CreateImage implementations?05:17
RAOFalf_: Sorry, I've got no ideas.05:27
alf_RAOF: np, thanks05:27
RAOFAlthough most drivers are not themselves threaded, so if gbm_bo import happens on a Mir callback that might be wrong.05:28
dufluRAOF: Some trivial patches for you: https://bugs.launchpad.net/xmir/+patches05:43
RAOFTa.05:43
dufluI wish, less trivial fixes :{05:44
RAOF...oh.06:05
RAOFIs *that* it?06:05
RAOFHm, no, that *shouldn't be it…06:06
RAOFOh, yes it is.06:08
RAOFduflu: We really need to tell clients when they're bypassed.06:08
dufluRAOF: That's quite counter-intuitive for me, but yeah, sure.06:09
dufluRAOF: More reasons why? Other than intel DDX internal reasons?06:10
RAOFRadeon DDX internal reasons, too.06:10
dufluJoy06:10
RAOFI'm pretty sure that's why radeon is corrupting with bypass (for some people)06:10
RAOFAnd the (for some people) is really (for some resolutions), because scanout buffers are aligned differently.06:11
mlankhorst;p06:11
mlankhorst<<<06:11
dufluRAOF: In that case we need to flag scanout buffers, and not necessarily when they're also bypassed06:11
RAOFmlankhorst: nvidia always seems to have the most forgiving hardware, but does nouveau lay out scanout buffers subtly differently in ways the kernel doesn't necessarily expose?06:12
RAOFduflu: Yes06:12
mlankhorsterm not at all, just needs to be allocated contiguously06:12
mlankhorstbut I've even added kernel checks for that recently06:12
dufluRAOF: Can you please make sure the bug carries the conversation?... bug 121881506:13
ubot5bug 1218815 in xserver-xorg-video-ati (Ubuntu) "[radeon] Graphic glitches and screen corruption (vertical lines) on XMir surfaces only" [Critical,Triaged] https://launchpad.net/bugs/121881506:13
mlankhorstfailing to allocate contiguously will only result in some very obvious scanout corruption though ;P06:14
dufluRAOF: Umm, actually, no. We don't need a scanout flag. We just need to report stride/pitch/whatever *accurately* :)06:14
mlankhorstduflu: but you can abuse the fact that if you know the dimensions, radeon calculates everything in libdrm so you will get the same answer06:17
dufluArgh, intel why can't you treat NullRegion as empty? :P06:18
RAOFmlankhorst: Actually, you won't; the RADEON_SURF_SCANOUT flag looks like it'll change the surface layout.06:19
RAOFmlankhorst: Although in ways that I've not fully traced.06:21
alf_mlankhorst: I have been trying to add eglCreateImageKHR support for gbm_bo to platform_mir, but I get some erratic behavior with this failing either during image creation or rendering in intel_do_flush_locked. It seems there may be some race/timing related issue going on... any ideas or known caveats about CreateImage implementations? It seems like the gem object created by gbm somehow gets lost and can't be found (e.g. I sometimes get ENOENT e06:30
alf_mlankhorst: could this be related to how gbm creates the gem object, loading the dri driver on its own?06:33
mlankhorstalf_: you might want to try against drm-next kernel, it has a bunch of fixes, and your wall of text got truncated at ENOENT06:33
alf_mlankhorst: ...ENOENT errors from IOCTL_DRM_GEM_FLINK, or later when trying to render)06:34
alf_mlankhorst: is there an easy way (e.g. a package) to get the kernel?06:34
mlankhorstwe have a bunch of pre-built ones06:35
mlankhorsttjaalton: ^06:35
RAOFIn the kernel "PPA", right?06:35
mlankhorstno idea, i only know we do :P06:36
RAOFalf_: http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-next/06:36
alf_RAOF: great, thanks!06:36
* RAOF really needs to fix it so that we don't flink buffers for no good reason06:36
tjaaltonyes, mainline builds rock06:37
tjaaltonwhat doesn't is the amount of work needed to get fixes backported06:38
dholbachgood morning06:39
alf_RAOF: well, the flink I am referring to is just part of an experiment to figure out why gbm object get lost, do we still have flinks elsewhere?06:42
RAOFalf_: I think we might do, yes.06:42
dufluRAOF: What is this exactly?... xmir->driver->BufferAvailableForWindow06:48
RAOFduflu: A callback we call when swap_buffers has returned, so there's a new buffer available.06:49
dufluRAOF: Yeah I figured that out. But am confused because it means we only schedule new redraws if one happened recently. How do you go from idle to redraw then?06:50
RAOFduflu: Due to my mismemory of the X main loop, it's kinda superfluous, because we only get our events processed when going idle anyway, and the DDX calls xmir_for_each_dirty_window()06:50
dufluCool.06:50
RAOFduflu: Ah; the BlockHandler gets called before the X main loop goes into select()06:50
duflu???06:51
dufluWhat _is_ the BlockHandler? Looks important :)06:51
RAOFIt's the server's “I'm about to go into select(), anything you need to do before I block for an indeterminate period?”06:51
RAOFcallback.06:51
RAOF(One of the things you can do is tell it not to block for an indeterminate period ☺)06:52
dufluRAOF: Right. So that could go deep sleep and not be woken till damage arrives?06:53
* duflu checks the intel code again06:53
RAOFNothing in the X server does anything between the block handlers being called and select() returning because some external event has happened.06:54
RAOFWhereupon the X server will call any of the WakeUpHandlers associated with fds that select says have had something interesting happen to them.06:54
RAOFThen X will handle any client requests on its socket.06:54
RAOFThen X will call the BlockHandlers again, then X will sleep in select() until…06:55
dufluRAOF: X is all very clever with its single threaded design, but not always intuitive. I usually end up appreciating the approach... eventually06:57
RAOFduflu: It's not totally dissimilar to glib's main loop handling, either.06:58
RAOFBut much, much less visible.06:58
dufluRAOF: OK, so do we really still need and want all of sna_accel_block_handler when XMir is running? I'm not convinced it's additional, but likely should replace some of that06:59
RAOFI don't think we need all of it, but I don't think it does anything that will actually *break* anything.07:01
RAOFSome of what it does would appear to be mandatory, like actually submitting rendering commands for everything but the XMir→Mir copy.07:02
dufluI thought we did that in XMir.07:03
* duflu hacks the DDX to be convinced07:03
dufluIf only the upstream branch *worked* I would be working with that.07:03
RAOFTime for me to see why it doesn't.07:11
dufluRAOF: It works if you have only one output...07:12
RAOFThen it's time to see what xmir_resize does that ickle hates!07:12
dufluRAOF: FYI, commenting out sna_accel_block_handler, XMir still works :)07:15
RAOFColour me surprised.07:16
dufluRAOF: So unless there's something important there, maybe we should try to skip as much as possible?07:16
RAOFIt looks to me like there's important stuff there.07:17
* RAOF wonders where else calls kgem_retire and _kgem_submit.07:17
dufluRAOF: The submit is in +sna_xmir_copy_to_mir07:18
RAOFNo, that's kgem_submit_bo, which is different.07:18
RAOF... no it isn't?07:19
RAOFAh. _kgem_submit vs kgem_submit. Of course!07:19
RAOFduflu: I suspect that you'll find that XMir will eventually fail to work when you comment out sna_accel_block_handler07:23
dufluRAOF: Fair point07:24
MirvI just experienced what apport tracked to bug #1220073 after 4h usage. it resulted in Xmir seemingly non-functional but VT1 functional07:55
ubot5bug 1220073 in xserver-xorg-video-intel (Ubuntu) "[snb mesa] GPU lockup IPEHR: 0x79050005 IPEHR: 0x0b140001" [Undecided,Confirmed] https://launchpad.net/bugs/122007307:55
dufluMirv: Well, the maintainer clearly knows about the bug already. Not sure what you can do07:57
dufluMirv: BTW, when logging bugs, please remember to set a task for the Mir project. Most of the team doesn't monitor the Ubuntu tasks08:02
Mirvduflu: yeah I noted that you want those in the upstream project08:03
Mirvlet's see if that gpu hang happens again, it's been a bit of time since the last one08:03
Mirvgenerally it's nice now, the only real workaround I currently need is to boot without the external monitor attached08:04
MKCoinWill editing the keyboard be substantially different in Mir, or will it be similar to/the same as Xmodmap?08:09
dufluMKCoin: It's pure X, unchanged. X is still handling all input even under XMir for now08:21
duflualf_: Have you worked with xf86-video-intel before?08:39
MKCoinI see, thanks.08:41
MKCoinFirst thing after I do after an install is customize my keyboard, glad to know that will be unchanged :D08:42
=== hikiko is now known as hikiko|lunch
=== hikiko|lunch is now known as hikiko
kgunnalf_: got your feet on the ground again yet ?13:44
=== pete-woods is now known as pete-woods-lunch
alf_kgunn: I actually have my feet deep in the mud... trying to implement eglCreateImageKHR for EGL platform mir (needed by nested mir), but I am getting strange issues13:46
kgunnalf_: mmm....like ?....i vaguely remember some weirdness around the gl binding call to the egl surface13:50
kgunnalf_: gotta branch ?13:52
alf_kgunn: it's a combo of the platform_mir eglCreateImageKHR implementation in mesa, and a hacked version of Alan's nested-mir spike. I will push my versions, along with an explanatory email later today.13:54
kgunnalf_: cool...13:55
=== pete-woods-lunch is now known as pete-woods
pete-woodsssweeny: hi, sorry for the delayed response15:10
pete-woodswhoops, wrong channel15:10
=== chihchun is now known as chihchun_afk
=== tkamppeter_ is now known as tkamppeter
tehrainin case anyone didn't know, the latest daily build is a real bitch to install on VMware due to graphical corruption15:43
xtrizfrom the next release ubuntu will start shipping with Mir, so will that create probs with some applications ?15:57
tehrainit's creating huge problems for me right now15:58
xtrizthat's sad to hear :(15:58
tehrainand this is with just the stock software15:58
xtrizMir would be default with the next release ?15:58
tehrainyes15:58
tehrainit doesn't seem to like changing screen resolution15:59
tehrainthe installation is also really fucked up on VMware at least15:59
tehrainI had to alt+drag the window15:59
xtrizi tried but i terribly failed too.15:59
xtrizon the next release can't we use the  xorg server instead of Mir ?16:00
tehrainnope16:00
tehrainnot unless you install binary nvidia or amd drivers16:00
tehrainand in 14.04 there will be no option to use X16:00
tehrainof course, you could also go upstream and use debian instead... ;p16:01
xtrizthen most of the applications also must not work properly on it correct ?16:01
tehrainat this point they're running inside of an X server that runs on top of Mir16:01
tehrainso most applications should work similarly16:01
xtriztehrain, and what about xfce and other DE will they work ? because i am using xfce side by side with unity.16:02
tehrainI haven't tried, but in theory it should work16:02
tehrainbut expect serious problems16:03
xtrizis their any special advantage of using Mir ?16:03
tehrainnot really ;p16:03
xtrizyeah i suspect that , there must be a whole lot of probs :(16:03
xtrizthan why are they taking up Mir...!! :P bad decision .16:03
tehrainobviously they smoke some really good weed16:03
tehrainI mean.. at least wait until the software is ready to make it default!16:04
tehrainI have to support this professionally16:04
xtrizsupport ?16:04
tehrainwe use Ubuntu at this company16:04
xtrizlike it's difficult for all the open source software to make Mir compatible.16:04
xtrizok :)16:05
tehrainyeah, and as an open source developer I'm not going to jump through hoops to make stuff work for a single distro16:05
xtrizcorrect :D16:06
tehrainit should be up to the Ubuntu devs to make Mir work with the existing software and adhere to existing standards, imo16:06
xtrizabsolutely otherwise all will leave ubuntu ...16:06
tehrainon my VM I'm seeing stars right now ;p16:06
tehrainthey change color if anything else on the screen moves16:06
xtriztehrain, what should i do if i don't want mir to be default on my system from the next release ?16:07
tehrainif you have an nvidia or amd graphics card, install the proprietary drivers16:07
tehrainthen you'll go back to using straight X16:07
xtrizthat's that simple ?16:17
xtriznothing else i need to do ?16:17
=== alan_g is now known as alan_g|EOD
xtriz\as mir will introduced that other DE like cinnamon and xfce will not work right ?18:18
kdubxmir supports other x-based environments18:20
xtrizkdub, that's great if it supports and everything works well.18:22
xtrizxmir is a compatible layer right ?18:22
kdubno18:23
xtrizok18:23
xtrizwhere i can learn more about mir ?18:23
kdubits the xserver that the desktop environment uses18:23
xtrizkdub, is their any special advantage of using mir ?18:23
kdubxtriz, sure!18:24
xtrizlike what are they ? i am getting more interested in Mir now...after reading couple of articles.18:24
kdubxtriz, for one, you can have smooth transitions between opengl clients18:24
xtrizbut can't get exact benefits of using Mir.18:24
xtrizkdub, ok18:25
xtrizkdub, are you a mir developer ?18:26
kdubxtriz, another one is that the state of the desktop is centralized and can be better tracked18:26
kdubyep18:26
xtrizgreat :)18:26
kdubxtriz, so for instance, if we want to have a client, and map it to a sphere shape, and have the clicks follow the client's mapping to the sphere, we could do something like that18:27
kdubthere's no plans to do that at the moment :) but thats the sort of flexibility we're shooting for18:27
xtrizthat's interesting.. so this sounds something more better.18:28
xtrizkdub, for example i am using any open source application will that work fine ? or they have to be made compatible to work with Mir.18:30
xtrizkdub, if i want to get involve into Mir from where should i start.18:30
kdubmost applications that rely on qt or gtk won't notice a difference18:30
kdubbecause we just rewrite some of the backend for qt/gtk/etc and the applications won't have to change18:30
xtrizok18:31
kdubxtriz, if you want to help out, that would be great! a good start is to just get it running18:31
xtrizok , so downloading the beta build of 13.1018:32
kdubxtriz, how are you interested in helping? really, once you get it going, the 'most fun' would just be to play with our example programs probably18:33
tehrainkdub, are you aware of any issues with Mir specific to VMware?18:35
xtrizok :)18:35
xtrizi would help to fix some bugs or recompile app with GTK / QT necessary flag support.18:36
kdubtehrain, no, unaware... we could note in a bug report I suppose18:36
kdubtehrain, might get better results if you use software rendering in vmware18:37
tehrainthe largest issue I've seen is during the installation phase of the latest daily Ubuntu snapshots, where a black/grey menubar repeats itself for half of the screen18:38
tehrainthat might be VMware specific though, not sure if it happens on other video drivers18:39
tehrainand if you change resolution, there is a lot of graphical corruption18:39
tehrainand I am using software rendering18:39
bschaefertehrain, I got that the other day...its not a VM problem18:39
xtrizright now i am using cinnamon 1.8 so after the upgrade to 13.10 i can successfully use it ?18:46
xtrizor some changes are necessary to be made ?18:46
xtrizlike compiling packages with mir support ?18:46
tehrainonly the toolkit needs to have support for Mir I believe18:47
xtrizok18:52
xtrizall the packages would need to recompiled to support mir correct ? if this happens then those distro which depends on ubuntu will be in prob ?19:08
xtrizam i correct ?19:08
xtrizany expert opinion19:11
kdub  no, just the toolkit packages19:12
xtrizkdub, can i pm you ?19:20
xtrizwould all the packages made in ubuntu will be compatible to those distro which do not support mir ? or they will package stuff specifically optimized for mir ?19:34
kdubxtriz, a gui application linked to a toolkit will need no repackaging19:39
xtrizkdub, ok :)19:43
kdubxtriz, really, the goal is so most people don't have to worry about it19:44
xtrizkdub, thats great19:45
xtrizif everything integrates well with Mir then Mir will be really successfully across the board.19:49
racarrcd22:22
racarrok I think I decided how to do the focus refactoring to get rid of the race22:26
racarrDefaultFocusMechanism::set_focus_to changes its argument from session->surface22:27
racarrand rather than like, session manager calls focus_mechanism->set_focus_to(session)22:27
racarrthen the focus_mechanism queries the default_surface22:27
racarrinstead, the session manager calls like22:27
racarrsession->take_focus(focus_mechanism)22:27
racarrand the session gets its own default surface while holding its internal lock22:27
kdubwhats the race?22:28
racarrkdub: You call session->default_surface and get std::shared_ptr<msh::Surface>, and or you were holding std::weak_ptr<msh::Surface> to the last focused surface and just locked it (so you can send it unfocused)22:29
racarrbut then you yield, the surface is destroyed from another thread (say the client disconnects)22:29
racarrand you call surface->anything throwing an exception22:29
racarrbecause you aren't actually keeping the underlying surface alive22:31
racarrof course, everything could be modified to handle the exceptions properly but that seems dangerously like using exceptions for synchronization XD22:31
racarrIt's what session-transactions was aimed to fix but that required a recursive mutex.22:32
racarrperhaps even just msh::Session should be std::lockable22:32
racarreh22:34
racarrneeds a recurisve mutex22:34
racarror a verbose API22:34
racarrbler myt focus mechanism inverting solution makes it difficult to deliver unfocused notifications22:36
racarrits possible to make it like DefaultFocusMechanism::set_focus_to(std::shared_ptr<shell::Surface> const& new_Focus, std::function<void()> callback_to_be_invoked_when_surface_is_unfocused_that_has_reponsibility_for_delivering_the_unfocus_configure_event)22:38
racarrbut you still need a recursive mutex because the lambda comes from the session and needs to lock the surfaces, but set_focus_to is called by the session as well22:39
racarrits recursive all the way down22:39
racarrA whole new tree of ideas!23:11
racarrmaybe the session doesnt call surface->destroy and just relys on the ~msh::Surface to do that so then23:11
racarrkeeping around a shared_ptr to a surface becomes safe23:11
racarrthis may be a useful property in general, i.e. just bnecause the client closed the surface doesn't mean the shell is totally done (perhaps we want to do an animation(23:11
racarrlol so in the end the solution is three lines23:26
racarrok im pretty happy about that :)23:32
bschaeferif anyone can reproduce, seems pretty bad (though it only happens when existing from an egl app): https://bugs.launchpad.net/mir/+bug/122197423:50
ubot5Launchpad bug 1221974 in Mir "eglTerminate double free or corruption using mir" [Undecided,New]23:50

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