<?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>349481</bug_id>
          
          <creation_ts>2015-06-22 00:34:33 +0000</creation_ts>
          <short_desc>konsole session sometimes is not saved into ~/.config/ksmserverrc on logout</short_desc>
          <delta_ts>2016-05-19 23:54:19 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>konsole</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Fedora RPMs</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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>1</everconfirmed>
          <reporter name="Roland Pallai">dap78</reporter>
          <assigned_to name="Konsole Bugs">konsole-bugs-null</assigned_to>
          <cc>ag+services</cc>
    
    <cc>ahartmetz</cc>
    
    <cc>alex.danila.web</cc>
    
    <cc>cpigat242</cc>
    
    <cc>daniel</cc>
    
    <cc>edward.lara.lara</cc>
    
    <cc>ghborrmann</cc>
    
    <cc>ldj00</cc>
    
    <cc>linuxfluesterer</cc>
    
    <cc>loic.yhuel</cc>
    
    <cc>oecetinel</cc>
    
    <cc>rdieter</cc>
    
    <cc>rivaldi8</cc>
    
    <cc>wolfram.koehn</cc>
    
    <cc>zilla</cc>
    
    <cc>zmogas</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>1527488</commentid>
    <comment_count>0</comment_count>
    <who name="Roland Pallai">dap78</who>
    <bug_when>2015-06-22 00:34:33 +0000</bug_when>
    <thetext>I have &quot;restore previous session&quot; enabled and works well except for konsole. Konsole session is not saved into ~/.config/ksmserverrc on 50% of logouts. I think it&apos;s konsole-specific, other kde and non-kde apps are always saved (and restored on login). I think there is more chance to hit the bug if more windows are open at logout.

It&apos;s always saved at manual session save (into section &quot;[Session: saved by user]&quot;).


Reproducible: Sometimes

Steps to Reproduce:
1. login, open some konsole and dolphin windows
2. logout
3. check ~/.config/ksmserverrc for &quot;konsole&quot;



Fedora 22;
konsole5-15.04.0-1.fc22.x86_64
plasma-workspace-5.3.1-2.fc22.x86_64</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1527494</commentid>
    <comment_count>1</comment_count>
    <who name="Roland Pallai">dap78</who>
    <bug_when>2015-06-22 00:49:46 +0000</bug_when>
    <thetext>Konsole always saves their own session file into ~/.config/session/konsole_* even when doesn&apos;t get saved by ksmserver. Those konsole_* files stays there forever.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1527574</commentid>
    <comment_count>2</comment_count>
    <who name="Roland Pallai">dap78</who>
    <bug_when>2015-06-22 16:43:13 +0000</bug_when>
    <thetext>Easily reproducible on a clean Fedora 22 install in KVM.

I try to dig deeper but it&apos;s not an easy topic for a newbie on KDE like me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1527655</commentid>
    <comment_count>3</comment_count>
    <who name="Roland Pallai">dap78</who>
    <bug_when>2015-06-22 23:27:39 +0000</bug_when>
    <thetext>It&apos;s not konsole-specific: kwite also affected.

Seems like app window closes before ksmserver could store the session. I hooked a breakpoint on &quot;QGuiApplicationPrivate::saveState()&quot; in Konsole and found that all windows are already gone when it stops on this breakpoint. This is not normal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1527657</commentid>
    <comment_count>4</comment_count>
    <who name="Roland Pallai">dap78</who>
    <bug_when>2015-06-23 01:27:57 +0000</bug_when>
    <thetext>Those who rely heavily on Konsole and session management (like me), there is a simple workaround on Fedora 22: use Konsole 4.x - seems like only KF5/Qt5 applications are affected.

# dnf remove konsole5; dnf install konsole</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1527667</commentid>
    <comment_count>5</comment_count>
    <who name="Wolfram Köhn">wolfram.koehn</who>
    <bug_when>2015-06-23 06:41:25 +0000</bug_when>
    <thetext>Could it be related to this: Bug 346768 ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1528301</commentid>
    <comment_count>6</comment_count>
    <who name="Loïc Yhuel">loic.yhuel</who>
    <bug_when>2015-06-25 22:27:17 +0000</bug_when>
    <thetext>I have the issue too :
 - files accumulate in ~/.config/session (I can see the last ksonsole/kate sessions)
 - ~/.config/ksmserverrc doesn&apos;t list all applications (I see kwin_x11, kmix, firewall_applet, sometimes pulseaudio)

Manually saving the session works.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1529577</commentid>
    <comment_count>7</comment_count>
    <who name="">ghborrmann</who>
    <bug_when>2015-07-01 20:44:18 +0000</bug_when>
    <thetext>I also show this behavior.  With 3 konsole windows on two desktops, and a konqueror session on the third, only the konqueror session is restored upon login.  Manually saving the session does not work perfectly for me -- the exact opposite occurs: the konsole windows are all restored, but the konqueror session does not appear.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1529971</commentid>
    <comment_count>8</comment_count>
    <who name="Ömer">oecetinel</who>
    <bug_when>2015-07-03 18:15:35 +0000</bug_when>
    <thetext>I have following behavior:
-Auto-save session everything except KF5 Konsole is restored
-Tried save manually session and this works as expected

Btw i am using kwin with the fix from this bug report https://bugs.kde.org/show_bug.cgi?id=341930

The only thing not working properly is discarding the last session files for kwin the others are deleted as they should be.
The &quot;discardCommand&quot; entry in ksmserverrc is missing for kwin completely. (also the counting is strange &quot;discardCommand3, discardCommand5,discardCommand6,discardCommand7&quot; where did 1,2 and 4 go?^^)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1553520</commentid>
    <comment_count>9</comment_count>
    <who name="Alex Dănilă">alex.danila.web</who>
    <bug_when>2015-10-29 21:18:32 +0000</bug_when>
    <thetext>I confirm this for Debian, both Testing and Unstable, and has been like this for a while. Most or all other programs are restored properly.

Version 15.08.0
Using:
KDE Frameworks 5.15.0
Qt 5.5.1 (built against 5.4.2)
The xcb windowing system</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1558902</commentid>
    <comment_count>10</comment_count>
    <who name="Andreas Hartmetz">ahartmetz</who>
    <bug_when>2015-11-23 01:46:57 +0000</bug_when>
    <thetext>Probably an instance of bug 354724
After I hacked konsole to not quit on session saving, it didn&apos;t restore properly on restore... that seems to be a separate bug.
On my computers the bug happens every time, but it is timing dependent so may trigger randomly for others. If konsole dies before kmserver saves the list of applications to restore, konsole will not be restored. If it dies later, it will be restored.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1586413</commentid>
    <comment_count>11</comment_count>
    <who name="linuxfluesterer">linuxfluesterer</who>
    <bug_when>2016-04-03 14:20:26 +0000</bug_when>
    <thetext>Hmm, I already use Plasma 5.6.1 as date of 29/03/2016. The above BUG is still given for KDE/Plasma specific applicatitions like Konsole, KWrite, Settings and so on.
To relogin to a saved session (last session) was a fine thing in KDE 4.x, because it worked.
Is there any try, any work to solve this bug in close future.
I would be glad about.
Thank you...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1586795</commentid>
    <comment_count>12</comment_count>
    <who name="Andreas Hartmetz">ahartmetz</who>
    <bug_when>2016-04-05 12:20:42 +0000</bug_when>
    <thetext>(In reply to linuxfluesterer from comment #11)
&gt; Hmm, I already use Plasma 5.6.1 as date of 29/03/2016. The above BUG is
&gt; still given for KDE/Plasma specific applicatitions like Konsole, KWrite,
&gt; Settings and so on.
&gt; To relogin to a saved session (last session) was a fine thing in KDE 4.x,
&gt; because it worked.
&gt; Is there any try, any work to solve this bug in close future.
&gt; I would be glad about.
&gt; Thank you...

Your KDE stack needs to be compiled against Qt 5.6 to fix this. This is hard to change without compiling KDE yourself. Even installing Qt 5.6 won&apos;t help.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587169</commentid>
    <comment_count>13</comment_count>
    <who name="linuxfluesterer">linuxfluesterer</who>
    <bug_when>2016-04-07 10:30:31 +0000</bug_when>
    <thetext>(In reply to Andreas Hartmetz from comment #12)
&gt; (In reply to linuxfluesterer from comment #11)
&gt; &gt; Hmm, I already use Plasma 5.6.1 as date of 29/03/2016. The above BUG is
&gt; &gt; still given for KDE/Plasma specific applicatitions like Konsole, KWrite,
&gt; &gt; Settings and so on.
&gt; &gt; To relogin to a saved session (last session) was a fine thing in KDE 4.x,
&gt; &gt; because it worked.
&gt; &gt; Is there any try, any work to solve this bug in close future.
&gt; &gt; I would be glad about.
&gt; &gt; Thank you...
&gt; 
&gt; Your KDE stack needs to be compiled against Qt 5.6 to fix this. This is hard
&gt; to change without compiling KDE yourself. Even installing Qt 5.6 won&apos;t help.

So then... is there any plan, any schedule to compile KDE by the developers?
If not, could I compile complete KDE packages (Plasma 5.6 Meta packages maybe) by using Gentoo and the &apos;emerge&apos; command?
I&apos;m a Sabayon user. Sabayon is a rolling release and offers precompiled binaries.
Thank you.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587204</commentid>
    <comment_count>14</comment_count>
    <who name="Andreas Hartmetz">ahartmetz</who>
    <bug_when>2016-04-07 11:59:42 +0000</bug_when>
    <thetext>(In reply to linuxfluesterer from comment #13)
&gt; (In reply to Andreas Hartmetz from comment #12)
&gt; &gt; (In reply to linuxfluesterer from comment #11)
&gt; &gt; &gt; Hmm, I already use Plasma 5.6.1 as date of 29/03/2016. The above BUG is
&gt; &gt; &gt; still given for KDE/Plasma specific applicatitions like Konsole, KWrite,
&gt; &gt; &gt; Settings and so on.
&gt; &gt; &gt; To relogin to a saved session (last session) was a fine thing in KDE 4.x,
&gt; &gt; &gt; because it worked.
&gt; &gt; &gt; Is there any try, any work to solve this bug in close future.
&gt; &gt; &gt; I would be glad about.
&gt; &gt; &gt; Thank you...
&gt; &gt; 
&gt; &gt; Your KDE stack needs to be compiled against Qt 5.6 to fix this. This is hard
&gt; &gt; to change without compiling KDE yourself. Even installing Qt 5.6 won&apos;t help.
&gt; 
&gt; So then... is there any plan, any schedule to compile KDE by the developers?
&gt; If not, could I compile complete KDE packages (Plasma 5.6 Meta packages
&gt; maybe) by using Gentoo and the &apos;emerge&apos; command?
&gt; I&apos;m a Sabayon user. Sabayon is a rolling release and offers precompiled
&gt; binaries.
&gt; Thank you.

We don&apos;t ship compiled packages, distributions do. They could also backport the necessary changes in Qt and remove the Qt version check in KDE.
If you use Gentoo, sure, you can compile your own and get those changes. But I do not know whether they are already in (your) stable versions of Frameworks 5 and Plasma and applications (where necessary). I haven&apos;t done much else for KDE recently, so if you see my name in the commit logs of kdelibs4support, kxmlgui and plasma-workspace in those versions, you have recent enough versions. The commit message should be about &quot;fallback session management&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587219</commentid>
    <comment_count>15</comment_count>
    <who name="Rex Dieter">rdieter</who>
    <bug_when>2016-04-07 12:55:50 +0000</bug_when>
    <thetext>I&apos;m skeptical of the claim that a full rebuild is required, are you suggesting that qt-5.6.x introduced some abi change wrt session-management?  If so, what evidence do you have for that claim?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587224</commentid>
    <comment_count>16</comment_count>
    <who name="Andreas Hartmetz">ahartmetz</who>
    <bug_when>2016-04-07 13:27:09 +0000</bug_when>
    <thetext>(In reply to Rex Dieter from comment #15)
&gt; I&apos;m skeptical of the claim that a full rebuild is required, are you
&gt; suggesting that qt-5.6.x introduced some abi change wrt session-management? 
&gt; If so, what evidence do you have for that claim?

5.6.0 introduced new API that is unfortunately required to fix the bug. That&apos;s of course also an ABI change. Evidence: commit e7bf0edfd49de9a4d8285fbe8d878f8fda910e6d in qtbase.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587227</commentid>
    <comment_count>17</comment_count>
    <who name="Rex Dieter">rdieter</who>
    <bug_when>2016-04-07 13:31:45 +0000</bug_when>
    <thetext>So it&apos;s at least an API change, but not necessarily an ABI change

Do you know which kf5/plasma components use this new API?  (only those would need rebuilding, not the entire stack)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587228</commentid>
    <comment_count>18</comment_count>
    <who name="Rex Dieter">rdieter</who>
    <bug_when>2016-04-07 13:44:57 +0000</bug_when>
    <thetext>Found these so far:

https://quickgit.kde.org/?p=kwrited.git&amp;a=commit&amp;h=e2bb0d7595c0898e8351bbcb721ad7173423f8f5

https://quickgit.kde.org/?p=plasma-workspace.git&amp;a=commitdiff&amp;h=b5e814a7b2867914327c889794b1088027aaafd6</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587231</commentid>
    <comment_count>19</comment_count>
    <who name="Andreas Hartmetz">ahartmetz</who>
    <bug_when>2016-04-07 14:17:07 +0000</bug_when>
    <thetext>I meant ABI change in the sense that if something is compiled against the new API, it won&apos;t run against an older version.
Applications that use KMainWindow (from kxmlgui framework) or KApplication (from kdelibs4support framework) are fixed automatically. Others all need to be fixed separately (&quot;disable fallback session management&quot;).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587233</commentid>
    <comment_count>20</comment_count>
    <who name="Rex Dieter">rdieter</who>
    <bug_when>2016-04-07 14:21:50 +0000</bug_when>
    <thetext>OK, that&apos;s not the classic definition (at least what I meant) of ABI change/break.  ABI break, to me, means a new build is no longer backward compatible.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1595643</commentid>
    <comment_count>21</comment_count>
    <who name="Roland Pallai">dap78</who>
    <bug_when>2016-05-19 23:54:19 +0000</bug_when>
    <thetext>For the record: it is fixed in Fedora 24. Thank you!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>