<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>362142</bug_id>
          
          <creation_ts>2016-04-23 14:19:24 +0000</creation_ts>
          <short_desc>The session does not finish cleanly / startkde exits too early?</short_desc>
          <delta_ts>2020-10-25 01:56:17 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>Frameworks and Libraries</classification>
          <product>frameworks-kinit</product>
          <component>general</component>
          <version>5.20.0</version>
          <rep_platform>Exherbo</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>244250</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Niels Ole Salscheider">niels_ole</reporter>
          <assigned_to name="David Faure">faure</assigned_to>
          <cc>kdelibs-bugs-null</cc>
    
    <cc>nate</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1590103</commentid>
    <comment_count>0</comment_count>
    <who name="Niels Ole Salscheider">niels_ole</who>
    <bug_when>2016-04-23 14:19:24 +0000</bug_when>
    <thetext>When I try to log out or power down my computer, the current kde session stays in the closing state.
In this case, loginctl session-status prints something similar to this:

 - olesalscheider (1000)
           Since: Sat 2016-04-23 15:56:16 CEST; 8min ago
          Leader: 1121
            Seat: seat0; vc1
         Display: :0
         Service: sddm; type x11; class user
         Desktop: KDE
           State: closing
            Unit: session-1.scope
                  �~T~\�~T~@1292 /usr/x86_64-pc-linux-gnu/bin/pulseaudio --start --log-target=syslog
                  �~T~\�~T~@1494 gpg-agent --homedir /home/olesalscheider/.gnupg --use-standard-socket --daemon
                  �~T~\�~T~@1616 kdeinit4: kio_http_cache_cleaner [kdeinit]
                  �~T~T�~T~@1827 /usr/x86_64-pc-linux-gnu/libexec/kf5/kio_http_cache_cleaner

Apr 23 16:02:51 OleDesktop kdeinit5[1191]: QDBusAbstractAdaptor: Cannot relay signal KDEDModule::moduleDeleted(KDEDModule*): Pointers are not supported: KDEDModule*
Apr 23 16:02:51 OleDesktop kdeinit5[1191]: QDBusAbstractAdaptor: Cannot relay signal KDEDModule::moduleDeleted(KDEDModule*): Pointers are not supported: KDEDModule*
Apr 23 16:02:51 OleDesktop kdeinit5[1191]: QDBusAbstractAdaptor: Cannot relay signal KDEDModule::moduleDeleted(KDEDModule*): Pointers are not supported: KDEDModule*
Apr 23 16:02:51 OleDesktop kdeinit5[1191]: QDBusAbstractAdaptor: Cannot relay signal KDEDModule::moduleDeleted(KDEDModule*): Pointers are not supported: KDEDModule*
Apr 23 16:02:51 OleDesktop kdeinit5[1191]: QDBusAbstractAdaptor: Cannot relay signal KDEDModule::moduleDeleted(KDEDModule*): Pointers are not supported: KDEDModule*
Apr 23 16:02:51 OleDesktop kdeinit5[1191]: QDBusAbstractAdaptor: Cannot relay signal KDEDModule::moduleDeleted(KDEDModule*): Pointers are not supported: KDEDModule*
Apr 23 16:02:51 OleDesktop kactivitymanagerd[1231]: The X11 connection broke (error 1). Did the X11 server die?
Apr 23 16:02:51 OleDesktop kdeinit5[1191]: The X11 connection broke: I/O error (code 1)
Apr 23 16:02:52 OleDesktop drkonqi[2550]: QXcbConnection: Could not connect to display :0
Apr 23 16:02:52 OleDesktop kdeinit5[2555]: QXcbConnection: Could not connect to display :0

It seems that the problem is that the X server is terminated before kdeinit5 finishes and before it can terminate all children.
But AFAIK the X server should only be terminated once startkde finishes and that can only happen when the kdeinit5_shutdown wrapper for kdeinit returns.
Therefore it seems likely that the bug is either in kdeinit or the wrapper.

The session can be cleanly terminated by running &quot;loginctl terminate-session&quot;.

Reproducible: Always

Steps to Reproduce:
1. Log out
2. Run loginctl list-sessions / loginctl session-status

Actual Results:  
Session stays in closing state

Expected Results:  
Session finishes cleanly</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1963952</commentid>
    <comment_count>1</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2020-10-12 03:38:34 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 359651 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1967864</commentid>
    <comment_count>2</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2020-10-25 01:56:17 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 244250 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>