* [pve-devel] [PATCH qemu-server/pve-manager] notify users about virtio-gl prerequisites
@ 2022-04-29 16:50 Stoiko Ivanov
2022-04-29 16:50 ` [pve-devel] [PATCH qemu-server 1/1] check prerequisites for virtio-gl display Stoiko Ivanov
2022-04-29 16:50 ` [pve-devel] [PATCH manager 1/1] ui: qemu: show hint about prerequisites for virgl display Stoiko Ivanov
0 siblings, 2 replies; 4+ messages in thread
From: Stoiko Ivanov @ 2022-04-29 16:50 UTC (permalink / raw)
To: pve-devel
These two patches resulted from the feedback of our early adopters in the forum:
https://forum.proxmox.com/threads/.61801/page-3#post-466750
Thomas suggested that it might both make sense to display a note in the GUI,
and exit early in the API/CLI.
Tested on my box (where it works), and a VM without GPU (where it cannot work).
qemu-server:
Stoiko Ivanov (1):
check prerequisites for virtio-gl display
PVE/QemuServer.pm | 11 +++++++++++
1 file changed, 11 insertions(+)
pve-manager:
Stoiko Ivanov (1):
ui: qemu: show hint about prerequisites for virgl display
www/manager6/qemu/DisplayEdit.js | 15 +++++++++++++++
1 file changed, 15 insertions(+)
--
2.30.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] [PATCH qemu-server 1/1] check prerequisites for virtio-gl display
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
2022-05-02 15:25 ` [pve-devel] applied: " Thomas Lamprecht
2022-04-29 16:50 ` [pve-devel] [PATCH manager 1/1] ui: qemu: show hint about prerequisites for virgl display Stoiko Ivanov
1 sibling, 1 reply; 4+ messages in thread
From: Stoiko Ivanov @ 2022-04-29 16:50 UTC (permalink / raw)
To: pve-devel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] [PATCH manager 1/1] ui: qemu: show hint about prerequisites for virgl display
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 ` [pve-devel] [PATCH qemu-server 1/1] check prerequisites for virtio-gl display Stoiko Ivanov
@ 2022-04-29 16:50 ` Stoiko Ivanov
1 sibling, 0 replies; 4+ messages in thread
From: Stoiko Ivanov @ 2022-04-29 16:50 UTC (permalink / raw)
To: pve-devel
since there is no hard dependency on the needed libraries (and we
cannot easily check if a fitting GPU is present in the GUI) - notify
the user about the prerequisites - else the error-messages might be a
bit confusing [0]
Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
[0] https://forum.proxmox.com/threads/.61801/post-466750
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
www/manager6/qemu/DisplayEdit.js | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/www/manager6/qemu/DisplayEdit.js b/www/manager6/qemu/DisplayEdit.js
index 9bb1763e..602729d6 100644
--- a/www/manager6/qemu/DisplayEdit.js
+++ b/www/manager6/qemu/DisplayEdit.js
@@ -49,6 +49,13 @@ Ext.define('PVE.qemu.DisplayInputPanel', {
memoryfield.setEmptyText(Proxmox.Utils.defaultText);
}
memoryfield.setDisabled(disableMemoryField);
+
+ let hintfield = this.up('panel').down('field[name=virglhint]');
+ if (val === 'virtio-gl') {
+ hintfield.setHidden(false);
+ } else {
+ hintfield.setHidden(true);
+ }
},
},
},
@@ -60,6 +67,14 @@ Ext.define('PVE.qemu.DisplayInputPanel', {
maxValue: 512,
step: 4,
name: 'memory',
+ },
+ {
+ xtype: 'displayfield',
+ userCls: 'pmx-hint',
+ hidden: true,
+ name: 'virglhint',
+ value: gettext('Note: You need to have a physical GPU in the host and have the necessary ' +
+ 'driver and library packages (libgl1, libegl1) installed'),
}],
});
--
2.30.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] applied: [PATCH qemu-server 1/1] check prerequisites for virtio-gl display
2022-04-29 16:50 ` [pve-devel] [PATCH qemu-server 1/1] check prerequisites for virtio-gl display Stoiko Ivanov
@ 2022-05-02 15:25 ` Thomas Lamprecht
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2022-05-02 15:25 UTC (permalink / raw)
To: Proxmox VE development discussion, Stoiko Ivanov
Am 4/29/22 um 18:50 schrieb Stoiko Ivanov:
> 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(+)
>
>
applied, but edited message minimally and transformed to post-if while at it, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-02 15:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [pve-devel] [PATCH qemu-server 1/1] check prerequisites for virtio-gl display Stoiko Ivanov
2022-05-02 15:25 ` [pve-devel] applied: " Thomas Lamprecht
2022-04-29 16:50 ` [pve-devel] [PATCH manager 1/1] ui: qemu: show hint about prerequisites for virgl display Stoiko Ivanov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox