Very slow application start on X11 under VMware (due to udev polling)

Task Info (Flyspray)
Opened By Stefan Hoffmeister (shoffmeister)
Task ID 80292
Type Bug Report
Project Arch Linux
Category Packages: Extra
Version None
OS All
Opened 2023-11-19 16:32:48 UTC
Status Assigned
Assignee Andreas Radke (AndyRTR)

Details

With the bugfix from https://bugs.archlinux.org/task/80284, processes using the Xorg X11 server (via libdrm) start with massive latency on VMware Workstation; this is not unexpected given the information present in task #80284.

The root cause for this is an interaction between a crude busy poll loop in libdrm, virtualization software taking a long time, and a change in libdrm which amplified these challenges.

The net effect is that, as-is, every process connecting to Xorg will get a startup penalty of at, say, 1.8 seconds (measured locally); I am also seeing delays of up to 2.8 seconds (most likely caused by usleep or stat timing/performance under varying virtualization config). This presents itself as

  • very long time to desktop environment shell (under X11)
  • applications such as KDE konsole starting with a delay of 1.8+ seconds

https://discussion.fedoraproject.org/t/x11-huge-delay-for-each-process-vmware-workstation-regression/95708 talks alot about this, https://github.com/shoffmeister/drm/commit/db85c9dc0553414ca77d5442fb7c203f550f267a has a hack to make things work better again.