I have been experiencing this issue and identified the root cause as a race condition in the KMS driver during the session handover from GDM to the user session. On certain virtualization drivers (specifically VirtualBox/VMSVGA and potentially others), there is a race condition during session handover (e.g., GDM to User Session). If the new session attempts to initialize the hardware cursor plane immediately while the previous session is releasing mastership, the atomic commit fails with EACCES. Mutter treats this failure on the first frame as fatal, resulting in a crash or a frozen black screen.
I have attached a patch that fixes the issue by implementing a hardware cursor stabilization period. I've tested this on Ubuntu 24.04 (Mutter 46.2) with VirtualBox, and it eliminates both the login crash and the stale frame issues without permanently disabling hardware acceleration by introducing a hardware cursor stabilization period (~2.5 seconds) for the KMS native backend. The Fix: Software cursors are forced for the first 2.5 seconds of the process lifetime. This avoids the race condition entirely by not touching the hardware cursor plane during the unstable handover period. It solves the "stale frame" issue often seen in VMs, as the software cursor forces damage updates (repaints) during initialization. After the stabilization period, the backend automatically switches to hardware cursors for optimal performance. ** Patch added: "0001-backends-native-Enforce-HW-cursor-stabilization-time.patch" https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2089709/+attachment/5938455/+files/0001-backends-native-Enforce-HW-cursor-stabilization-time.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2089709 Title: Ubuntu 24.04 sometimes logs in to a black screen if the mouse is moved during login To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2089709/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
