Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Recommended way to shut down akonadi
Date: Sat, 18 Jun 2016 16:46:01
Message-Id: 3812355.PEq5tGLPxX@dell_xps
In Reply to: Re: [gentoo-user] Recommended way to shut down akonadi by "J. Roeleveld"
1 On Tuesday 14 Jun 2016 07:03:25 J. Roeleveld wrote:
2 > On Friday, June 10, 2016 10:32:25 PM Mick wrote:
3 > > On Friday 10 Jun 2016 19:54:44 J. Roeleveld wrote:
4 > > > Kde and I would assume Gnome as well have a method of running a script
5 > > > when
6 > > > starting and stopping a login session.
7 > > >
8 > > > This is usually used for ssh-agent and pgp-agent.
9 > >
10 > > Yes, KDE uses /etc/plasma/shutdown/10-agent-shutdown.sh and I guess gnome
11 > > would have its equivalent, but I think this is only for any daemonised
12 > > services running on the desktop.
13 > >
14 > > I suspect that:
15 > >
16 > > /usr/bin/kdeinit4_shutdown
17 > > /usr/bin/kdeinit5_shutdown
18 > >
19 > > are used to shutdown gracefully any KDE apps.
20 > >
21 > > > You could try looking for something similar with the desktop/window
22 > > > manager
23 > > > of your choice.
24 > >
25 > > I tried the above shutdown commands but they didn't work. Unfortunately
26 > > enlightenment does not have anything available to stop desktop
27 > > applications
28 > > at shutdown. The dev's advice was to use .xinitrc or equivalent.
29 > >
30 > > > I think .xsession is run only during start and will not 'pause' during
31 > > > the
32 > > > session.
33 > >
34 > > Well my confusion is that my .xsession *was* working fine until a couple
35 > > of
36 > > weeks ago ... and all still works as expected when I run akonadictl stop
37 > > in
38 > > a terminal before I shut down. I don't know why the same command behaves
39 > > differently in .xsession now. :-/
40 > >
41 > > PS. When I just log out there is no delay. The problem only arises when I
42 > > shutdown. I wonder if this is something to do with this darn sddm display
43 > > manager ...
44 >
45 > There is a 90 second delay with PostgreSQL if there are still clients
46 > connected to the database.
47 > This should also be displayed on the screen if you see the shutdown-text.
48
49 Yes, postgresql waits 90 seconds until all these akonadi attempts to reconnect
50 its agents finish, then X exits, postgresql shutsdown and then system shuts
51 down as expected.
52
53
54 > I don't see how sddm can cause an extra delay.
55
56 I can't either, but I am clutching at straws here.
57
58
59 > You could add the commands to:
60 > /etc/local.d/killakonadi.stop
61 >
62 > (These are run as root, so you might need to do something like:
63 > /bin/su -s /bin/sh -c " <command> " <username>
64 > instead of the commands you have been putting in the scripts.
65
66 Thank you this did not work. I didn't know that /etc/local.d/ scripts run at
67 shutdown, but in any case even if they do I suspect they don't run until X
68 exits first.
69
70
71 > I think the local-service is stopped before postgresql is stopped, so this
72 > might prevent the delay you are seeing?
73 >
74 > --
75 > Joost
76
77 I usually have a terminal open (more often than I have kmail) so I will need
78 to remember to run 'akonadictl stop' in the terminal before I shutdown the
79 machine. It's not ideal, but unless something can stop effectively akonadi I
80 can't exit X.
81
82 --
83 Regards,
84 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Recommended way to shut down akonadi "J. Roeleveld" <joost@××××××××.org>