Using systemd-logind Session.TakeControl() from Xorg, input needed

Ray Strode rstrode at redhat.com
Wed Dec 4 11:53:31 PST 2013


Hi,

----- Original Message -----
> No it ain't. If you use DRM, you can run a smooth handover without
> tearing, flicker or other artifacts. It's not obvious and not
> documented at all (sadly), but it's possible. You simply avoid doing a
> full/deep modeset on session activation but instead take-over where it
> was left. Schedule your framebuffer for the next vblank and you will
> see no artifacts. Obviously, if you need to change (pixel-)modes or
> clock parameters, a full modeset is required. But that's always the
> case, whether you use a system-compositor or not.
The problem is the drivers are notoriously bad at keeping -background none working.
The intel driver only works if using SNA, and the modesetting driver doesn't work
at all, so we're going to get black a lot of the time when the X server first starts
up.

That's the situation with plymouth -> X right now anyway.

> > 2) It will mean there's always an X server with a login screen running in
> > the background, even on single user systems.
> 
> You can shut down the greeter-session after login and re-create it
> when required again.
You can't shut down an X server unless it's in the foreground.

> > I mean it's something we can consider, we even used to have code to do it
> > (called "factory mode"), but I don't it's a
> > absolute given that we should do it at this point.
> 
> I'm lost, sorry. So you are saying we should try it or not?
You asked why not, and I listed some reasons why it isn't an obvious yes or no
on which way to go.  I'm on the fence.  It's worth at least experimenting with.
We're essentially going to have to do that anyway for wayland sessions (since the greeter
itself doesn't run over wayland right now).
 
> I skimmed through the gdm code but didn't find the pam-transaction for
> the gdm user, only the one for the new sessions. Thanks for clarifying
> that! It's the right thing to do, imho.

The GDM code is a bit on the complicated side...

Greeter is started here:

https://git.gnome.org/browse/gdm/tree/daemon/gdm-simple-slave.c#n1277

which ultimately calls gdm_launch_environment_start, which creates a GdmSession object here:

https://git.gnome.org/browse/gdm/tree/daemon/gdm-launch-environment.c#n467

The GdmSession object is what fires off a gdm-session-worker process to run the PAM conversation and launch a session.

If you have a login screen up, you can see the worker process by doing

ps -ef |grep gdm-session-worker

and you'll see something like "gdm-session-worker [pam/gdm-launch-environment]" in the ps listing

--Ray


More information about the xorg-devel mailing list