Bug 1169203 - Bad performance of Wayland/GNOME on Virtio GPU
Bad performance of Wayland/GNOME on Virtio GPU
Status: IN_PROGRESS
: 1170586 (view as bug list)
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: GNOME
Current
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: E-mail List
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-04-10 18:52 UTC by Sergio Lindo Mansilla
Modified: 2020-10-08 06:00 UTC (History)
8 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
opensuse-welcome-wayland-gnome.journalctl.txt (35.35 KB, text/plain)
2020-04-10 18:52 UTC, Sergio Lindo Mansilla
Details
hwinfo-gfxcard.txt (741 bytes, text/plain)
2020-04-14 18:53 UTC, Sergio Lindo Mansilla
Details
inxi.txt (312 bytes, text/plain)
2020-04-14 18:54 UTC, Sergio Lindo Mansilla
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio Lindo Mansilla 2020-04-10 18:52:11 UTC
Created attachment 835452 [details]
opensuse-welcome-wayland-gnome.journalctl.txt

Wayland performs very bad in comparison to X11.
Even with plenty amount of free ram (3GB+ free of total 4GB), Wayland/GNOME behaves slower and a key presses are missed.
This bad performance is more visible on aarch64, even more on qemu VM, where a lot of short-time visual artifacts make very uncomfortable to use the system.

This could be another cause of typing issues shown in openQA.

When selecting "GNOME on Xorg" at the login screen, the situation improves a lot. The response of GNOME is still a little bit to slow for a 4GB QEMU VM, but I was not able to reproduce missing keys nor have visual artifacts.



I was trying to debug why on aarch64 the opensuse-welcome popup is not shown.
The top bar shows the name, but the windows doesn't appear.
I tried to login with "GNOME on Xorg" where I could execute opensuse-welcome in a terminal and see the popup.
Then I activated the checkbox "Show on startup", I logged out, selected "GNOME" (Wayland) and login doesn't work. It crashes and show GDM again.
Please, find attached the systemd journal output since GDM login on Wayland/GNOME to the crash.
Comment 1 Stefan Dirsch 2020-04-10 19:10:47 UTC
Which graphics hardware is this? Maybe gdm greeter should better disable GNOME/Wayland sessions on that one.
Comment 2 Sergio Lindo Mansilla 2020-04-10 20:18:16 UTC
(In reply to Stefan Dirsch from comment #1)
> Which graphics hardware is this? Maybe gdm greeter should better disable
> GNOME/Wayland sessions on that one.

It is a QEMU VM under seattle10.arch.suse.de
Comment 3 Stefan Dirsch 2020-04-11 19:54:49 UTC
This appears to be a an aarch64 machine.. I guess in the VM an aarch64 guest is running. I don't know which graphics emulation is being used for that. Could you tell me the qemu otions?
Comment 4 Sergio Lindo Mansilla 2020-04-14 12:20:41 UTC
Hi Stefan,

The graphic emulation is virtio-gpu-pci


In case it is helpful, here is the whole command used by openQA:

/usr/bin/qemu-system-aarch64
 -device virtio-gpu-pci
 -only-migratable
 -chardev ringbuf,id=serial0,logfile=serial0,logappend=on
 -serial chardev:serial0
 -soundhw hda
 -m 4096
 -machine virt,gic-version=host
 -cpu host
 -mem-prealloc
 -mem-path /dev/hugepages/
 -netdev user,id=qanet0
 -device virtio-net,netdev=qanet0,mac=52:54:00:12:34:56
 -object rng-random,filename=/dev/urandom,id=rng0
 -device virtio-rng-pci,rng=rng0
 -device nec-usb-xhci
 -device usb-tablet
 -device usb-kbd
 -smp 1
 -enable-kvm
 -no-shutdown
 -vnc :101,share=force-shared
 -device virtio-serial
 -chardev socket,path=virtio_console,server,nowait,id=virtio_console,logfile=virtio_console.log,logappend=on
 -device virtconsole,chardev=virtio_console,name=org.openqa.console.virtio_console
 -chardev socket,path=qmp_socket,server,nowait,id=qmp_socket,logfile=qmp_socket.log,logappend=on
 -qmp chardev:qmp_socket
 -S
 -device virtio-scsi-pci,id=scsi0
 -blockdev driver=file,node-name=hd0-file,filename=/var/lib/openqa/pool/11/raid/hd0,cache.no-flush=on
 -blockdev driver=qcow2,node-name=hd0,file=hd0-file,cache.no-flush=on
 -device virtio-blk-device,id=hd0-device,drive=hd0,serial=hd0
 -blockdev driver=file,node-name=cd0-overlay0-file,filename=/var/lib/openqa/pool/11/raid/cd0-overlay0,cache.no-flush=on
 -blockdev driver=qcow2,node-name=cd0-overlay0,file=cd0-overlay0-file,cache.no-flush=on
 -device scsi-cd,id=cd0-device,drive=cd0-overlay0,serial=cd0
 -drive id=pflash-code-overlay0,if=pflash,file=/var/lib/openqa/pool/11/raid/pflash-code-overlay0,unit=0,readonly=on
 -drive id=pflash-vars-overlay0,if=pflash,file=/var/lib/openqa/pool/11/raid/pflash-vars-overlay0,unit=1
Comment 5 Stefan Dirsch 2020-04-14 12:44:49 UTC
Thanks. Could you also provide the output of 

  inxi -x -G

on the guest? Also

hwinfo --gfxcard

on the guest. The whole X logfile of the guest would also be useful.
Comment 6 Sergio Lindo Mansilla 2020-04-14 18:53:39 UTC
Created attachment 835750 [details]
hwinfo-gfxcard.txt
Comment 7 Sergio Lindo Mansilla 2020-04-14 18:54:01 UTC
Created attachment 835751 [details]
inxi.txt
Comment 8 Stefan Dirsch 2020-04-14 21:47:59 UTC
 Hardware Class: graphics card
  Model: "Red Hat Virtio GPU"
  Vendor: pci 0x1af4 "Red Hat, Inc."
  Device: pci 0x1050 "Virtio GPU"
  SubVendor: pci 0x1af4 "Red Hat, Inc."
  SubDevice: pci 0x1100 
  Revision: 0x01
  Driver: "virtio-pci"
  Driver Modules: "virtio_pci"

Thanks. I suggest to disable Wayland/GNOME with this GPU. Reassigning to GNOME component.
Comment 9 Thomas Zimmermann 2020-04-15 06:10:35 UTC
Hi Sergio,

here are a few more ideas for debugging.

(In reply to Stefan Dirsch from comment #8)
>  Hardware Class: graphics card
>   Model: "Red Hat Virtio GPU"
>   Vendor: pci 0x1af4 "Red Hat, Inc."
>   Device: pci 0x1050 "Virtio GPU"
>   SubVendor: pci 0x1af4 "Red Hat, Inc."
>   SubDevice: pci 0x1100 
>   Revision: 0x01
>   Driver: "virtio-pci"
>   Driver Modules: "virtio_pci"

This is a virtual graphics card that uses the host's HW for rendering.

What graphics hardware does the host contain?

Stefan, do we ship the virgl Mesa driver? If so, can we find out if Gnome on Wayland uses it?

Best regards
Thomas
Comment 10 Stefan Dirsch 2020-04-15 09:09:51 UTC
Thomas, yes we have the build of virgl driver enabled. I see 

  /usr/lib64/dri/virtio_gpu_dri.so

in the Mesa-dri aarch64 package on TW. I guess you can figure out which driver is being used for OpenGL with

  glxinfo | grep "OpenGL renderer"

(Mesa-demo-x package)
Comment 11 Sergio Lindo Mansilla 2020-04-15 11:48:23 UTC
(In reply to Thomas Zimmermann from comment #9)
> What graphics hardware does the host contain?

Hi Thomas,

I think the host doesn't have any. I cannot find any VGA/GPU with lspci nor hwinfo.

Is there any other command to know that?
Comment 12 Thomas Zimmermann 2020-04-15 12:43:28 UTC
Hi

(In reply to Sergio Lindo Mansilla from comment #11)
> (In reply to Thomas Zimmermann from comment #9)
> > What graphics hardware does the host contain?
> 
> Hi Thomas,
> 
> I think the host doesn't have any. I cannot find any VGA/GPU with lspci nor
> hwinfo.
> 
> Is there any other command to know that?

lspci -v should be fine. Can you post its output?

If there's no host graphics card, virtio would use software rendering. No wonder it's slow.
Comment 19 Stefan Dirsch 2020-04-17 17:52:05 UTC
Ok. Thanks for giving it a try. Maybe we should disable Wayland on aarc64 in general ...
Comment 20 Thomas Zimmermann 2020-04-20 11:05:29 UTC
(In reply to Stefan Dirsch from comment #19)
> Ok. Thanks for giving it a try. Maybe we should disable Wayland on aarc64 in
> general ...

No. Honestly, this performance problem is caused by the lack of HW accelerarion AFAICT. We're trying to get aarch64 support into better shape. Disabling features to fix a corner case would not help.
Comment 21 Stefan Dirsch 2020-04-20 12:00:45 UTC
Why corner case? AFAIK Wayland/GNOME is our default sessions type. So more or less every aarch64 user runs into this issue ...
Comment 22 Stefan Dirsch 2020-04-20 12:01:34 UTC
Or at least openQA ...
Comment 23 Thomas Zimmermann 2020-04-20 12:19:39 UTC
(In reply to Stefan Dirsch from comment #21)
> Why corner case? AFAIK Wayland/GNOME is our default sessions type. So more
> or less every aarch64 user runs into this issue ...

Every aarch64 is affected? This report is about a performance problem that comes from the lack for HW rendering. Driver quality aside, there are other aarch64 systems that have HW available (e.g., RasPi3).

Am I missing something?
Comment 25 Sergio Lindo Mansilla 2020-05-05 13:17:46 UTC
*** Bug 1170586 has been marked as a duplicate of this bug. ***
Comment 26 Guillaume GARDET 2020-05-05 13:26:18 UTC
This is a regression since Leap 15.2 on aarch64 has no problem.
But I am not sure it is really a problem of performance on Wayland.
https://bugzilla.opensuse.org/show_bug.cgi?id=1170586#c1 suggests it is a race condition on session start as running "opensuse-welcome" manually works fine, and logout/login reproduces the problem.
Comment 27 Guillaume GARDET 2020-08-17 08:21:11 UTC
How could we move forward here?
Comment 29 Alynx Zhou 2020-09-21 00:56:50 UTC
Installed aarch64 iso on my machine with qemu, both Xorg and Wayland is terrible, do I missed something?
Comment 30 Guillaume GARDET 2020-09-21 06:19:13 UTC
(In reply to Alynx Zhou from comment #29)
> Installed aarch64 iso on my machine with qemu, both Xorg and Wayland is
> terrible, do I missed something?

Did you enable KVM? Without KVM, performances are much lower.
So, if you use an aarch64 host, please enable KVM.
Comment 31 Alynx Zhou 2020-09-21 06:58:53 UTC
(In reply to Guillaume GARDET from comment #30)
> (In reply to Alynx Zhou from comment #29)
> > Installed aarch64 iso on my machine with qemu, both Xorg and Wayland is
> > terrible, do I missed something?
> 
> Did you enable KVM? Without KVM, performances are much lower.
> So, if you use an aarch64 host, please enable KVM.

I see, I am using my X86 machine...