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