* [Bug 1888964] [NEW] Segfault using GTK display with dmabuf (iGVT-g) on Wayland
@ 2020-07-25 21:32 Tobias Markus
2021-05-07 8:23 ` [Bug 1888964] " Thomas Huth
2021-07-07 4:17 ` Launchpad Bug Tracker
0 siblings, 2 replies; 3+ messages in thread
From: Tobias Markus @ 2020-07-25 21:32 UTC (permalink / raw)
To: qemu-devel
Public bug reported:
When using...
a) Intel virtualized graphics (iGVT-g) with dmabuf output
b) QEMU's GTK display with GL output enabled (-display gtk,gl=on)
c) A Wayland compositor (Sway in my case)
a segfault occurs at some point on boot (I guess as soon as the guest starts using the virtual graphics card?)
The origin is the function dpy_gl_scanout_dmabuf in ui/console.c, where it calls
con->gl->ops->dpy_gl_scanout_dmabuf(con->gl, dmabuf);
However, the ops field (struct DisplayChangeListenerOps) does not have dpy_gl_scanout_dmabuf set because it is set to dcl_gl_area_ops which does not have dpy_gl_scanout_dmabuf set.
Only dcl_egl_ops has dpy_gl_scanout_dmabuf set.
Currently, the GTK display uses EGL on X11 displays, but GtkGLArea on Wayland. This can be observed in early_gtk_display_init() in ui/gtk.c, where it says (simplified code):
if (opts->has_gl && opts->gl != DISPLAYGL_MODE_OFF) {
if (GDK_IS_WAYLAND_DISPLAY(gdk_display_get_default())) {
gtk_use_gl_area = true;
gtk_gl_area_init();
} else {
DisplayGLMode mode = opts->has_gl ? opts->gl : DISPLAYGL_MODE_ON;
gtk_egl_init(mode);
}
}
To reproduce the findings above, add this assertion to dpy_gl_scanout_dmabuf:
assert(con->gl->ops->dpy_gl_scanout_dmabuf);
This will make the segfault turn into an assertion failure.
A workaround is to force QEMU to use GDK's X11 backend (using
GDK_BACKEND=x11).
Note: This might be a duplicate of 1775011, however the information
provided in that bug report is not sufficient to make the assertion.
QEMU version: b0ce3f021e0157e9a5ab836cb162c48caac132e1 (from Git master branch)
OS: Arch Linux, Kernel Version 5.17.0-1
Relevant flags of the QEMU invocation:
qemu-system-x86_64 \
-vga none \
-device vfio-pci-nohotplug,sysfsdev="$GVT_DEV",romfile="${ROMFILE}",display=on,x-igd-opregion=on,ramfb=on \
-display gtk,gl=on
** Affects: qemu
Importance: Undecided
Status: New
** Tags: dmabuf egl gtk gvt mdev ui vfio
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1888964
Title:
Segfault using GTK display with dmabuf (iGVT-g) on Wayland
Status in QEMU:
New
Bug description:
When using...
a) Intel virtualized graphics (iGVT-g) with dmabuf output
b) QEMU's GTK display with GL output enabled (-display gtk,gl=on)
c) A Wayland compositor (Sway in my case)
a segfault occurs at some point on boot (I guess as soon as the guest starts using the virtual graphics card?)
The origin is the function dpy_gl_scanout_dmabuf in ui/console.c, where it calls
con->gl->ops->dpy_gl_scanout_dmabuf(con->gl, dmabuf);
However, the ops field (struct DisplayChangeListenerOps) does not have dpy_gl_scanout_dmabuf set because it is set to dcl_gl_area_ops which does not have dpy_gl_scanout_dmabuf set.
Only dcl_egl_ops has dpy_gl_scanout_dmabuf set.
Currently, the GTK display uses EGL on X11 displays, but GtkGLArea on Wayland. This can be observed in early_gtk_display_init() in ui/gtk.c, where it says (simplified code):
if (opts->has_gl && opts->gl != DISPLAYGL_MODE_OFF) {
if (GDK_IS_WAYLAND_DISPLAY(gdk_display_get_default())) {
gtk_use_gl_area = true;
gtk_gl_area_init();
} else {
DisplayGLMode mode = opts->has_gl ? opts->gl : DISPLAYGL_MODE_ON;
gtk_egl_init(mode);
}
}
To reproduce the findings above, add this assertion to dpy_gl_scanout_dmabuf:
assert(con->gl->ops->dpy_gl_scanout_dmabuf);
This will make the segfault turn into an assertion failure.
A workaround is to force QEMU to use GDK's X11 backend (using
GDK_BACKEND=x11).
Note: This might be a duplicate of 1775011, however the information
provided in that bug report is not sufficient to make the assertion.
QEMU version: b0ce3f021e0157e9a5ab836cb162c48caac132e1 (from Git master branch)
OS: Arch Linux, Kernel Version 5.17.0-1
Relevant flags of the QEMU invocation:
qemu-system-x86_64 \
-vga none \
-device vfio-pci-nohotplug,sysfsdev="$GVT_DEV",romfile="${ROMFILE}",display=on,x-igd-opregion=on,ramfb=on \
-display gtk,gl=on
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1888964/+subscriptions
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug 1888964] Re: Segfault using GTK display with dmabuf (iGVT-g) on Wayland
2020-07-25 21:32 [Bug 1888964] [NEW] Segfault using GTK display with dmabuf (iGVT-g) on Wayland Tobias Markus
@ 2021-05-07 8:23 ` Thomas Huth
2021-07-07 4:17 ` Launchpad Bug Tracker
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2021-05-07 8:23 UTC (permalink / raw)
To: qemu-devel
The QEMU project is currently moving its bug tracking to another system.
For this we need to know which bugs are still valid and which could be
closed already. Thus we are setting the bug state to "Incomplete" now.
If the bug has already been fixed in the latest upstream version of QEMU,
then please close this ticket as "Fix released".
If it is not fixed yet and you think that this bug report here is still
valid, then you have two options:
1) If you already have an account on gitlab.com, please open a new ticket
for this problem in our new tracker here:
https://gitlab.com/qemu-project/qemu/-/issues
and then close this ticket here on Launchpad (or let it expire auto-
matically after 60 days). Please mention the URL of this bug ticket on
Launchpad in the new ticket on GitLab.
2) If you don't have an account on gitlab.com and don't intend to get
one, but still would like to keep this ticket opened, then please switch
the state back to "New" within the next 60 days (otherwise it will get
closed as "Expired"). We will then eventually migrate the ticket auto-
matically to the new system (but you won't be the reporter of the bug
in the new system and thus won't get notified on changes anymore).
Thank you and sorry for the inconvenience.
** Changed in: qemu
Status: New => Incomplete
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1888964
Title:
Segfault using GTK display with dmabuf (iGVT-g) on Wayland
Status in QEMU:
Incomplete
Bug description:
When using...
a) Intel virtualized graphics (iGVT-g) with dmabuf output
b) QEMU's GTK display with GL output enabled (-display gtk,gl=on)
c) A Wayland compositor (Sway in my case)
a segfault occurs at some point on boot (I guess as soon as the guest starts using the virtual graphics card?)
The origin is the function dpy_gl_scanout_dmabuf in ui/console.c, where it calls
con->gl->ops->dpy_gl_scanout_dmabuf(con->gl, dmabuf);
However, the ops field (struct DisplayChangeListenerOps) does not have dpy_gl_scanout_dmabuf set because it is set to dcl_gl_area_ops which does not have dpy_gl_scanout_dmabuf set.
Only dcl_egl_ops has dpy_gl_scanout_dmabuf set.
Currently, the GTK display uses EGL on X11 displays, but GtkGLArea on Wayland. This can be observed in early_gtk_display_init() in ui/gtk.c, where it says (simplified code):
if (opts->has_gl && opts->gl != DISPLAYGL_MODE_OFF) {
if (GDK_IS_WAYLAND_DISPLAY(gdk_display_get_default())) {
gtk_use_gl_area = true;
gtk_gl_area_init();
} else {
DisplayGLMode mode = opts->has_gl ? opts->gl : DISPLAYGL_MODE_ON;
gtk_egl_init(mode);
}
}
To reproduce the findings above, add this assertion to dpy_gl_scanout_dmabuf:
assert(con->gl->ops->dpy_gl_scanout_dmabuf);
This will make the segfault turn into an assertion failure.
A workaround is to force QEMU to use GDK's X11 backend (using
GDK_BACKEND=x11).
Note: This might be a duplicate of 1775011, however the information
provided in that bug report is not sufficient to make the assertion.
QEMU version: b0ce3f021e0157e9a5ab836cb162c48caac132e1 (from Git master branch)
OS: Arch Linux, Kernel Version 5.17.0-1
Relevant flags of the QEMU invocation:
qemu-system-x86_64 \
-vga none \
-device vfio-pci-nohotplug,sysfsdev="$GVT_DEV",romfile="${ROMFILE}",display=on,x-igd-opregion=on,ramfb=on \
-display gtk,gl=on
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1888964/+subscriptions
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug 1888964] Re: Segfault using GTK display with dmabuf (iGVT-g) on Wayland
2020-07-25 21:32 [Bug 1888964] [NEW] Segfault using GTK display with dmabuf (iGVT-g) on Wayland Tobias Markus
2021-05-07 8:23 ` [Bug 1888964] " Thomas Huth
@ 2021-07-07 4:17 ` Launchpad Bug Tracker
1 sibling, 0 replies; 3+ messages in thread
From: Launchpad Bug Tracker @ 2021-07-07 4:17 UTC (permalink / raw)
To: qemu-devel
[Expired for QEMU because there has been no activity for 60 days.]
** Changed in: qemu
Status: Incomplete => Expired
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1888964
Title:
Segfault using GTK display with dmabuf (iGVT-g) on Wayland
Status in QEMU:
Expired
Bug description:
When using...
a) Intel virtualized graphics (iGVT-g) with dmabuf output
b) QEMU's GTK display with GL output enabled (-display gtk,gl=on)
c) A Wayland compositor (Sway in my case)
a segfault occurs at some point on boot (I guess as soon as the guest starts using the virtual graphics card?)
The origin is the function dpy_gl_scanout_dmabuf in ui/console.c, where it calls
con->gl->ops->dpy_gl_scanout_dmabuf(con->gl, dmabuf);
However, the ops field (struct DisplayChangeListenerOps) does not have dpy_gl_scanout_dmabuf set because it is set to dcl_gl_area_ops which does not have dpy_gl_scanout_dmabuf set.
Only dcl_egl_ops has dpy_gl_scanout_dmabuf set.
Currently, the GTK display uses EGL on X11 displays, but GtkGLArea on Wayland. This can be observed in early_gtk_display_init() in ui/gtk.c, where it says (simplified code):
if (opts->has_gl && opts->gl != DISPLAYGL_MODE_OFF) {
if (GDK_IS_WAYLAND_DISPLAY(gdk_display_get_default())) {
gtk_use_gl_area = true;
gtk_gl_area_init();
} else {
DisplayGLMode mode = opts->has_gl ? opts->gl : DISPLAYGL_MODE_ON;
gtk_egl_init(mode);
}
}
To reproduce the findings above, add this assertion to dpy_gl_scanout_dmabuf:
assert(con->gl->ops->dpy_gl_scanout_dmabuf);
This will make the segfault turn into an assertion failure.
A workaround is to force QEMU to use GDK's X11 backend (using
GDK_BACKEND=x11).
Note: This might be a duplicate of 1775011, however the information
provided in that bug report is not sufficient to make the assertion.
QEMU version: b0ce3f021e0157e9a5ab836cb162c48caac132e1 (from Git master branch)
OS: Arch Linux, Kernel Version 5.17.0-1
Relevant flags of the QEMU invocation:
qemu-system-x86_64 \
-vga none \
-device vfio-pci-nohotplug,sysfsdev="$GVT_DEV",romfile="${ROMFILE}",display=on,x-igd-opregion=on,ramfb=on \
-display gtk,gl=on
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1888964/+subscriptions
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-07 4:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-25 21:32 [Bug 1888964] [NEW] Segfault using GTK display with dmabuf (iGVT-g) on Wayland Tobias Markus
2021-05-07 8:23 ` [Bug 1888964] " Thomas Huth
2021-07-07 4:17 ` Launchpad Bug Tracker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).