mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-04 20:12:15 +00:00
check prerequisites for virtio-gl display
and exit early if they are not met. The necessary libraries were taken from Thomas' post in our community forum: https://forum.proxmox.com/threads/.61801/post-466767 (ff) The /dev/dri/renderD.* check is based on util/drm.c in the current qemu source code. Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This commit is contained in:
parent
96670745a6
commit
9f979d9f31
@ -1880,6 +1880,17 @@ sub print_vga_device {
|
||||
$pciaddr = print_pci_addr($vgaid, $bridges, $arch, $machine);
|
||||
}
|
||||
|
||||
if ($vga->{type} eq 'virtio-gl') {
|
||||
if ( ! -e '/usr/lib/x86_64-linux-gnu/libEGL.so.1' ||
|
||||
! -e '/usr/lib/x86_64-linux-gnu/libGL.so.1') {
|
||||
die "missing libraries for '$vga->{type}' detected (install libgl1 and libegl1)\n";
|
||||
}
|
||||
|
||||
if ( ! PVE::Tools::dir_glob_regex('/dev/dri/', "renderD.*")) {
|
||||
die "no drm render node detected (/dev/dri/renderD*) - needed for '$vga->{type}' display\n";
|
||||
}
|
||||
}
|
||||
|
||||
return "$type,id=${vgaid}${memory}${max_outputs}${pciaddr}${edidoff}";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user