Bug 955280 - session not restored after logout/login
Summary: session not restored after logout/login
Status: RESOLVED FIXED
: 955328 965534 (view as bug list)
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: KDE Workspace (Plasma) (show other bugs)
Version: Leap 42.1
Hardware: Other Other
: P5 - None : Normal with 5 votes (vote)
Target Milestone: ---
Assignee: Forgotten User DV81ZEWZkN
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-16 19:40 UTC by Ulrich Deiters
Modified: 2020-12-03 13:59 UTC (History)
5 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Deiters 2015-11-16 19:40:13 UTC
1. After upgrading from openSuse 13.4 to Leap 42.1, all my desktop settings were lost.

2. I set up 4 virtual desktops. On desktop 1, I start a dolphin window and move it to the upper right corner, then a terminal window in the lower left corner. On desktop 3, I start another dolphin window in the upper left corner. I log out and in. Then I find 1 dolphin session that shows on all desktops, and the terminal window does not show at all.
Comment 1 Forgotten User ZpviCCR5tb 2015-11-24 11:59:08 UTC
When I set up a konsole session in desktop 1 and logout, it is not recreated upon login.  In the directory ~/.config/session, a file, `konsole_10145100a1ea000144831997300000028770008_1448319997_596458' is created which appears to have the proper information to restart the session, however this file does not appear to be read or deleted upon login.
Comment 2 Wolfgang Bauer 2015-11-24 12:39:43 UTC
(In reply to Walter Augenstein from comment #1)
> When I set up a konsole session in desktop 1 and logout, it is not recreated
> upon login.  In the directory ~/.config/session, a file,
> `konsole_10145100a1ea000144831997300000028770008_1448319997_596458' is
> created which appears to have the proper information to restart the session,
> however this file does not appear to be read or deleted upon login.

Yes, because it isn't added to ~/.config/ksmserver.

Note that this is only a problem with KF5/Qt5 applications, the session management itself works fine and other applications will be restored.

They seem to crash (randomly, not always) when/after saving their state to ~/.config/session/, so they are not regarded as running any more by the session management and not added to ksmserverrc to be restarted at login.
Apparently they try to access their window, which can already be closed at that time it seems, thus causing the crash. Applications not having a window open in the first place (like kmix running in the system tray), are restored reliably in my experience.

A possible workaround for you could be to set "Start with a previously saved session", and then select "Save session" in the application menu (Session/Powersaving). The manually saved session should work perfectly fine even for KF5 apps (likely because no windows are actually closed at this point).
Comment 3 Wolfgang Bauer 2015-11-24 12:41:54 UTC
*** Bug 955328 has been marked as a duplicate of this bug. ***
Comment 4 Wolfgang Bauer 2015-11-24 15:00:58 UTC
(In reply to Wolfgang Bauer from comment #2)
> They seem to crash (randomly, not always) when/after saving their state to
> ~/.config/session/, so they are not regarded as running any more by the
> session management and not added to ksmserverrc to be restarted at login.
> Apparently they try to access their window, which can already be closed at
> that time it seems, thus causing the crash. Applications not having a window
> open in the first place (like kmix running in the system tray), are restored
> reliably in my experience.

Apparently they don't crash, they just quit too early and might not be seen by the session management as still running.

See here for a more thorough analysis:
https://bugs.kde.org/show_bug.cgi?id=354724

A related bug report (specifically against konsole) can be found here:
https://bugs.kde.org/show_bug.cgi?id=349481
Comment 5 Forgotten User DV81ZEWZkN 2016-02-01 16:30:45 UTC
I will submit patches pending for upstream inclusion soon (for Leap with Plasma 5.5.4 update, for TW ASAP - first we need qtbase accepted)
Comment 6 Bernhard Wiedemann 2016-02-01 17:00:09 UTC
This is an autogenerated message for OBS integration:
This bug (955280) was mentioned in
https://build.opensuse.org/request/show/357214 Factory / libqt5-qtbase
Comment 7 Bernhard Wiedemann 2016-02-01 18:00:14 UTC
This is an autogenerated message for OBS integration:
This bug (955280) was mentioned in
https://build.opensuse.org/request/show/357225 Factory / libqt5-qtbase
Comment 8 Andreas Stieger 2016-02-07 19:58:38 UTC
*** Bug 965534 has been marked as a duplicate of this bug. ***
Comment 9 Benjamin Brunner 2016-02-10 10:13:15 UTC
Update for openSUSE Leap released.

Resolved fixed, thanks!
Comment 10 Wolfgang Bauer 2016-02-10 12:35:05 UTC
(In reply to Benjamin Brunner from comment #9)
> Update for openSUSE Leap released.
> 
> Resolved fixed, thanks!

Just to be clear here: this Qt update alone won't fix anything. But it's needed for making it possible to fix the problem in the applications.

@Hrvoje: does the Plasma 5.5.4 update really contain anything in this regard?
AFAIK we'd need patches for kxmlgui and kdelibs4support, and separate ones for all applications that don't use the classes from there.

Or am I misunderstanding something here?
Comment 11 Swamp Workflow Management 2016-02-10 14:11:28 UTC
openSUSE-RU-2016:0402-1: An update that has one recommended fix can now be installed.

Category: recommended (moderate)
Bug References: 955280
CVE References: 
Sources used:
openSUSE Leap 42.1 (src):    libqt5-qtbase-5.5.1-7.1
Comment 12 Forgotten User DV81ZEWZkN 2016-02-10 15:05:04 UTC
(In reply to Wolfgang Bauer from comment #10)
> (In reply to Benjamin Brunner from comment #9)
> > Update for openSUSE Leap released.
> > 
> > Resolved fixed, thanks!
> 
> Just to be clear here: this Qt update alone won't fix anything. But it's
> needed for making it possible to fix the problem in the applications.
> 
> @Hrvoje: does the Plasma 5.5.4 update really contain anything in this regard?
> AFAIK we'd need patches for kxmlgui and kdelibs4support, and separate ones
> for all applications that don't use the classes from there.
> 
> Or am I misunderstanding something here?

Nope; i'll submit latest KF5 (5.19) with needed patches once it's official released.
Comment 13 Bernhard Wiedemann 2016-02-10 17:00:34 UTC
This is an autogenerated message for OBS integration:
This bug (955280) was mentioned in
https://build.opensuse.org/request/show/358747 Factory / libqt5-qtbase
Comment 14 Wolfgang Bauer 2016-02-19 12:00:00 UTC
With the latest patches in KDE:Frameworks5, KF5 applications seem to be saved on logout by ksmserver reliably now, at least the ones I tried so far (konsole, dolphin, kwrite).

But there's still one major (IMHO) problem we should solve (though not really related to this bug report):
plasmashell still quits too early, leaving you without a desktop if the logout is cancelled.
(https://bugs.kde.org/show_bug.cgi?id=349805)

We need a patch there too. I think it should suffice to call sm.setAutoCloseWindowsEnabled(false) in plasmashell's disableSessionManagement function defined in main().
I will give it a try during the weekend...
Comment 15 Ulrich Deiters 2016-02-20 11:07:17 UTC
I cannot confirm that the problem is solved. On my machine, merely 1 dolphin window is restored (but at a wrong location), but the dolphin windows on the other workspaces are forgotten. The terminal window is also forgotten after a logout.
Comment 16 Wolfgang Bauer 2016-02-20 11:15:10 UTC
(In reply to Ulrich Deiters from comment #15)
> I cannot confirm that the problem is solved. On my machine, merely 1 dolphin
> window is restored (but at a wrong location), but the dolphin windows on the
> other workspaces are forgotten. The terminal window is also forgotten after
> a logout.

Note that the patches are only in the additional KDE:Frameworks5 repo for now.
Are you using that?
Comment 17 Ulrich Deiters 2016-02-20 12:52:56 UTC
> Note that the patches are only in the additional KDE:Frameworks5 repo for now.
Are you using that?

Sorry, that little detail had escaped me. I have been using the standard repositories.
Comment 18 Wolfgang Bauer 2016-02-20 13:25:46 UTC
(In reply to Ulrich Deiters from comment #17)
> Sorry, that little detail had escaped me. I have been using the standard
> repositories.

See comment#12.
That's why I reopened this bug report in the first place: it got erroneously closed after the release of the latest Qt5 update which doesn't fix anything yet but is required to be able to add fixes to KF5.

You will get those fixes together with a full KDE Frameworks update to 5.19.0 via the official update repo, but that will still take some time.

If you don't want to wait and/or try it out now, you can add the KDE:Frameworks5 repo and do a full switch to it. You'll always get the latest stable Frameworks and Plasma versions at the day of release then.
Comment 19 Wolfgang Bauer 2016-02-20 14:24:29 UTC
Fix for the "desktop disappears too soon" issue:
https://build.opensuse.org/request/show/360625

Works fine here... ;-)
Comment 20 Bernhard Wiedemann 2016-02-26 16:00:11 UTC
This is an autogenerated message for OBS integration:
This bug (955280) was mentioned in
https://build.opensuse.org/request/show/361862 Factory / plasma5-workspace
Comment 21 Swamp Workflow Management 2016-03-01 11:11:47 UTC
openSUSE-SU-2016:0612-1: An update that contains security fixes can now be installed.

Category: security (moderate)
Bug References: 955280,963680,967668
CVE References: 
Sources used:
openSUSE Leap 42.1 (src):    attica-qt5-5.19.0-6.3, baloo5-5.19.0-6.2, bluez-qt-5.19.0-6.3, breeze5-icons-5.19.0-5.8, extra-cmake-modules-5.19.0-6.3, frameworkintegration-5.19.0-9.2, kactivities5-5.19.0-11.2, kapidox-5.19.0-6.3, karchive-5.19.0-6.3, kauth-5.19.0-6.3, kbookmarks-5.19.0-6.2, kcmutils-5.19.0-6.2, kcodecs-5.19.0-6.3, kcompletion-5.19.0-6.3, kconfig-5.19.0-6.3, kconfigwidgets-5.19.0-6.3, kcoreaddons-5.19.0-6.3, kcrash-5.19.0-8.1, kdbusaddons-5.19.0-6.3, kdeclarative-5.19.0-6.2, kded-5.19.0-6.2, kdelibs4support-5.19.0-6.6, kdesignerplugin-5.19.0-6.7, kdesu-5.19.0-6.2, kdewebkit-5.19.0-6.2, kdnssd-framework-5.19.0-6.3, kdoctools-5.19.0-6.3, kemoticons-5.19.0-6.2, kfilemetadata5-5.19.0-9.3, kglobalaccel-5.19.0-6.2, kguiaddons-5.19.0-6.3, khtml-5.19.0-6.2, ki18n-5.19.0-6.3, kiconthemes-5.19.0-6.3, kidletime-5.19.0-6.3, kimageformats-5.19.0-6.3, kinit-5.19.0-6.2, kio-5.19.0-12.5, kitemmodels-5.19.0-6.3, kitemviews-5.19.0-6.3, kjobwidgets-5.19.0-6.3, kjs-5.19.0-6.3, kjsembed-5.19.0-6.3, kmediaplayer-5.19.0-6.2, knewstuff-5.19.0-6.2, knotifications-5.19.0-6.3, knotifyconfig-5.19.0-6.2, kpackage-5.19.0-6.3, kparts-5.19.0-6.2, kpeople5-5.19.0-6.2, kplotting-5.19.0-6.3, kpty-5.19.0-6.3, kross-5.19.0-6.2, krunner-5.19.0-6.2, kservice-5.19.0-7.2, ktexteditor-5.19.0-6.3, ktextwidgets-5.19.0-6.2, kunitconversion-5.19.0-6.3, kwallet-5.19.0-6.2, kwidgetsaddons-5.19.0-6.3, kwindowsystem-5.19.0-6.3, kxmlgui-5.19.0-6.2, kxmlrpcclient5-5.19.0-6.2, libKF5ModemManagerQt-5.19.0-6.3, libKF5NetworkManagerQt-5.19.0-6.3, oxygen5-icon-theme-5.18.0-5.3, plasma-framework-5.19.0-6.2, solid-5.19.0-6.3, sonnet-5.19.0-6.7, threadweaver-5.19.0-6.3
Comment 22 Wolfgang Bauer 2016-03-01 17:23:12 UTC
The update has been released, session saving/restoring should work reliable for KF5 applications now too...
Comment 23 Forgotten User yM3F60q4RJ 2016-03-26 20:50:08 UTC
I have installed the update some day ago.

Restoring the session works now correctly.
Comment 24 Swamp Workflow Management 2016-04-02 23:07:44 UTC
openSUSE-RU-2016:0942-1: An update that has two recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 955280,970856
CVE References: 
Sources used:
openSUSE Leap 42.1 (src):    attica-qt5-5.20.0-9.1, baloo5-5.20.0-9.1, bluez-qt-5.20.0-9.1, breeze5-icons-5.20.0-8.3, extra-cmake-modules-5.20.0-9.1, frameworkintegration-5.20.0-12.1, kapidox-5.20.0-9.1, karchive-5.20.0-9.1, kauth-5.20.0-9.1, kbookmarks-5.20.0-9.1, kcmutils-5.20.0-9.1, kcodecs-5.20.0-9.1, kcompletion-5.20.0-9.1, kconfig-5.20.0-9.1, kconfigwidgets-5.20.0-9.1, kcoreaddons-5.20.0-9.1, kcrash-5.20.0-11.1, kdbusaddons-5.20.0-9.1, kdeclarative-5.20.0-12.1, kded-5.20.0-9.1, kdelibs4support-5.20.0-9.6, kdesignerplugin-5.20.0-9.6, kdesu-5.20.0-9.1, kdewebkit-5.20.0-9.1, kdnssd-framework-5.20.0-9.1, kdoctools-5.20.0-9.1, kemoticons-5.20.0-9.1, kfilemetadata5-5.20.0-12.1, kglobalaccel-5.20.0-11.1, kguiaddons-5.20.0-9.1, khtml-5.20.0-9.1, ki18n-5.20.0-9.1, kiconthemes-5.20.0-9.1, kidletime-5.20.0-9.1, kimageformats-5.20.0-9.1, kinit-5.20.0-9.1, kio-5.20.0-15.4, kitemmodels-5.20.0-9.1, kitemviews-5.20.0-9.1, kjobwidgets-5.20.0-9.1, kjs-5.20.0-9.1, kjsembed-5.20.0-9.1, kmediaplayer-5.20.0-9.1, knewstuff-5.20.0-9.1, knotifications-5.20.0-9.1, knotifyconfig-5.20.0-9.1, kpackage-5.20.0-9.1, kparts-5.20.0-9.1, kpeople5-5.20.0-9.1, kplotting-5.20.0-9.1, kpty-5.20.0-9.1, kross-5.20.0-9.1, krunner-5.20.0-9.1, kservice-5.20.0-13.1, ktexteditor-5.20.0-11.2, ktextwidgets-5.20.0-9.1, kunitconversion-5.20.0-9.1, kwallet-5.20.0-9.1, kwidgetsaddons-5.20.0-9.1, kwindowsystem-5.20.0-9.1, kxmlgui-5.20.0-9.1, kxmlrpcclient5-5.20.0-9.1, libKF5ModemManagerQt-5.20.0-9.1, libKF5NetworkManagerQt-5.20.0-9.1, plasma-framework-5.20.0-12.1, plasma5-desktop-5.5.5-17.1, plasma5-openSUSE-13.3-35.1, solid-5.20.0-9.1, sonnet-5.20.0-9.3, threadweaver-5.20.0-9.1
Comment 25 Bernhard Wiedemann 2017-10-28 16:08:25 UTC
This is an autogenerated message for OBS integration:
This bug (955280) was mentioned in
https://build.opensuse.org/request/show/537327 Factory / libqt5-qtbase