Launchpad has imported 5 comments from the remote bug at https://bugs.freedesktop.org/show_bug.cgi?id=109102.
If you reply to an imported comment from within Launchpad, your comment will be sent to the remote bug automatically. Read more about Launchpad's inter-bugtracker facilities at https://help.launchpad.net/InterBugTracking. ------------------------------------------------------------------------ On 2018-12-19T14:29:06+00:00 Gert van de Kraats wrote: Created attachment 142855 stacktrace This is a copy of ubuntu bug 1797882. It should be directly submitted to mesa. Using ubuntu 18.10 wayland with dual monitors, configured above each other. Dock is configured at both displays, not hiding. Icons for "terminal" and "libreofffice Writer" are present at the dock. Start terminal on primary screen by mouseclick on dock. Start libreoffice Writer on primary screen by mouseclick on dock. Terminate libreoffice Witer by mouseclick on X. Repeat the starting and stopping of Writer. Login-screen will appear. Syslog shows: Oct 15 00:09:51 Gert2 org.gnome.Shell.desktop[5892]: intel_do_flush_locked failed: Resource deadlock avoided Oct 15 00:09:51 Gert2 gnome-terminal-[6439]: Error reading events from display: Connection reset by peer Oct 15 00:09:51 Gert2 systemd[5755]: gnome-terminal-server.service: Main process exited, code=exited, status=1/FAILURE This problem doesnot occur in a dual monitor-session without wayland. It also doesnot occur, if only one monitor used with wayland It also doesnot occur, if the dock is only present at the primary screen. It also doesnot occur if second started application is present at the dock and doesnot add an icon to the dock (as libreoffice does). All other dual monitor/dock configurations seem to have this problem. No idea if this is helpful info, but the used graphics card does not support OpenGL version 2.1: Oct 15 00:02:32 Gert2 org.gnome.Shell.desktop[4426]: Require OpenGL version 2.1 or later. Oct 15 00:02:32 Gert2 org.gnome.Shell.desktop[4426]: Failed to initialize glamor Oct 15 00:02:32 Gert2 org.gnome.Shell.desktop[4426]: Failed to initialize glamor, falling back to sw glxinfo: OpenGL vendor string: VMware, Inc. OpenGL renderer string: llvmpipe (LLVM 7.0, 128 bits) OpenGL core profile version string: 3.3 (Core Profile) Mesa 18.2.2 OpenGL core profile shading language version string: 3.30 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL core profile extensions: OpenGL version string: 3.1 Mesa 18.2.2 OpenGL shading language version string: 1.40 OpenGL context flags: (none) OpenGL extensions: OpenGL ES profile version string: OpenGL ES 3.0 Mesa 18.2.2 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00 OpenGL ES profile extensions: Extra info: Without solving this problem, wayland cannot be used after logon, when using dual monitor. The sesssion stops very easy and often. Work is lost; you have to logon again. E.g. the simple switching between 2 overlapping windows causes the end of the session. I changed src/mesa/drivers/dri/i915/intel_batchbuffer.c to force a coredump in this case. The stacktrace is added to this bug-report. Linenumbers might deviate a little bit because of extra coding of tracing. The deadlock always occurs at cogl_onscreen_swap_buffers calling cogl_flush(), at the first journal-batch-flush for the offscreen-framebuffer. The deadlock disappeared as soon as cogl is compiled with disabled batching! To minimize this disabling of batching, I made a very dirty but working patch, which is attached to this bug. At program clutter_stage_cogl_redraw_view routine paint_stage is called for the "Unclipped stage paint". This call is manipulated to flush immedately the first journal-entry of the default onscreen framebuffer. This is done by misusing and changing program cogl_framebuffer_set_viewport and by changing _cogl_journal_flush. Apparenly this early flushing causes a lock to be set which avoids the deadlock. I do not know how to see which locks are held and by which process, so I cannot solve the root-cause of the problem, but I assume some extra lock must be set in this case to avoid deadlock. With this dirty patch combined with other suggested (simple) patches at #1790525, #1795774 and #1795760 wayland can be run without any problems on dual monitor and "old" intel graphic card. It performs better than lightdm, specially if the monitors are positioned aside of each other. Reply at: https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1797882/comments/6 ------------------------------------------------------------------------ On 2018-12-19T14:31:37+00:00 Gert van de Kraats wrote: Created attachment 142856 ubuntu-cogl-patch Reply at: https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1797882/comments/7 ------------------------------------------------------------------------ On 2018-12-19T14:35:07+00:00 Chris Wilson wrote: -EDEADLOCK = userspace tried to use more fence registers than the HW supports. Reply at: https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1797882/comments/9 ------------------------------------------------------------------------ On 2019-01-26T10:50:53+00:00 Gert van de Kraats wrote: I am using intel i915 gen 3 with 16 fence registers. When displaying the variable total_fences at function drm_intel_gem_check_aperture_space at libdrm-2.4.95/intel/intel_bufmgr_gem.c, it is seen that the deadlock-abort is occurring at total_fences == 16, where the previous display shows total_fences == 14, so there is an increment of 2 fences in stead of the usual increment of 1. Apparently the deadlock occurs at the "freeing fences phase", that is started if total_fences is too high. I decided to lower the available_fences from 14 to 13 (see proposed patch). This solved the problem. After this patch I still saw sometimes total_fences == 16, where the previous display shows total_fences == 13, so there is an increment of 3 fences. This did not cause a deadlock at the "freeing fences phase". Reply at: https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1797882/comments/10 ------------------------------------------------------------------------ On 2019-01-26T10:52:47+00:00 Gert van de Kraats wrote: Created attachment 143231 libdrm-patch Reply at: https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1797882/comments/11 ** Changed in: mesa Status: Unknown => Confirmed ** Changed in: mesa Importance: Unknown => Medium -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to mesa in Ubuntu. https://bugs.launchpad.net/bugs/1797882 Title: At dual monitor intel_do_flush_locked failed: Resource deadlock avoided To manage notifications about this bug go to: https://bugs.launchpad.net/mesa/+bug/1797882/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp