Skip to content

rutabaga virglrenderer fallback when gpu is absent #418

@valpackett

Description

@valpackett

Currently if we have the entire GPU setup working and try to launch without /dev/dri present, the entire GPU worker crashes..

DEBUG rutabaga_gfx::virgl_renderer] failed to initialize vrend winsys

thread 'gpu worker' panicked at src/devices/src/virtio/gpu/virtio_gpu.rs:282:14:
Rutabaga initialization failed!: ComponentError(-1)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

causing a 5 second delay in the guest kernel boot process..

[    0.314939] printk: legacy console [hvc0] enabled
[    5.345195] [drm:virtio_gpu_get_capsets] *ERROR* timed out waiting for cap set 0
[    5.346399] [drm] Initialized virtio_gpu 0.1.0 for virtio-mmio.3 on minor 0

and leaving it without cross-domain (Wayland/etc.) functionality.

What would be the best way, API-wise, to make it possible to automatically fall back to a minimal no-gpu flag set (such as just VIRGLRENDERER_NO_VIRGL) that would let cross-domain work?

Currently the error isn't even really catchable by the frontend as it just crashes a secondary thread while the VM keeps running..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions