Skip to content

backends/native: Fix issue where KMS thread fails to acquire realtime priority on boot when the shell starts before the rtkit daemon

Agustín Dall'Alba requested to merge agusdallalba/mutter:main into main

I have autologin enabled, and was intermittently finding that the KMS thread did not have realtime priority after a reboot. This problem never appeared with autologin disabled, and was fixed when I logged out and back in.

I determined the cause from the following line in the logs:

Failed to make thread 'KMS thread' realtime scheduled: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.freedesktop.RealtimeKit1" does not exist

It turns out that sometimes rtkit-daemon started after gnome-shell and the latter fails to acquire realtime priority. Usually dbus starts the daemon in this case but the proxy has the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag set that prevents this.

This PR removes this flag from the rtkit dbus proxy. I tested it in my machine and it solves the issue. It also doesn't cause problems when rtkit is uninstalled. I'm not sure why the flag was set in the first place.

Merge request reports