3cde9e8fa0ae2a424ae2e6e27e14668ca5d90c98 |
|
05-Aug-2015 |
Daniel Mack <daniel@zonque.org> |
logind: switch to sd_bus_track helper
Let logind use the sd_bus_track helper object to track the controllers of
sessions. This does not only remove quite some code but also kills the
unconditional matches for all NameOwnerChanged signals.
The latter is something we should never ever do, as it wakes up the daemon
every time a client connects, which doesn't scale. |
b80120c4cba7d134b5437a58437a23fdf7ab2084 |
|
07-Jul-2015 |
David Herrmann <dh.herrmann@gmail.com> |
logind: fail on CreateSession if already in session
Right now, if you're already in a session and call CreateSession, we
return information about the current session of yours. This is highy
confusing and a nasty hack. Avoid that, and instead return a commonly
known error, so the caller can detect that.
This has the side-effect, that we no longer override XDG_VTNR and XDG_SEAT
in pam_systemd, if you're already in a session. But this sounds like the
right thing to do, anyway. |
602a41c22ac2df33b4b5e5083719c1cfaf58acf9 |
|
17-Jun-2015 |
Lennart Poettering <lennart@poettering.net> |
logind: rework display counting when detecting whether the system is docked
Previously, we'd just count connected displays, and if there was 2 or
more we assumed a "docked" state.
With this change we now:
- Only count external displays, ignore internal ones (which we detect by
checking the connector name against a whitelist of known external plug
types)
- We ignore connectors which are explicitly disabled
- We then compare the count with >= 1 rather than >= 2 as before
This new logic has the benefit that systems that disconnect the internal
display when the lid is closed are better supported. Also, explicitly
disabled ports do not confuse the algorithm anymore.
This new algorithm has been suggested here:
http://lists.freedesktop.org/archives/intel-gfx/2015-June/068821.html
This also makes two functions static, that are not used outside of their
.c files. |
94036de887ad5b0dc805abe38b5c1c58b57d9465 |
|
11-Mar-2014 |
Mantas Mikulėnas <grawity@gmail.com> |
logind: Do not fail display count if a device has no parent
udev_device_get_parent() may return NULL when the device doesn't have a
parent, as is the case with (for example) /sys/devices/virtual/drm/ttm.
Also, log an actual error message instead of "-12 displays connected". |
6a79c58603ea816a1b4fa1520397b4e138bc1ca0 |
|
03-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
logind: ignore lid switch if more than 1 display is connected
Previously we expected the desktop environment to take an inhibitor
lock, but this opened a race on boot-up where logind might already be
running but no DE is active.
Hence, let's move checking for additional displays into logind. This
also opens up this logic for other DEs, given that only GNOME
implemented the inhibitor logic so far. |
92bd5ff3a062c3f9475b9d9d39b9335bfeb7705e |
|
28-Nov-2013 |
David Herrmann <dh.herrmann@gmail.com> |
logind: make VT numbers unsigned
Fix the whole code to use "unsigned int" for vtnr. 0 is an invalid vtnr so
we don't need negative numbers at all.
Note that most code already assumes it's unsigned so in case there's a
negative vtnr, our code may, under special circumstances, silently break.
So this patch makes sure all sources of vtnrs verify the validity. Also
note that the dbus api already uses unsigned ints. |
2b3ab29de466ae6bd7c3243a5a48c7291cc2af0a |
|
26-Sep-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Move part of logind.c into a separate file
liblogind-core.la was underlinked, missing a few functions
defined in logind.c. They are moved to a new file, logind-core.c,
and this file is linked into liblogind-core.la.
In addition, logind-acl.c is attached to the liblogind-core.la,
instead of systemd-logind directly. |