public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Recommended way to shut down akonadi
@ 2016-06-05 22:13 Mick
  2016-06-06  3:25 ` J. Roeleveld
  0 siblings, 1 reply; 11+ messages in thread
From: Mick @ 2016-06-05 22:13 UTC (permalink / raw
  To: gentoo-user


[-- Attachment #1.1: Type: text/plain, Size: 19862 bytes --]

=2D-nextPart7715274.63h3xliQGL
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"

I run enlightenment DE with a few KDE apps, including KDEPIM and with the 
arrival of Plasma5 I have migrated most of my systems to this set up.

On my laptop I run a stand-alone postgresql for KDEPIM's akonadi, instead of 
mysql.  Everything was working fine, until a week ago.  Shutdown now takes a 
while with akonadi apparently trying to restart, before it eventually gives 
up.  This can take up to 90 seconds.  The delay goes away if I close Kmail and 
run 'akonadictl stop' in a terminal, before I shutdown from the GUI, but not 
if I just add it in my .xsession.  Perhaps my syntax is wrong, or there may be 
a better way to achieve the same.  The contents of my .xsession are:

===================================
#!/bin/sh
if [ -x /usr/bin/gpg-agent ]; then
        kill $(ps ux | awk '/gpg-agent/ && !/awk/ {print $2}') >/dev/null 2>&1
fi

if [ -x /usr/bin/gpg-agent ]; then
  eval "$(/usr/bin/gpg-agent --daemon)"
fi 

# Uncomment the following lines to start rxvt-unicode which has the ability to
# run multiple terminals in one single process, thus starting up faster and 
# saving resources.
# The --opendisplay ensures that the daemon quits when the X server 
terminates,
# therefore we don't need matching lines in agent-shutdown.sh.

if [ -x /usr/bin/urxvtd ]; then
        /usr/bin/urxvtd --opendisplay --fork --quiet
fi

#exec ck-launch-session /usr/bin/enlightenment_start
exec /usr/bin/enlightenment_start
/usr/bin/akonadictl stop
wait 4
========================

The above causes a number of recurring entries in .xsession-errors as per the 
attached log file.  Some of the errors look like this:

rocessControl: Application '/usr/bin/akonadi_maildispatcher_agent' returned 
with exit code 1 (Unknown error)
akonadi_agent_launcher: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with 
exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_migration_agent' returned with 
exit code 1 (Unknown error)
akonadi_agent_launcher: cannot connect to X server :0.0
akonadi_newmailnotifier_agent: cannot connect to X server :0.0

*after* akonadi has already reported:

Application 'akonadiserver' exited normally...


So if it has exited normally, why are all these processes left hanging and 
keeping postgresql mulling it over for 90 seconds or so, before it eventually 
gives up?  If I press Ctrl+Alt+Backspace while sitting there waiting on a 
black VT7 the shutdown process picks up without further delay.

Is there something I need to correct in my .xsession syntax?

=2D- 
Regards,
Mick
=2D-nextPart7715274.63h3xliQGL
Content-Disposition: attachment; filename="xsession_errors.log"
Content-Transfer-Encoding: 7Bit
Content-Type: text/x-log; charset="UTF-8"; name="xsession_errors.log"

_e_sys_comp_emit_cb_wait - [7] e,state,sys,reboot e,state,sys,reboot,done
action reboot 2
urxvt: X connection to ':0' broken, unable to recover, exiting.
kdeinit4: Fatal IO error: client killed
kded4: Fatal IO error: client killed
knotify4: Fatal IO error: client killed
kwalletd: Fatal IO error: client killed
akonadi_agent_launcher: Fatal IO error: client killed
akonadi_agent_launcher: Fatal IO error: client killed
akonadi_agent_launcher: Fatal IO error: client killed
akonadi_followupreminder_agent: Fatal IO error: client killed
Control process died, committing suicide!
terminating service threads 
akonadi_maildispatcher_agent: Fatal IO error: client killed
akonadi_sendlater_agent: Fatal IO error: client killed
The X11 connection broke (error 1). Did the X11 server die?
kdeinit5: Fatal IO error: client killed
klauncher: Exiting on signal 15
akonadi_archivemail_agent: Fatal IO error: client killed
Checking for pam module
Lacking a socket, pipe: 0, env:0
akonadi_mailfilter_agent: Fatal IO error: client killed
klauncher: Exiting on signal 15
kdeinit4: Fatal IO error: client killed
akonadi_migration_agent: Fatal IO error: client killed
akonadi_imap_resource: Fatal IO error: client killed
akonadi_agent_launcher: Fatal IO error: client killed
akonadi_baloo_indexer: Fatal IO error: client killed
akonadi_newmailnotifier_agent: Fatal IO error: client killed
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_sendlater_agent' returned with exit code 1 (Unknown error)
akonadi_imap_resource: Fatal IO error: client killed
The X11 connection broke (error 1). Did the X11 server die?
QThread: Destroyed while thread is still running
Closing SQL connection:  "kactivities_db_resources_140418780239744_readwrite"
akonadi_agent_launcher: Fatal IO error: client killed
E - PID=29674, valgrind=0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
terminating connection threads 
ProcessControl: Application '/usr/bin/akonadi_archivemail_agent' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_followupreminder_agent' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_imap_resource' returned with exit code 1 (Unknown error)
Unable to free statement: FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

Unable to free statement: FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

ProcessControl: Application '/usr/bin/akonadi_maildispatcher_agent' returned with exit code 1 (Unknown error)
Unable to free statement: FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

Unable to free statement: FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

Unable to free statement: no connection to the server

Unable to free statement: no connection to the server

Unable to free statement: no connection to the server

Unable to free statement: no connection to the server

ProcessControl: Application '/usr/bin/akonadi_migration_agent' returned with exit code 1 (Unknown error)
Unable to free statement: FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

stopping db process 
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
Application 'akonadiserver' exited normally...
ProcessControl: Application '/usr/bin/akonadi_baloo_indexer' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_newmailnotifier_agent' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_mailfilter_agent' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_imap_resource' returned with exit code 1 (Unknown error)
STORAGE+=/org/freedesktop/UDisks2/drives/TSSTcorp_DVD_2b_2f_RW_TS_T633C_R5516GOSC05707
++STO:
  udi: /org/freedesktop/UDisks2/drives/TSSTcorp_DVD_2b_2f_RW_TS_T633C_R5516GOSC05707
  bus: 
  drive_type: optical_cd
  model: TSSTcorp DVD+/-RW TS-T633C
  vendor: (null)
  serial: R5516GOSC05707
  icon.drive: (null)
  icon.volume: (null)

VOL+ /org/freedesktop/UDisks2/block_devices/sda1
VOL+ /org/freedesktop/UDisks2/block_devices/sda2
VOL+ /org/freedesktop/UDisks2/block_devices/sda10
VOL+ /org/freedesktop/UDisks2/block_devices/sda11
VOL+ /org/freedesktop/UDisks2/block_devices/sda3
VOL+ /org/freedesktop/UDisks2/block_devices/sda6
VOL+ /org/freedesktop/UDisks2/block_devices/sda8
VOL+ /org/freedesktop/UDisks2/block_devices/sda7
VOL+ /org/freedesktop/UDisks2/block_devices/sda9
STORAGE+=/org/freedesktop/UDisks2/drives/ST9500420ASG_5VJ377P2
++STO:
  udi: /org/freedesktop/UDisks2/drives/ST9500420ASG_5VJ377P2
  bus: 
  drive_type: (null)
  model: ST9500420ASG
  vendor: (null)
  serial: 5VJ377P2
  icon.drive: (null)
  icon.volume: (null)

removing likely internal storage /org/freedesktop/UDisks2/drives/ST9500420ASG_5VJ377P2
STORAGE+=/org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
++STO:
  udi: /org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
  bus: usb
  drive_type: (null)
  model: 0302
  vendor: Verbatim
  serial: 12082425004469
  icon.drive: (null)
  icon.volume: (null)

++STO:
  udi: /org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
  bus: usb
  drive_type: (null)
  model: 0302
  vendor: Verbatim
  serial: 12082425004469
  icon.drive: (null)
  icon.volume: (null)

VOL+ /org/freedesktop/UDisks2/block_devices/sdb1
DB DEV-: /org/freedesktop/UDisks2/jobs/0
DB DEV-: /org/freedesktop/UDisks2/jobs/1
DB DEV-: /org/freedesktop/UDisks2/jobs/2
DB DEV-: /org/freedesktop/UDisks2/block_devices/sdb1
=2D-VOL /dev/sdb1
DB DEV-: /org/freedesktop/UDisks2/block_devices/sdb
++STO:
  udi: /org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
  bus: usb
  drive_type: (null)
  model: 0302
  vendor: Verbatim
  serial: 12082425004469
  icon.drive: (null)
  icon.volume: (null)

DB DEV-: /org/freedesktop/UDisks2/block_devices/sdb
DB DEV-: /org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
=2D-STO /org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
STORAGE+=/org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
++STO:
  udi: /org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
  bus: usb
  drive_type: (null)
  model: 0302
  vendor: Verbatim
  serial: 12082425004469
  icon.drive: (null)
  icon.volume: (null)

++STO:
  udi: /org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
  bus: usb
  drive_type: (null)
  model: 0302
  vendor: Verbatim
  serial: 12082425004469
  icon.drive: (null)
  icon.volume: (null)

VOL+ /org/freedesktop/UDisks2/block_devices/sdb1
DB DEV-: /org/freedesktop/UDisks2/jobs/3
DB DEV-: /org/freedesktop/UDisks2/jobs/4
DB DEV-: /org/freedesktop/UDisks2/jobs/5
DB DEV-: /org/freedesktop/UDisks2/jobs/6
DB DEV-: /org/freedesktop/UDisks2/block_devices/sdb1
=2D-VOL /dev/sdb1
DB DEV-: /org/freedesktop/UDisks2/block_devices/sdb
++STO:
  udi: /org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
  bus: usb
  drive_type: (null)
  model: 0302
  vendor: Verbatim
  serial: 12082425004469
  icon.drive: (null)
  icon.volume: (null)

DB DEV-: /org/freedesktop/UDisks2/block_devices/sdb
DB DEV-: /org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
=2D-STO /org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
akonadi_agent_launcher: cannot connect to X server :0.0
akonadi_agent_launcher: cannot connect to X server :0.0
akonadi_migration_agent: cannot connect to X server :0.0
akonadi_maildispatcher_agent: cannot connect to X server :0.0
akonadi_agent_launcher: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
akonadi_followupreminder_agent: cannot connect to X server :0.0
akonadi_agent_launcher: cannot connect to X server :0.0
akonadi_agent_launcher: cannot connect to X server :0.0
akonadi_imap_resource: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_followupreminder_agent' returned with exit code 1 (Unknown error)
akonadi_baloo_indexer: cannot connect to X server :0.0
akonadi_sendlater_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_maildispatcher_agent' returned with exit code 1 (Unknown error)
akonadi_archivemail_agent: cannot connect to X server :0.0
akonadi_imap_resource: cannot connect to X server :0.0
akonadi_agent_launcher: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_imap_resource' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
akonadi_newmailnotifier_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_archivemail_agent' returned with exit code 1 (Unknown error)
akonadi_agent_launcher: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_migration_agent' returned with exit code 1 (Unknown error)
akonadi_agent_launcher: cannot connect to X server :0.0
akonadi_agent_launcher: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_newmailnotifier_agent' returned with exit code 1 (Unknown error)
akonadi_followupreminder_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_followupreminder_agent' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
akonadi_maildispatcher_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
akonadi_mailfilter_agent: cannot connect to X server :0.0
akonadi_agent_launcher: cannot connect to X server :0.0
akonadi_agent_launcher: cannot connect to X server :0.0
akonadi_imap_resource: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_sendlater_agent' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_baloo_indexer' returned with exit code 1 (Unknown error)
akonadi_migration_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_maildispatcher_agent' returned with exit code 1 (Unknown error)
akonadi_agent_launcher: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_migration_agent' returned with exit code 1 (Unknown error)
akonadi_agent_launcher: cannot connect to X server :0.0
akonadi_newmailnotifier_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_agent_launcher" crashed too often and will not be restarted! 
akonadi_followupreminder_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_agent_launcher" crashed too often and will not be restarted! 
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_agent_launcher" crashed too often and will not be restarted! 
ProcessControl: Application '/usr/bin/akonadi_imap_resource' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_newmailnotifier_agent' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_followupreminder_agent' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_followupreminder_agent" crashed too often and will not be restarted! 
ProcessControl: Application '/usr/bin/akonadi_mailfilter_agent' returned with exit code 1 (Unknown error)
akonadi_agent_launcher: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
akonadi_baloo_indexer: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_imap_resource' returned with exit code 1 (Unknown error)
akonadi_maildispatcher_agent: cannot connect to X server :0.0
akonadi_migration_agent: cannot connect to X server :0.0
akonadi_archivemail_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_baloo_indexer' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_agent_launcher" crashed too often and will not be restarted! 
ProcessControl: Application '/usr/bin/akonadi_maildispatcher_agent' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_maildispatcher_agent" crashed too often and will not be restarted! 
ProcessControl: Application '/usr/bin/akonadi_migration_agent' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_migration_agent" crashed too often and will not be restarted! 
ProcessControl: Application '/usr/bin/akonadi_archivemail_agent' returned with exit code 1 (Unknown error)
akonadi_imap_resource: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_imap_resource' returned with exit code 1 (Unknown error)
akonadi_newmailnotifier_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_newmailnotifier_agent' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_newmailnotifier_agent" crashed too often and will not be restarted! 
akonadi_agent_launcher: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_agent_launcher" crashed too often and will not be restarted! 
akonadi_sendlater_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_sendlater_agent' returned with exit code 1 (Unknown error)
akonadi_imap_resource: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_imap_resource' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_imap_resource" crashed too often and will not be restarted! 
akonadi_baloo_indexer: cannot connect to X server :0.0
akonadi_imap_resource: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_baloo_indexer' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_baloo_indexer" crashed too often and will not be restarted! 
ProcessControl: Application '/usr/bin/akonadi_imap_resource' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_imap_resource" crashed too often and will not be restarted! 
akonadi_mailfilter_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_mailfilter_agent' returned with exit code 1 (Unknown error)
akonadi_archivemail_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_archivemail_agent' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_archivemail_agent" crashed too often and will not be restarted! 
akonadi_sendlater_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_sendlater_agent' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_sendlater_agent" crashed too often and will not be restarted! 
akonadi_mailfilter_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_mailfilter_agent' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_mailfilter_agent" crashed too often and will not be restarted! 

=2D-nextPart7715274.63h3xliQGL--
This is a multi-part message in MIME format.

[-- Attachment #1.2: Type: text/plain, Size: 2579 bytes --]

I run enlightenment DE with a few KDE apps, including KDEPIM and with the 
arrival of Plasma5 I have migrated most of my systems to this set up.

On my laptop I run a stand-alone postgresql for KDEPIM's akonadi, instead of 
mysql.  Everything was working fine, until a week ago.  Shutdown now takes a 
while with akonadi apparently trying to restart, before it eventually gives 
up.  This can take up to 90 seconds.  The delay goes away if I close Kmail and 
run 'akonadictl stop' in a terminal, before I shutdown from the GUI, but not 
if I just add it in my .xsession.  Perhaps my syntax is wrong, or there may be 
a better way to achieve the same.  The contents of my .xsession are:

===================================
#!/bin/sh
if [ -x /usr/bin/gpg-agent ]; then
        kill $(ps ux | awk '/gpg-agent/ && !/awk/ {print $2}') >/dev/null 2>&1
fi

if [ -x /usr/bin/gpg-agent ]; then
  eval "$(/usr/bin/gpg-agent --daemon)"
fi 

# Uncomment the following lines to start rxvt-unicode which has the ability to
# run multiple terminals in one single process, thus starting up faster and 
# saving resources.
# The --opendisplay ensures that the daemon quits when the X server 
terminates,
# therefore we don't need matching lines in agent-shutdown.sh.

if [ -x /usr/bin/urxvtd ]; then
        /usr/bin/urxvtd --opendisplay --fork --quiet
fi

#exec ck-launch-session /usr/bin/enlightenment_start
exec /usr/bin/enlightenment_start
/usr/bin/akonadictl stop
wait 4
========================

The above causes a number of recurring entries in .xsession-errors as per the 
attached log file.  Some of the errors look like this:

rocessControl: Application '/usr/bin/akonadi_maildispatcher_agent' returned 
with exit code 1 (Unknown error)
akonadi_agent_launcher: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with 
exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_migration_agent' returned with 
exit code 1 (Unknown error)
akonadi_agent_launcher: cannot connect to X server :0.0
akonadi_newmailnotifier_agent: cannot connect to X server :0.0

*after* akonadi has already reported:

Application 'akonadiserver' exited normally...


So if it has exited normally, why are all these processes left hanging and 
keeping postgresql mulling it over for 90 seconds or so, before it eventually 
gives up?  If I press Ctrl+Alt+Backspace while sitting there waiting on a 
black VT7 the shutdown process picks up without further delay.

Is there something I need to correct in my .xsession syntax?

-- 
Regards,
Mick

[-- Attachment #1.3: xsession_errors.log --]
[-- Type: text/x-log, Size: 16886 bytes --]

_e_sys_comp_emit_cb_wait - [7] e,state,sys,reboot e,state,sys,reboot,done
action reboot 2
urxvt: X connection to ':0' broken, unable to recover, exiting.
kdeinit4: Fatal IO error: client killed
kded4: Fatal IO error: client killed
knotify4: Fatal IO error: client killed
kwalletd: Fatal IO error: client killed
akonadi_agent_launcher: Fatal IO error: client killed
akonadi_agent_launcher: Fatal IO error: client killed
akonadi_agent_launcher: Fatal IO error: client killed
akonadi_followupreminder_agent: Fatal IO error: client killed
Control process died, committing suicide!
terminating service threads 
akonadi_maildispatcher_agent: Fatal IO error: client killed
akonadi_sendlater_agent: Fatal IO error: client killed
The X11 connection broke (error 1). Did the X11 server die?
kdeinit5: Fatal IO error: client killed
klauncher: Exiting on signal 15
akonadi_archivemail_agent: Fatal IO error: client killed
Checking for pam module
Lacking a socket, pipe: 0, env:0
akonadi_mailfilter_agent: Fatal IO error: client killed
klauncher: Exiting on signal 15
kdeinit4: Fatal IO error: client killed
akonadi_migration_agent: Fatal IO error: client killed
akonadi_imap_resource: Fatal IO error: client killed
akonadi_agent_launcher: Fatal IO error: client killed
akonadi_baloo_indexer: Fatal IO error: client killed
akonadi_newmailnotifier_agent: Fatal IO error: client killed
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_sendlater_agent' returned with exit code 1 (Unknown error)
akonadi_imap_resource: Fatal IO error: client killed
The X11 connection broke (error 1). Did the X11 server die?
QThread: Destroyed while thread is still running
Closing SQL connection:  "kactivities_db_resources_140418780239744_readwrite"
akonadi_agent_launcher: Fatal IO error: client killed
E - PID=29674, valgrind=0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
terminating connection threads 
ProcessControl: Application '/usr/bin/akonadi_archivemail_agent' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_followupreminder_agent' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_imap_resource' returned with exit code 1 (Unknown error)
Unable to free statement: FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

Unable to free statement: FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

ProcessControl: Application '/usr/bin/akonadi_maildispatcher_agent' returned with exit code 1 (Unknown error)
Unable to free statement: FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

Unable to free statement: FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

Unable to free statement: no connection to the server

Unable to free statement: no connection to the server

Unable to free statement: no connection to the server

Unable to free statement: no connection to the server

ProcessControl: Application '/usr/bin/akonadi_migration_agent' returned with exit code 1 (Unknown error)
Unable to free statement: FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

stopping db process 
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
Application 'akonadiserver' exited normally...
ProcessControl: Application '/usr/bin/akonadi_baloo_indexer' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_newmailnotifier_agent' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_mailfilter_agent' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_imap_resource' returned with exit code 1 (Unknown error)
STORAGE+=/org/freedesktop/UDisks2/drives/TSSTcorp_DVD_2b_2f_RW_TS_T633C_R5516GOSC05707
++STO:
  udi: /org/freedesktop/UDisks2/drives/TSSTcorp_DVD_2b_2f_RW_TS_T633C_R5516GOSC05707
  bus: 
  drive_type: optical_cd
  model: TSSTcorp DVD+/-RW TS-T633C
  vendor: (null)
  serial: R5516GOSC05707
  icon.drive: (null)
  icon.volume: (null)

VOL+ /org/freedesktop/UDisks2/block_devices/sda1
VOL+ /org/freedesktop/UDisks2/block_devices/sda2
VOL+ /org/freedesktop/UDisks2/block_devices/sda10
VOL+ /org/freedesktop/UDisks2/block_devices/sda11
VOL+ /org/freedesktop/UDisks2/block_devices/sda3
VOL+ /org/freedesktop/UDisks2/block_devices/sda6
VOL+ /org/freedesktop/UDisks2/block_devices/sda8
VOL+ /org/freedesktop/UDisks2/block_devices/sda7
VOL+ /org/freedesktop/UDisks2/block_devices/sda9
STORAGE+=/org/freedesktop/UDisks2/drives/ST9500420ASG_5VJ377P2
++STO:
  udi: /org/freedesktop/UDisks2/drives/ST9500420ASG_5VJ377P2
  bus: 
  drive_type: (null)
  model: ST9500420ASG
  vendor: (null)
  serial: 5VJ377P2
  icon.drive: (null)
  icon.volume: (null)

removing likely internal storage /org/freedesktop/UDisks2/drives/ST9500420ASG_5VJ377P2
STORAGE+=/org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
++STO:
  udi: /org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
  bus: usb
  drive_type: (null)
  model: 0302
  vendor: Verbatim
  serial: 12082425004469
  icon.drive: (null)
  icon.volume: (null)

++STO:
  udi: /org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
  bus: usb
  drive_type: (null)
  model: 0302
  vendor: Verbatim
  serial: 12082425004469
  icon.drive: (null)
  icon.volume: (null)

VOL+ /org/freedesktop/UDisks2/block_devices/sdb1
DB DEV-: /org/freedesktop/UDisks2/jobs/0
DB DEV-: /org/freedesktop/UDisks2/jobs/1
DB DEV-: /org/freedesktop/UDisks2/jobs/2
DB DEV-: /org/freedesktop/UDisks2/block_devices/sdb1
--VOL /dev/sdb1
DB DEV-: /org/freedesktop/UDisks2/block_devices/sdb
++STO:
  udi: /org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
  bus: usb
  drive_type: (null)
  model: 0302
  vendor: Verbatim
  serial: 12082425004469
  icon.drive: (null)
  icon.volume: (null)

DB DEV-: /org/freedesktop/UDisks2/block_devices/sdb
DB DEV-: /org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
--STO /org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
STORAGE+=/org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
++STO:
  udi: /org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
  bus: usb
  drive_type: (null)
  model: 0302
  vendor: Verbatim
  serial: 12082425004469
  icon.drive: (null)
  icon.volume: (null)

++STO:
  udi: /org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
  bus: usb
  drive_type: (null)
  model: 0302
  vendor: Verbatim
  serial: 12082425004469
  icon.drive: (null)
  icon.volume: (null)

VOL+ /org/freedesktop/UDisks2/block_devices/sdb1
DB DEV-: /org/freedesktop/UDisks2/jobs/3
DB DEV-: /org/freedesktop/UDisks2/jobs/4
DB DEV-: /org/freedesktop/UDisks2/jobs/5
DB DEV-: /org/freedesktop/UDisks2/jobs/6
DB DEV-: /org/freedesktop/UDisks2/block_devices/sdb1
--VOL /dev/sdb1
DB DEV-: /org/freedesktop/UDisks2/block_devices/sdb
++STO:
  udi: /org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
  bus: usb
  drive_type: (null)
  model: 0302
  vendor: Verbatim
  serial: 12082425004469
  icon.drive: (null)
  icon.volume: (null)

DB DEV-: /org/freedesktop/UDisks2/block_devices/sdb
DB DEV-: /org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
--STO /org/freedesktop/UDisks2/drives/Verbatim_0302_12082425004469
akonadi_agent_launcher: cannot connect to X server :0.0
akonadi_agent_launcher: cannot connect to X server :0.0
akonadi_migration_agent: cannot connect to X server :0.0
akonadi_maildispatcher_agent: cannot connect to X server :0.0
akonadi_agent_launcher: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
akonadi_followupreminder_agent: cannot connect to X server :0.0
akonadi_agent_launcher: cannot connect to X server :0.0
akonadi_agent_launcher: cannot connect to X server :0.0
akonadi_imap_resource: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_followupreminder_agent' returned with exit code 1 (Unknown error)
akonadi_baloo_indexer: cannot connect to X server :0.0
akonadi_sendlater_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_maildispatcher_agent' returned with exit code 1 (Unknown error)
akonadi_archivemail_agent: cannot connect to X server :0.0
akonadi_imap_resource: cannot connect to X server :0.0
akonadi_agent_launcher: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_imap_resource' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
akonadi_newmailnotifier_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_archivemail_agent' returned with exit code 1 (Unknown error)
akonadi_agent_launcher: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_migration_agent' returned with exit code 1 (Unknown error)
akonadi_agent_launcher: cannot connect to X server :0.0
akonadi_agent_launcher: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_newmailnotifier_agent' returned with exit code 1 (Unknown error)
akonadi_followupreminder_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_followupreminder_agent' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
akonadi_maildispatcher_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
akonadi_mailfilter_agent: cannot connect to X server :0.0
akonadi_agent_launcher: cannot connect to X server :0.0
akonadi_agent_launcher: cannot connect to X server :0.0
akonadi_imap_resource: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_sendlater_agent' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_baloo_indexer' returned with exit code 1 (Unknown error)
akonadi_migration_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_maildispatcher_agent' returned with exit code 1 (Unknown error)
akonadi_agent_launcher: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_migration_agent' returned with exit code 1 (Unknown error)
akonadi_agent_launcher: cannot connect to X server :0.0
akonadi_newmailnotifier_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_agent_launcher" crashed too often and will not be restarted! 
akonadi_followupreminder_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_agent_launcher" crashed too often and will not be restarted! 
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_agent_launcher" crashed too often and will not be restarted! 
ProcessControl: Application '/usr/bin/akonadi_imap_resource' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_newmailnotifier_agent' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_followupreminder_agent' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_followupreminder_agent" crashed too often and will not be restarted! 
ProcessControl: Application '/usr/bin/akonadi_mailfilter_agent' returned with exit code 1 (Unknown error)
akonadi_agent_launcher: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
akonadi_baloo_indexer: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_imap_resource' returned with exit code 1 (Unknown error)
akonadi_maildispatcher_agent: cannot connect to X server :0.0
akonadi_migration_agent: cannot connect to X server :0.0
akonadi_archivemail_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_baloo_indexer' returned with exit code 1 (Unknown error)
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_agent_launcher" crashed too often and will not be restarted! 
ProcessControl: Application '/usr/bin/akonadi_maildispatcher_agent' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_maildispatcher_agent" crashed too often and will not be restarted! 
ProcessControl: Application '/usr/bin/akonadi_migration_agent' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_migration_agent" crashed too often and will not be restarted! 
ProcessControl: Application '/usr/bin/akonadi_archivemail_agent' returned with exit code 1 (Unknown error)
akonadi_imap_resource: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_imap_resource' returned with exit code 1 (Unknown error)
akonadi_newmailnotifier_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_newmailnotifier_agent' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_newmailnotifier_agent" crashed too often and will not be restarted! 
akonadi_agent_launcher: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_agent_launcher" crashed too often and will not be restarted! 
akonadi_sendlater_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_sendlater_agent' returned with exit code 1 (Unknown error)
akonadi_imap_resource: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_imap_resource' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_imap_resource" crashed too often and will not be restarted! 
akonadi_baloo_indexer: cannot connect to X server :0.0
akonadi_imap_resource: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_baloo_indexer' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_baloo_indexer" crashed too often and will not be restarted! 
ProcessControl: Application '/usr/bin/akonadi_imap_resource' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_imap_resource" crashed too often and will not be restarted! 
akonadi_mailfilter_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_mailfilter_agent' returned with exit code 1 (Unknown error)
akonadi_archivemail_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_archivemail_agent' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_archivemail_agent" crashed too often and will not be restarted! 
akonadi_sendlater_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_sendlater_agent' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_sendlater_agent" crashed too often and will not be restarted! 
akonadi_mailfilter_agent: cannot connect to X server :0.0
ProcessControl: Application '/usr/bin/akonadi_mailfilter_agent' returned with exit code 1 (Unknown error)
"/usr/bin/akonadi_mailfilter_agent" crashed too often and will not be restarted! 

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] Recommended way to shut down akonadi
  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
  0 siblings, 1 reply; 11+ messages in thread
From: J. Roeleveld @ 2016-06-06  3:25 UTC (permalink / raw
  To: gentoo-user

On June 6, 2016 12:13:16 AM GMT+02:00, Mick <michaelkintzios@gmail.com> wrote:
>I run enlightenment DE with a few KDE apps, including KDEPIM and with
>the 
>arrival of Plasma5 I have migrated most of my systems to this set up.
>
>On my laptop I run a stand-alone postgresql for KDEPIM's akonadi,
>instead of 
>mysql.  Everything was working fine, until a week ago.  Shutdown now
>takes a 
>while with akonadi apparently trying to restart, before it eventually
>gives 
>up.  This can take up to 90 seconds.  The delay goes away if I close
>Kmail and 
>run 'akonadictl stop' in a terminal, before I shutdown from the GUI,
>but not 
>if I just add it in my .xsession.  Perhaps my syntax is wrong, or there
>may be 
>a better way to achieve the same.  The contents of my .xsession are:
>
>===================================
>#!/bin/sh
>if [ -x /usr/bin/gpg-agent ]; then
> kill $(ps ux | awk '/gpg-agent/ && !/awk/ {print $2}') >/dev/null 2>&1
>fi
>
>if [ -x /usr/bin/gpg-agent ]; then
>  eval "$(/usr/bin/gpg-agent --daemon)"
>fi 
>
># Uncomment the following lines to start rxvt-unicode which has the
>ability to
># run multiple terminals in one single process, thus starting up faster
>and 
># saving resources.
># The --opendisplay ensures that the daemon quits when the X server 
>terminates,
># therefore we don't need matching lines in agent-shutdown.sh.
>
>if [ -x /usr/bin/urxvtd ]; then
>        /usr/bin/urxvtd --opendisplay --fork --quiet
>fi
>
>#exec ck-launch-session /usr/bin/enlightenment_start
>exec /usr/bin/enlightenment_start
>/usr/bin/akonadictl stop
>wait 4
>========================
>
>The above causes a number of recurring entries in .xsession-errors as
>per the 
>attached log file.  Some of the errors look like this:
>
>rocessControl: Application '/usr/bin/akonadi_maildispatcher_agent'
>returned 
>with exit code 1 (Unknown error)
>akonadi_agent_launcher: cannot connect to X server :0.0
>ProcessControl: Application '/usr/bin/akonadi_agent_launcher' returned
>with 
>exit code 1 (Unknown error)
>ProcessControl: Application '/usr/bin/akonadi_migration_agent' returned
>with 
>exit code 1 (Unknown error)
>akonadi_agent_launcher: cannot connect to X server :0.0
>akonadi_newmailnotifier_agent: cannot connect to X server :0.0
>
>*after* akonadi has already reported:
>
>Application 'akonadiserver' exited normally...
>
>
>So if it has exited normally, why are all these processes left hanging
>and 
>keeping postgresql mulling it over for 90 seconds or so, before it
>eventually 
>gives up?  If I press Ctrl+Alt+Backspace while sitting there waiting on
>a 
>black VT7 the shutdown process picks up without further delay.
>
>Is there something I need to correct in my .xsession syntax?

Running KDE, I don't see this behaviour.

I think you want to kill the 'kde session' that is started by the kde application(s) during the shutdown process. I'm not certain which process to look for, I'll have a look later when I'm with my desktop.

Alternatively, kill all programs actually using akonadi. Like kmail and all the systray apps from the kdepim set.

--
Joost
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] Recommended way to shut down akonadi
  2016-06-06  3:25 ` J. Roeleveld
@ 2016-06-06 18:22   ` Mick
  2016-06-07  8:13     ` J. Roeleveld
  0 siblings, 1 reply; 11+ messages in thread
From: Mick @ 2016-06-06 18:22 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 4906 bytes --]

On Monday 06 Jun 2016 03:25:42 J. Roeleveld wrote:
> On June 6, 2016 12:13:16 AM GMT+02:00, Mick <michaelkintzios@gmail.com> 
wrote:
> >I run enlightenment DE with a few KDE apps, including KDEPIM and with
> >the
> >arrival of Plasma5 I have migrated most of my systems to this set up.
> >
> >On my laptop I run a stand-alone postgresql for KDEPIM's akonadi,
> >instead of
> >mysql.  Everything was working fine, until a week ago.  Shutdown now
> >takes a
> >while with akonadi apparently trying to restart, before it eventually
> >gives
> >up.  This can take up to 90 seconds.  The delay goes away if I close
> >Kmail and
> >run 'akonadictl stop' in a terminal, before I shutdown from the GUI,
> >but not
> >if I just add it in my .xsession.  Perhaps my syntax is wrong, or there
> >may be
> >a better way to achieve the same.  The contents of my .xsession are:
> >
> >===================================
> >#!/bin/sh
> >if [ -x /usr/bin/gpg-agent ]; then
> >
> > kill $(ps ux | awk '/gpg-agent/ && !/awk/ {print $2}') >/dev/null 2>&1
> >
> >fi
> >
> >if [ -x /usr/bin/gpg-agent ]; then
> >
> >  eval "$(/usr/bin/gpg-agent --daemon)"
> >
> >fi
> >
> ># Uncomment the following lines to start rxvt-unicode which has the
> >ability to
> ># run multiple terminals in one single process, thus starting up faster
> >and
> ># saving resources.
> ># The --opendisplay ensures that the daemon quits when the X server
> >terminates,
> ># therefore we don't need matching lines in agent-shutdown.sh.
> >
> >if [ -x /usr/bin/urxvtd ]; then
> >
> >        /usr/bin/urxvtd --opendisplay --fork --quiet
> >
> >fi
> >
> >#exec ck-launch-session /usr/bin/enlightenment_start
> >exec /usr/bin/enlightenment_start
> >/usr/bin/akonadictl stop
> >wait 4
> >========================
[snip ...]

> >Is there something I need to correct in my .xsession syntax?
> 
> Running KDE, I don't see this behaviour.

Well I didn't see this behaviour on this box with the above .xsession file up 
until a week ago.  I expect that when KDE shuts down it takes care of all its 
'children' and none are left behind running amok.  ;-)


> I think you want to kill the 'kde session' that is started by the kde
> application(s) during the shutdown process. I'm not certain which process
> to look for, I'll have a look later when I'm with my desktop.
> 
> Alternatively, kill all programs actually using akonadi. Like kmail and all
> the systray apps from the kdepim set.

I do not have KDEPIM systray enabled and I shutdown Kmail before I shutdown 
the PC.

These are the relevant processes I see:

29961 ?        SNl    0:09 kmail -caption KMail
29968 ?        SNl    0:00 /usr/bin/akonadi_control
29970 ?        SNl    0:08  \_ akonadiserver
29998 ?        SNl    0:00  \_ /usr/bin/akonadi_agent_launcher 
akonadi_akonotes_resource akonadi_akonotes_resource_0
29999 ?        SN     0:00  \_ /usr/bin/akonadi_archivemail_agent --identifier 
akonadi_archivemail_agent
30000 ?        SN     0:02  \_ /usr/bin/akonadi_baloo_indexer --identifier 
akonadi_baloo_indexer
30001 ?        SNl    0:00  \_ /usr/bin/akonadi_agent_launcher 
akonadi_contacts_resource akonadi_contacts_resource_1
30002 ?        SN     0:00  \_ /usr/bin/akonadi_followupreminder_agent --
identifier akonadi_followupreminder_agent
30007 ?        SNl    0:00  \_ /usr/bin/akonadi_imap_resource --identifier 
akonadi_imap_resource_0
30008 ?        SNl    0:02  \_ /usr/bin/akonadi_imap_resource --identifier 
akonadi_imap_resource_1
30009 ?        SNl    0:00  \_ /usr/bin/akonadi_agent_launcher 
akonadi_maildir_resource akonadi_maildir_resource_0
30010 ?        SN     0:00  \_ /usr/bin/akonadi_maildispatcher_agent --
identifier akonadi_maildispatcher_agent
30013 ?        SN     0:00  \_ /usr/bin/akonadi_mailfilter_agent --identifier 
akonadi_mailfilter_agent
30014 ?        SN     0:00  \_ /usr/bin/akonadi_migration_agent --identifier 
akonadi_migration_agent
30015 ?        SN     0:00  \_ /usr/bin/akonadi_newmailnotifier_agent --
identifier akonadi_newmailnotifier_agent
30016 ?        SN     0:00  \_ /usr/bin/akonadi_sendlater_agent --identifier 
akonadi_sendlater_agent
30023 ?        SNl    0:00  \_ /usr/bin/akonadi_agent_launcher 
akonadi_vcard_resource akonadi_vcard_resource_1
30024 ?        SNl    0:00  \_ /usr/bin/akonadi_agent_launcher 
akonadi_vcard_resource akonadi_vcard_resource_2
29974 ?        SNs    0:00 kdeinit4: kdeinit4 Runnin e
29976 ?        SN     0:00  \_ kdeinit4: klauncher [kdei e
29979 ?        SN     0:00 kdeinit4: kded4 [kdeinit]
29997 ?        SNL    0:00 kdeinit4: kwalletd [kdein e
30101 ?        SNl    0:00 /usr/bin/knotify4

after I login and start Kmail.

I did try 'killall kdeinit4' but from what I recall it made no difference.  
Happy to try any suggestions/syntax you may have.

-- 
Regards,
Mick

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] Recommended way to shut down akonadi
  2016-06-06 18:22   ` Mick
@ 2016-06-07  8:13     ` J. Roeleveld
  2016-06-10 16:05       ` Mick
  0 siblings, 1 reply; 11+ messages in thread
From: J. Roeleveld @ 2016-06-07  8:13 UTC (permalink / raw
  To: gentoo-user


[-- Attachment #1.1: Type: text/plain, Size: 31455 bytes --]

=2D-nextPart1980400.XjxXDDqcG6
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"

On Monday, June 06, 2016 07:22:09 PM Mick wrote:
> On Monday 06 Jun 2016 03:25:42 J. Roeleveld wrote:
> > On June 6, 2016 12:13:16 AM GMT+02:00, Mick <michaelkintzios@gmail.com>
> 
> wrote:
> > >I run enlightenment DE with a few KDE apps, including KDEPIM and with
> > >the
> > >arrival of Plasma5 I have migrated most of my systems to this set up.
> > >
> > >On my laptop I run a stand-alone postgresql for KDEPIM's akonadi,
> > >instead of
> > >mysql.  Everything was working fine, until a week ago.  Shutdown now
> > >takes a
> > >while with akonadi apparently trying to restart, before it eventually
> > >gives
> > >up.  This can take up to 90 seconds.  The delay goes away if I close
> > >Kmail and
> > >run 'akonadictl stop' in a terminal, before I shutdown from the GUI,
> > >but not
> > >if I just add it in my .xsession.  Perhaps my syntax is wrong, or there
> > >may be
> > >a better way to achieve the same.  The contents of my .xsession are:
> > >
> > >===================================
> > >#!/bin/sh
> > >if [ -x /usr/bin/gpg-agent ]; then
> > >
> > > kill $(ps ux | awk '/gpg-agent/ && !/awk/ {print $2}') >/dev/null 2>&1
> > >
> > >fi
> > >
> > >if [ -x /usr/bin/gpg-agent ]; then
> > >
> > >  eval "$(/usr/bin/gpg-agent --daemon)"
> > >
> > >fi
> > >
> > ># Uncomment the following lines to start rxvt-unicode which has the
> > >ability to
> > ># run multiple terminals in one single process, thus starting up faster
> > >and
> > ># saving resources.
> > ># The --opendisplay ensures that the daemon quits when the X server
> > >terminates,
> > ># therefore we don't need matching lines in agent-shutdown.sh.
> > >
> > >if [ -x /usr/bin/urxvtd ]; then
> > >
> > >        /usr/bin/urxvtd --opendisplay --fork --quiet
> > >
> > >fi
> > >
> > >#exec ck-launch-session /usr/bin/enlightenment_start
> > >exec /usr/bin/enlightenment_start
> > >/usr/bin/akonadictl stop
> > >wait 4
> > >========================
> 
> [snip ...]
> 
> > >Is there something I need to correct in my .xsession syntax?
> > 
> > Running KDE, I don't see this behaviour.
> 
> Well I didn't see this behaviour on this box with the above .xsession file
> up until a week ago.  I expect that when KDE shuts down it takes care of
> all its 'children' and none are left behind running amok.  ;-)
> 
> > I think you want to kill the 'kde session' that is started by the kde
> > application(s) during the shutdown process. I'm not certain which process
> > to look for, I'll have a look later when I'm with my desktop.
> > 
> > Alternatively, kill all programs actually using akonadi. Like kmail and
> > all
> > the systray apps from the kdepim set.
> 
> I do not have KDEPIM systray enabled and I shutdown Kmail before I shutdown
> the PC.
> 
> These are the relevant processes I see:
> 
> 29961 ?        SNl    0:09 kmail -caption KMail
> 29968 ?        SNl    0:00 /usr/bin/akonadi_control
> 29970 ?        SNl    0:08  \_ akonadiserver
> 29998 ?        SNl    0:00  \_ /usr/bin/akonadi_agent_launcher
> akonadi_akonotes_resource akonadi_akonotes_resource_0
> 29999 ?        SN     0:00  \_ /usr/bin/akonadi_archivemail_agent
> --identifier akonadi_archivemail_agent
> 30000 ?        SN     0:02  \_ /usr/bin/akonadi_baloo_indexer --identifier
> akonadi_baloo_indexer
> 30001 ?        SNl    0:00  \_ /usr/bin/akonadi_agent_launcher
> akonadi_contacts_resource akonadi_contacts_resource_1
> 30002 ?        SN     0:00  \_ /usr/bin/akonadi_followupreminder_agent --
> identifier akonadi_followupreminder_agent
> 30007 ?        SNl    0:00  \_ /usr/bin/akonadi_imap_resource --identifier
> akonadi_imap_resource_0
> 30008 ?        SNl    0:02  \_ /usr/bin/akonadi_imap_resource --identifier
> akonadi_imap_resource_1
> 30009 ?        SNl    0:00  \_ /usr/bin/akonadi_agent_launcher
> akonadi_maildir_resource akonadi_maildir_resource_0
> 30010 ?        SN     0:00  \_ /usr/bin/akonadi_maildispatcher_agent --
> identifier akonadi_maildispatcher_agent
> 30013 ?        SN     0:00  \_ /usr/bin/akonadi_mailfilter_agent
> --identifier akonadi_mailfilter_agent
> 30014 ?        SN     0:00  \_ /usr/bin/akonadi_migration_agent --identifier
> akonadi_migration_agent
> 30015 ?        SN     0:00  \_ /usr/bin/akonadi_newmailnotifier_agent --
> identifier akonadi_newmailnotifier_agent
> 30016 ?        SN     0:00  \_ /usr/bin/akonadi_sendlater_agent --identifier
> akonadi_sendlater_agent
> 30023 ?        SNl    0:00  \_ /usr/bin/akonadi_agent_launcher
> akonadi_vcard_resource akonadi_vcard_resource_1
=2D-nextPart1980400.XjxXDDqcG6
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 Monday, June 06, 2016 07:22:09 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;">&gt; On Monday 06 Jun 2016 03:25:42 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;">&gt; &gt; On June 6, 2016 12:13:16 AM GMT+02:00, Mick &lt;michaelkintzios@gmail.com&gt;</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;">&gt; </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;">&gt; 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;">&gt; &gt; &gt;I run enlightenment DE with a few KDE apps, including KDEPIM and with</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;">&gt; &gt; &gt;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;">&gt; &gt; &gt;arrival of Plasma5 I have migrated most of my systems to this set up.</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;">&gt; &gt; &gt;</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;">&gt; &gt; &gt;On my laptop I run a stand-alone postgresql for KDEPIM's akonadi,</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;">&gt; &gt; &gt;instead 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;">&gt; &gt; &gt;mysql.  Everything was working fine, until a week ago.  Shutdown 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;">&gt; &gt; &gt;takes a</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;">&gt; &gt; &gt;while with akonadi apparently trying to restart, before it eventually</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;">&gt; &gt; &gt;gives</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;">&gt; &gt; &gt;up.  This can take up to 90 seconds.  The delay goes away if I close</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;">&gt; &gt; &gt;Kmail and</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;">&gt; &gt; &gt;run 'akonadictl stop' in a terminal, before I shutdown from the GUI,</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;">&gt; &gt; &gt;but not</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;">&gt; &gt; &gt;if I just add it in my .xsession.  Perhaps my syntax is wrong, or there</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;">&gt; &gt; &gt;may be</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;">&gt; &gt; &gt;a better way to achieve the same.  The contents of my .xsession are:</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;">&gt; &gt; &gt;</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;">&gt; &gt; &gt;===================================</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;">&gt; &gt; &gt;#!/bin/sh</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;">&gt; &gt; &gt;if [ -x /usr/bin/gpg-agent ]; then</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;">&gt; &gt; &gt;</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;">&gt; &gt; &gt; kill $(ps ux | awk '/gpg-agent/ &amp;&amp; !/awk/ {print $2}') &gt;/dev/null 2&gt;&amp;1</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;">&gt; &gt; &gt;</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;">&gt; &gt; &gt;fi</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;">&gt; &gt; &gt;</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;">&gt; &gt; &gt;if [ -x /usr/bin/gpg-agent ]; then</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;">&gt; &gt; &gt;</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;">&gt; &gt; &gt;  eval &quot;$(/usr/bin/gpg-agent --daemon)&quot;</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;">&gt; &gt; &gt;</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;">&gt; &gt; &gt;fi</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;">&gt; &gt; &gt;</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;">&gt; &gt; &gt;# Uncomment the following lines to start rxvt-unicode which has 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;">&gt; &gt; &gt;ability 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;">&gt; &gt; &gt;# run multiple terminals in one single process, thus starting up faster</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;">&gt; &gt; &gt;and</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;">&gt; &gt; &gt;# saving resources.</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;">&gt; &gt; &gt;# The --opendisplay ensures that the daemon quits when the X server</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;">&gt; &gt; &gt;terminates,</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;">&gt; &gt; &gt;# therefore we don't need matching lines in agent-shutdown.sh.</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;">&gt; &gt; &gt;</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;">&gt; &gt; &gt;if [ -x /usr/bin/urxvtd ]; then</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;">&gt; &gt; &gt;</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;">&gt; &gt; &gt;        /usr/bin/urxvtd --opendisplay --fork --quiet</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;">&gt; &gt; &gt;</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;">&gt; &gt; &gt;fi</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;">&gt; &gt; &gt;</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;">&gt; &gt; &gt;#exec ck-launch-session /usr/bin/enlightenment_start</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;">&gt; &gt; &gt;exec /usr/bin/enlightenment_start</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;">&gt; &gt; &gt;/usr/bin/akonadictl stop</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;">&gt; &gt; &gt;wait 4</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;">&gt; &gt; &gt;========================</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;">&gt; </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;">&gt; [snip ...]</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;">&gt; </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;">&gt; &gt; &gt;Is there something I need to correct in my .xsession syntax?</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;">&gt; &gt; </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;">&gt; &gt; Running KDE, I don't see this behaviour.</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;">&gt; </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;">&gt; Well I didn't see this behaviour on this box with the above .xsession file</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;">&gt; up until a week ago.  I expect that when KDE shuts down it takes care 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;">&gt; all its 'children' and none are left behind running amok.  ;-)</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;">&gt; </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;">&gt; &gt; I think you want to kill the 'kde session' that is started by the kde</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;">&gt; &gt; application(s) during the shutdown process. I'm not certain which process</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;">&gt; &gt; to look for, I'll have a look later when I'm with my 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;">&gt; &gt; </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;">&gt; &gt; Alternatively, kill all programs actually using akonadi. Like kmail and</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;">&gt; &gt; all</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;">&gt; &gt; the systray apps from the kdepim set.</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;">&gt; </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;">&gt; I do not have KDEPIM systray enabled and I shutdown Kmail before I 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;">&gt; the PC.</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;">&gt; </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;">&gt; These are the relevant processes I see:</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;">&gt; </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;">&gt; 29961 ?        SNl    0:09 kmail -caption KMail</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;">&gt; 29968 ?        SNl    0:00 /usr/bin/akonadi_control</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;">&gt; 29970 ?        SNl    0:08  \_ akonadiserver</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;">&gt; 29998 ?        SNl    0:00  \_ /usr/bin/akonadi_agent_launcher</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;">&gt; akonadi_akonotes_resource akonadi_akonotes_resource_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;">&gt; 29999 ?        SN     0:00  \_ /usr/bin/akonadi_archivemail_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;">&gt; --identifier akonadi_archivemail_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;">&gt; 30000 ?        SN     0:02  \_ /usr/bin/akonadi_baloo_indexer --identifier</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;">&gt; akonadi_baloo_indexer</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;">&gt; 30001 ?        SNl    0:00  \_ /usr/bin/akonadi_agent_launcher</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;">&gt; akonadi_contacts_resource akonadi_contacts_resource_1</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;">&gt; 30002 ?        SN     0:00  \_ /usr/bin/akonadi_followupreminder_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;">&gt; identifier akonadi_followupreminder_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;">&gt; 30007 ?        SNl    0:00  \_ /usr/bin/akonadi_imap_resource --identifier</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;">&gt; akonadi_imap_resource_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;">&gt; 30008 ?        SNl    0:02  \_ /usr/bin/akonadi_imap_resource --identifier</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;">&gt; akonadi_imap_resource_1</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;">&gt; 30009 ?        SNl    0:00  \_ /usr/bin/akonadi_agent_launcher</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;">&gt; akonadi_maildir_resource akonadi_maildir_resource_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;">&gt; 30010 ?        SN     0:00  \_ /usr/bin/akonadi_maildispatcher_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;">&gt; identifier akonadi_maildispatcher_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;">&gt; 30013 ?        SN     0:00  \_ /usr/bin/akonadi_mailfilter_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;">&gt; --identifier akonadi_mailfilter_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;">&gt; 30014 ?        SN     0:00  \_ /usr/bin/akonadi_migration_agent --identifier</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;">&gt; akonadi_migration_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;">&gt; 30015 ?        SN     0:00  \_ /usr/bin/akonadi_newmailnotifier_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;">&gt; identifier akonadi_newmailnotifier_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;">&gt; 30016 ?        SN     0:00  \_ /usr/bin/akonadi_sendlater_agent --identifier</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;">&gt; akonadi_sendlater_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;">&gt; 30023 ?        SNl    0:00  \_ /usr/bin/akonadi_agent_launcher</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;">&gt; akonadi_vcard_resource akonadi_vcard_resource_1</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;">&gt; 30024 ?        SNl    0:00  \_ /usr/bin/akonadi_agent_launcher</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;">&gt; akonadi_vcard_resource akonadi_vcard_resource_2</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;">&gt; 29974 ?        SNs    0:00 kdeinit4: kdeinit4 Runnin e</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;">&gt; 29976 ?        SN     0:00  \_ kdeinit4: klauncher [kdei e</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;">&gt; 29979 ?        SN     0:00 kdeinit4: kded4 [kdeinit]</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;">&gt; 29997 ?        SNL    0:00 kdeinit4: kwalletd [kdein e</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;">&gt; 30101 ?        SNl    0:00 /usr/bin/knotify4</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;">&gt; </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;">&gt; after I login and start Kmail.</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;">&gt; </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;">&gt; I did try 'killall kdeinit4' but from what I recall it made no difference.</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;">&gt; Happy to try any suggestions/syntax you may have.</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; ">&nbsp;</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;">Not able to test as I use KDE.</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;">But, you could try:</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;"># killall  akonadi_control</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;">or</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;"># akonadictl stop</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;">and then wait till akonadictl status shows it's actually stopped:</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; ">&nbsp;</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;">Akonadi Control: running </span><span style=" font-family:'monospace';"><br />Akonadi Server: running<br /><br />(stopped, instead of running, for those 2 lines.</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; ">&nbsp;</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';">or you could try:</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; ">&nbsp;</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';"># killall --user &lt;your-user-name&gt;</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; ">&nbsp;</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;">Kind regards,</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; ">&nbsp;</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;">Joost</p></body></html>
=2D-nextPart1980400.XjxXDDqcG6--
This is a multi-part message in MIME format.

[-- Attachment #1.2: Type: text/plain, Size: 4483 bytes --]

On Monday, June 06, 2016 07:22:09 PM Mick wrote:
> On Monday 06 Jun 2016 03:25:42 J. Roeleveld wrote:
> > On June 6, 2016 12:13:16 AM GMT+02:00, Mick <michaelkintzios@gmail.com>
> 
> wrote:
> > >I run enlightenment DE with a few KDE apps, including KDEPIM and with
> > >the
> > >arrival of Plasma5 I have migrated most of my systems to this set up.
> > >
> > >On my laptop I run a stand-alone postgresql for KDEPIM's akonadi,
> > >instead of
> > >mysql.  Everything was working fine, until a week ago.  Shutdown now
> > >takes a
> > >while with akonadi apparently trying to restart, before it eventually
> > >gives
> > >up.  This can take up to 90 seconds.  The delay goes away if I close
> > >Kmail and
> > >run 'akonadictl stop' in a terminal, before I shutdown from the GUI,
> > >but not
> > >if I just add it in my .xsession.  Perhaps my syntax is wrong, or there
> > >may be
> > >a better way to achieve the same.  The contents of my .xsession are:
> > >
> > >===================================
> > >#!/bin/sh
> > >if [ -x /usr/bin/gpg-agent ]; then
> > >
> > > kill $(ps ux | awk '/gpg-agent/ && !/awk/ {print $2}') >/dev/null 2>&1
> > >
> > >fi
> > >
> > >if [ -x /usr/bin/gpg-agent ]; then
> > >
> > >  eval "$(/usr/bin/gpg-agent --daemon)"
> > >
> > >fi
> > >
> > ># Uncomment the following lines to start rxvt-unicode which has the
> > >ability to
> > ># run multiple terminals in one single process, thus starting up faster
> > >and
> > ># saving resources.
> > ># The --opendisplay ensures that the daemon quits when the X server
> > >terminates,
> > ># therefore we don't need matching lines in agent-shutdown.sh.
> > >
> > >if [ -x /usr/bin/urxvtd ]; then
> > >
> > >        /usr/bin/urxvtd --opendisplay --fork --quiet
> > >
> > >fi
> > >
> > >#exec ck-launch-session /usr/bin/enlightenment_start
> > >exec /usr/bin/enlightenment_start
> > >/usr/bin/akonadictl stop
> > >wait 4
> > >========================
> 
> [snip ...]
> 
> > >Is there something I need to correct in my .xsession syntax?
> > 
> > Running KDE, I don't see this behaviour.
> 
> Well I didn't see this behaviour on this box with the above .xsession file
> up until a week ago.  I expect that when KDE shuts down it takes care of
> all its 'children' and none are left behind running amok.  ;-)
> 
> > I think you want to kill the 'kde session' that is started by the kde
> > application(s) during the shutdown process. I'm not certain which process
> > to look for, I'll have a look later when I'm with my desktop.
> > 
> > Alternatively, kill all programs actually using akonadi. Like kmail and
> > all
> > the systray apps from the kdepim set.
> 
> I do not have KDEPIM systray enabled and I shutdown Kmail before I shutdown
> the PC.
> 
> These are the relevant processes I see:
> 
> 29961 ?        SNl    0:09 kmail -caption KMail
> 29968 ?        SNl    0:00 /usr/bin/akonadi_control
> 29970 ?        SNl    0:08  \_ akonadiserver
> 29998 ?        SNl    0:00  \_ /usr/bin/akonadi_agent_launcher
> akonadi_akonotes_resource akonadi_akonotes_resource_0
> 29999 ?        SN     0:00  \_ /usr/bin/akonadi_archivemail_agent
> --identifier akonadi_archivemail_agent
> 30000 ?        SN     0:02  \_ /usr/bin/akonadi_baloo_indexer --identifier
> akonadi_baloo_indexer
> 30001 ?        SNl    0:00  \_ /usr/bin/akonadi_agent_launcher
> akonadi_contacts_resource akonadi_contacts_resource_1
> 30002 ?        SN     0:00  \_ /usr/bin/akonadi_followupreminder_agent --
> identifier akonadi_followupreminder_agent
> 30007 ?        SNl    0:00  \_ /usr/bin/akonadi_imap_resource --identifier
> akonadi_imap_resource_0
> 30008 ?        SNl    0:02  \_ /usr/bin/akonadi_imap_resource --identifier
> akonadi_imap_resource_1
> 30009 ?        SNl    0:00  \_ /usr/bin/akonadi_agent_launcher
> akonadi_maildir_resource akonadi_maildir_resource_0
> 30010 ?        SN     0:00  \_ /usr/bin/akonadi_maildispatcher_agent --
> identifier akonadi_maildispatcher_agent
> 30013 ?        SN     0:00  \_ /usr/bin/akonadi_mailfilter_agent
> --identifier akonadi_mailfilter_agent
> 30014 ?        SN     0:00  \_ /usr/bin/akonadi_migration_agent --identifier
> akonadi_migration_agent
> 30015 ?        SN     0:00  \_ /usr/bin/akonadi_newmailnotifier_agent --
> identifier akonadi_newmailnotifier_agent
> 30016 ?        SN     0:00  \_ /usr/bin/akonadi_sendlater_agent --identifier
> akonadi_sendlater_agent
> 30023 ?        SNl    0:00  \_ /usr/bin/akonadi_agent_launcher
> akonadi_vcard_resource akonadi_vcard_resource_1

[-- Attachment #1.3: Type: text/html, Size: 26675 bytes --]

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] Recommended way to shut down akonadi
  2016-06-07  8:13     ` J. Roeleveld
@ 2016-06-10 16:05       ` Mick
  2016-06-10 19:54         ` J. Roeleveld
  0 siblings, 1 reply; 11+ messages in thread
From: Mick @ 2016-06-10 16:05 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 3246 bytes --]

On Tuesday 07 Jun 2016 10:13:12 J. Roeleveld wrote:

> On Monday, June 06, 2016 07:22:09 PM Mick wrote:
> > I do not have KDEPIM systray enabled and I shutdown Kmail before I
> > shutdown
> > the PC.
> > 
> > These are the relevant processes I see:
> > 
> > 29961 ? SNl 0:09 kmail -caption KMail
> > 29968 ? SNl 0:00 /usr/bin/akonadi_control
> > 29970 ? SNl 0:08 \_ akonadiserver
> > 29998 ? SNl 0:00 \_ /usr/bin/akonadi_agent_launcher
> > akonadi_akonotes_resource akonadi_akonotes_resource_0
> > 29999 ? SN 0:00 \_ /usr/bin/akonadi_archivemail_agent
> > --identifier akonadi_archivemail_agent
> > 30000 ? SN 0:02 \_ /usr/bin/akonadi_baloo_indexer --identifier
> > akonadi_baloo_indexer
> > 30001 ? SNl 0:00 \_ /usr/bin/akonadi_agent_launcher
> > akonadi_contacts_resource akonadi_contacts_resource_1
> > 30002 ? SN 0:00 \_ /usr/bin/akonadi_followupreminder_agent --
> > identifier akonadi_followupreminder_agent
> > 30007 ? SNl 0:00 \_ /usr/bin/akonadi_imap_resource --identifier
> > akonadi_imap_resource_0
> > 30008 ? SNl 0:02 \_ /usr/bin/akonadi_imap_resource --identifier
> > akonadi_imap_resource_1
> > 30009 ? SNl 0:00 \_ /usr/bin/akonadi_agent_launcher
> > akonadi_maildir_resource akonadi_maildir_resource_0
> > 30010 ? SN 0:00 \_ /usr/bin/akonadi_maildispatcher_agent --
> > identifier akonadi_maildispatcher_agent
> > 30013 ? SN 0:00 \_ /usr/bin/akonadi_mailfilter_agent
> > --identifier akonadi_mailfilter_agent
> > 30014 ? SN 0:00 \_ /usr/bin/akonadi_migration_agent --identifier
> > akonadi_migration_agent
> > 30015 ? SN 0:00 \_ /usr/bin/akonadi_newmailnotifier_agent --
> > identifier akonadi_newmailnotifier_agent
> > 30016 ? SN 0:00 \_ /usr/bin/akonadi_sendlater_agent --identifier
> > akonadi_sendlater_agent
> > 30023 ? SNl 0:00 \_ /usr/bin/akonadi_agent_launcher
> > akonadi_vcard_resource akonadi_vcard_resource_1
> > 30024 ? SNl 0:00 \_ /usr/bin/akonadi_agent_launcher
> > akonadi_vcard_resource akonadi_vcard_resource_2
> > 29974 ? SNs 0:00 kdeinit4: kdeinit4 Runnin e
> > 29976 ? SN 0:00 \_ kdeinit4: klauncher [kdei e
> > 29979 ? SN 0:00 kdeinit4: kded4 [kdeinit]
> > 29997 ? SNL 0:00 kdeinit4: kwalletd [kdein e
> > 30101 ? SNl 0:00 /usr/bin/knotify4
> > 
> > after I login and start Kmail.
> > 
> > I did try 'killall kdeinit4' but from what I recall it made no difference.
> > Happy to try any suggestions/syntax you may have.
> 
> Not able to test as I use KDE.
> But, you could try:
> # killall akonadi_control
> or
> # akonadictl stop
> and then wait till akonadictl status shows it's actually stopped:
> 
> Akonadi Control: running
> 
> 
> or you could try:
> 
> # killall --user
> 
> Kind regards,
> 
> Joost

I've tried setting in .xsession:

/usr/bin/akonadictl stop
killall akonadi_control
killall kdeinit4
killall kded4

and various combinations thereof, all of which do not fix the problem.  I 
still have to wait for 90 sec on a black screen before X exits and shutdown 
begins.  :-(

If running first '/usr/bin/akonadictl stop' on a terminal allows X to exit, 
why the same incantation in .xsession does not.  :-/

Is there some other file I can add this command to run when I call for X to 
exit?
-- 
Regards,
Mick

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] Recommended way to shut down akonadi
  2016-06-10 16:05       ` Mick
@ 2016-06-10 19:54         ` J. Roeleveld
  2016-06-10 21:32           ` Mick
  0 siblings, 1 reply; 11+ messages in thread
From: J. Roeleveld @ 2016-06-10 19:54 UTC (permalink / raw
  To: gentoo-user

On June 10, 2016 6:05:56 PM GMT+02:00, Mick <michaelkintzios@gmail.com> wrote:
>On Tuesday 07 Jun 2016 10:13:12 J. Roeleveld wrote:
>
>> On Monday, June 06, 2016 07:22:09 PM Mick wrote:
>> > I do not have KDEPIM systray enabled and I shutdown Kmail before I
>> > shutdown
>> > the PC.
>> > 
>> > These are the relevant processes I see:
>> > 
>> > 29961 ? SNl 0:09 kmail -caption KMail
>> > 29968 ? SNl 0:00 /usr/bin/akonadi_control
>> > 29970 ? SNl 0:08 \_ akonadiserver
>> > 29998 ? SNl 0:00 \_ /usr/bin/akonadi_agent_launcher
>> > akonadi_akonotes_resource akonadi_akonotes_resource_0
>> > 29999 ? SN 0:00 \_ /usr/bin/akonadi_archivemail_agent
>> > --identifier akonadi_archivemail_agent
>> > 30000 ? SN 0:02 \_ /usr/bin/akonadi_baloo_indexer --identifier
>> > akonadi_baloo_indexer
>> > 30001 ? SNl 0:00 \_ /usr/bin/akonadi_agent_launcher
>> > akonadi_contacts_resource akonadi_contacts_resource_1
>> > 30002 ? SN 0:00 \_ /usr/bin/akonadi_followupreminder_agent --
>> > identifier akonadi_followupreminder_agent
>> > 30007 ? SNl 0:00 \_ /usr/bin/akonadi_imap_resource --identifier
>> > akonadi_imap_resource_0
>> > 30008 ? SNl 0:02 \_ /usr/bin/akonadi_imap_resource --identifier
>> > akonadi_imap_resource_1
>> > 30009 ? SNl 0:00 \_ /usr/bin/akonadi_agent_launcher
>> > akonadi_maildir_resource akonadi_maildir_resource_0
>> > 30010 ? SN 0:00 \_ /usr/bin/akonadi_maildispatcher_agent --
>> > identifier akonadi_maildispatcher_agent
>> > 30013 ? SN 0:00 \_ /usr/bin/akonadi_mailfilter_agent
>> > --identifier akonadi_mailfilter_agent
>> > 30014 ? SN 0:00 \_ /usr/bin/akonadi_migration_agent --identifier
>> > akonadi_migration_agent
>> > 30015 ? SN 0:00 \_ /usr/bin/akonadi_newmailnotifier_agent --
>> > identifier akonadi_newmailnotifier_agent
>> > 30016 ? SN 0:00 \_ /usr/bin/akonadi_sendlater_agent --identifier
>> > akonadi_sendlater_agent
>> > 30023 ? SNl 0:00 \_ /usr/bin/akonadi_agent_launcher
>> > akonadi_vcard_resource akonadi_vcard_resource_1
>> > 30024 ? SNl 0:00 \_ /usr/bin/akonadi_agent_launcher
>> > akonadi_vcard_resource akonadi_vcard_resource_2
>> > 29974 ? SNs 0:00 kdeinit4: kdeinit4 Runnin e
>> > 29976 ? SN 0:00 \_ kdeinit4: klauncher [kdei e
>> > 29979 ? SN 0:00 kdeinit4: kded4 [kdeinit]
>> > 29997 ? SNL 0:00 kdeinit4: kwalletd [kdein e
>> > 30101 ? SNl 0:00 /usr/bin/knotify4
>> > 
>> > after I login and start Kmail.
>> > 
>> > I did try 'killall kdeinit4' but from what I recall it made no
>difference.
>> > Happy to try any suggestions/syntax you may have.
>> 
>> Not able to test as I use KDE.
>> But, you could try:
>> # killall akonadi_control
>> or
>> # akonadictl stop
>> and then wait till akonadictl status shows it's actually stopped:
>> 
>> Akonadi Control: running
>> 
>> 
>> or you could try:
>> 
>> # killall --user
>> 
>> Kind regards,
>> 
>> Joost
>
>I've tried setting in .xsession:
>
>/usr/bin/akonadictl stop
>killall akonadi_control
>killall kdeinit4
>killall kded4
>
>and various combinations thereof, all of which do not fix the problem. 
>I 
>still have to wait for 90 sec on a black screen before X exits and
>shutdown 
>begins.  :-(
>
>If running first '/usr/bin/akonadictl stop' on a terminal allows X to
>exit, 
>why the same incantation in .xsession does not.  :-/
>
>Is there some other file I can add this command to run when I call for
>X to 
>exit?

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.

You could try looking for something similar with the desktop/window manager of your choice.

I think .xsession is run only during start and will not 'pause' during the session.

--
Joost
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] Recommended way to shut down akonadi
  2016-06-10 19:54         ` J. Roeleveld
@ 2016-06-10 21:32           ` Mick
  2016-06-14  5:03             ` J. Roeleveld
  0 siblings, 1 reply; 11+ messages in thread
From: Mick @ 2016-06-10 21:32 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1421 bytes --]

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 ...

-- 
Regards,
Mick

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] Recommended way to shut down akonadi
  2016-06-10 21:32           ` Mick
@ 2016-06-14  5:03             ` J. Roeleveld
  2016-06-18 16:45               ` Mick
  0 siblings, 1 reply; 11+ messages in thread
From: J. Roeleveld @ 2016-06-14  5:03 UTC (permalink / raw
  To: gentoo-user


[-- 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;">&gt; 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;">&gt; &gt; 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;">&gt; &gt; 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;">&gt; &gt; 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;">&gt; &gt; </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;">&gt; &gt; 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;">&gt; </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;">&gt; 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;">&gt; 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;">&gt; 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;">&gt; </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;">&gt; 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;">&gt; </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;">&gt; /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;">&gt; /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;">&gt; </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;">&gt; 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;">&gt; </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;">&gt; &gt; 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;">&gt; &gt; 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;">&gt; &gt; 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;">&gt; </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;">&gt; 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;">&gt; 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;">&gt; 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;">&gt; </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;">&gt; &gt; 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;">&gt; &gt; 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;">&gt; </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;">&gt; 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;">&gt; 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;">&gt; 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;">&gt; 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;">&gt; </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;">&gt; 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;">&gt; 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;">&gt; 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; ">&nbsp;</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; ">&nbsp;</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; ">&nbsp;</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; ">&nbsp;</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 &quot; &lt;command&gt; &quot; &lt;username&gt;</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; ">&nbsp;</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; ">&nbsp;</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 --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] Recommended way to shut down akonadi
  2016-06-14  5:03             ` J. Roeleveld
@ 2016-06-18 16:45               ` Mick
  2016-06-18 17:42                 ` J. Roeleveld
  0 siblings, 1 reply; 11+ messages in thread
From: Mick @ 2016-06-18 16:45 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2986 bytes --]

On Tuesday 14 Jun 2016 07:03:25 J. Roeleveld wrote:
> 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.

Yes, postgresql waits 90 seconds until all these akonadi attempts to reconnect 
its agents finish, then X exits, postgresql shutsdown and then system shuts 
down as expected.


> I don't see how sddm can cause an extra delay.

I can't either, but I am clutching at straws here.


> 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.

Thank you this did not work.  I didn't know that /etc/local.d/ scripts run at 
shutdown, but in any case even if they do I suspect they don't run until X 
exits first.


> I think the local-service is stopped before postgresql is stopped, so this
> might prevent the delay you are seeing?
> 
> --
> Joost

I usually have a terminal open (more often than I have kmail) so I will need 
to remember to run 'akonadictl stop' in the terminal before I shutdown the 
machine.  It's not ideal, but unless something can stop effectively akonadi I 
can't exit X.

-- 
Regards,
Mick

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] Recommended way to shut down akonadi
  2016-06-18 16:45               ` Mick
@ 2016-06-18 17:42                 ` J. Roeleveld
  2016-06-18 19:47                   ` Mick
  0 siblings, 1 reply; 11+ messages in thread
From: J. Roeleveld @ 2016-06-18 17:42 UTC (permalink / raw
  To: gentoo-user

On Saturday, June 18, 2016 05:45:31 PM Mick wrote:
> On Tuesday 14 Jun 2016 07:03:25 J. Roeleveld wrote:
> > 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.
> 
> Yes, postgresql waits 90 seconds until all these akonadi attempts to
> reconnect its agents finish, then X exits, postgresql shutsdown and then
> system shuts down as expected.
> 
> > I don't see how sddm can cause an extra delay.
> 
> I can't either, but I am clutching at straws here.
> 
> > 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.
> 
> Thank you this did not work.  I didn't know that /etc/local.d/ scripts run
> at shutdown, but in any case even if they do I suspect they don't run until
> X exits first.

add the following to /etc/rc.conf:

rc_local_need="postgresql-9.5"
(or whichever version you are currently using)

That will force "local" to be stopped before "xdm"

but as far as I am aware, the "local" service is normally started last and 
stopped first.
As long as it's stopped before postgresql, you should be fine.

> > I think the local-service is stopped before postgresql is stopped, so this
> > might prevent the delay you are seeing?
> > 
> > --
> > Joost
> 
> I usually have a terminal open (more often than I have kmail) so I will need
> to remember to run 'akonadictl stop' in the terminal before I shutdown the
> machine.  It's not ideal, but unless something can stop effectively akonadi
> I can't exit X.

--
Joost


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] Recommended way to shut down akonadi
  2016-06-18 17:42                 ` J. Roeleveld
@ 2016-06-18 19:47                   ` Mick
  0 siblings, 0 replies; 11+ messages in thread
From: Mick @ 2016-06-18 19:47 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1389 bytes --]

On Saturday 18 Jun 2016 19:42:05 J. Roeleveld wrote:
> On Saturday, June 18, 2016 05:45:31 PM Mick wrote:

> > Thank you this did not work.  I didn't know that /etc/local.d/ scripts run
> > at shutdown, but in any case even if they do I suspect they don't run
> > until X exits first.
> 
> add the following to /etc/rc.conf:
> 
> rc_local_need="postgresql-9.5"
> (or whichever version you are currently using)
> 
> That will force "local" to be stopped before "xdm"
> 
> but as far as I am aware, the "local" service is normally started last and
> stopped first.
> As long as it's stopped before postgresql, you should be fine.

Is don't fully understand how this may help with the problem I am 
experiencing?  Namely, akonadi will *not* stop and shutdown its agents, no 
matter what scripts I've provided either in ~/.xsession or in 
/etc/local.d/killakonadi.stop, in order to release gracefully any connections 
to postgresql?

Regardless, I added the stanza in rc.conf and still have the same problem.  
TBH I have a new problem too, which is that net.enp11s0 is now counting down 
and waiting for ...40, ...30, ...20 seconds and so on at boot up.

Akonadi's wonderful agents won't give up at shut down.

Thank you for your kind help.  I think I'll give up for now and just use a 
terminal to stop akonadi before I shut down the PC.

-- 
Regards,
Mick

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-06-18 19:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2016-06-18 16:45               ` Mick
2016-06-18 17:42                 ` J. Roeleveld
2016-06-18 19:47                   ` Mick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox