[[PageOutline]] = virtio-gpu = * [https://virgil3d.github.io/ Virgil 3D GPU project by virgil3d] * [https://www.phoronix.com/scan.php?page=news_item&px=Virt-Manager-1.4-Released Virt-Manager 1.4 Exposes The New OpenGL Options - Phoronix] * [https://www.kraxel.org/blog/2016/09/using-virtio-gpu-with-libvirt-and-spice/ Using virtio-gpu with libvirt and spice | kraxel's news] == QXL vs virtio-vga == * 結論から言うと、SPICEが未対応のためvirt-manager下では3D accelerationを有効にできない * https://wiki.archlinux.org/index.php/QEMU#virtio {{{virtio-vga}}} / {{{virtio-gpu}}} is a paravirtual 3D graphics driver based on [https://virgil3d.github.io/ virgl]. > As of September 2016, support for the spice protocol is under development and can be tested installing the development release of spice (>= 0.13.2). * H/W: wiki:TipAndDoc/Hardware#ASUSH97M-PLUS * S/W * ArchLinux 4.7.6-1 * qemu 2.7.0-2 * seabios 1.9.3-1 * libvirt 2.3.0-1 * spice 0.12.8-1 * virt-manager 1.4.0-2 === QXL === * mitty@guest:~$ lspci {{{ 00:02.0 VGA compatible controller: Red Hat, Inc. QXL paravirtual graphic card (rev 04) }}} * mitty@guest:~$ dmesg | grep drm {{{ [ 1.057734] [drm] Initialized drm 1.1.0 20060810 [ 1.110306] [drm] Device Version 0.0 [ 1.110308] [drm] Compression level 0 log level 0 [ 1.110309] [drm] Currently using mode #0, list at 0x488 [ 1.110309] [drm] 12286 io pages at offset 0x1000000 [ 1.110310] [drm] 16777216 byte draw area at offset 0x0 [ 1.110310] [drm] RAM header offset: 0x3ffe000 [ 1.110311] [drm] rom modes offset 0x488 for 128 modes [ 1.110364] [drm] qxl: 16M of VRAM memory size [ 1.110364] [drm] qxl: 63M of IO pages memory ready (VRAM domain) [ 1.110365] [drm] qxl: 64M of Surface memory size [ 1.112882] [drm] main mem slot 1 [f4000000,3ffe000] [ 1.112884] [drm] surface mem slot 2 [f8000000,4000000] [ 1.113677] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). [ 1.113679] [drm] No driver support for vblank timestamp query. [ 1.113891] [drm] fb mappable at 0xF4000000, size 3145728 [ 1.113891] [drm] fb: depth 24, pitch 4096, width 1024, height 768 [ 1.113892] fb: switching to qxldrmfb from VESA VGA [ 1.115537] fbcon: qxldrmfb (fb0) is primary device [ 1.116425] [drm:qxl_enc_commit [qxl]] *ERROR* head number too large or missing monitors config: ffffc90000748000, 0 [ 1.118767] qxl 0000:00:02.0: fb0: qxldrmfb frame buffer device [ 1.136842] [drm] Initialized qxl 0.1.0 20120117 for 0000:00:02.0 on minor 0 }}} * minecraftは一応動いた[[br]][[Image(QXL-minecraft.png,33%)]] * 仮想CPU 4コア、メモリ4GBでCPU負荷50%程度、35fps(minecraftの3D設定はなるべく低負荷に設定) === virtio-vga (no 3D) === * mitty@guest:~$ lspci {{{ 00:02.0 VGA compatible controller: Red Hat, Inc Virtio GPU (rev 01) }}} * mitty@guest:~$ dmesg | grep drm {{{ [ 0.690401] [drm] Initialized drm 1.1.0 20060810 [ 0.714409] [drm] pci: virtio-vga detected [ 0.714412] fb: switching to virtiodrmfb from VESA VGA [ 0.714786] [drm] virgl 3d acceleration not available [ 0.715117] [drm] virtio vbuffers: 80 bufs, 192B each, 15kB total. [ 0.715164] [drm] number of scanouts: 1 [ 0.715177] [drm] number of cap sets: 0 [ 0.717593] virtio_gpu virtio0: fb0: virtiodrmfb frame buffer device [ 0.726158] [drm] Initialized virtio_gpu 0.0.1 0 on minor 0 }}} * 3Dが有効にならない場合、QXLとほぼ変わらない[[br]][[Image(virgil_no3d-minecraft.png,33%)]] * 仮想CPU 4コア、メモリ4GBでCPU負荷50%程度、33fps(minecraftの3D設定はなるべく低負荷に設定) ==== errors ==== * [https://www.kraxel.org/blog/2015/10/virtio-gpu-and-libvirt/ virtio-gpu and libvirt | kraxel's news] こちらを参考に、virsh editで直接編集してみたが、起動に失敗する 1. mitty@host:~$ diff -u virgil.orig.xml virgil.gl.xml {{{#!diff --- virgil.orig.xml 2016-10-08 20:47:22.762150999 +0900 +++ virgil.gl.xml 2016-10-08 20:49:14.199368411 +0900 @@ -87,6 +87,7 @@ +
}}} * mitty@host:~$ virsh start virgil {{{ error: Failed to start domain virgil error: unsupported configuration: This QEMU doesn't support spice OpenGL }}} 2. mitty@host:~$ diff -u virgil.orig.xml virgil.gl.xml {{{#!diff --- virgil.orig.xml 2016-10-08 20:47:22.762150999 +0900 +++ virgil.gl.xml 2016-10-09 00:12:45.044761666 +0900 @@ -1,4 +1,4 @@ - + virgil afd14745-a9f3-44ea-b2da-e2eefabea22b 4194304 @@ -84,10 +84,7 @@ - - - - +
@@ -105,5 +102,11 @@
+ + + + + + }}} * mitty@host:~$ virsh start virgil {{{ error: Failed to start domain virgil error: internal error: process exited while connecting to monitor: Unable to init server: Could not connect: Connection refused 2016-10-08T15:12:30.027297Z qemu-system-x86_64: OpenGL is not supported by the display }}} * ホスト上でXを動かせば良さそう -> [https://www.phoronix.com/scan.php?page=news_item&px=Virt-Manager-1.4-Released Virt-Manager 1.4 Exposes The New OpenGL Options - Phoronix]