From: "J. Roeleveld" <joost@antarean.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Recommended way to shut down akonadi
Date: Tue, 14 Jun 2016 07:03:25 +0200 [thread overview]
Message-ID: <4166965.pJ4J8PHmMW@andromeda> (raw)
In-Reply-To: <2658824.pSkp3lKu9l@dell_xps>
[-- Attachment #1.1: Type: text/plain, Size: 13027 bytes --]
=2D-nextPart1996927.oIXFpWVxT5
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
On Friday, June 10, 2016 10:32:25 PM Mick wrote:
> On Friday 10 Jun 2016 19:54:44 J. Roeleveld wrote:
> > Kde and I would assume Gnome as well have a method of running a script
> > when
> > starting and stopping a login session.
> >
> > This is usually used for ssh-agent and pgp-agent.
>
> Yes, KDE uses /etc/plasma/shutdown/10-agent-shutdown.sh and I guess gnome
> would have its equivalent, but I think this is only for any daemonised
> services running on the desktop.
>
> I suspect that:
>
> /usr/bin/kdeinit4_shutdown
> /usr/bin/kdeinit5_shutdown
>
> are used to shutdown gracefully any KDE apps.
>
> > You could try looking for something similar with the desktop/window
> > manager
> > of your choice.
>
> I tried the above shutdown commands but they didn't work. Unfortunately
> enlightenment does not have anything available to stop desktop applications
> at shutdown. The dev's advice was to use .xinitrc or equivalent.
>
> > I think .xsession is run only during start and will not 'pause' during the
> > session.
>
> Well my confusion is that my .xsession *was* working fine until a couple of
> weeks ago ... and all still works as expected when I run akonadictl stop in
> a terminal before I shut down. I don't know why the same command behaves
> differently in .xsession now. :-/
>
> PS. When I just log out there is no delay. The problem only arises when I
> shutdown. I wonder if this is something to do with this darn sddm display
> manager ...
There is a 90 second delay with PostgreSQL if there are still clients connected to the
database.
This should also be displayed on the screen if you see the shutdown-text.
I don't see how sddm can cause an extra delay.
You could add the commands to:
/etc/local.d/killakonadi.stop
(These are run as root, so you might need to do something like:
/bin/su -s /bin/sh -c " <command> " <username>
instead of the commands you have been putting in the scripts.
I think the local-service is stopped before postgresql is stopped, so this might prevent the
delay you are seeing?
=2D-
Joost
=2D-nextPart1996927.oIXFpWVxT5
Content-Transfer-Encoding: 7Bit
Content-Type: text/html; charset="us-ascii"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Noto Sans'; font-size:10pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On Friday, June 10, 2016 10:32:25 PM Mick wrote:</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> On Friday 10 Jun 2016 19:54:44 J. Roeleveld wrote:</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> > Kde and I would assume Gnome as well have a method of running a script</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> > when</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> > starting and stopping a login session.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> > </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> > This is usually used for ssh-agent and pgp-agent.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> Yes, KDE uses /etc/plasma/shutdown/10-agent-shutdown.sh and I guess gnome</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> would have its equivalent, but I think this is only for any daemonised</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> services running on the desktop.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> I suspect that:</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> /usr/bin/kdeinit4_shutdown</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> /usr/bin/kdeinit5_shutdown</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> are used to shutdown gracefully any KDE apps.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> > You could try looking for something similar with the desktop/window</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> > manager</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> > of your choice.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> I tried the above shutdown commands but they didn't work. Unfortunately</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> enlightenment does not have anything available to stop desktop applications</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> at shutdown. The dev's advice was to use .xinitrc or equivalent.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> > I think .xsession is run only during start and will not 'pause' during the</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> > session.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> Well my confusion is that my .xsession *was* working fine until a couple of</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> weeks ago ... and all still works as expected when I run akonadictl stop in</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> a terminal before I shut down. I don't know why the same command behaves</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> differently in .xsession now. :-/</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> PS. When I just log out there is no delay. The problem only arises when I</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> shutdown. I wonder if this is something to do with this darn sddm display</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> manager ...</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">There is a 90 second delay with PostgreSQL if there are still clients connected to the database.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">This should also be displayed on the screen if you see the shutdown-text.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">I don't see how sddm can cause an extra delay.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">You could add the commands to:</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">/etc/local.d/killakonadi.stop</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">(These are run as root, so you might need to do something like:</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">/bin/su -s /bin/sh -c " <command> " <username></span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'monospace';">instead of the commands you have been putting in the scripts.</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'monospace';">I think the local-service is stopped before postgresql is stopped, so this might prevent the delay you are seeing?</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'monospace';">--</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'monospace';">Joost<br /></span></p></body></html>
=2D-nextPart1996927.oIXFpWVxT5--
This is a multi-part message in MIME format.
[-- Attachment #1.2: Type: text/plain, Size: 2063 bytes --]
On Friday, June 10, 2016 10:32:25 PM Mick wrote:
> On Friday 10 Jun 2016 19:54:44 J. Roeleveld wrote:
> > Kde and I would assume Gnome as well have a method of running a script
> > when
> > starting and stopping a login session.
> >
> > This is usually used for ssh-agent and pgp-agent.
>
> Yes, KDE uses /etc/plasma/shutdown/10-agent-shutdown.sh and I guess gnome
> would have its equivalent, but I think this is only for any daemonised
> services running on the desktop.
>
> I suspect that:
>
> /usr/bin/kdeinit4_shutdown
> /usr/bin/kdeinit5_shutdown
>
> are used to shutdown gracefully any KDE apps.
>
> > You could try looking for something similar with the desktop/window
> > manager
> > of your choice.
>
> I tried the above shutdown commands but they didn't work. Unfortunately
> enlightenment does not have anything available to stop desktop applications
> at shutdown. The dev's advice was to use .xinitrc or equivalent.
>
> > I think .xsession is run only during start and will not 'pause' during the
> > session.
>
> Well my confusion is that my .xsession *was* working fine until a couple of
> weeks ago ... and all still works as expected when I run akonadictl stop in
> a terminal before I shut down. I don't know why the same command behaves
> differently in .xsession now. :-/
>
> PS. When I just log out there is no delay. The problem only arises when I
> shutdown. I wonder if this is something to do with this darn sddm display
> manager ...
There is a 90 second delay with PostgreSQL if there are still clients connected to the
database.
This should also be displayed on the screen if you see the shutdown-text.
I don't see how sddm can cause an extra delay.
You could add the commands to:
/etc/local.d/killakonadi.stop
(These are run as root, so you might need to do something like:
/bin/su -s /bin/sh -c " <command> " <username>
instead of the commands you have been putting in the scripts.
I think the local-service is stopped before postgresql is stopped, so this might prevent the
delay you are seeing?
--
Joost
[-- Attachment #1.3: Type: text/html, Size: 10665 bytes --]
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2016-06-14 5:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-05 22:13 [gentoo-user] Recommended way to shut down akonadi Mick
2016-06-06 3:25 ` J. Roeleveld
2016-06-06 18:22 ` Mick
2016-06-07 8:13 ` J. Roeleveld
2016-06-10 16:05 ` Mick
2016-06-10 19:54 ` J. Roeleveld
2016-06-10 21:32 ` Mick
2016-06-14 5:03 ` J. Roeleveld [this message]
2016-06-18 16:45 ` Mick
2016-06-18 17:42 ` J. Roeleveld
2016-06-18 19:47 ` Mick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4166965.pJ4J8PHmMW@andromeda \
--to=joost@antarean.org \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox