Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#76850 - [virglrenderer] Enable hardware video acceleration

Attached to Project: Arch Linux
Opened by Shohei Maruyama (cheatsc) - Friday, 16 December 2022, 20:42 GMT
Last edited by Toolybird (Toolybird) - Friday, 15 September 2023, 23:04 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Anatol Pomozov (anatolik)
Architecture x86_64
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

To use hardware video acceleration on VMs, virtio_gpu_drv_video.so (VAAPI driver) and virglrenderer with `-Dvideo=true` are required. The driver has already been provided, so could you enable the option, please?

Additional info:
* package version: 0.10.3-1
* how to enable: pass `-Dvideo=true` to meson
* additional packages: libva
This task depends upon

Closed by  Toolybird (Toolybird)
Friday, 15 September 2023, 23:04 GMT
Reason for closing:  Fixed
Additional comments about closing:  virglrenderer 0.10.3-2
Comment by Shohei Maruyama (cheatsc) - Friday, 16 December 2022, 20:45 GMT Comment by Toolybird (Toolybird) - Friday, 16 December 2022, 21:26 GMT Comment by Anatol Pomozov (anatolik) - Friday, 16 December 2022, 21:54 GMT
Thank you for the report. I recompiled the package with this option and it is available in testing right now. Please try virglrenderer-0.10.3-2 and let me know if you see any issues.
Comment by Shohei Maruyama (cheatsc) - Saturday, 17 December 2022, 06:07 GMT
Thank you for your prompt response. I will try the package as soon as possible!
Comment by Shohei Maruyama (cheatsc) - Saturday, 17 December 2022, 12:17 GMT
I found no issues on the package.

Host:

$ vainfo
Trying display: wayland
vainfo: VA-API version: 1.16 (libva 2.16.0)
vainfo: Driver version: Mesa Gallium driver 22.3.1 for AMD Radeon RX 5500 XT (navi14, LLVM 14.0.6, DRM 3.49, 6.1.0-zen1-1-zen)
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc

$ qemu-system-x86_64 -m 4G -M q35 --accel kvm --cpu host --smp 2 --cdrom out/archlinux-live-2022.12.17-x86_64.iso --display gtk,gl=on --vga none --device virtio-vga-gl --usbdevice tablet

Guest:

$ vainfo --display drm
Trying display: drm
vainfo: VA-API version: 1.16 (libva 2.16.0)
vainfo: Driver version: Mesa Gallium driver 22.3.1 for virgl (AMD Radeon RX 5500 XT (navi14, LLVM 14.0.6, DRM 3.49...)
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc

However, I found that qemu support is also required to support hardware video acceleration on VMs completely.

hw/display/virtio-gpu-virgl.c:

```
int virtio_gpu_virgl_init(VirtIOGPU *g)
{
int ret;

ret = virgl_renderer_init(g, 0, &virtio_gpu_3d_cbs);
if (ret != 0) {
error_report("virgl could not be initialized: %d", ret);
return ret;
}
```

Probably, need to set virgl_renderer_init(... VIRGL_RENDERER_USE_VIDEO ...) and virtio_gpu_3d_cbs->get_drm_fd.
Comment by Anatol Pomozov (anatolik) - Saturday, 17 December 2022, 18:30 GMT
Shohei, do you know if there is a qemu build switch to enable the hw support you are looking for?
Comment by Shohei Maruyama (cheatsc) - Sunday, 18 December 2022, 11:53 GMT
Sorry, I have no idea about the build switch. An user tried using vaapi, but the result is as the same as mine.

- https://www.phoronix.com/forums/forum/phoronix/latest-phoronix-articles/1357918-virgl-adds-accelerated-video-encoding-to-guest-vms?p=1357967#post1357967

Loading...