all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server 1/1] check prerequisites for virtio-gl display
Date: Fri, 29 Apr 2022 18:50:07 +0200	[thread overview]
Message-ID: <20220429165008.734273-2-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20220429165008.734273-1-s.ivanov@proxmox.com>

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>
---
 PVE/QemuServer.pm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 8e7cfb8..1290f33 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -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}";
 }
 
-- 
2.30.2





  reply	other threads:[~2022-04-29 16:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29 16:50 [pve-devel] [PATCH qemu-server/pve-manager] notify users about virtio-gl prerequisites Stoiko Ivanov
2022-04-29 16:50 ` Stoiko Ivanov [this message]
2022-05-02 15:25   ` [pve-devel] applied: [PATCH qemu-server 1/1] check prerequisites for virtio-gl display Thomas Lamprecht
2022-04-29 16:50 ` [pve-devel] [PATCH manager 1/1] ui: qemu: show hint about prerequisites for virgl display Stoiko Ivanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220429165008.734273-2-s.ivanov@proxmox.com \
    --to=s.ivanov@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal