xf86-video-qxl issueshttps://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/-/issues2023-10-27T01:28:49Zhttps://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/-/issues/17Driver always sets pScreen->DestroyPixmap to NULL during teardown2023-10-27T01:28:49ZPeter HuttererDriver always sets pScreen->DestroyPixmap to NULL during teardownIn `uxa_close_screen()` qxl tries to restore the various wrapped screen functions, including `DestroyPixmap`.
```
pScreen->DestroyPixmap = uxa_screen->SavedDestroyPixmap;
```
But `SavedDestroyPixmap` is never assigned from the origina...In `uxa_close_screen()` qxl tries to restore the various wrapped screen functions, including `DestroyPixmap`.
```
pScreen->DestroyPixmap = uxa_screen->SavedDestroyPixmap;
```
But `SavedDestroyPixmap` is never assigned from the original function, so we always set it to NULL here. If this code is ever called [^1] it will lead to segfault during pixmap cleanup.
---
[^1]: right now it isn't because of a buggy shortcut in the X server, see https://gitlab.freedesktop.org/xorg/xserver/-/commit/d348ab06aae21c153ecbc3511aeafc8ab66d8303https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/-/issues/16[Xspice] Segfault due to incorrect parsing of default values2022-07-08T22:28:04ZPatrycja Rosa[Xspice] Segfault due to incorrect parsing of default valuesWhen `SurfaceBufferSize` is not set in the config, `get_int_option` returns 0 instead of 128, causing Xorg to segfault when accessing the ram header:
```
Starting program: /usr/libexec/Xorg -config spiceqxl.xorg.conf -noreset :1
X.Org X...When `SurfaceBufferSize` is not set in the config, `get_int_option` returns 0 instead of 128, causing Xorg to segfault when accessing the ram header:
```
Starting program: /usr/libexec/Xorg -config spiceqxl.xorg.conf -noreset :1
X.Org X Server 1.21.1.3
X Protocol Version 11, Revision 0
Current Operating System: Linux toshiro 5.15.52-0-lts #1-Alpine SMP Mon, 04 Jul 2022 07:49:33 +0000 x86_64
Kernel command line: <snip>
Current version of pixman: 0.40.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/patrycja/.local/share/xorg/Xorg.1.log", Time: Fri Jul 8 20:48:56 2022
(++) Using config file: "/etc/X11/spiceqxl.xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
resizing surface0 to 0
memory space from 0x7ffff7c287b0 to 0x7ffff7c257b0
memory space from 0x7ffff7c28790 to 0x7ffff7c28790
Program received signal SIGSEGV, Segmentation fault.
xspice_init_qxl_ram (qxl=qxl@entry=0x7ffff6bad120) at spiceqxl_io_port.c:75
75 spiceqxl_io_port.c: No such file or directory.
(gdb) bt full
#0 xspice_init_qxl_ram (qxl=qxl@entry=0x7ffff6bad120) at spiceqxl_io_port.c:75
ram = 0x8000f7c267b0
item = <optimized out>
#1 0x00007ffff74f1614 in qxl_pre_init (pScrn=0x7ffff7c1cb10, flags=<optimized out>) at qxl_driver.c:1116
scrnIndex = <optimized out>
qxl = 0x7ffff6bad120
clockRanges = 0x0
max_x = 1433901016
max_y = 21845
playback_fifo_dir = <optimized out>
smartcard_file = <optimized out>
```
While [debugging][1], the issue was narrowed down to usage of `xf86GetOptValInteger` instead of `options[option_index].value.num`, introduced in https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/-/commit/4e1963a812f2c1777ba5d56ea9e939a3e40a0496; for some reason, most options - including `SurfaceBufferSize` - have the [`found`][2] field [set to `FALSE`][3] (?), causing `xf86GetOptValInteger` to return early, because it's explicitly not set in the config:
```
(gdb) call xf86TokenToOptinfo(options, 36)
$1 = (struct {...} *) 0x7ffff6bad940
(gdb) print $1->found
$2 = 0
(gdb) print *$1
$3 = {token = 36, name = 0x7ffff75079aa "SurfaceBufferSize",
type = OPTV_INTEGER, value = {num = 128,
str = 0x80 <error: Cannot access memory at address 0x80>,
realnum = 6.3240402667679558e-322, boolean = 128, freq = {
freq = 6.3240402667679558e-322, units = 0}}, found = 0}
```
[1]: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13996
[2]: https://gitlab.freedesktop.org/xorg/xserver/-/blob/454b3a82/hw/xfree86/common/xf86Opt.h#L70
[3]: https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/-/blob/4e1963a8/src/qxl_driver.c#L151https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/-/issues/15fix building against the newer libdrm2022-02-10T08:39:05ZMatteo Bernardinifix building against the newer libdrmbuilding fails against the newer libdrm (2.4.109 here)
```
make[3]: Entering directory '/tmp/sbopkg.gDtvH5/xf86-video-qxl-0.1.5/src'
CC qxl_driver.lo
CC qxl_image.lo
CC qxl_surface.lo
CC qxl_surface_ums.l...building fails against the newer libdrm (2.4.109 here)
```
make[3]: Entering directory '/tmp/sbopkg.gDtvH5/xf86-video-qxl-0.1.5/src'
CC qxl_driver.lo
CC qxl_image.lo
CC qxl_surface.lo
CC qxl_surface_ums.lo
CC qxl_ring.lo
CC qxl_mem.lo
CC mspace.lo
CC murmurhash3.lo
CC qxl_cursor.lo
CC qxl_option_helpers.lo
CC qxl_uxa.lo
CC qxl_ums_mode.lo
CC qxl_io.lo
CC dfps.lo
CC qxl_kms.lo
CC qxl_drmmode.lo
In file included from /usr/include/xf86drmMode.h:45,
from qxl_drmmode.h:33,
from qxl_drmmode.c:36:
/usr/include/xorg/xf86Opt.h:44:10: error: two or more data types in declaration specifiers
44 | Bool bool;
| ^~~~
In file included from /usr/include/xorg/xf86str.h:43,
from qxl_drmmode.h:34,
from qxl_drmmode.c:36:
/usr/include/xorg/xf86Opt.h:44:14: warning: declaration does not declare anything
44 | Bool bool;
| ^
make[3]: *** [Makefile:754: qxl_drmmode.lo] Error 1
make[3]: Leaving directory '/tmp/sbopkg.gDtvH5/xf86-video-qxl-0.1.5/src'
make[2]: *** [Makefile:948: all-recursive] Error 1
make[2]: Leaving directory '/tmp/sbopkg.gDtvH5/xf86-video-qxl-0.1.5/src'
make[1]: *** [Makefile:457: all-recursive] Error 1
make[1]: Leaving directory '/tmp/sbopkg.gDtvH5/xf86-video-qxl-0.1.5'
make: *** [Makefile:389: all] Error 2
```
this happens because [libdrm commit e641e2a632d779f638ac2ba983b9fceb20b3fac4](https://gitlab.freedesktop.org/mesa/drm/-/commit/e641e2a632d779f638ac2ba983b9fceb20b3fac4[libdrm.patch](/uploads/54d5e0e8c9a4dab0e040fbf379db6a50/libdrm.patch)) added stdbool.h to the library headers which conflicts with the xorg headers: moving the qxl_drmmode.h inclusion later (like in the attached [libdrm.patch](/uploads/aeb8c8a219abfc446ac3c6a5b1f3a3da/libdrm.patch)) it's enough to fix it.
```
From: Matteo Bernardini <ponce@slackbuilds.org>
Subject: Change header inclusion order to avoid xorg headers catching stdbool.h
libdrm commit e641e2a632d779f638ac2ba983b9fceb20b3fac4 added
stdbool.h to the library headers which conflicts with xorg headers.
diff -Naur xf86-video-qxl-0.1.5.orig/src/qxl_drmmode.c xf86-video-qxl-0.1.5/src/qxl_drmmode.c
--- xf86-video-qxl-0.1.5.orig/src/qxl_drmmode.c 2015-03-30 16:58:56.000000000 +0200
+++ xf86-video-qxl-0.1.5/src/qxl_drmmode.c 2022-02-10 08:59:13.221017000 +0100
@@ -33,7 +33,6 @@
#ifdef XF86DRM_MODE
#include <sys/ioctl.h>
-#include "qxl_drmmode.h"
#include "X11/Xatom.h"
#include "xf86DDC.h"
/* DPMS */
@@ -47,6 +46,7 @@
#include "qxl.h"
#include "qxl_surface.h"
+#include "qxl_drmmode.h"
static void drmmode_show_cursor (xf86CrtcPtr crtc);
```https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/-/issues/14Xspice crashes2022-04-06T05:39:19Zjan AnjaXspice crashes* spice v0.15.0
* xf86-video-qxl v0.1.5
* xorg-server v1.20.14
```
[ 5775.094] (EE) Backtrace:
[ 5775.094] (EE) 0: /usr/bin/X (xorg_backtrace+0x4d) [0x55635ee29a0d]
[ 5775.094] (EE) 1: /usr/bin/X (0x55635ed7b000+0xb25b5) [0x55635ee2d...* spice v0.15.0
* xf86-video-qxl v0.1.5
* xorg-server v1.20.14
```
[ 5775.094] (EE) Backtrace:
[ 5775.094] (EE) 0: /usr/bin/X (xorg_backtrace+0x4d) [0x55635ee29a0d]
[ 5775.094] (EE) 1: /usr/bin/X (0x55635ed7b000+0xb25b5) [0x55635ee2d5b5]
[ 5775.094] (EE) 2: /lib64/libc.so.6 (0x7fcfb4438000+0x3d570) [0x7fcfb4475570]
[ 5775.094] (EE) 3: /lib64/libc.so.6 (0x7fcfb4438000+0x880c4) [0x7fcfb44c00c4]
[ 5775.094] (EE) 4: /lib64/libc.so.6 (raise+0x12) [0x7fcfb44754e2]
[ 5775.094] (EE) 5: /lib64/libc.so.6 (abort+0xcf) [0x7fcfb4460449]
[ 5775.094] (EE) 6: /lib64/libc.so.6 (0x7fcfb4438000+0x7ca98) [0x7fcfb44b4a98]
[ 5775.094] (EE) 7: /lib64/libc.so.6 (0x7fcfb4438000+0x91a7a) [0x7fcfb44c9a7a]
[ 5775.094] (EE) 8: /lib64/libc.so.6 (0x7fcfb4438000+0x94d32) [0x7fcfb44ccd32]
[ 5775.094] (EE) 9: /lib64/libc.so.6 (__libc_calloc+0xba) [0x7fcfb44ce382]
[ 5775.094] (EE) 10: /usr/lib64/xorg/modules/drivers/spiceqxl_drv.so (0x7fcfb3bc8000+0xf9f9) [0x7fcfb3bd79f9]
[ 5775.094] (EE) 11: /usr/lib64/xorg/modules/drivers/spiceqxl_drv.so (0x7fcfb3bc8000+0xb206) [0x7fcfb3bd3206]
[ 5775.095] (EE) 12: /usr/lib64/xorg/modules/drivers/spiceqxl_drv.so (0x7fcfb3bc8000+0xc256) [0x7fcfb3bd4256]
[ 5775.095] (EE) 13: /usr/bin/X (InitOutput+0x9e0) [0x55635ee4b1f8]
[ 5775.095] (EE) 14: /usr/bin/X (0x55635ed7b000+0x5b8a3) [0x55635edd68a3]
[ 5775.095] (EE) 15: /lib64/libc.so.6 (0x7fcfb4438000+0x292fa) [0x7fcfb44612fa]
[ 5775.095] (EE) 16: /lib64/libc.so.6 (__libc_start_main+0x78) [0x7fcfb44613a8]
[ 5775.095] (EE) 17: /usr/bin/X (_start+0x21) [0x55635edc0721]
[ 5775.095] (EE)
[ 5775.095] (EE)
Fatal server error:
[ 5775.095] (EE) Caught signal 6 (Aborted). Server aborting
```
Full log:
[log.txt](/uploads/891e516de661552dab8c4bbb7a752bb6/log.txt)https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/-/issues/120.1.5: build fails with X server 21.0.99.12021-08-28T14:16:51ZTomasz Kłoczko0.1.5: build fails with X server 21.0.99.1```console
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/xf86-video-qxl-0.1.5/src'
/bin/sh ../libtool --tag=CC --mode=compile /usr/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/spice-1 -I/usr/include/xorg -fvisibili...```console
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/xf86-video-qxl-0.1.5/src'
/bin/sh ../libtool --tag=CC --mode=compile /usr/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/spice-1 -I/usr/include/xorg -fvisibility=hidden -I/usr/include/pixman-1 -I/usr/include/X11/dri -fno-strict-aliasing -I/usr/include/libdrm -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -c -o qxl_option_helpers.lo qxl_option_helpers.c
libtool: compile: /usr/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/spice-1 -I/usr/include/xorg -fvisibility=hidden -I/usr/include/pixman-1 -I/usr/include/X11/dri -fno-strict-aliasing -I/usr/include/libdrm -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -c qxl_option_helpers.c -fPIC -DPIC -o .libs/qxl_option_helpers.o
qxl_option_helpers.c: In function ‘get_bool_option’:
qxl_option_helpers.c:37:44: error: ‘ValueUnion’ has no member named ‘bool’; did you mean ‘boolean’?
37 | return options[option_index].value.bool;
| ^~~~
| boolean
make[3]: *** [Makefile:797: qxl_option_helpers.lo] Error 1
```https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/-/issues/11uxa_get_image in uxa-accel.c x/y wrong use. [Box.x1 = pDrawable->y + x + xo...2020-12-15T03:31:42Zxuyinguxa_get_image in uxa-accel.c x/y wrong use. [Box.x1 = pDrawable->y + x + xoff]- > [Box.x1 = pDrawable->x + x + xoff]`void
uxa_get_image(DrawablePtr pDrawable, int x, int y, int w, int h,
unsigned int format, unsigned long planeMask, char *d)
{
ScreenPtr screen = pDrawable->pScreen;
uxa_screen_t *uxa_screen = uxa_get_screen(screen);
BoxRec Bo...`void
uxa_get_image(DrawablePtr pDrawable, int x, int y, int w, int h,
unsigned int format, unsigned long planeMask, char *d)
{
ScreenPtr screen = pDrawable->pScreen;
uxa_screen_t *uxa_screen = uxa_get_screen(screen);
BoxRec Box;
PixmapPtr pPix = uxa_get_drawable_pixmap(pDrawable);
int xoff, yoff;
Bool ok;
RegionRec region;
uxa_get_drawable_deltas(pDrawable, pPix, &xoff, &yoff);
Box.x1 = pDrawable->y + x + xoff; // the pDrawable->y is wrong here, use pDrawable->x instead
Box.y1 = pDrawable->y + y + yoff;`https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/-/issues/10Fails to start server in Gnome Boxes (QEMU)2023-03-29T05:57:47ZCheeseFails to start server in Gnome Boxes (QEMU)Xorg 1:7.7+19 fails to start on a default installation of Ubuntu 20.04 daily in GNOME Boxes (based off of QEMU).
Details:
```
[ 604.230] (EE) Backtrace:
[ 604.230] (EE) 0: /usr/lib/xorg/Xorg (OsLookupColor+0x13c) [0x5576c3d8facc]
[ 60...Xorg 1:7.7+19 fails to start on a default installation of Ubuntu 20.04 daily in GNOME Boxes (based off of QEMU).
Details:
```
[ 604.230] (EE) Backtrace:
[ 604.230] (EE) 0: /usr/lib/xorg/Xorg (OsLookupColor+0x13c) [0x5576c3d8facc]
[ 604.231] (EE) 1: /lib/x86_64-linux-gnu/libpthread.so.0 (funlockfile+0x60) [0x7f6767b6359f]
[ 604.231] (EE) 2: /lib/x86_64-linux-gnu/libc.so.6 (gsignal+0xcb) [0x7f67679a13eb]
[ 604.232] (EE) 3: /lib/x86_64-linux-gnu/libc.so.6 (abort+0x12b) [0x7f6767980899]
[ 604.232] (EE) unw_get_proc_name failed: no unwind info found [-10]
[ 604.232] (EE) 4: /lib/x86_64-linux-gnu/libc.so.6 (?+0x0) [0x7f676798075a]
[ 604.232] (EE) 5: /lib/x86_64-linux-gnu/libc.so.6 (__assert_fail+0x46) [0x7f6767992006]
[ 604.232] (EE) 6: /usr/lib/xorg/Xorg (DRIMoveBuffersHelper+0xc15) [0x5576c3d5aaa5]
[ 604.232] (EE) 7: /usr/lib/xorg/Xorg (DRI2Authenticate+0xa2) [0x5576c3d5c0f2]
[ 604.233] (EE) 8: /usr/lib/xorg/Xorg (DRI2GetParam+0x944) [0x5576c3d5d4b4]
[ 604.233] (EE) 9: /usr/lib/xorg/Xorg (SendErrorToClient+0x354) [0x5576c3c2ef44]
[ 604.233] (EE) 10: /usr/lib/xorg/Xorg (InitFonts+0x3b4) [0x5576c3c32fd4]
[ 604.233] (EE) 11: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xf3) [0x7f67679821e3]
[ 604.233] (EE) 12: /usr/lib/xorg/Xorg (_start+0x2e) [0x5576c3c1ca1e]
```
Originally reported [here](https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1858336).https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/-/issues/9system crash when using qxl device and driver2019-07-31T06:30:42ZJürgen Richtsfeldsystem crash when using qxl device and driverI'm running Arch linux with latest updates and created a qemu/kvm machine using libvirt. If i give it a QXL video device AND install the `xf86-video-qxl` package in the client (which is also Arch linux) (currently the version is `0.1.5-7...I'm running Arch linux with latest updates and created a qemu/kvm machine using libvirt. If i give it a QXL video device AND install the `xf86-video-qxl` package in the client (which is also Arch linux) (currently the version is `0.1.5-7`) the system crashes a very short time after startup (in most cases, the system doesn't run long enough to enter my password in sddm).
As soon as I uninstall the qxl driver (or change the device of the vm to something else) it runs quite stable.
Sadly, I don't get any further details from the system as it gets fully unusable (screen goes blank, doesn't react on anything). If you can provide information on _how_ to gather debug information, I should be able to obtain that although I assume this problem can be easily reproduced as I tried it on 2 different Arch linux machines.https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/-/issues/8[Xspice] --xsession option broken with Python 32020-04-01T05:58:18ZMatthew Trescott[Xspice] --xsession option broken with Python 3When using a command like `Xspice --port 5900 --xsession /usr/bin/xterm :3`, Xspice starts up and then crashes shortly after when attempting to start xterm with the following error:
~~~
Traceback (most recent call last):
File "/usr/bi...When using a command like `Xspice --port 5900 --xsession /usr/bin/xterm :3`, Xspice starts up and then crashes shortly after when attempting to start xterm with the following error:
~~~
Traceback (most recent call last):
File "/usr/bin/Xspice", line 358, in <module>
os.spawnlpe(os.P_NOWAIT, args.xsession, environ)
File "/usr/lib64/python3.6/os.py", line 961, in spawnlpe
return spawnvpe(mode, file, args, env, execvpe)
File "/usr/lib64/python3.6/os.py", line 905, in spawnvpe
return _spawnvef(mode, file, args, env, execvpe)
File "/usr/lib64/python3.6/os.py", line 840, in _spawnvef
raise ValueError('argv first element cannot be empty')
ValueError: argv first element cannot be empty
~~~
This is on RHEL 8, which uses the Xspice script from current git master. Switching the shebang to use Python 2 fixes the problem but I don't know enough Python to fix it myself.https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/-/issues/6[RFE] Xspice listening on unix socket2018-10-05T12:22:25Zjirib[RFE] Xspice listening on unix socketHi,
would it be possible to have Xspice listening on unix socket? The idea is to have SPICE alternative to x11vnc which is able to listen on unix socket and spawn Xdummy/Xvfb...
So, one could do something like this with Xspice:
```
ss...Hi,
would it be possible to have Xspice listening on unix socket? The idea is to have SPICE alternative to x11vnc which is able to listen on unix socket and spawn Xdummy/Xvfb...
So, one could do something like this with Xspice:
```
ssh -oPermitLocalCommand=yes \
-oLocalCommand="(sleep 1; remote-viewer spice://localhost:5900 >/dev/null 2>&1 )&" \
-L 5900:/home/jirib/xspice.sock \
192.168.1.7 Xorg -noreset -config spiceqxl.xorg.conf :3.0```https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/-/issues/5[Xspice] python2 NameError: name 'temp_dir' is not defined2020-05-12T01:43:46ZBugzilla Migration User[Xspice] python2 NameError: name 'temp_dir' is not defined## Submitted by Mohan R
Assigned to **Søren Sandmann Pedersen**
**[Link to original bug (#107364)](https://bugs.freedesktop.org/show_bug.cgi?id=107364)**
## Description
getting below exception when starting Xspice
Traceback (most...## Submitted by Mohan R
Assigned to **Søren Sandmann Pedersen**
**[Link to original bug (#107364)](https://bugs.freedesktop.org/show_bug.cgi?id=107364)**
## Description
getting below exception when starting Xspice
Traceback (most recent call last):
File "/usr/bin/Xspice", line 277, in `<module>`
if not temp_dir:
NameError: name 'temp_dir' is not defined
Distro: Archlinux
Package: 0.1.5-6https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/-/issues/7mouse pointer on qxl multihead VM does not work after switching monitor posit...2019-01-05T08:32:18ZBugzilla Migration Usermouse pointer on qxl multihead VM does not work after switching monitor positions with xrandr## Submitted by Vasilis Liaskovitis
Assigned to **Spice Bug List**
**[Link to original bug (#103531)](https://bugs.freedesktop.org/show_bug.cgi?id=103531)**
## Description
On a Tumbleweed VM with qxl and 2 virtual displays (using ...## Submitted by Vasilis Liaskovitis
Assigned to **Spice Bug List**
**[Link to original bug (#103531)](https://bugs.freedesktop.org/show_bug.cgi?id=103531)**
## Description
On a Tumbleweed VM with qxl and 2 virtual displays (using gnome):
- connect virt-viewer.
- enable 2nd display. Works fine.
- change display positions with "xrandr --output Virtual-1 --left-of Virtual-0"
Before the xrandr command, mouse works fine. After the xrandr command, the displays successfully switch position. However the mouse no longer works.
Going back to orignal monitor positions with "xrandr --output Virtual-0 --left-of Virtual-1", makes the mouse work again.
Is this expected? Not sure if this a virt-viewer problem or some other component.
host:
qemu 2.10.1-1.1
virt-viewer 6.0-1.1
libspice-client 0.34-1.1
libspice server 0.12.8-5.4
guest:
spice-vdagent 0.17.0-3.1
spice-vdagent and qemu-ga are both present in VM.https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/-/issues/4drop drm master on xserver teardown to avoid crash on VT switch2018-08-10T21:57:51ZBugzilla Migration Userdrop drm master on xserver teardown to avoid crash on VT switch## Submitted by Oliver Henshaw
Assigned to **Søren Sandmann Pedersen**
**[Link to original bug (#99102)](https://bugs.freedesktop.org/show_bug.cgi?id=99102)**
## Description
With the sddm display manager and the qxl driver, loggin...## Submitted by Oliver Henshaw
Assigned to **Søren Sandmann Pedersen**
**[Link to original bug (#99102)](https://bugs.freedesktop.org/show_bug.cgi?id=99102)**
## Description
With the sddm display manager and the qxl driver, logging out of an x11 session can kill the x11 session session of a user who logged in earlier. This can't be reproduced on common real hardware (and all signs point to a problem with the xorg qxl driver); it can't be reproduced with gdm afaik, presumably because gdm systems use logind to mediate VT/drm-master access rather than the xserver accessing it directly.
Steps to reproduce:
1. Boot to sddm (which is on vt1)
2. Log in as user1 (which is on vt1)
3. Switch to new session (which is on vt2); login as user2
4. Log out of user2
Results:
User2 logs out, and after a few seconds I'm taken to a newly spawned sddm login screen on VT1 (on kde I briefly see a white dialog from ksmserver saying "Could not start ksmserver: check your installation"). Switching vt works and loginctl shows that the user1 session is in state 'closing'. The tail of Xorg.0.log.old shows:
[ 502.491] (WW) qxl(0): drmSetMaster failed: Invalid argument
[ 502.491] (EE) qxl(0): failed to set mode: Permission denied(EE)
Fatal server error:
[ 502.491] (EE) EnterVT failed for screen 0
[ 502.491] (EE)
[ 502.491] (EE)
Please consult the Fedora Project support
at http://wiki.x.org
for help.
[ 502.491] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 502.491] (EE)
[ 502.492] (WW) qxl(0): drmDropMaster failed: Invalid argument
[ 502.521] (EE) Server terminated with error (1). Closing log file.
Expected results:
user2 logs out and the system switches to user1's session on VT1.
Installed packages:
xorg-x11-server-Xorg-1.18.4-4.fc24.x86_64
libdrm-2.4.71-2.fc24.x86_64
kernel-4.8.6-201.fc24.x86_64 (this is an old test VM)
xorg-x11-drv-qxl-0.1.4-7.fc24.x86_64
### See also
* https://bugzilla.redhat.com/show_bug.cgi?id=1382001https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/-/issues/3Xspice segfault2018-08-10T21:57:48ZBugzilla Migration UserXspice segfault## Submitted by Laurent Bigonville
Assigned to **Søren Sandmann Pedersen**
**[Link to original bug (#98861)](https://bugs.freedesktop.org/show_bug.cgi?id=98861)**
## Description
Created attachment 128200
Log
Hi,
With the last gi...## Submitted by Laurent Bigonville
Assigned to **Søren Sandmann Pedersen**
**[Link to original bug (#98861)](https://bugs.freedesktop.org/show_bug.cgi?id=98861)**
## Description
Created attachment 128200
Log
Hi,
With the last git HEAD (4d7160c49614c9132e7b7ae4ccfda952daffeefb), Xspice crashes with the following backtrace:
(EE)
(EE) Backtrace:
(EE) 0: /usr/lib/xorg/Xorg (xorg_backtrace+0x4a) [0x5590c30a1fea]
(EE) 1: /usr/lib/xorg/Xorg (0x5590c2ee9000+0x1bcd69) [0x5590c30a5d69]
(EE) 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7fe8ff840000+0x11100) [0x7fe8ff851100]
(EE) 3: /usr/lib/xorg/modules/drivers/spiceqxl_drv.so (0x7fe8fb5ab000+0x90ab) [0x7fe8fb5b40ab]
(EE) 4: /usr/lib/xorg/Xorg (BlockHandler+0x4e) [0x5590c2f41e0e]
(EE) 5: /usr/lib/xorg/Xorg (WaitForSomething+0x152) [0x5590c309f882]
(EE) 6: /usr/lib/xorg/Xorg (0x5590c2ee9000+0x541fa) [0x5590c2f3d1fa]
(EE) 7: /usr/lib/xorg/Xorg (0x5590c2ee9000+0x58448) [0x5590c2f41448]
(EE) 8: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xf1) [0x7fe8ff4c22b1]
(EE) 9: /usr/lib/xorg/Xorg (_start+0x2a) [0x5590c2f2b13a]
(EE)
(EE) Segmentation fault at address 0x927c0
(EE)
Fatal server error:
(EE) Caught signal 11 (Segmentation fault). Server aborting
(EE)
(EE)
**Attachment 128200**, "Log":
[log](/uploads/c1720deb325f16a6d56c75a087867304/log)
Version: githttps://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/-/issues/2Segfault (NULL deref) during RandR mode switch with multiple QXL devices2018-08-10T21:57:46ZBugzilla Migration UserSegfault (NULL deref) during RandR mode switch with multiple QXL devices## Submitted by Peter Wu
Assigned to **Søren Sandmann Pedersen**
**[Link to original bug (#91576)](https://bugs.freedesktop.org/show_bug.cgi?id=91576)**
## Description
Situation:
QEMU VM with a QXL display device.
When changing th...## Submitted by Peter Wu
Assigned to **Søren Sandmann Pedersen**
**[Link to original bug (#91576)](https://bugs.freedesktop.org/show_bug.cgi?id=91576)**
## Description
Situation:
QEMU VM with a QXL display device.
When changing the screen resolution, Xorg crashes.
Steps to reproduce:
1. Start QEMU with an Arch Linux guest.
qemu-system-x86_64 -machine pc,accel=kvm ... -vga qxl -device qxl -spice port=$port,disable-ticketing
2. Connect with: spicy -h $ip -p $port
2. Install packages: pacman -S xorg-server xorg-xrandr xterm xorg-xinit.
3. From a tty, startx
4. In xterm: xrandr --output Virtual-0 --mode 1920x1200
Expected result:
Screen resolution changes, window resizes.
Actual result:
Xorg segfaults. See bottom for Xorg.0.log and gdb output. Note that
Package versions:
qemu-system-x86_64 2.0.0+dfsg-2ubuntu1.15 (host, Ubuntu 14.04LTS)
Guest:
Arch Linux x86_64
xf86-video-qxl 0.1.4
xorg-server 1.17.2
spice 0.12.5
spice-vdagent 0.16.0 (vdagent does not seem to affect result)
Additional information:
[ 970.996] qxl_kms_surface_create: Bad bpp: 1 (1)
[ 971.001] (EE)
[ 971.001] (EE) Backtrace:
[ 971.001] (EE) 0: /usr/lib/xorg-server/Xorg (OsLookupColor+0x139) [0x596d09]
[ 971.002] (EE) 1: /usr/lib/libc.so.6 (__restore_rt+0x0) [0x7fc7793955af]
[ 971.002] (EE) 2: /usr/lib/xorg-server/Xorg (RRTellChanged+0x2ca) [0x4f632a]
[ 971.002] (EE) 3: /usr/lib/xorg-server/Xorg (ProcRRSetOutputPrimary+0x103) [0x4fc7c3]
[ 971.002] (EE) 4: /usr/lib/xorg-server/Xorg (SendErrorToClient+0x2ff) [0x438e4f]
[ 971.002] (EE) 5: /usr/lib/xorg-server/Xorg (remove_fs_handlers+0x41b) [0x43cf4b]
[ 971.002] (EE) 6: /usr/lib/libc.so.6 (__libc_start_main+0xf0) [0x7fc779382790]
[ 971.002] (EE) 7: /usr/lib/xorg-server/Xorg (_start+0x29) [0x427319]
[ 971.003] (EE) 8: ? (?+0x29) [0x29]
[ 971.003] (EE)
[ 971.003] (EE) Segmentation fault at address 0x34
```
(gdb) bt
#0 0x00007fd83343e528 in raise () from /usr/lib/libc.so.6
#1 0x00007fd83343f93a in abort () from /usr/lib/libc.so.6
#2 0x000000000063a94a in OsAbort () at utils.c:1342
#3 0x000000000049d411 in ddxGiveUp (error=EXIT_ERR_ABORT) at xf86Init.c:1065
#4 0x000000000049d53a in AbortDDX (error=EXIT_ERR_ABORT) at xf86Init.c:1109
#5 0x00000000006447b2 in AbortServer () at log.c:804
#6 0x0000000000644cf6 in FatalError (f=0x672a20 "Caught signal %d (%s). Server aborting\n") at log.c:945
#7 0x0000000000637538 in OsSigHandler (signo=11, sip=0x7ffeb068c7b0, unused=0x7ffeb068c680) at osinit.c:147
#8 <signal handler called>
#9 0x000000000054b1d2 in RRTellChanged (pScreen=0x12817e0) at randr.c:615
#10 0x000000000055a064 in RRScreenSizeNotify (pScreen=0x12817e0) at rrscreen.c:149
#11 0x00000000004f2796 in xf86RandR12ScreenSetSize (pScreen=0x12817e0, width=1920, height=1200, mmWidth=507, mmHeight=317) at xf86RandR12.c:734
#12 0x000000000055a101 in RRScreenSizeSet (pScreen=0x12817e0, width=1920, height=1200, mmWidth=507, mmHeight=317) at rrscreen.c:171
#13 0x000000000055a599 in ProcRRSetScreenSize (client=0x155f460) at rrscreen.c:286
#14 0x000000000054b40f in ProcRRDispatch (client=0x155f460) at randr.c:675
#15 0x000000000043393d in Dispatch () at dispatch.c:432
#16 0x0000000000442977 in dix_main (argc=7, argv=0x7ffeb068cf98, envp=0x7ffeb068cfd8) at main.c:298
#17 0x0000000000423a8e in main (argc=7, argv=0x7ffeb068cf98, envp=0x7ffeb068cfd8) at stubmain.c:34
(gdb) frame 9
#9 0x000000000054b1d2 in RRTellChanged (pScreen=0x12817e0) at randr.c:615
615 pSlaveScrPriv->provider->changed = FALSE;
(gdb) l
610 pSlaveScrPriv = rrGetScrPriv(iter);
611 pSlaveScrPriv->provider->changed = FALSE;
612 }
613 xorg_list_for_each_entry(iter, &master->unattached_list, unattached_head) {
614 pSlaveScrPriv = rrGetScrPriv(iter);
615 pSlaveScrPriv->provider->changed = FALSE;
616 }
617
618 if (mastersp->layoutChanged) {
619 pScrPriv->layoutChanged = FALSE;
(gdb) p pSlaveScrPriv->provider
$1 = (RRProviderPtr) 0x0
```
By skipping the provider indirection the crash is avoided:
break randr.c:615 if !pSlaveScrPriv->provider
commands
j +1
c
end
# unattached_list
break randr.c:619 if !pSlaveScrPriv->provider
commands
j +1
c
endhttps://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/-/issues/1After some time VM screen becomes black and some letters disappears2018-08-10T21:57:39ZBugzilla Migration UserAfter some time VM screen becomes black and some letters disappears## Submitted by Eugene `@Gannet`
Assigned to **Søren Sandmann Pedersen**
**[Link to original bug (#88779)](https://bugs.freedesktop.org/show_bug.cgi?id=88779)**
## Description
After some time on my booted KVM/QEMU VM the screen be...## Submitted by Eugene `@Gannet`
Assigned to **Søren Sandmann Pedersen**
**[Link to original bug (#88779)](https://bugs.freedesktop.org/show_bug.cgi?id=88779)**
## Description
After some time on my booted KVM/QEMU VM the screen becomes black and a lot of letters becomes invisible (please see screenshot in attachment). Also it could happens quicker if to run firefox, load some web page and to move scrollbar up and down. Sometimes it is even hangs the hole VM if to move scrollbar.
Relogin always fixes the screen.
Host:
Kubuntu 14.10
Linux 3.19RC5 x86_64
libvirt0 1.2.11-0~14.10~ppa1
qemu-system-x86 2.2.0+dfsg-0~14.10~ppa0
Mesa 10.5.0-devel (git-94e7b59 2015-01-24 utopic-oibaf-ppa)
xserver-xorg-video-qxl 0.1.1-0ubuntu3
Guest:
Xubuntu 14.04.1 x86
Linux: 3.13.0-44 / 3.18.3 / 3.19RC5 x86_64
Mesa 10.5.0-devel (git-d2811c2 2015-01-24 trusty-oibaf-ppa)
Version: git