public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH qemu-server v2 0/2] qemuserver: fix virtio-gpu not being
@ 2026-07-16  7:35 Kaiyang Wu
  2026-07-16  7:35 ` [PATCH qemu-server v2 1/2] qemuserver: make base path of libGL and libEGL libraries architecture-aware Kaiyang Wu
  2026-07-16  7:35 ` [PATCH qemu-server v2 2/2] qemuserver: replace virtio-vga-gl with virtio-gpu-gl on aarch64 Kaiyang Wu
  0 siblings, 2 replies; 6+ messages in thread
From: Kaiyang Wu @ 2026-07-16  7:35 UTC (permalink / raw)
  To: pve-devel; +Cc: Kaiyang Wu

Replace 'virtio-vga-gl' with 'virtio-gpu-gl' to use the correct variant of
virtio-gpu on aarch64, and fix the detection of libGL and libEGL libraries on
non-x86_64 architectures.

Changes v1 -> v2:
- Use the host architecture to locate the libraries (as suggested by Dominik
  Csapak <d.csapak@proxmox.com>)
- Replace 'virtio-vga-gl' with 'virtio-gpu-gl' on aarch64 to make virtio-gl
  display option available on aarch64

Kaiyang Wu (2):
  qemuserver: make base path of libGL and libEGL libraries
    architecture-aware
  qemuserver: replace virtio-vga-gl with virtio-gpu-gl on aarch64

 src/PVE/QemuServer.pm | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

-- 
2.52.0




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH qemu-server v2 1/2] qemuserver: make base path of libGL and libEGL libraries architecture-aware
  2026-07-16  7:35 [PATCH qemu-server v2 0/2] qemuserver: fix virtio-gpu not being Kaiyang Wu
@ 2026-07-16  7:35 ` Kaiyang Wu
  2026-07-16  9:32   ` Dominik Csapak
  2026-07-16  7:35 ` [PATCH qemu-server v2 2/2] qemuserver: replace virtio-vga-gl with virtio-gpu-gl on aarch64 Kaiyang Wu
  1 sibling, 1 reply; 6+ messages in thread
From: Kaiyang Wu @ 2026-07-16  7:35 UTC (permalink / raw)
  To: pve-devel; +Cc: Kaiyang Wu

'print_vga_device' assumed x86_64 library path to look for 'libGL.so.1'
and 'libEGL.so.1', which leads to missing libraries error regardless of
whether 'libgl1' and 'libegl1' were installed or not, on architectures
other than x86_64.

Make base path of the libraries architecture-aware to correctly locate
the libraries on non-x86_64 architectures.

Suggested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Kaiyang Wu <wukaiyang@loongfans.cn>
---
 src/PVE/QemuServer.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index 191ae549..c11351bb 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -1540,7 +1540,9 @@ sub print_vga_device {
     }
 
     if ($vga->{type} eq 'virtio-gl') {
-        my $base = '/usr/lib/x86_64-linux-gnu/lib';
+        my $host_arch = get_host_arch();
+        my $base = "/usr/lib/${host_arch}-linux-gnu/lib";
+
         die "missing libraries for '$vga->{type}' detected! Please install 'libgl1' and 'libegl1'\n"
             if !-e "${base}EGL.so.1" || !-e "${base}GL.so.1";
 
-- 
2.52.0




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH qemu-server v2 2/2] qemuserver: replace virtio-vga-gl with virtio-gpu-gl on aarch64
  2026-07-16  7:35 [PATCH qemu-server v2 0/2] qemuserver: fix virtio-gpu not being Kaiyang Wu
  2026-07-16  7:35 ` [PATCH qemu-server v2 1/2] qemuserver: make base path of libGL and libEGL libraries architecture-aware Kaiyang Wu
@ 2026-07-16  7:35 ` Kaiyang Wu
  2026-07-16  9:32   ` Dominik Csapak
  1 sibling, 1 reply; 6+ messages in thread
From: Kaiyang Wu @ 2026-07-16  7:35 UTC (permalink / raw)
  To: pve-devel; +Cc: Kaiyang Wu

Fix the issue of virtio-gpu not being available on aarch64.

QEMU only provides the non-VGA variant of virtio-gpu-gl on aarch64.
Replace VGA variant with non-VGA variant for 'virtio-vga-gl' device,
similar to how we replace 'virtio-vga' with 'virtio-gpu' on aarch64.

Signed-off-by: Kaiyang Wu <wukaiyang@loongfans.cn>
---
 src/PVE/QemuServer.pm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index c11351bb..16922dd5 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -1487,8 +1487,12 @@ sub print_vga_device {
     my ($conf, $vga, $arch, $machine_version, $id, $qxlnum, $bridges) = @_;
 
     my $type = $vga_map->{ $vga->{type} };
-    if ($arch eq 'aarch64' && defined($type) && $type eq 'virtio-vga') {
-        $type = 'virtio-gpu';
+    if ($arch eq 'aarch64' && defined($type)) {
+        if ($type eq 'virtio-vga') {
+            $type = 'virtio-gpu';
+        } elsif ($type eq 'virtio-vga-gl') {
+            $type = 'virtio-gpu-gl';
+        }
     }
     my $vgamem_mb = $vga->{memory};
 
-- 
2.52.0




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH qemu-server v2 1/2] qemuserver: make base path of libGL and libEGL libraries architecture-aware
  2026-07-16  7:35 ` [PATCH qemu-server v2 1/2] qemuserver: make base path of libGL and libEGL libraries architecture-aware Kaiyang Wu
@ 2026-07-16  9:32   ` Dominik Csapak
  0 siblings, 0 replies; 6+ messages in thread
From: Dominik Csapak @ 2026-07-16  9:32 UTC (permalink / raw)
  To: Kaiyang Wu, pve-devel; +Cc: Kaiyang Wu

Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>

On 7/16/26 9:35 AM, Kaiyang Wu wrote:
> 'print_vga_device' assumed x86_64 library path to look for 'libGL.so.1'
> and 'libEGL.so.1', which leads to missing libraries error regardless of
> whether 'libgl1' and 'libegl1' were installed or not, on architectures
> other than x86_64.
> 
> Make base path of the libraries architecture-aware to correctly locate
> the libraries on non-x86_64 architectures.
> 
> Suggested-by: Dominik Csapak <d.csapak@proxmox.com>
> Signed-off-by: Kaiyang Wu <wukaiyang@loongfans.cn>
> ---
>   src/PVE/QemuServer.pm | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
> index 191ae549..c11351bb 100644
> --- a/src/PVE/QemuServer.pm
> +++ b/src/PVE/QemuServer.pm
> @@ -1540,7 +1540,9 @@ sub print_vga_device {
>       }
>   
>       if ($vga->{type} eq 'virtio-gl') {
> -        my $base = '/usr/lib/x86_64-linux-gnu/lib';
> +        my $host_arch = get_host_arch();
> +        my $base = "/usr/lib/${host_arch}-linux-gnu/lib";
> +
>           die "missing libraries for '$vga->{type}' detected! Please install 'libgl1' and 'libegl1'\n"
>               if !-e "${base}EGL.so.1" || !-e "${base}GL.so.1";
>   





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH qemu-server v2 2/2] qemuserver: replace virtio-vga-gl with virtio-gpu-gl on aarch64
  2026-07-16  7:35 ` [PATCH qemu-server v2 2/2] qemuserver: replace virtio-vga-gl with virtio-gpu-gl on aarch64 Kaiyang Wu
@ 2026-07-16  9:32   ` Dominik Csapak
  2026-07-16 10:47     ` superseded: " Kaiyang Wu
  0 siblings, 1 reply; 6+ messages in thread
From: Dominik Csapak @ 2026-07-16  9:32 UTC (permalink / raw)
  To: Kaiyang Wu, pve-devel; +Cc: Kaiyang Wu

while this works, I'd probably prefer to expand our vga_map mechanism
to include the arch too.

e.g. having a 'sub map_vga_model($vga, $arch)' or
something like this which internally has maybe a type->device
map per arch? (or one per arch + a common fallback where the
different architectures don't differ)

On 7/16/26 9:36 AM, Kaiyang Wu wrote:
> Fix the issue of virtio-gpu not being available on aarch64.
> 
> QEMU only provides the non-VGA variant of virtio-gpu-gl on aarch64.
> Replace VGA variant with non-VGA variant for 'virtio-vga-gl' device,
> similar to how we replace 'virtio-vga' with 'virtio-gpu' on aarch64.
> 
> Signed-off-by: Kaiyang Wu <wukaiyang@loongfans.cn>
> ---
>   src/PVE/QemuServer.pm | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
> index c11351bb..16922dd5 100644
> --- a/src/PVE/QemuServer.pm
> +++ b/src/PVE/QemuServer.pm
> @@ -1487,8 +1487,12 @@ sub print_vga_device {
>       my ($conf, $vga, $arch, $machine_version, $id, $qxlnum, $bridges) = @_;
>   
>       my $type = $vga_map->{ $vga->{type} };
> -    if ($arch eq 'aarch64' && defined($type) && $type eq 'virtio-vga') {
> -        $type = 'virtio-gpu';
> +    if ($arch eq 'aarch64' && defined($type)) {
> +        if ($type eq 'virtio-vga') {
> +            $type = 'virtio-gpu';
> +        } elsif ($type eq 'virtio-vga-gl') {
> +            $type = 'virtio-gpu-gl';
> +        }
>       }
>       my $vgamem_mb = $vga->{memory};
>   





^ permalink raw reply	[flat|nested] 6+ messages in thread

* superseded: [PATCH qemu-server v2 2/2] qemuserver: replace virtio-vga-gl with virtio-gpu-gl on aarch64
  2026-07-16  9:32   ` Dominik Csapak
@ 2026-07-16 10:47     ` Kaiyang Wu
  0 siblings, 0 replies; 6+ messages in thread
From: Kaiyang Wu @ 2026-07-16 10:47 UTC (permalink / raw)
  To: pve-devel

Superseded-by: 
https://lore.proxmox.com/pve-devel/20260716104440.302873-1-wukaiyang@loongfans.cn/#t

On 2026-07-16 17:32, Dominik Csapak wrote:
> while this works, I'd probably prefer to expand our vga_map mechanism
> to include the arch too.
>
> e.g. having a 'sub map_vga_model($vga, $arch)' or
> something like this which internally has maybe a type->device
> map per arch? (or one per arch + a common fallback where the
> different architectures don't differ)
>
> On 7/16/26 9:36 AM, Kaiyang Wu wrote:
>> Fix the issue of virtio-gpu not being available on aarch64.
>>
>> QEMU only provides the non-VGA variant of virtio-gpu-gl on aarch64.
>> Replace VGA variant with non-VGA variant for 'virtio-vga-gl' device,
>> similar to how we replace 'virtio-vga' with 'virtio-gpu' on aarch64.
>>
>> Signed-off-by: Kaiyang Wu <wukaiyang@loongfans.cn>
>> ---
>>   src/PVE/QemuServer.pm | 8 ++++++--
>>   1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
>> index c11351bb..16922dd5 100644
>> --- a/src/PVE/QemuServer.pm
>> +++ b/src/PVE/QemuServer.pm
>> @@ -1487,8 +1487,12 @@ sub print_vga_device {
>>       my ($conf, $vga, $arch, $machine_version, $id, $qxlnum, 
>> $bridges) = @_;
>>         my $type = $vga_map->{ $vga->{type} };
>> -    if ($arch eq 'aarch64' && defined($type) && $type eq 
>> 'virtio-vga') {
>> -        $type = 'virtio-gpu';
>> +    if ($arch eq 'aarch64' && defined($type)) {
>> +        if ($type eq 'virtio-vga') {
>> +            $type = 'virtio-gpu';
>> +        } elsif ($type eq 'virtio-vga-gl') {
>> +            $type = 'virtio-gpu-gl';
>> +        }
>>       }
>>       my $vgamem_mb = $vga->{memory};
>
>
>
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-07-16 10:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-16  7:35 [PATCH qemu-server v2 0/2] qemuserver: fix virtio-gpu not being Kaiyang Wu
2026-07-16  7:35 ` [PATCH qemu-server v2 1/2] qemuserver: make base path of libGL and libEGL libraries architecture-aware Kaiyang Wu
2026-07-16  9:32   ` Dominik Csapak
2026-07-16  7:35 ` [PATCH qemu-server v2 2/2] qemuserver: replace virtio-vga-gl with virtio-gpu-gl on aarch64 Kaiyang Wu
2026-07-16  9:32   ` Dominik Csapak
2026-07-16 10:47     ` superseded: " Kaiyang Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal