Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

ErrRutabaga(InvalidResourceId): While trying to run Wayland (with Virtio-GPU Venus support)

39 views
Skip to first unread message

Wanjohi

unread,
Oct 17, 2024, 1:44:44 PM10/17/24
to crosvm-dev
Hello there 👋🏾

I hope you are doing alright.

I have been trying to make CrosVM work for a gaming demo project.
I have successfully done the following:

1. Compiled the ChromeOS kernel version 6.1
2. Built crosvm with the features "default-no-sandbox gpu x virgl_renderer wl-dmabuf"
3. Built a rootfs image closely resembling the borealis image (with sommelier, wayland, mesa, xwayland) 
4. Installed Vulkan, Mesa, vulkan-icd-loader, (built and installed) minigbm, virglrenderer, vulkan-virtio. Such that when i use a Venus (with a virglrenderer test server) it works alright

Here is how am running the crosvm instance:

set +e -x

export CROSVM_GPU_ARGS='context-types=virgl:virgl2:venus:cross-domain,backend=3d,gles=false'

VK_DRIVER_FILES="/usr/share/vulkan/icd.d/intel_icd.x86_64.json" \
/usr/local/bin/crosvm run \
        --block ./borealis.img \
        --initrd ./initramfs-linux.img \
        --gpu-render-server "path=/usr/local/libexec/virgl_render_server" \
        --disable-sandbox \
        --gpu "${CROSVM_GPU_ARGS}" \
        --wayland-sock "/tmp/wayland-1" \
        --net "tap-name=crosvm_tap" \
        -p "root=/dev/vda1 rw" \
        vmlinuz-linux


- I have successfully ran gedit using the command sommelier --virtgpu-channel gedit

However, I am having trouble running VKCUBE or glxgears, and there is this common error I am getting before sommelier crashes
[2024-10-17T14:35:58.261740640+00:00 ERROR devices::virtio::gpu] error processing gpu command CmdSubmit3d: ErrRutabaga(InvalidResourceId)
[  187.566796] [drm:virtio_gpu_dequeue_ctrl_func] *ERROR* response 0x1200 (command 0x207)

Here is the full log:
[nestrivm@nestri ~]$ sommelier -X --virtgpu-channel --xwayland-path=/usr/bin/Xwayland  --glamor vkcube
INFO <sommelier-scope-timer.cc:30> ~ScopeTimer: configure event loop: 0.000382156 seconds
INFO <sommelier-scope-timer.cc:30> ~ScopeTimer: drm device: 0.00470423 seconds
INFO <sommelier-scope-timer.cc:30> ~ScopeTimer: connect display: 1.7077e-05 seconds
INFO <sommelier-scope-timer.cc:30> ~ScopeTimer: client create: 2.5636e-05 seconds
INFO <sommelier-scope-timer.cc:30> ~ScopeTimer: display implementation: 2.444e-06 seconds
INFO <sommelier-scope-timer.cc:30> ~ScopeTimer: spawn xwayland: 0.000407801 seconds
ATTENTION: default value of option vk_require_astc overridden by environment.
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
> Warning:          Could not resolve keysym XF86KbdInputAssistPrevgrou
> Warning:          Could not resolve keysym XF86KbdInputAssistNextgrou
Errors from xkbcomp are not fatal to the X server
Selected GPU 0: Virtio-GPU Venus (Intel(R) Arc(tm) A380 Graphics (DG2)), type: DiscreteGpu
[2024-10-17T14:35:58.261740640+00:00 ERROR devices::virtio::gpu] error processing gpu command CmdSubmit3d: ErrRutabaga(InvalidResourceId)
[  187.566796] [drm:virtio_gpu_dequeue_ctrl_func] *ERROR* response 0x1200 (command 0x207)
wl_display#1: error 1: invalid arguments for zwp_linux_dmabuf_v1#18.create_params
[nestrivm@nestri ~]$ (EE) failed to read Wayland events: Broken pipe
[  187.679609] vkcube[395]: segfault at 5b622c5f3d80 ip 00007e7b31a93bcd sp 00007ffe47ba7f80 error 4 in libvulkan_virtio.so[7e7b319fc000+ce000] likely on CPU 3 (core 0, socket 1)
[  187.689300] Code: 48 89 d3 48 8d 4d a0 48 83 ec 58 48 8b b0 48 12 00 00 8b 07 64 48 8b 14 25 28 00 00 00 48 89 55 e8 31 d2 c7 45 e4 00 00 00 00 <48> 8b 84 c6 48 04 00 00 c7 45 a0 d9 9a 9c 3b 0f 11 45 a4 0f 11 45
[  187.700006] audit: type=1701 audit(1729175758.396:87): auid=1000 uid=1000 gid=1000 ses=1 pid=395 comm="vkcube" exe="/usr/bin/vkcube" sig=11 res=1
[  187.733798] audit: type=1130 audit(1729175758.424:88): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@1-400-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  187.875679] audit: type=1131 audit(1729175758.568:89): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@1-400-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

To be honest, there is little to none documentation on how to use CrosVM with Venus that works. Especially now that `context-types` are a thing (previous blogs on this found at Mesa's page is 3 years outdated)

I feel like i am doing something wrong, maybe a feature i did not add while building or while running crosvm as it is a Rutabaga error and not tied specifically to sommelier(?)

Please help.

Thank you in advance
Reply all
Reply to author
Forward
0 new messages