#755140 Fails to shutdown or logout without gnome-shell

Package:
gnome-session
Source:
gnome-session
Submitter:
Joachim Breitner
Date:
2021-06-17 17:21:13 UTC
Severity:
normal
Tags:
#755140#5
Date:
2014-07-18 07:36:55 UTC
From:
To:
Hi,

I’m running gnome-session without gnome-shell, and since 3.12, I cannot
shutdown or logout any more. I removed gnome-panel from my session, to
reduce the problem, but still, when I run gnome-session-quit, nothing
happens. With "--debug" passed to gnome-session, I get:


Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmManager: Logout called
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmManager: requesting logout
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmManager: ending phase RUNNING
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmManager: starting phase QUERY_END_SESSION
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): gsm_xsmp_server_stop_accepting_new_clients
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmManager: Client /org/gnome/SessionManager/Client1
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmManager: Client /org/gnome/SessionManager/Client2
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmManager: Client /org/gnome/SessionManager/Client3
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmManager: Client /org/gnome/SessionManager/Client4
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmManager: sending query-end-session to clients (logout mode: normal)
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmDBusClient: sending QueryEndSession signal to :1.5
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmManager: adding client to query clients: /org/gnome/SessionManager/Client1
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmDBusClient: sending QueryEndSession signal to :1.7
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmManager: adding client to query clients: /org/gnome/SessionManager/Client2
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmManager: adding client to query clients: /org/gnome/SessionManager/Client3
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmDBusClient: sending QueryEndSession signal to :1.15
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmManager: adding client to query clients: /org/gnome/SessionManager/Client4
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmXSMPClient: Client '0x1b6c650 [pulseaudio 10423033baab5c100f140566814524128400000046620017]' received SaveYourselfDone(success = True)
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmManager: Response from end session request: is-ok=1 do-last=0 cancel=0 reason=
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmDBusClient: obj_path=/org/gnome/SessionManager/Client1 interface=org.gnome.SessionManager.ClientPrivate method=EndSessionResponse
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmDBusClient: got EndSessionResponse is-ok:1 reason=
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmManager: Response from end session request: is-ok=1 do-last=0 cancel=0 reason=
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmXsmpServer: sms_error_handler (0x1bae690, FALSE, 3, c, 32771, 0)
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmDBusClient: obj_path=/org/gnome/SessionManager/Client2 interface=org.gnome.SessionManager.ClientPrivate method=EndSessionResponse
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmDBusClient: obj_path=/org/gnome/SessionManager/Client2 interface=org.gnome.SessionManager.ClientPrivate method=EndSessionResponse
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmDBusClient: got EndSessionResponse is-ok:1 reason=
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmManager: Response from end session request: is-ok=1 do-last=0 cancel=0 reason=
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmDBusClient: obj_path=/org/gnome/SessionManager/Client4 interface=org.freedesktop.DBus.Properties method=GetAll
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmDBusClient: obj_path=/org/gnome/SessionManager/Client4 interface=org.freedesktop.DBus.Properties method=GetAll
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmDBusClient: obj_path=/org/gnome/SessionManager/Client4 interface=org.freedesktop.DBus.Properties method=GetAll
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmDBusClient: obj_path=/org/freedesktop/DBus interface=org.freedesktop.DBus method=NameOwnerChanged
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmDBusClient: obj_path=/org/freedesktop/DBus interface=org.freedesktop.DBus method=NameOwnerChanged
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmDBusClient: obj_path=/org/freedesktop/DBus interface=org.freedesktop.DBus method=NameOwnerChanged
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmDBusClient: obj_path=/org/gnome/SessionManager/Client4 interface=org.gnome.SessionManager.ClientPrivate method=EndSessionResponse
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmDBusClient: obj_path=/org/gnome/SessionManager/Client4 interface=org.gnome.SessionManager.ClientPrivate method=EndSessionResponse
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmDBusClient: obj_path=/org/gnome/SessionManager/Client4 interface=org.gnome.SessionManager.ClientPrivate method=EndSessionResponse
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmDBusClient: got EndSessionResponse is-ok:1 reason=
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmManager: Response from end session request: is-ok=1 do-last=0 cancel=0 reason=
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmManager: query end session complete
Jul 18 09:29:24 kirk gnome-session[4662]: DEBUG(+): GsmShell: Not connected to the shell

I count 4 "Response from end session", so all clients seem to answer in
due time.  The last message "might" mean that it relies on gnome-shell to log
out; could also be a red herring.

I am running systemd and gdm3, if that makes a difference.

(This might be part of the problem in #755118)

Thanks,
Joachim


- -- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (101, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gnome-session depends on:
ii  gnome-session-bin      3.12.1-3
ii  gnome-session-common   3.12.1-3
ii  gnome-settings-daemon  3.12.2-1
ii  gnome-shell            3.12.2-3

gnome-session recommends no packages.

Versions of packages gnome-session suggests:
pn  desktop-base      <none>
ii  gnome-keyring     3.12.0-2
pn  gnome-user-guide  <none>

- -- no debconf information
iEYEARECAAYFAlPIzpQACgkQ9ijrk0dDIGya/wCgrz2sDrGdSv0Mscbdxel11Kyq
OlEAoJIsiql2sPowR8TVLqOk8M8bJLXz
=Fq/V
-----END PGP SIGNATURE-----

#755140#10
Date:
2014-07-18 07:46:10 UTC
From:
To:
Hi,

Am Freitag, den 18.07.2014, 09:36 +0200 schrieb Joachim Breitner:

it also happens in a gnome-flashback session.

I’ll retry with a fresh home directory.

Greetings,
Joachim

#755140#15
Date:
2014-07-18 07:53:15 UTC
From:
To:
Hi,

Am Freitag, den 18.07.2014, 09:46 +0200 schrieb Joachim Breitner:
down is not possible.

Plus, unrelated, but possibly interesting to readers of this bug: The
mouse cursor disappear. This can be worked-around with
dconf write /org/gnome/settings-daemon/plugins/cursor/active false

Greetings,
Joachim

#755140#22
Date:
2014-07-18 10:29:16 UTC
From:
To:
Hi Andreas,

thanks for your insights!

I can understand that gnome-session doesn’t want to show a dialog any
more. But shouldn’t then
$ gnome-session-quit --logout --no-prompt
work?

Also, I would expect gnome-session to behave more sensibly if it cannot
ask anyone to do the confirmation, e.g. then shutdown.

Am Freitag, den 18.07.2014, 12:03 +0200 schrieb Andreas Henriksson:

Is there a documentation of this API somewhere?

Greetings,
Joachim

#755140#27
Date:
2014-07-18 10:03:35 UTC
From:
To:
Hello Joachim Breitner!

Your problem with quitting the session is likely because nothing is
listening on the DBus API called by gnome-session (if you're not running
gnome-shell).

Upstream is working on making gnome components not rely on X (to support
running on top of Wayland instead).

I've also heard that gnome 3.8 was the last upstream release supporting
the fallback session. (Likely because everybody seems to prefer forking
over actually helping keeping it alive.)

This commit was included in gnome-shell 3.10 which is relevant
to your problem:
https://git.gnome.org/browse/gnome-session/commit/gnome-session/gsm-manager.c?id=705699b2799a3434d1a8f35c9a92868a5057f73e

I guess you have two options here....

short term it might work to revert the above commit for you, but I think
that will become increasingly hard to maintain.

better solution would be to implement something to listen to the correct
set of DBus API to show the poweroff/reboot/logout dialog depending
on which component you think should be in charge of that graphical
details.

If you're interested in helping out maintaining the fallback session
that help is very welcome. Please visit #debian-gnome on irc.debian.org.

Hope there hints helps you find a solution.

Regards,
Andreas Henriksson

#755140#32
Date:
2014-07-18 12:16:39 UTC
From:
To:
Hello!

I don't know. You tell me! ;)
I didn't design this thing and I have gnome-shell so everything works for me.

I don't know. I'm looking up things as we go here....

The signalling between gnome-session (manager) and gnome-shell
seems to be handled via an abstraction in gnome-session/gsm-shell.c
where the outgoing calls are made and replies interpretted and converted
to gsm-internal glib signals.

Usually the dbus api is described in a .xml file, but in gnome-shells
case it seems it has been embedded in the javascript code.
eg. https://git.gnome.org/browse/gnome-shell/tree/js/ui/endSessionDialog.js#n48


Regards,
Andreas Henriksson

#755140#37
Date:
2014-07-18 12:44:14 UTC
From:
To:
Hi,

Am Freitag, den 18.07.2014, 14:16 +0200 schrieb Andreas Henriksson:

Thanks again!

I tried to come up with a python script to answer these requests, but
it’s bound to fail: gnome-session refuses to talk to anything but the
real gnome-shell (note the SHELL_NAME):

                proxy = dbus_g_proxy_new_for_name (shell->priv->bus_connection,
                                                   SHELL_NAME,
                                                   SHELL_END_SESSION_DIALOG_PATH,
                                                   SHELL_END_SESSION_DIALOG_INTERFACE);
(from gnome-session/gsm-shell.c).


With such a deep coupling of gnome-shell and gnome-session, I don’t
think its very viable to keep using gnome-session without gnome-shell.

Greetings,
Joachim

#755140#42
Date:
2014-07-18 12:57:08 UTC
From:
To:
[...]

And the "real" gnome-shell is whoever listens to "org.gnome.Shell"....

Sorry, I fail to see the problem here. Why can't you implement
"org.gnome.Shell" ?
Wasn't that the excercise all the time? To reimplement the Shell dbus api?

Regards,
Andreas Henriksson

#755140#47
Date:
2014-07-18 13:34:13 UTC
From:
To:
Hi,

Am Freitag, den 18.07.2014, 14:57 +0200 schrieb Andreas Henriksson:

maybe, but I was under the impression that a clean interface would not
address a specific object name, but tries to find a counterpart via a
general interface, i.e. via:
define SHELL_END_SESSION_DIALOG_PATH      "/org/gnome/SessionManager/EndSessionDialog"
define SHELL_END_SESSION_DIALOG_INTERFACE "org.gnome.SessionManager.EndSessionDialog"

I would expect putting an object on the bus pretending to be gnome-shell
(but not implementing _all_ its interfaces) will cause other unexpected
behavior.

It might work as a work-around but it’d be quite an ugly hack.

(Another is "killall gnome-session; killall gnome-session" to log
out...)

Greetings,
Joachim

#755140#52
Date:
2014-07-18 13:46:15 UTC
From:
To:
On Fri, Jul 18, 2014 at 03:34:13PM +0200, Joachim Breitner wrote:
[...]
[...]

I'm convinced that if the current implementation in gnome-session is
improved to be more general and a second implementation of the interface
actually appears, that upstream would be happy to consider a patch for it.

Right now there's not much point from their side to spend time on
improving for a future theoretical scenario. (Specially since no matter
how much preparatory work they do, peoples first step always seems to
be to fork rather then contribute.)

Regards,
Andreas Henriksson

#755140#57
Date:
2014-07-25 16:35:57 UTC
From:
To:
Hi,

This thread is related:

https://mail.gnome.org/archives/gnome-flashback-list/2014-June/msg00046.html

I believe Alberts Muktupāvels <alberts.muktupavels@gmail.com> has an
implementation of the listener service, you may want to contact him and
ask to share his code.

#755140#62
Date:
2014-08-30 22:20:56 UTC
From:
To:
severity 755140 serious

After a new jessie install today, I arrived at this bug.
I'm using systemd, gdm3, and gnome-flashback, so no gnome-shell.

Sorry not have the technical skills to fix this, but if we can't support
Gnome3 without gnome-shell, then things like gnome-flashback should be
removed from jessie before it's released, hence the severity raise. If
this means everybody using Gnome3 should use gnome-shell, so be it.
Please reassign/clone/affects as appropriate.

Thanks.

#755140#71
Date:
2014-11-01 08:51:44 UTC
From:
To:
Logout and Shutdown from gnome-flashback session are working fine now
as it pretends to be gnome-shell by exporting relevant interface.

However it would still be nice if upstream gnome-session supported
more generic interface name, so leaving the bug open and adding an
upstream task.

#755140#80
Date:
2015-08-12 21:37:29 UTC
From:
To:
I made the latest updates (of iceweasel a.s.o.) and now there's the bug in gnome & gnome classic!