Xwayland fails to initialize on miral-desktop

Bug #1728574 reported by Alan Griffiths
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Triaged
Medium
Unassigned
mir (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

$ miral-desktop
$ WAYLAND_DEBUG=1 miral-xrun xeyes

This outputs:

[3478171.835] -> wl_display@1.get_registry(new id wl_registry@2)
[3478171.859] -> wl_display@1.sync(new id wl_callback@3)
[3478171.992] wl_display@1.delete_id(3)
[3478172.018] wl_registry@2.global(1, "wl_compositor", 3)
[3478172.032] -> wl_registry@2.bind(1, "wl_compositor", 1, new id [unknown]@4)
[3478172.056] wl_registry@2.global(2, "wl_seat", 5)
[3478172.061] wl_registry@2.global(3, "wl_output", 2)
[3478172.065] -> wl_registry@2.bind(3, "wl_output", 2, new id [unknown]@5)
[3478172.078] wl_registry@2.global(4, "wl_shell", 1)
[3478172.083] -> wl_registry@2.bind(4, "wl_shell", 1, new id [unknown]@6)
[3478172.087] wl_registry@2.global(5, "wl_shm", 1)
[3478172.092] -> wl_registry@2.bind(5, "wl_shm", 1, new id [unknown]@7)
[3478172.098] wl_registry@2.global(6, "wl_drm", 2)
[3478172.104] -> wl_registry@2.bind(6, "wl_drm", 2, new id [unknown]@8)
[3478172.113] wl_callback@3.done(0)
[3478172.119] -> wl_display@1.sync(new id wl_callback@3)
[3478172.227] wl_display@1.delete_id(3)
[3478172.248] wl_output@5.geometry(0, 0, 310, 170, 0, "Fake manufacturer", "Fake model", 0)
[3478172.271] wl_output@5.mode(3, 1600, 900, 59970)
[3478172.277] wl_output@5.scale(1)
[3478172.280] wl_output@5.done()
[3478172.287] wl_drm@8.device("/dev/dri/card0")
wayland-egl: could not open /dev/dri/card0 (Permission denied)
[3478172.300] wl_drm@8.format(875713089)
[3478172.304] wl_drm@8.format(875713112)
[3478172.308] wl_drm@8.format(909199186)
[3478172.312] wl_drm@8.format(961959257)
[3478172.317] wl_drm@8.format(825316697)
[3478172.321] wl_drm@8.format(842093913)
[3478172.325] wl_drm@8.format(909202777)
[3478172.330] wl_drm@8.format(875713881)
[3478172.335] wl_drm@8.format(842094158)
[3478172.339] wl_drm@8.format(909203022)
[3478172.344] wl_drm@8.format(1448695129)
[3478172.349] wl_drm@8.capabilities(1)
[3478172.353] wl_callback@3.done(0)
[3478172.359] -> wl_display@1.sync(new id wl_callback@3)
[3478172.388] wl_display@1.delete_id(3)
[3478172.399] wl_callback@3.done(0)
[3478172.406] -> wl_display@1.sync(new id wl_callback@3)
[3478172.486] wl_display@1.delete_id(3)
[3478172.498] wl_callback@3.done(0)
[3478172.502] -> wl_display@1.sync(new id wl_callback@3)
[3478172.532] wl_display@1.delete_id(3)
[3478172.541] wl_callback@3.done(0)
[3478172.560] -> wl_display@1.sync(new id wl_callback@3)
[3478172.610] wl_display@1.delete_id(3)
[3478172.623] wl_callback@3.done(0)

with a lot of repetition of the last three lines. X11 clients fail to connect.

~~~~

For comparison, the output when connecting to miral-app is:

[3926349.817] -> wl_display@1.get_registry(new id wl_registry@2)
[3926349.862] -> wl_display@1.sync(new id wl_callback@3)
[3926349.970] wl_display@1.delete_id(3)
[3926349.994] wl_registry@2.global(1, "wl_compositor", 3)
[3926350.006] -> wl_registry@2.bind(1, "wl_compositor", 1, new id [unknown]@4)
[3926350.025] wl_registry@2.global(2, "wl_seat", 5)
[3926350.033] wl_registry@2.global(3, "wl_output", 2)
[3926350.053] -> wl_registry@2.bind(3, "wl_output", 2, new id [unknown]@5)
[3926350.073] wl_registry@2.global(4, "wl_shell", 1)
[3926350.078] -> wl_registry@2.bind(4, "wl_shell", 1, new id [unknown]@6)
[3926350.083] wl_registry@2.global(5, "wl_shm", 1)
[3926350.089] -> wl_registry@2.bind(5, "wl_shm", 1, new id [unknown]@7)
[3926350.097] wl_registry@2.global(6, "wl_drm", 2)
[3926350.101] -> wl_registry@2.bind(6, "wl_drm", 2, new id [unknown]@8)
[3926350.106] wl_callback@3.done(1)
[3926350.109] -> wl_display@1.sync(new id wl_callback@3)
[3926350.184] wl_display@1.delete_id(3)
[3926350.190] wl_output@5.geometry(0, 0, 338, 198, 0, "Fake manufacturer", "Fake model", 0)
[3926350.201] wl_output@5.mode(3, 1280, 750, 60000)
[3926350.208] wl_output@5.scale(1)
[3926350.211] wl_output@5.done()
[3926350.219] wl_drm@8.device("/dev/dri/renderD128")
glamor: EGL version 1.4 (DRI2):
[3926360.938] wl_drm@8.format(875713089)
[3926360.952] wl_drm@8.format(875713112)
[3926360.954] wl_drm@8.format(909199186)
[3926360.957] wl_drm@8.format(961959257)
[3926360.959] wl_drm@8.format(825316697)
[3926360.971] wl_drm@8.format(842093913)
[3926360.973] wl_drm@8.format(909202777)
[3926360.975] wl_drm@8.format(875713881)
[3926360.979] wl_drm@8.format(842094158)
[3926360.981] wl_drm@8.format(909203022)
[3926360.983] wl_drm@8.format(1448695129)
[3926360.985] wl_drm@8.capabilities(1)
[3926360.988] wl_callback@3.done(1)
[3926435.962] -> wl_compositor@4.create_surface(new id wl_surface@3)
[3926435.982] -> wl_shell@6.get_shell_surface(new id wl_shell_surface@9, wl_surface@3)
[3926435.995] -> wl_shell_surface@9.set_toplevel()
[3926435.998] -> wl_compositor@4.create_region(new id wl_region@10)
[3926436.002] -> wl_region@10.add(0, 0, 1280, 750)
[3926436.007] -> wl_surface@3.set_opaque_region(wl_region@10)
[3926436.011] -> wl_region@10.destroy()
[3926457.478] -> wl_shm@7.create_pool(new id wl_shm_pool@11, fd 11, 1024)
[3926457.516] -> wl_shm_pool@11.create_buffer(new id wl_buffer@12, 0, 16, 16, 64, 0)
[3926457.532] -> wl_shm_pool@11.destroy()
[3926458.766] -> wl_display@1.get_registry(new id wl_registry@13)
[3926458.789] -> wl_display@1.sync(new id wl_callback@14)
[3926458.846] wl_shell_surface@9.configure(0, 640, 480)

Tags: wayland
Changed in mir:
assignee: nobody → Alan Griffiths (alan-griffiths)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Empirically, if the Xwayland session is run as root then it starts successfully. (Although the socket it creates is owned by root, which isn't desirable.)

Changed in mir:
status: In Progress → Triaged
importance: High → Medium
assignee: Alan Griffiths (alan-griffiths) → nobody
Revision history for this message
Michał Sawicz (saviq) wrote :

Syncing task from Mir.

Changed in mir (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Chris Halse Rogers (raof) wrote :

Long and boring root-cause and psuedo-fix on https://github.com/MirServer/mir/pull/18

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :
Changed in mir (Ubuntu):
status: Triaged → In Progress
Changed in mir (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.