mkosi icon indicating copy to clipboard operation
mkosi copied to clipboard

QEMU gui fails to start when using the tools tree on Fedora

Open davide125 opened this issue 2 months ago • 4 comments

mkosi commit the issue has been seen with

main

Used host distribution

Fedora Linux 42 (host), Fedora Linux Rawhide (tools tree)

Used target distribution

Fedora Linux 42

Linux kernel version used

6.16.9-200.fc42.x86_64

CPU architectures issue was seen on

None

Unexpected behaviour you saw

mkosi vm fails to start QEMU when Console=gui is set. Minimal repro:

$ cat mkosi.conf
[Build]
ToolsTree=default

[Runtime]
Console=gui

Running mkosi -f vm yields:

swtpm: Warning: Profile-enabled algorithms contain disabled 'RSA-1024-sign(SHA1, pkcs1-pss)'
swtpm: Warning: Setting OPENSSL_ENABLE_SHA1_SIGNATURES=1
qemu-system-x86_64: Display 'sdl' is not available.
‣ "/usr/bin/qemu-system-x86_64 -machine type=q35,smm=on,hpet=off -smp 1 -m 2048M -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0,id=rng-device0 -device virtio-balloon,free-page-reporting=on -no-user-config -nic user,model=virtio-net-pci --add-fd fd=3,set=1,opaque=/dev/kvm -cpu host -accel kvm,device=/dev/fdset/1 -device vhost-vsock-pci,guest-cid=684215157,vhostfd=4 -device virtio-vga -nodefaults -display sdl,gl=on -audio driver=pipewire,model=virtio -drive if=pflash,format=qcow2,readonly=on,file=/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2 -drive file=/tmp/mkosi-ovmf-vars-y4rm2dfd,if=pflash,format=qcow2 -global ICH9-LPC.disable_s3=1 -global driver=cfi.pflash01,property=secure,value=on -device virtio-scsi-pci,id=mkosi -blockdev driver=raw,node-name=scratch,discard=unmap,file.driver=file,file.filename=/var/tmp/mkosi-scratch-a6plj89a,file.aio=io_uring,cache.direct=on,cache.no-flush=on -device virtio-blk-pci,drive=scratch -blockdev driver=raw,node-name=mkosi,discard=unmap,file.driver=file,file.filename=/home/dcavalca/r/image.raw,file.aio=io_uring,cache.direct=yes,cache.no-flush=no -device virtio-blk-pci,drive=mkosi,bootindex=1 -chardev socket,id=chrtpm,path=/tmp/mkosi-swtpm-92ykvpbp/sock -tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis,tpmdev=tpm0 -smbios type=11,path=/tmp/mkosi-smbios-j7kisztz/vmm.notify_socket -smbios type=11,path=/tmp/mkosi-smbios-j7kisztz/firstboot.timezone -smbios type=11,path=/tmp/mkosi-smbios-j7kisztz/firstboot.locale -smbios 'type=11,value=io.systemd.stub.kernel-cmdline-extra=systemd.mount-extra=LABEL=scratch:/var/tmp:btrfs rw systemd.wants=network.target module_blacklist=vmw_vmci systemd.tty.term.hvc0=xterm-256color systemd.tty.columns.hvc0=134 systemd.tty.rows.hvc0=35 ip=enc0:any ip=enp0s1:any ip=enp0s2:any ip=host0:any ip=none loglevel=4 SYSTEMD_SULOGIN_FORCE=1' -smbios 'type=11,value=io.systemd.boot.kernel-cmdline-extra=systemd.mount-extra=LABEL=scratch:/var/tmp:btrfs rw systemd.wants=network.target module_blacklist=vmw_vmci systemd.tty.term.hvc0=xterm-256color systemd.tty.columns.hvc0=134 systemd.tty.rows.hvc0=35 ip=enc0:any ip=enp0s1:any ip=enp0s2:any ip=host0:any ip=none loglevel=4 SYSTEMD_SULOGIN_FORCE=1'" returned non-zero exit code 1.

This kinda makes sense, because by default the gui profile in the tools tree is not enabled, but it's not terribly discoverable. But even after enabling it:

$ cat mkosi.conf
[Build]
ToolsTree=default
ToolsTreeProfiles=gui,runtime

[Runtime]
Console=gui

we still get a failure with mkosi -f vm:

swtpm: Warning: Profile-enabled algorithms contain disabled 'RSA-1024-sign(SHA1, pkcs1-pss)'
swtpm: Warning: Setting OPENSSL_ENABLE_SHA1_SIGNATURES=1
swtpm: Warning: Profile-enabled algorithms contain disabled 'RSA-1024-sign(SHA1, pkcs1-pss)'
swtpm: Warning: Setting OPENSSL_ENABLE_SHA1_SIGNATURES=1

(qemu-system-x86_64:298373): Gtk-WARNING **: 16:34:46.798: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
**
Gtk:ERROR:../gtk/gtkiconhelper.c:495:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Adwaita/scalable/status/image-missing.svg: Loader process exited early with status '1'Command:
 "bwrap" "--unshare-all" "--die-with-parent" "--chdir" "/" "--ro-bind" "/usr" "/usr" "--dev" "/dev" "--ro-bind-try" "/etc/ld.so.cache" "/etc/ld.so.cache" "--ro-bind-try" "/nix/store" "/nix/store" "--tmpfs" "/tmp-home" "--tmpfs" "/tmp-run" "--clearenv" "--setenv" "HOME" "/tmp-home" "--setenv" "XDG_RUNTIME_DIR" "/tmp-run" "--setenv" "XDG_RUNTIME_DIR" "/run/user/1000" "--symlink" "/usr/lib64" "/lib64" "--symlink" "/usr/lib" "/lib" "--ro-bind-try" "/etc/fonts/conf.d" "/etc/fonts/conf.d" "--ro-bind-try" "/etc/fonts/fonts.conf" "/etc/fonts/fonts.conf" "--ro-bind-try" "/home/dcavalca/.cache/fontconfig" "/home/dcavalca/.cache/fontconfig" "--ro-bind-try" "/home/dcavalca/.fonts" "/home/dcavalca/.fonts" "--ro-bind-try" "/usr/lib/fontconfig/cache" "/usr/lib/fontconfig/cache" "--bind-try" "/home/dcavalca/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "/home/dcavalca/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "--setenv" "XDG_CACHE_HOME" "/home/dcavalca/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "--seccomp" "67" "/usr/libexec/glycin-loaders/2+/glycin-svg" "--dbus-fd" "79" (gdk-pixbuf-error-quark, 0)
Bail out! Gtk:ERROR:../gtk/gtkiconhelper.c:495:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Adwaita/scalable/status/image-missing.svg: Loader process exited early with status '1'Command:  "bwrap" "--unshare-all" "--die-with-parent" "--chdir" "/" "--ro-bind" "/usr" "/usr" "--dev" "/dev" "--ro-bind-try" "/etc/ld.so.cache" "/etc/ld.so.cache" "--ro-bind-try" "/nix/store" "/nix/store" "--tmpfs" "/tmp-home" "--tmpfs" "/tmp-run" "--clearenv" "--setenv" "HOME" "/tmp-home" "--setenv" "XDG_RUNTIME_DIR" "/tmp-run" "--setenv" "XDG_RUNTIME_DIR" "/run/user/1000" "--symlink" "/usr/lib64" "/lib64" "--symlink" "/usr/lib" "/lib" "--ro-bind-try" "/etc/fonts/conf.d" "/etc/fonts/conf.d" "--ro-bind-try" "/etc/fonts/fonts.conf" "/etc/fonts/fonts.conf" "--ro-bind-try" "/home/dcavalca/.cache/fontconfig" "/home/dcavalca/.cache/fontconfig" "--ro-bind-try" "/home/dcavalca/.fonts" "/home/dcavalca/.fonts" "--ro-bind-try" "/usr/lib/fontconfig/cache" "/usr/lib/fontconfig/cache" "--bind-try" "/home/dcavalca/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "/home/dcavalca/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "--setenv" "XDG_CACHE_HOME" "/home/dcavalca/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "--seccomp" "67" "/usr/libexec/glycin-loaders/2+/glycin-svg" "--dbus-fd" "79" (gdk-pixbuf-error-quark, 0)
swtpm: Data client disconnected
‣ "/usr/bin/qemu-system-x86_64 -machine type=q35,smm=on,hpet=off -smp 1 -m 2048M -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0,id=rng-device0 -device virtio-balloon,free-page-reporting=on -no-user-config -nic user,model=virtio-net-pci --add-fd fd=3,set=1,opaque=/dev/kvm -cpu host -accel kvm,device=/dev/fdset/1 -device vhost-vsock-pci,guest-cid=684215157,vhostfd=4 -device virtio-vga -nodefaults -display sdl,gl=on -audio driver=pipewire,model=virtio -drive if=pflash,format=qcow2,readonly=on,file=/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2 -drive file=/tmp/mkosi-ovmf-vars-mdk4x08b,if=pflash,format=qcow2 -global ICH9-LPC.disable_s3=1 -global driver=cfi.pflash01,property=secure,value=on -device virtio-scsi-pci,id=mkosi -blockdev driver=raw,node-name=scratch,discard=unmap,file.driver=file,file.filename=/var/tmp/mkosi-scratch-21vodo_e,file.aio=io_uring,cache.direct=on,cache.no-flush=on -device virtio-blk-pci,drive=scratch -blockdev driver=raw,node-name=mkosi,discard=unmap,file.driver=file,file.filename=/home/dcavalca/r/image.raw,file.aio=io_uring,cache.direct=yes,cache.no-flush=no -device virtio-blk-pci,drive=mkosi,bootindex=1 -chardev socket,id=chrtpm,path=/tmp/mkosi-swtpm-tq8ty0s4/sock -tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis,tpmdev=tpm0 -smbios type=11,path=/tmp/mkosi-smbios-t4axz9dk/vmm.notify_socket -smbios type=11,path=/tmp/mkosi-smbios-t4axz9dk/firstboot.timezone -smbios type=11,path=/tmp/mkosi-smbios-t4axz9dk/firstboot.locale -smbios 'type=11,value=io.systemd.stub.kernel-cmdline-extra=systemd.mount-extra=LABEL=scratch:/var/tmp:btrfs rw systemd.wants=network.target module_blacklist=vmw_vmci systemd.tty.term.hvc0=xterm-256color systemd.tty.columns.hvc0=134 systemd.tty.rows.hvc0=35 ip=enc0:any ip=enp0s1:any ip=enp0s2:any ip=host0:any ip=none loglevel=4 SYSTEMD_SULOGIN_FORCE=1' -smbios 'type=11,value=io.systemd.boot.kernel-cmdline-extra=systemd.mount-extra=LABEL=scratch:/var/tmp:btrfs rw systemd.wants=network.target module_blacklist=vmw_vmci systemd.tty.term.hvc0=xterm-256color systemd.tty.columns.hvc0=134 systemd.tty.rows.hvc0=35 ip=enc0:any ip=enp0s1:any ip=enp0s2:any ip=host0:any ip=none loglevel=4 SYSTEMD_SULOGIN_FORCE=1'" was killed by SIGABRT signal.

Looking online, this might be related to a recent upstream change in glycin / gdk-pixbuf2 (see https://github.com/netblue30/firejail/issues/6906).

Used mkosi config


mkosi output


davide125 avatar Oct 05 '25 16:10 davide125

@davide125 What if you add ToolsTreePackages=bubblewrap? Annoyingly the error message doesn't say whether bwrap is missing or failing, but adding what I suggested will exclude the first possibility.

DaanDeMeyer avatar Oct 05 '25 19:10 DaanDeMeyer

Still fails:

$ cat mkosi.conf
[Build]
ToolsTree=default
ToolsTreeProfiles=gui,runtime
ToolsTreePackages=bubblewrap

[Runtime]
Console=gui
$ mkosi -f vm
[...]
swtpm: Warning: Profile-enabled algorithms contain disabled 'RSA-1024-sign(SHA1, pkcs1-pss)'
swtpm: Warning: Setting OPENSSL_ENABLE_SHA1_SIGNATURES=1
swtpm: Warning: Profile-enabled algorithms contain disabled 'RSA-1024-sign(SHA1, pkcs1-pss)'
swtpm: Warning: Setting OPENSSL_ENABLE_SHA1_SIGNATURES=1

(qemu-system-x86_64:443901): Gtk-WARNING **: 05:15:58.177: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
**
Gtk:ERROR:../gtk/gtkiconhelper.c:495:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Adwaita/scalable/status/image-missing.svg: Loader process exited early with status '1'Command:
 "bwrap" "--unshare-all" "--die-with-parent" "--chdir" "/" "--ro-bind" "/usr" "/usr" "--dev" "/dev" "--ro-bind-try" "/etc/ld.so.cache" "/etc/ld.so.cache" "--ro-bind-try" "/nix/store" "/nix/store" "--tmpfs" "/tmp-home" "--tmpfs" "/tmp-run" "--clearenv" "--setenv" "HOME" "/tmp-home" "--setenv" "XDG_RUNTIME_DIR" "/tmp-run" "--setenv" "XDG_RUNTIME_DIR" "/run/user/1000" "--symlink" "/usr/lib64" "/lib64" "--symlink" "/usr/lib" "/lib" "--ro-bind-try" "/etc/fonts/conf.d" "/etc/fonts/conf.d" "--ro-bind-try" "/etc/fonts/fonts.conf" "/etc/fonts/fonts.conf" "--ro-bind-try" "/home/dcavalca/.cache/fontconfig" "/home/dcavalca/.cache/fontconfig" "--ro-bind-try" "/home/dcavalca/.fonts" "/home/dcavalca/.fonts" "--ro-bind-try" "/usr/lib/fontconfig/cache" "/usr/lib/fontconfig/cache" "--bind-try" "/home/dcavalca/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "/home/dcavalca/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "--setenv" "XDG_CACHE_HOME" "/home/dcavalca/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "--seccomp" "80" "/usr/libexec/glycin-loaders/2+/glycin-svg" "--dbus-fd" "79" (gdk-pixbuf-error-quark, 0)
Bail out! Gtk:ERROR:../gtk/gtkiconhelper.c:495:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Adwaita/scalable/status/image-missing.svg: Loader process exited early with status '1'Command:  "bwrap" "--unshare-all" "--die-with-parent" "--chdir" "/" "--ro-bind" "/usr" "/usr" "--dev" "/dev" "--ro-bind-try" "/etc/ld.so.cache" "/etc/ld.so.cache" "--ro-bind-try" "/nix/store" "/nix/store" "--tmpfs" "/tmp-home" "--tmpfs" "/tmp-run" "--clearenv" "--setenv" "HOME" "/tmp-home" "--setenv" "XDG_RUNTIME_DIR" "/tmp-run" "--setenv" "XDG_RUNTIME_DIR" "/run/user/1000" "--symlink" "/usr/lib64" "/lib64" "--symlink" "/usr/lib" "/lib" "--ro-bind-try" "/etc/fonts/conf.d" "/etc/fonts/conf.d" "--ro-bind-try" "/etc/fonts/fonts.conf" "/etc/fonts/fonts.conf" "--ro-bind-try" "/home/dcavalca/.cache/fontconfig" "/home/dcavalca/.cache/fontconfig" "--ro-bind-try" "/home/dcavalca/.fonts" "/home/dcavalca/.fonts" "--ro-bind-try" "/usr/lib/fontconfig/cache" "/usr/lib/fontconfig/cache" "--bind-try" "/home/dcavalca/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "/home/dcavalca/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "--setenv" "XDG_CACHE_HOME" "/home/dcavalca/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "--seccomp" "80" "/usr/libexec/glycin-loaders/2+/glycin-svg" "--dbus-fd" "79" (gdk-pixbuf-error-quark, 0)
swtpm: Data client disconnected
‣ "/usr/bin/qemu-system-x86_64 -machine type=q35,smm=on,hpet=off -smp 1 -m 2048M -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0,id=rng-device0 -device virtio-balloon,free-page-reporting=on -no-user-config -nic user,model=virtio-net-pci --add-fd fd=3,set=1,opaque=/dev/kvm -cpu host -accel kvm,device=/dev/fdset/1 -device vhost-vsock-pci,guest-cid=684215157,vhostfd=4 -device virtio-vga -nodefaults -display sdl,gl=on -audio driver=pipewire,model=virtio -drive if=pflash,format=qcow2,readonly=on,file=/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2 -drive file=/tmp/mkosi-ovmf-vars-kr7ar9il,if=pflash,format=qcow2 -global ICH9-LPC.disable_s3=1 -global driver=cfi.pflash01,property=secure,value=on -device virtio-scsi-pci,id=mkosi -blockdev driver=raw,node-name=scratch,discard=unmap,file.driver=file,file.filename=/var/tmp/mkosi-scratch-xi7nl9w_,file.aio=io_uring,cache.direct=on,cache.no-flush=on -device virtio-blk-pci,drive=scratch -blockdev driver=raw,node-name=mkosi,discard=unmap,file.driver=file,file.filename=/home/dcavalca/r/image.raw,file.aio=io_uring,cache.direct=yes,cache.no-flush=no -device virtio-blk-pci,drive=mkosi,bootindex=1 -chardev socket,id=chrtpm,path=/tmp/mkosi-swtpm-et1b2sxc/sock -tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis,tpmdev=tpm0 -smbios type=11,path=/tmp/mkosi-smbios-91rn2_2k/vmm.notify_socket -smbios type=11,path=/tmp/mkosi-smbios-91rn2_2k/firstboot.timezone -smbios type=11,path=/tmp/mkosi-smbios-91rn2_2k/firstboot.locale -smbios 'type=11,value=io.systemd.stub.kernel-cmdline-extra=systemd.mount-extra=LABEL=scratch:/var/tmp:btrfs rw systemd.wants=network.target module_blacklist=vmw_vmci systemd.tty.term.hvc0=xterm-256color systemd.tty.columns.hvc0=104 systemd.tty.rows.hvc0=32 ip=enc0:any ip=enp0s1:any ip=enp0s2:any ip=host0:any ip=none loglevel=4 SYSTEMD_SULOGIN_FORCE=1' -smbios 'type=11,value=io.systemd.boot.kernel-cmdline-extra=systemd.mount-extra=LABEL=scratch:/var/tmp:btrfs rw systemd.wants=network.target module_blacklist=vmw_vmci systemd.tty.term.hvc0=xterm-256color systemd.tty.columns.hvc0=104 systemd.tty.rows.hvc0=32 ip=enc0:any ip=enp0s1:any ip=enp0s2:any ip=host0:any ip=none loglevel=4 SYSTEMD_SULOGIN_FORCE=1'" was killed by SIGABRT signal.

davide125 avatar Oct 06 '25 05:10 davide125

For what it's worth, I'm getting the same issue with git versions of both systemd and mkosi:

‣ /home/anton/github/mkosi_test/mkosi.output/image_73.efi size is 1.0G, consumes 1.0G. qemu-system-x86_64: Display 'sdl' is not available. ‣ "/usr/bin/qemu-system-x86_64 -machine type=q35,smm=on,hpet=off -smp 2 -m 6144M -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0,id=rng-device0 -device virtio-balloon,free-page-reporting=on -no-user-config -nic user,model=virtio-net-pci --add-fd fd=3,set=1,opaque=/dev/kvm -cpu host -accel kvm,device=/dev/fdset/1 -device vhost-vsock-pci,guest-cid=1009358899,vhostfd=4 -device virtio-vga -nodefaults -display sdl,gl=on -audio driver=pipewire,model=virtio -drive if=pflash,format=raw,readonly=on,file=/usr/share/edk2/x64/OVMF_CODE.secboot.4m.fd -drive file=/tmp/mkosi-ovmf-vars-t0f_wwoo,if=pflash,format=raw -global ICH9-LPC.disable_s3=1 -global driver=cfi.pflash01,property=secure,value=on -kernel /home/anton/github/mkosi_test/mkosi.output/image_73 -initrd /home/anton/github/mkosi_test/mkosi.output/image_73.initrd -chardev socket,id=chrtpm,path=/tmp/mkosi-swtpm-ayyht5jv/sock -tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis,tpmdev=tpm0 -smbios type=11,path=/tmp/mkosi-smbios-cbnih9oy/vmm.notify_socket -smbios type=11,path=/tmp/mkosi-smbios-cbnih9oy/ssh.authorized_keys.root -smbios type=11,path=/tmp/mkosi-smbios-cbnih9oy/firstboot.timezone -smbios type=11,path=/tmp/mkosi-smbios-cbnih9oy/firstboot.locale -append 'rw systemd.wants=network.target module_blacklist=vmw_vmci systemd.tty.term.hvc0=alacritty systemd.tty.columns.hvc0=110 systemd.tty.rows.hvc0=24 ip=enc0:any ip=enp0s1:any ip=enp0s2:any ip=host0:any ip=none loglevel=4 SYSTEMD_SULOGIN_FORCE=1' -vga qxl" returned non-zero exit code 1.

But not with latest stable releases of either.

Torxed avatar Nov 24 '25 13:11 Torxed

qemu-system-x86_64: Display 'sdl' is not available.

That seems like a missing dependency. You can pass in extra options. after mkosi vm --, so if the last assignment wins for qemu, you could pass e.g. -display gtk or something else.

If you can find which qemu dependency is missing from the tools tree, a PR would be appreciated.

behrmann avatar Nov 24 '25 13:11 behrmann

@davide125 I tried to reproduce this but wasn't able to, so I'm gonna assume this was fixed somewhere downstream in the meantime. I'll close this but please do let me know if this is still an issue

DaanDeMeyer avatar Dec 16 '25 14:12 DaanDeMeyer