GNOME Bugzilla – Bug 724604
Replace mutter-launch with logind integration
Last modified: 2014-12-29 05:35:44 UTC
This uses David Herrmann's new logind sessions interface to retrieve fds for input devices, rather than using a custom setuid helper to do the management. This vastly simplifies the interface. This does require systemd from git, as systemd v209 has not been released yet.
Created attachment 269500 [details] [review] Replace mutter-launch with logind integration
Review of attachment 269500 [details] [review]: ::: src/wayland/meta-login1.c @@ +61,3 @@ + + clutter_evdev_reclaim_devices (); +} You're killing all the logic for not running the main loop here, so we keep redrawing and failing because we're not drm master. @@ +87,3 @@ + MetaLogin1 *self = user_data; + sync_active (self); +} Are you sure this is never called twice with the same value? Is it enforced by logind or gdbus? @@ +111,3 @@ + cancellable, + error)) + goto out; Are we sure fd_list is initialized on error? @@ +212,3 @@ + GError **error) +{ + if (!login1_session_call_activate_sync (self->session_proxy, NULL, error)) What are the semantics for Activate()? Doesn't it require to release all devices before returning, in which case it needs to be async? (This is from memory, but maybe I'm wrong)
(In reply to comment #2) > Review of attachment 269500 [details] [review]: > > You're killing all the logic for not running the main loop here, so we keep > redrawing and failing because we're not drm master. I talked to David Herrmann about this, and I think what he wants is to have hooks inside Cogl to pause drawing. This sounds like a reasonable solution, and for now there's nothing wrong with drawing and failing, only an inefficiency. > Are you sure this is never called twice with the same value? Is it enforced by > logind or gdbus? I remember checking and it is enforced by gdbus. You should probably triple-check for me though. > What are the semantics for Activate()? Doesn't it require to release all > devices before returning, in which case it needs to be async? > (This is from memory, but maybe I'm wrong) Activate(); is if we need to activate our own session, so, no? We don't have any devices to release yet. The way I'm going to use this is to call meta_activate_session(); right as gnome-shell is ready to do the animation. gdm will fade out the login screen, start the session, and then just wait. When gnome-shell calls meta_activate_session();, we'll switch VTs and do the animation, and gdm will reset its login screen.
(In reply to comment #3) > (In reply to comment #2) > > Review of attachment 269500 [details] [review] [details]: > > > > You're killing all the logic for not running the main loop here, so we keep > > redrawing and failing because we're not drm master. > > I talked to David Herrmann about this, and I think what he wants is to have > hooks inside Cogl to pause drawing. This sounds like a reasonable solution, and > for now there's nothing wrong with drawing and failing, only an inefficiency. A pretty bad one: if we fail to draw, we also fail to throttle to vblank, so we busy loop in the background. (In reply to comment #3) > > What are the semantics for Activate()? Doesn't it require to release all > > devices before returning, in which case it needs to be async? > > (This is from memory, but maybe I'm wrong) > > Activate(); is if we need to activate our own session, so, no? We don't have > any devices to release yet. Same question for switch_vt() then.
This landed a while ago.