[Spice-devel] xf86-video-qxl + libspice-server: no image on FreeBSD

Oleg Ginzburg olevole at olevole.ru
Thu Dec 28 10:27:47 UTC 2017


Hello!

I would really like to see XSpice and xf86-video-qxl on FreeBSD.

The correction for the FreeBSD build libspice-server.so is quite trivial
and mechanical (first and dirty version in attach. I'd like to do the
FreeBSD port later)

After that, the compilation xf86-video-qxl (with --enable-xspice) is
success:

root at fbl1:/# ldd /usr/local/lib/xorg/modules/drivers/spiceqxl_drv.so
/usr/local/lib/xorg/modules/drivers/spiceqxl_drv.so:
        libspice-server.so.1 => /usr/local/lib/libspice-server.so.1
(0x801656000)
        libXfont.so.1 => /usr/local/lib/libXfont.so.1 (0x8019cc000)
        libthr.so.3 => /lib/libthr.so.3 (0x801c09000)
        libc.so.7 => /lib/libc.so.7 (0x800826000)
        libgthread-2.0.so.0 => /usr/local/lib/libgthread-2.0.so.0
(0x801e30000)
        libgio-2.0.so.0 => /usr/local/lib/libgio-2.0.so.0 (0x802031000)
        libjpeg.so.8 => /usr/local/lib/libjpeg.so.8 (0x8023bc000)
        liblz4.so.1 => /usr/local/lib/liblz4.so.1 (0x8025fb000)
        libpixman-1.so.0 => /usr/local/lib/libpixman-1.so.0 (0x802818000)
        libsasl2.so.3 => /usr/local/lib/libsasl2.so.3 (0x802ade000)
        libgstapp-1.0.so.0 => /usr/local/lib/libgstapp-1.0.so.0
(0x802cfb000)
        libgstvideo-1.0.so.0 => /usr/local/lib/libgstvideo-1.0.so.0
(0x802f09000)
        libgstbase-1.0.so.0 => /usr/local/lib/libgstbase-1.0.so.0
(0x8031af000)
        libgstreamer-1.0.so.0 => /usr/local/lib/libgstreamer-1.0.so.0
(0x80340e000)
        libgobject-2.0.so.0 => /usr/local/lib/libgobject-2.0.so.0
(0x803741000)
        libglib-2.0.so.0 => /usr/local/lib/libglib-2.0.so.0 (0x80398a000)
        libintl.so.8 => /usr/local/lib/libintl.so.8 (0x803c9d000)
        libcrypto.so.9 => /usr/local/lib/libcrypto.so.9 (0x804000000)
        libssl.so.9 => /usr/local/lib/libssl.so.9 (0x80447a000)
        libz.so.6 => /lib/libz.so.6 (0x8046f2000)
        libm.so.5 => /lib/libm.so.5 (0x80490b000)
        librt.so.1 => /usr/lib/librt.so.1 (0x804b38000)
        liborc-0.4.so.0 => /usr/local/lib/liborc-0.4.so.0 (0x804d3d000)
        libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x804fda000)
        libfontenc.so.1 => /usr/local/lib/libfontenc.so.1 (0x80528c000)
        libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x805493000)
        libpcre.so.1 => /usr/local/lib/libpcre.so.1 (0x80578e000)
        libffi.so.6 => /usr/local/lib/libffi.so.6 (0x805a05000)
        libgmodule-2.0.so.0 => /usr/local/lib/libgmodule-2.0.so.0
(0x805c0c000)
        libunwind.so.8 => /usr/local/lib/libunwind.so.8 (0x805e0f000)
        libbz2.so.4 => /usr/lib/libbz2.so.4 (0x806028000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x80623c000)
        liblzma.so.5 => /usr/lib/liblzma.so.5 (0x806452000)

+

root at fbl1:/# ldd /usr/local/lib/xorg/modules/drivers/qxl_drv.so
/usr/local/lib/xorg/modules/drivers/qxl_drv.so:
        libc.so.7 => /lib/libc.so.7 (0x800826000)


After copying spiceqxl.xorg.conf and starting the Xspice (or Xspice with
--auto args) Xspice/xorg
starts successfully and I see that the port is open:

Xspice --disable-ticketing --xsession /usr/local/bin/fluxbox :1 --port 5900

(startup log in Xspice-run.txt)

% sockstat -4l |grep 5900
root     Xorg       80657 7  tcp46  *:5900                *:*


Also, I see that the fluxbox is launched:

% ps axf |grep fluxbox

80662  3  I+       0:00.18 [fluxbox]


But when i try to connect from remote node:

% spicy -h <Server IP> -p 5900
GSpice-Message: main channel: opened


I do not get any images. I've see on server side this messages upon client
connect:


main_channel_link: add main channel client
...

And when client disconnected:

red_channel_client_disconnect: rcc=0x823180130 (channel=0x8008b58a0 type=1
id=0)
main_channel_client_on_disconnect: rcc=0x823180130
red_client_destroy: destroy client 0x81e0fac00 with #channels=1

But can see anything.

Can somebody help to debug this ?

PS: client also is FreeBSD, but this work well when Xspice running in same
way on Debian.

xorg-7.7
xorg-server-1.18.4_6,1
xf86-video-qxl-0.1.5
spice-0.14.0
spice-protocol-0.12.13
spice-gtk-0.33
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20171228/a566b993/attachment-0001.html>
-------------- next part --------------
--- server/net-utils.c.orig	2017-09-12 15:00:11.000000000 +0300
+++ server/net-utils.c	2017-12-27 17:40:47.728516000 +0300
@@ -23,6 +23,9 @@
 #include <fcntl.h>
 #include <stdbool.h>
 #include <string.h>
+#include <sys/types.h>
+#include <arpa/inet.h>
+#include <netinet/in.h>
 #include <netinet/ip.h>
 #include <netinet/tcp.h>
 #include <sys/socket.h>
@@ -42,7 +45,7 @@
 {
     int keepalive = !!enable;
 
-    if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &keepalive, sizeof(keepalive)) == -1) {
+    if (setsockopt(fd, IPPROTO_TCP, SO_KEEPALIVE, &keepalive, sizeof(keepalive)) == -1) {
         if (errno != ENOTSUP) {
             spice_printerr("setsockopt for keepalive failed, %s", strerror(errno));
             return false;
@@ -54,7 +57,7 @@
     }
 
 #ifdef HAVE_TCP_KEEPIDLE
-    if (setsockopt(fd, SOL_TCP, TCP_KEEPIDLE, &timeout, sizeof(timeout)) == -1) {
+    if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &timeout, sizeof(timeout)) == -1) {
         if (errno != ENOTSUP) {
             spice_printerr("setsockopt for keepalive timeout failed, %s", strerror(errno));
             return false;
--- server/red-worker.c.bak	2017-09-21 14:05:07.000000000 +0300
+++ server/red-worker.c	2017-12-27 17:53:23.512584000 +0300
@@ -28,6 +28,7 @@
 #include <unistd.h>
 #include <poll.h>
 #include <pthread.h>
+#include <pthread_np.h>
 #include <openssl/ssl.h>
 #include <inttypes.h>
 #include <glib.h>
@@ -51,6 +52,16 @@
 #define CMD_RING_POLL_RETRIES 1
 
 #define INF_EVENT_WAIT ~0
+
+int pthread_setname_np(pthread_t, const char *);
+
+
+int pthread_setname_np(pthread_t id, const char *name)
+{
+	/* this BSD function returns no error */
+	pthread_set_name_np(id, name);
+	return 0;
+}
 
 struct RedWorker {
     pthread_t thread;
--- server/sound.c.orig	2017-09-21 14:05:07.000000000 +0300
+++ server/sound.c	2017-12-27 17:43:39.803158000 +0300
@@ -22,6 +22,8 @@
 #include <fcntl.h>
 #include <errno.h>
 #include <limits.h>
+#include <sys/types.h>
+#include <netinet/in.h>
 #include <sys/socket.h>
 #include <netinet/ip.h>
 #include <netinet/tcp.h>
-------------- next part --------------
X.Org X Server 1.18.4
Release Date: 2016-07-19
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 12.0-CURRENT amd64 
Current Operating System: FreeBSD fbl1.my.domain 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r327219: Wed Dec 27 00:31:28 MSK 2017     root at fbl1.my.domain:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
Build Date: 21 December 2017  04:02:09AM
 
Current version of pixman: 0.34.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: "/var/log/Xorg.1.log", Time: Thu Dec 28 10:12:29 2017
(++) Using config file: "spiceqxl.xorg.conf"
resizing surface0 to 16777216
memory space from 0x80b528580 to 0x812525580
memory space from 0x812529780 to 0x81a529780
resizing surface0 to 16777216
memory space from 0x813529a00 to 0x81a526a00
memory space from 0x80a5285c0 to 0x8125285c0

(process:80657): Spice-WARNING **: reds.c:3656:reds_set_video_codecs_from_string: spice: invalid encoder:codec value at spice:mjpeg;gstreamer:mjpeg;gstreamer:h264;gstreamer:vp8;gstreamer:vp9;

(process:80657): Spice-WARNING **: reds.c:3656:reds_set_video_codecs_from_string: spice: invalid encoder:codec value at ;gstreamer:mjpeg;gstreamer:h264;gstreamer:vp8;gstreamer:vp9;

(process:80657): Spice-WARNING **: reds.c:3656:reds_set_video_codecs_from_string: spice: invalid encoder:codec value at ;gstreamer:h264;gstreamer:vp8;gstreamer:vp9;

(process:80657): Spice-WARNING **: reds.c:3656:reds_set_video_codecs_from_string: spice: invalid encoder:codec value at ;gstreamer:vp8;gstreamer:vp9;

(process:80657): Spice-WARNING **: reds.c:3656:reds_set_video_codecs_from_string: spice: invalid encoder:codec value at ;gstreamer:vp9;

(process:80657): Spice-WARNING **: reds.c:3682:reds_set_video_codecs_from_string: Failed to set video codecs, input string: ';'
inotify not available; audio disabled.
slots start: 0, slots end: 1
done reset
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
Failed to read: session.ignoreBorder
Setting default value
Failed to read: session.forcePseudoTransparency
Setting default value
Failed to read: session.colorsPerChannel
Setting default value
Failed to read: session.doubleClickInterval
Setting default value
Failed to read: session.tabPadding
Setting default value
Failed to read: session.styleOverlay
Setting default value
Failed to read: session.slitlistFile
Setting default value
Failed to read: session.appsFile
Setting default value
Failed to read: session.tabsAttachArea
Setting default value
Failed to read: session.menuSearch
Setting default value
Failed to read: session.cacheLife
Setting default value
Failed to read: session.cacheMax
Setting default value
Failed to read: session.autoRaiseDelay
Setting default value
Failed to read: session.ignoreBorder
Setting default value
Failed to read: session.forcePseudoTransparency
Setting default value
Failed to read: session.colorsPerChannel
Setting default value
Failed to read: session.doubleClickInterval
Setting default value
Failed to read: session.tabPadding
Setting default value
Failed to read: session.styleOverlay
Setting default value
Failed to read: session.slitlistFile
Setting default value
Failed to read: session.appsFile
Setting default value
Failed to read: session.tabsAttachArea
Setting default value
Failed to read: session.menuSearch
Setting default value
Failed to read: session.cacheLife
Setting default value
Failed to read: session.cacheMax
Setting default value
Failed to read: session.autoRaiseDelay
Setting default value
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
Failed to read: session.screen0.opaqueMove
Setting default value
Failed to read: session.screen0.fullMaximization
Setting default value
Failed to read: session.screen0.maxIgnoreIncrement
Setting default value
Failed to read: session.screen0.maxDisableMove
Setting default value
Failed to read: session.screen0.maxDisableResize
Setting default value
Failed to read: session.screen0.workspacewarping
Setting default value
Failed to read: session.screen0.showwindowposition
Setting default value
Failed to read: session.screen0.autoRaise
Setting default value
Failed to read: session.screen0.clickRaises
Setting default value
Failed to read: session.screen0.defaultDeco
Setting default value
Failed to read: session.screen0.tab.placement
Setting default value
Failed to read: session.screen0.windowMenu
Setting default value
Failed to read: session.screen0.noFocusWhileTypingDelay
Setting default value
Failed to read: session.screen0.workspaces
Setting default value
Failed to read: session.screen0.edgeSnapThreshold
Setting default value
Failed to read: session.screen0.window.focus.alpha
Setting default value
Failed to read: session.screen0.window.unfocus.alpha
Setting default value
Failed to read: session.screen0.menu.alpha
Setting default value
Failed to read: session.screen0.menuDelay
Setting default value
Failed to read: session.screen0.tab.width
Setting default value
Failed to read: session.screen0.tooltipDelay
Setting default value
Failed to read: session.screen0.allowRemoteActions
Setting default value
Failed to read: session.screen0.clientMenu.usePixmap
Setting default value
Failed to read: session.screen0.tabs.usePixmap
Setting default value
Failed to read: session.screen0.tabs.maxOver
Setting default value
Failed to read: session.screen0.tabs.intitlebar
Setting default value
Failed to read: session.screen0.focusModel
Setting default value
Failed to read: session.screen0.tabFocusModel
Setting default value
Failed to read: session.screen0.focusNewWindows
Setting default value
Failed to read: session.screen0.focusSameHead
Setting default value
Failed to read: session.screen0.rowPlacementDirection
Setting default value
Failed to read: session.screen0.colPlacementDirection
Setting default value
Failed to read: session.screen0.windowPlacement
Setting default value
Failed to read: session.ignoreBorder
Setting default value
Failed to read: session.forcePseudoTransparency
Setting default value
Failed to read: session.colorsPerChannel
Setting default value
Failed to read: session.doubleClickInterval
Setting default value
Failed to read: session.tabPadding
Setting default value
Failed to read: session.styleOverlay
Setting default value
Failed to read: session.slitlistFile
Setting default value
Failed to read: session.appsFile
Setting default value
Failed to read: session.tabsAttachArea
Setting default value
Failed to read: session.menuSearch
Setting default value
Failed to read: session.cacheLife
Setting default value
Failed to read: session.cacheMax
Setting default value
Failed to read: session.autoRaiseDelay
Setting default value
Failed to read: session.screen0.opaqueMove
Setting default value
Failed to read: session.screen0.fullMaximization
Setting default value
Failed to read: session.screen0.maxIgnoreIncrement
Setting default value
Failed to read: session.screen0.maxDisableMove
Setting default value
Failed to read: session.screen0.maxDisableResize
Setting default value
Failed to read: session.screen0.workspacewarping
Setting default value
Failed to read: session.screen0.showwindowposition
Setting default value
Failed to read: session.screen0.autoRaise
Setting default value
Failed to read: session.screen0.clickRaises
Setting default value
Failed to read: session.screen0.defaultDeco
Setting default value
Failed to read: session.screen0.tab.placement
Setting default value
Failed to read: session.screen0.windowMenu
Setting default value
Failed to read: session.screen0.noFocusWhileTypingDelay
Setting default value
Failed to read: session.screen0.workspaces
Setting default value
Failed to read: session.screen0.edgeSnapThreshold
Setting default value
Failed to read: session.screen0.window.focus.alpha
Setting default value
Failed to read: session.screen0.window.unfocus.alpha
Setting default value
Failed to read: session.screen0.menu.alpha
Setting default value
Failed to read: session.screen0.menuDelay
Setting default value
Failed to read: session.screen0.tab.width
Setting default value
Failed to read: session.screen0.tooltipDelay
Setting default value
Failed to read: session.screen0.allowRemoteActions
Setting default value
Failed to read: session.screen0.clientMenu.usePixmap
Setting default value
Failed to read: session.screen0.tabs.usePixmap
Setting default value
Failed to read: session.screen0.tabs.maxOver
Setting default value
Failed to read: session.screen0.tabs.intitlebar
Setting default value
Failed to read: session.screen0.focusModel
Setting default value
Failed to read: session.screen0.tabFocusModel
Setting default value
Failed to read: session.screen0.focusNewWindows
Setting default value
Failed to read: session.screen0.focusSameHead
Setting default value
Failed to read: session.screen0.rowPlacementDirection
Setting default value
Failed to read: session.screen0.colPlacementDirection
Setting default value
Failed to read: session.screen0.windowPlacement
Setting default value
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
Failed to read: session.screen0.slit.acceptKdeDockapps
Setting default value
Failed to read: session.screen0.slit.autoHide
Setting default value
Failed to read: session.screen0.slit.maxOver
Setting default value
Failed to read: session.screen0.slit.placement
Setting default value
Failed to read: session.screen0.slit.alpha
Setting default value
Failed to read: session.screen0.slit.onhead
Setting default value
Failed to read: session.screen0.slit.layer
Setting default value
Failed to read: session.screen0.toolbar.autoHide
Setting default value
Failed to read: session.screen0.toolbar.maxOver
Setting default value
Failed to read: session.screen0.toolbar.visible
Setting default value
Failed to read: session.screen0.toolbar.widthPercent
Setting default value
Failed to read: session.screen0.toolbar.alpha
Setting default value
Failed to read: session.screen0.toolbar.layer
Setting default value
Failed to read: session.screen0.toolbar.onhead
Setting default value
Failed to read: session.screen0.toolbar.placement
Setting default value
Failed to read: session.screen0.toolbar.height
Setting default value
Failed to read: session.screen0.toolbar.tools
Setting default value
Failed to read: session.screen0.iconbar.mode
Setting default value
Failed to read: session.screen0.iconbar.alignment
Setting default value
Failed to read: session.screen0.iconbar.iconWidth
Setting default value
Failed to read: session.screen0.iconbar.iconTextPadding
Setting default value
Failed to read: session.screen0.iconbar.usePixmap
Setting default value
Failed to read: session.screen0.strftimeFormat
Setting default value



More information about the Spice-devel mailing list