Cursor movement becomes synchronized with main content updates after VT switch
Description
After switching out to a different VT and back to the one that Mutter/gnome-shell controls, cursor movement is no longer independent of content updates and remains so until the session is restarted. Essentially, the main user-visible benefit introduced in !2777 (merged) is lost.
The following error is shown when switching out of the VT:
Failed to determine deadline: drmWaitVBlank failed: Operation not permitted
Root cause analysis
The error above results in priv->deadline_timer_inhibited
being set to TRUE
in
main/src/backends/native/meta-kms-impl-device.c#L1622-1629.
After that, priv->deadline_timer_inhibited
remains set to TRUE
for the entire lifetime of the MetaKmsImplDevice
. As long as it's set to TRUE
, the deadline timer is not armed and cursor updates are no longer done on their own schedule independent of the main thread.
I'll upload a MR to fix this issue.