RebuildPPAKernelImages

ppa kernel

Install ppa kernel on ubuntu20.04 via:

add-apt-repository ppa:tuxinvader/lts-mainline -y
apt update -y
apt-get install -y linux-generic-5.19

After reboot, check the kernel via:

# uname -r
5.19.3-051903-generic

Customization of Kernel

uncomment the deb-srcfor ppa:

# cat /etc/apt/sources.list.d/tuxinvader-ubuntu-lts-mainline-focal.list 
deb http://ppa.launchpad.net/tuxinvader/lts-mainline/ubuntu focal main
deb-src http://ppa.launchpad.net/tuxinvader/lts-mainline/ubuntu focal main
# apt update

Get the source code:

# apt install linux-source-5.19.3
# ls /usr/src/linux-source-5.19.3/
debian  debian.master  linux-source-5.19.3.tar.bz2

Get the build-dep for kernel:

# apt build-dep linux-generic-5.19
# apt build-dep linux-doc

Prepare the build tree:

# cd /usr/src/linux-source
# bunzip2 linux-source-5.19.3.tar.bz2
# tar xf linux-source-5.19.3.tar
# mv linux-source-5.19.3/* .
# mkdir debian/stamps

Build via:

# fakeroot debian/rules clean
# fakeroot debian/rules editconfigs
# fakeroot debian/rules binary-headers binary-generic binary-perarch

build will take sometimes, so drink a cup of H~~~ot tea and wait.

Check the built result:

# ls /usr/src/*.deb
/usr/src/linux-buildinfo-5.19.3-051903-generic_5.19.3-051903.202208220846_amd64.deb
/usr/src/linux-headers-5.19.3-051903_5.19.3-051903.202208220846_all.deb
/usr/src/linux-headers-5.19.3-051903-generic_5.19.3-051903.202208220846_amd64.deb
/usr/src/linux-image-unsigned-5.19.3-051903-generic_5.19.3-051903.202208220846_amd64.deb
/usr/src/linux-modules-5.19.3-051903-generic_5.19.3-051903.202208220846_amd64.deb

Benchmark

glmark2 result:

# uname -r
5.19.3-051903-generic
# export DISPLAY=:179
# glmark2
=======================================================
    glmark2 2021.02
=======================================================
    OpenGL Information
    GL_VENDOR:     Intel
    GL_RENDERER:   Mesa Intel(R) Graphics (SG1)
    GL_VERSION:    4.6 (Compatibility Profile) Mesa 22.2.0-devel (git-e8fc5cc 2022-06-22 focal-oibaf-ppa)
=======================================================
.........
=======================================================
                                  glmark2 Score: 2886 
=======================================================

SG1Benchmark

Environment

Before upgrading the mesa:

root@sg1ubuntuzen:/home/intel# dpkg -l | grep mesa
ii  libegl-mesa0:amd64                         21.2.6-0ubuntu0.1~20.04.2             amd64        free implementation of the EGL API -- Mesa vendor library
ii  libgl1-mesa-dri:amd64                      21.2.6-0ubuntu0.1~20.04.2             amd64        free implementation of the OpenGL API -- DRI modules
ii  libglapi-mesa:amd64                        21.2.6-0ubuntu0.1~20.04.2             amd64        free implementation of the GL API -- shared library
ii  libglu1-mesa:amd64                         9.0.1-1build1                         amd64        Mesa OpenGL utility library (GLU)
ii  libglx-mesa0:amd64                         21.2.6-0ubuntu0.1~20.04.2             amd64        free implementation of the OpenGL API -- GLX vendor library
ii  mesa-vulkan-drivers:amd64                  21.2.6-0ubuntu0.1~20.04.2             amd64        Mesa Vulkan graphics drivers
root@sg1ubuntuzen:/home/intel# uname -a
Linux sg1ubuntuzen 5.19.3-zen-3c77c0f552c7+ #1 ZEN SMP PREEMPT_DYNAMIC Mon Aug 22 14:00:01 CST 2022 x86_64 x86_64 x86_64 GNU/Linu

Ludashi:

/images/2022_08_23_09_52_38_1051x926.jpg

Detailed result:

/images/2022_08_23_09_52_55_995x236.jpg

Second result:

/images/2022_08_23_09_57_44_1050x344.jpg

glmark2 result:

root@sg1ubuntuzen:/home/intel# export DISPLAY=:179
root@sg1ubuntuzen:/home/intel# glmark2
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
=======================================================
    glmark2 2021.02
=======================================================
    OpenGL Information
    GL_VENDOR:     Mesa/X.org
    GL_RENDERER:   llvmpipe (LLVM 12.0.0, 256 bits)
    GL_VERSION:    3.1 Mesa 21.2.6
=======================================================
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[build] use-vbo=false:^C

Upgrade mesa

Methods:

sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt update
sudo apt upgrade

mesa infos:

root@sg1ubuntuzen:/home/intel# dpkg -l | grep -i mesa
ii  libegl-mesa0:amd64                         22.2~git2206220600.e8fc5c~oibaf~f     amd64        free implementation of the EGL API -- Mesa vendor library
ii  libgl1-mesa-dri:amd64                      22.2~git2206220600.e8fc5c~oibaf~f     amd64        free implementation of the OpenGL API -- DRI modules
ii  libglapi-mesa:amd64                        22.2~git2206220600.e8fc5c~oibaf~f     amd64        free implementation of the GL API -- shared library
ii  libglu1-mesa:amd64                         9.0.1-1build1                         amd64        Mesa OpenGL utility library (GLU)
ii  libglx-mesa0:amd64                         22.2~git2206220600.e8fc5c~oibaf~f     amd64        free implementation of the OpenGL API -- GLX vendor library
ii  mesa-vulkan-drivers:amd64                  22.2~git2206220600.e8fc5c~oibaf~f     amd64        Mesa Vulkan graphics drivers

glmark2 result:

# glmark2
=======================================================
    glmark2 2021.02
=======================================================
    OpenGL Information
    GL_VENDOR:     Intel
    GL_RENDERER:   Mesa Intel(R) Graphics (SG1)
    GL_VERSION:    4.6 (Compatibility Profile) Mesa 22.2.0-devel (git-e8fc5cc 2022-06-22 focal-oibaf-ppa)
=======================================================
[build] use-vbo=false: FPS: 2485 FrameTime: 0.402 ms
[build] use-vbo=true: FPS: 3636 FrameTime: 0.275 ms
[texture] texture-filter=nearest: FPS: 3686 FrameTime: 0.271 ms
[texture] texture-filter=linear: FPS: 3559 FrameTime: 0.281 ms
[texture] texture-filter=mipmap: FPS: 3566 FrameTime: 0.280 ms
[shading] shading=gouraud: FPS: 3408 FrameTime: 0.293 ms
[shading] shading=blinn-phong-inf: FPS: 3243 FrameTime: 0.308 ms
[shading] shading=phong: FPS: 3339 FrameTime: 0.299 ms
[shading] shading=cel: FPS: 2886 FrameTime: 0.347 ms
[bump] bump-render=high-poly: FPS: 2402 FrameTime: 0.416 ms
[bump] bump-render=normals: FPS: 3683 FrameTime: 0.272 ms
[bump] bump-render=height: FPS: 3702 FrameTime: 0.270 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 3085 FrameTime: 0.324 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 2311 FrameTime: 0.433 ms
[pulsar] light=false:quads=5:texture=false: FPS: 3521 FrameTime: 0.284 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 2026 FrameTime: 0.494 ms
[desktop] effect=shadow:windows=4: FPS: 2605 FrameTime: 0.384 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 601 FrameTime: 1.664 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 1237 FrameTime: 0.808 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 637 FrameTime: 1.570 ms
[ideas] speed=duration: FPS: 2594 FrameTime: 0.386 ms
[jellyfish] <default>: FPS: 2947 FrameTime: 0.339 ms
[terrain] <default>: FPS: 531 FrameTime: 1.883 ms
[shadow] <default>: FPS: 2982 FrameTime: 0.335 ms
[refract] <default>: FPS: 1276 FrameTime: 0.784 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 3301 FrameTime: 0.303 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 3383 FrameTime: 0.296 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 3302 FrameTime: 0.303 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 3402 FrameTime: 0.294 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 3435 FrameTime: 0.291 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 3280 FrameTime: 0.305 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 3423 FrameTime: 0.292 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 3431 FrameTime: 0.291 ms
=======================================================
                                  glmark2 Score: 2815 
=======================================================

avd benchmark

Result(with x11vnc on):

/images/2022_08_23_11_17_35_422x832.jpg

Without x11vnc:

/images/2022_08_23_11_22_04_390x804.jpg

Kernel upgrading

vfio in linux-zen, performance is bad.

# git clone git://mirrors.ustc.edu.cn/linux.git
# cd linux/
# git checkout tags/v5.19.3 -b 5.19.3

To be continued

SG1OnArchLinux

Steps

Install sddm:

# pacman -S sddm xorg

After reboot, examine the kernel and the sg1 pci infos:

[root@archvfio ~]# lspci | grep -i vga
00:01.0 VGA compatible controller: Red Hat, Inc. Virtio GPU (rev 01)
07:00.0 VGA compatible controller: Intel Corporation SG1 [Server GPU SG-18M] (rev 01)
[root@archvfio ~]# uname -a
Linux archvfio 5.19.1-arch2-1 #1 SMP PREEMPT_DYNAMIC Thu, 11 Aug 2022 16:06:13 +0000 x86_64 GNU/Linux

Add virtio gpu into blacklist:

# vim /etc/modprobe.d/blacklist.conf
   # blacklist virtio_gpu

Didn’t take effects, change the graphical to qxl and added blacklist qxl:

/images/2022_08_15_14_23_35_535x518.jpg

Take effects:

[root@archvfio ~]# lsmod | grep qxl
[root@archvfio ~]# ls /dev/dri/
by-path  card0	renderD128

Examine the sg1 connected info:

for p in /sys/class/drm/*/status; do con=${p%/status}; echo -n "${con#*/card?-}: "; cat $p; done
DP-1: disconnected
DP-2: disconnected
DP-3: disconnected
HDMI-A-1: disconnected
HDMI-A-2: disconnected
HDMI-A-3: disconnected
HDMI-A-4: disconnected

Edit the Xorg configuration files and start the benchmark:

# cat /etc/X11/xorgintel.conf 
Section "Device"
    Identifier     "Device[0]"
    BusID          "PCI:7:0:0"
    VendorName     "Intel"
    BoardName      "DG1"
    Option "AllowEmptyInitialConfiguration"
EndSection
Section "ServerFlags"
    Option "Debug" "dmabuf_capable"
EndSection
Section "Monitor"
    Identifier   "Monitor0"
    VendorName   "Monitor Vendor"
    ModelName    "Monitor Model"
    Option   "IgnoreEDID"
EndSection
# Xorg :179 -config /etc/X11/xorgintel.conf
# ps -ef | grep -i xorg
root         841     526  0 14:27 tty2     00:00:00 /usr/lib/Xorg :179 -config /etc/X11/xorgintel.conf
root         877     873  0 14:28 pts/1    00:00:00 grep -i xorg

testing

Install x11vnc and glmark2 for benchmarking:

# vim /etc/pacman.conf
[archlinuxcn]
#The Chinese Arch Linux communities packages.
SigLevel = Never
Server   = http://repo.archlinuxcn.org/$arch
# pacman -Sy
# pacman -S x11vnc glmark2
[root@archvfio ~]# export DISPLAY=:179
[root@archvfio ~]# glmark2
=======================================================
    glmark2 2021.12
=======================================================
    OpenGL Information
    GL_VENDOR:     Intel
    GL_RENDERER:   Mesa Intel(R) Graphics (SG1)
    GL_VERSION:    4.6 (Compatibility Profile) Mesa 22.1.6
=======================================================

glmark2 result:

=======================================================
    glmark2 2021.12
=======================================================
    OpenGL Information
    GL_VENDOR:     Intel
    GL_RENDERER:   Mesa Intel(R) Graphics (SG1)
    GL_VERSION:    4.6 (Compatibility Profile) Mesa 22.1.6
=======================================================
[build] use-vbo=false: FPS: 2386 FrameTime: 0.419 ms
[build] use-vbo=true: FPS: 3112 FrameTime: 0.321 ms
[texture] texture-filter=nearest: FPS: 3262 FrameTime: 0.307 ms
[texture] texture-filter=linear: FPS: 3452 FrameTime: 0.290 ms
[texture] texture-filter=mipmap: FPS: 3493 FrameTime: 0.286 ms
[shading] shading=gouraud: FPS: 3056 FrameTime: 0.327 ms
[shading] shading=blinn-phong-inf: FPS: 3070 FrameTime: 0.326 ms
[shading] shading=phong: FPS: 2990 FrameTime: 0.334 ms
[shading] shading=cel: FPS: 3129 FrameTime: 0.320 ms
[bump] bump-render=high-poly: FPS: 2409 FrameTime: 0.415 ms
[bump] bump-render=normals: FPS: 3495 FrameTime: 0.286 ms
[bump] bump-render=height: FPS: 3393 FrameTime: 0.295 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 2885 FrameTime: 0.347 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 2300 FrameTime: 0.435 ms
[pulsar] light=false:quads=5:texture=false: FPS: 3424 FrameTime: 0.292 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 1861 FrameTime: 0.537 ms
[desktop] effect=shadow:windows=4: FPS: 2431 FrameTime: 0.411 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 769 FrameTime: 1.300 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 1275 FrameTime: 0.784 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 824 FrameTime: 1.214 ms
[ideas] speed=duration: FPS: 3128 FrameTime: 0.320 ms
[jellyfish] <default>: FPS: 2708 FrameTime: 0.369 ms
[terrain] <default>: FPS: 509 FrameTime: 1.965 ms
[shadow] <default>: FPS: 2664 FrameTime: 0.375 ms
[refract] <default>: FPS: 1041 FrameTime: 0.961 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 3226 FrameTime: 0.310 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 3035 FrameTime: 0.329 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 2974 FrameTime: 0.336 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 3014 FrameTime: 0.332 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 3047 FrameTime: 0.328 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 3250 FrameTime: 0.308 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 3050 FrameTime: 0.328 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 3293 FrameTime: 0.304 ms
=======================================================
                                  glmark2 Score: 2665 
=======================================================

Unigen valley benchmark:

# export DISPLAY=:179
[root@archvfio ~]# x11vnc
###############################################################
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
#@                                                           @#
#@  **  WARNING  **  WARNING  **  WARNING  **  WARNING  **   @#
#@                                                           @#
#@        YOU ARE RUNNING X11VNC WITHOUT A PASSWORD!!        @#
#@                                                           @#
#@  This means anyone with network access to this computer   @#


On another terminal:  
[root@archvfio ~]# export DISPLAY=:179
[root@archvfio ~]# cd Unigine_Valley-1.0/
[root@archvfio Unigine_Valley-1.0]# ls
bin  data  documentation  valley
[root@archvfio Unigine_Valley-1.0]# ./valley 

/images/2022_08_15_14_42_10_965x786.jpg

valley cannot start in default resolution, changes edid and set the default resolution to 1920x1080:

# vim /etc/default/grub
........
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet drm_kms_helper.edid_firmware=edid/1920x1080.bin video=HDMI-A-1:e"
........
# grub-mkconfig -o /boot/grub/grub.cfg

Valley result:

/images/2022_08_15_14_57_02_518x465.jpg

Benchmark results:
Time:	189.067
Frames:	8108
FPS:	42.8842
Min FPS:	25.3772
Max FPS:	71.5901
Score:	1794.28

Ubuntu sg1

Update and upgrade system(based on desktop iso):

# apt update && apt upgrade && apt install openssh-server vim glmark2 x11vnc && ufw disable && systemctl disable gdm && reboot
# vim /etc/modprobe.d/blacklist.conf
.......
blacklist qxl

Using linux-zen kernel:

Install the linux-zen via:    
# sudo add-apt-repository ppa:damentz/liquorix && sudo apt-get update
# sudo apt-get install linux-image-liquorix-amd64 linux-headers-liquorix-amd64

root@dash-Standard-PC-Q35-ICH9-2009:/home/dash# ls /dev/dri/
by-path  card0  renderD128
root@dash-Standard-PC-Q35-ICH9-2009:/home/dash# uname -a
Linux dash-Standard-PC-Q35-ICH9-2009 5.19.0-1.1-liquorix-amd64

Create Xorg via:

tobe added

Issue: not started:

error: Kernel is too old for Iris. Consider upgrading to kernel v4.16.

Ubuntu20.04 sg1

Install the kernel provided by intel, then:

# ln -s /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so /usr/lib64/dri/swrast_dri.so
# ln -s /usr/lib/x86_64-linux-gnu/dri/kms_swrast_dri.so /usr/lib64/dri/kms_swrast_dri.so
# ln -s /usr/local/lib/x86_64-linux-gnu/dri/iris_dri.so /usr/lib64/dri/iris_dri.so
# export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64:/usr/local/lib64/dri:/usr/lib64/:/usr/lib64/dri:$LD_LIBRARY_PATH
# export MESA_LOADER_DRIVER_OVERRIDE=iris
# Xorg :179 -config /etc/X11/xorgintel.conf 
    X.Org X Server 1.20.13
    X Protocol Version 11, Revision 0
    Build Operating System: linux Ubuntu
    Current Operating System: Linux virtio-vga-node 5.4.48-3c77c0f552c7+ #1 SMP Fri Jan 15 13:26:42 UTC 2021 x86_64
    Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.4.48-3c77c0f552c7+ root=UUID=a10af00c-1048-4629-bfd7-e7aa7f2b4866 ro quiet splash vt.handoff=7
    Build Date: 14 December 2021  02:14:13PM
    xorg-server 2:1.20.13-1ubuntu1~20.04.2 (For technical support please see http://www.ubuntu.com/support) 
    Current version of pixman: 0.38.4
    	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.179.log", Time: Tue Aug 16 09:38:50 2022
    (++) Using config file: "/etc/X11/xorgintel.conf"
    (==) Using system config directory "/usr/share/X11/xorg.conf.d"
    (II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
    MESA: warning: Driver does not support the 0x4907 PCI ID.
    (II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
    MESA: warning: Driver does not support the 0x4907 PCI ID.

In another terminal , run glmark2:

# export DISPLAY=:179
# glmark2

UniValley result:

Time:   189.107
Frames: 7131
FPS:    37.7089
Min FPS:        19.6125
Max FPS:        68.0576
Score:  1577.74

BuildingBlissOS

Steps

Install necessray packages:

sudo apt install -y openjdk-8-jdk build-essential
sudo apt install git-core gnupg flex bison maven gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip squashfs-tools  libssl-dev ninja-build lunzip syslinux syslinux-utils gettext genisoimage gettext bc xorriso libncurses5 xmlstarlet build-essential git imagemagick lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libxml2 lzop pngcrush rsync schedtool  python3-mako libelf-dev$a
sudo apt-get install gcc-10 g++-10
git config --global user.email "you@example.com"
git config --global user.name "Your Name"

Get the repo from ustc.edu.cn, and replace the repo for proxy.

$ curl -sSL  'https://gerrit-googlesource.proxy.ustclug.org/git-repo/+/master/repo?format=TEXT' |base64 -d > ~/bin/repo
$ chmod a+x ~/bin/repo
## 如果提示无法连接到 gerrit.googlesource.com,可以编辑 ~/bin/repo,把 REPO_URL 一行替换成下面的:
## REPO_URL = 'https://gerrit-googlesource.proxy.ustclug.org/git-repo'

Repo init:

repo init -u https://github.com/BlissRoms-x86/manifest.git -b r11-r36

Repo sync(Using redsocks):

repo sync -j8

After repo sync:

cd prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6
git checkout 2078a6bf9e5479104cfe2cbf54e9602672bd89f7

Build via:

. build/envsetup.sh
lunch android_x86_64-userdebug
export NO_KERNEL_CROSS_COMPILE=true
export BLISS_BUILD_VARIANT=foss
mka iso_img -j8

The generated iso is listed as:

out/target/product/x86_64/BlissOS-14.3-x86_64-202207270925_k-_m-r11-r36.iso is built successfully.
#### build completed successfully (02:40:00 (hh:mm:ss)) ####

dash@2204:/media/sda/Code/BlissOS$ 
dash@2204:/media/sda/Code/BlissOS$ ls out/target/product/x86_64/BlissOS-14.3-x86_64-202207270925_k-_m-r11-r36.iso
out/target/product/x86_64/BlissOS-14.3-x86_64-202207270925_k-_m-r11-r36.iso

VfioQEMU

Installation:

sudo qemu-system-x86_64 -name Arch -cdrom /var/lib/libvirt/images/ubuntu-20.04.3-live-server-amd64.iso -drive file=/var/lib/libvirt/images/vfioubuntu.qcow2 -m 8192 -enable-kvm -M q35 -cpu host -smp 4,sockets=1,cores=4,threads=1 -display egl-headless,gl=on -usb -device usb-tablet -bios /usr/share/OVMF/OVMF_CODE.fd -boot order=d -device virtio-vga,virgl=on -spice unix,disable-ticketing,image-compression=off,addr=arch.sock,seamless-migration=on

After installation, start the vm via:

sudo qemu-system-x86_64 -name Arch  -drive file=/var/lib/libvirt/images/vfioubuntu.qcow2,if=virtio  -m 22192 -enable-kvm -M q35 -cpu host -smp 8,sockets=1,cores=8,threads=1  -usb -device usb-tablet -device usb-ehci,id=ehci  -bios /usr/share/OVMF/OVMF_CODE.fd -boot order=c -vga none -device virtio-gpu-pci,virgl=on -display sdl,gl=on  -net nic -net user,hostfwd=tcp::2288-:22,hostfwd=tcp::5555-:5555