[Pkg-xfce-devel] Bug#732623: Bug#729576: duplicate of bug #726763
Vincent Lefevre
vincent at vinc17.net
Tue Dec 24 01:01:21 UTC 2013
Hi Andreas,
On 2013-12-23 14:30:28 +0100, Andreas Cadhalpun wrote:
> (Seriously, does anyone use twm as window manager?)
I use it to test bugs only. :)
> The major difference between testing and unstable concerning this bug is
> lightdm, which is 1.6.3-1 in testing, but 1.8.5-2 in unstable. So I
> installed lightdm from unstable, and indeed I can reproduce the problem of
> this bug with that version. This is independent of the started session
> (gnome-shell, xfce, twm) and independent of the init system (sysvinit,
> systemd-sysv).
>
> Therefore this bug is a regression introduced in lightdm between
> 1.6.3-1 and 1.8.5-2.
After I looked at liblightdm-gobject/power.c in both versions, I could
see that 1.8.5-2 added systemd interaction (org.freedesktop.login1).
See the new login1_call_function function. So, it is still not clear
whether the bug is in lightdm (because sessions are not handled
correctly, but in this case, all the 4 menu items should have
disappeared, not just 2) or in systemd (the problem was not visible
with lightdm 1.6.3-1 because it didn't do systemd tests). It could
also be both.
> On 23.12.2013 03:20, Vincent Lefevre wrote:
> >>What logs would you like to see?
> >
> >The result of the tests CanSuspend, CanHibernate, CanReboot and
> >CanPowerOff, and possibly the cause of the result when it isn't
> >"yes". I can't see them in D-Bus monitoring. Or perhaps I'm doing
> >something wrong.
> How can I run these tests? Can you give me a command line to execute?
I've tried the following:
$ gdbus call --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1 --method org.freedesktop.login1.Manager.CanSuspend
('yes',)
$ gdbus call --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1 --method org.freedesktop.login1.Manager.CanHibernate
('yes',)
$ gdbus call --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1 --method org.freedesktop.login1.Manager.CanReboot
('yes',)
$ gdbus call --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1 --method org.freedesktop.login1.Manager.CanPowerOff
('yes',)
both from an X session and from a VT. So, everything seems to be
"fine" under these conditions. However, when lightdm does these
tests, only two of them seem to return "yes". But without logs
(either from lightdm or from systemd), I cannot confirm.
> >There could be a debug mode in the conf files, just like what
> >gdm3 has, e.g. from /etc/gdm3/daemon.conf:
> >
> >[debug]
> ># More verbose logs
> ># Additionally lets the X server dump core if it crashes
> >Enable = true
> I'm not sure if you meant this, but there is /var/log/lightdm.
with too little information, in particular not the results of the
tests. It may be OK normally, but not for debugging.
Look at the patch I've attached in this message:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732623#35
Direct link:
http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=35;filename=lightdm-power-debug.2.patch;att=1;bug=732623
I've added some g_debug messages, but they do not appear in the
logs, while g_debug messages from other parts of the source do
appear! So, I'm wondering what to do.
Note that I'm sure that these functions are called, because the
change of the return values to TRUE makes the difference when
systemd is installed.
> With the unstable version of lightdm, I have the following error (sorry for
> the german) in /var/log/lightdm/x-0-greeter.log:
> ** (lightdm-gtk-greeter:2536): WARNING **: Failed to open sessions
> directory: Fehler beim Öffnen des Ordners »/usr/share/lightdm/sessions«:
> Datei oder Verzeichnis nicht gefunden
These are warnings, not errors. I think that this may be used to
pre-define sessions (for the greeter). Unfortunately the source
is not documented. You have examples in tests/data/sessions.
> This is not present when using the lightdm version from testing, so it seems
> that /usr/share/lightdm/sessions is not correctly created by the unstable
> version of lightdm.
It is not created because it would be an empty directory.
Other packages might add it and files into it.
> >With libpam-systemd installed, using
> >
> > gdbus monitor --system --dest org.freedesktop.login1
> >
> >I can see org.freedesktop.login1.Manager.SessionNew lines, but the
> >sessions are removed only when I log in again. So, when I log out,
> >there's always a session active. Here's how it looks like:
> I also have always an active session with the testing version of lightdm,
> but nevertheless all four menu items show.
I'm wondering whether there is a race condition, making differences
between machines.
> >This leaves 2 questions:
> >
> >1. Why isn't the session removed when I log out?
> > Something related to /etc/X11/Xsession* configuration?
> > Note that I have the default.
> > /etc/X11/Xsession is run via session-wrapper=/etc/X11/Xsession
> > in /usr/share/lightdm/lightdm.conf.d/01_debian.conf
> That is a good question, but it seems unrelated to this bug, as it cannot be
> the cause, because the menu works in spite of this with the testing version.
No, as said above, the testing version does not use systemd tests.
So, you can't compare with it. However, even when a session is
active, I get "yes" to the 4 calls (see above), though the bug
is still reproducible. What lightdm gets may be different.
> >2. Why, apparently due to this session problem, only 2 menu items
> > over the 4 ones disappear?
> I think that the menus disappear might be due to having still the 1.6
> version of the greeter.
No, this doesn't explain anything. What is shown by the patch is
that 2 of the lightdm_get_can_* functions behave incorrectly. The
greeter doesn't matter. Actually lightdm-gtk-greeter.c 1.6 does:
if (!lightdm_get_can_suspend ())
gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder, "suspend_menuitem")));
if (!lightdm_get_can_hibernate ())
gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder, "hibernate_menuitem")));
if (!lightdm_get_can_restart ())
gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder, "restart_menuitem")));
if (!lightdm_get_can_shutdown ())
gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder, "shutdown_menuitem")));
So, the problem with the greeter directly comes from lightdm.
--
Vincent Lefèvre <vincent at vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
More information about the Pkg-xfce-devel
mailing list