Bug 404318 - KDE 5.15 - "Restore manually saved session" no more working
Summary: KDE 5.15 - "Restore manually saved session" no more working
Status: RESOLVED FIXED
Alias: None
Product: ksmserver
Classification: Plasma
Component: general (show other bugs)
Version: 5.14.90
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-14 05:06 UTC by frc_kde
Modified: 2019-02-20 15:05 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.15.1


Attachments
~/.local/share/sddm/xorg-session.log (7.45 KB, text/plain)
2019-02-14 18:41 UTC, frc_kde
Details
~/.local/share/sddm/xorg-session.log (II) (6.77 KB, text/plain)
2019-02-14 23:31 UTC, frc_kde
Details
~/.config/ksmserverrc (2.17 KB, text/plain)
2019-02-15 01:42 UTC, frc_kde
Details
~/.local/share/sddm/xorg-session.log (openSUSE Leap) (6.90 KB, text/x-log)
2019-02-15 12:56 UTC, frc_kde
Details
~/.config/ksmserverrc (Kubuntu 19.04 db) (2.37 KB, text/plain)
2019-02-15 13:02 UTC, frc_kde
Details
~/.config/ksmserverrc (PCLinuxOS) (1.32 KB, text/plain)
2019-02-15 13:04 UTC, frc_kde
Details
~/.config/ksmserverrc (openSUSE Leap) (1.50 KB, text/plain)
2019-02-15 13:10 UTC, frc_kde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description frc_kde 2019-02-14 05:06:16 UTC
SUMMARY

My option is that, since 3 years ago, to automatically run Conky at startup:

On Login

[ ] Restore previous session

[x] Restore manually saved session

[ ] Start with an empty session

After upgrade to 5.15 "beta" (5.14.90) it doesn't work on Kubuntu 19.04 (development branch), a few days ago.

Today, after upgrade to 5.15, it stopped work also in Arch.


STEPS TO REPRODUCE
1. Set "Restore manually saved session" at KDE < 5.15
2. Save session, with Conky
3. Upgrade to KDE 5.14.90 or 5.15

OBSERVED RESULT

Now, session starts without Conky.

I have tried to reset (Empty session) and back to Restore / Save, but it didn't solve the problem.

EXPECTED RESULT

Expected "Restore saved session" to work again, as before.

SOFTWARE/OS VERSIONS
Windows: NONE
MacOS: NONE

Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.15
KDE Frameworks Version: 5.55.0
Qt Version: 5.12.1

Linux/KDE Plasma: Kubuntu 19.04 (development branch)
(available in About System)
KDE Plasma Version: 5.14.90; and now 5.15
KDE Frameworks Version: 5.54.0
Qt Version: 5.11.3

ADDITIONAL INFORMATION

Working fine in all KDE versions < 5.14.90
Comment 1 David Edmundson 2019-02-14 16:35:09 UTC
I tried with my current session and couldn't reproduce.

Does anything get restored.
Can you save a session with kate open and see what happens with that.

If not can you also export 

QT_LOGGING_RULES=org.kde.kf5.ksmserver.debug=true into /etc/profile.d/log.sh

and upload your ~/.local/share/sddm/xorg-session.log after logging back in
Comment 2 frc_kde 2019-02-14 18:41:35 UTC
Created attachment 118081 [details]
~/.local/share/sddm/xorg-session.log

Tested:

1. Run Conky
2. Open Dolphin (2 tabs)
3. Open Kate
4. Menu > Power / Session > Save session
5. Close Dolphin and Kate
6. Restart

Distros tested:

Arch Linux
KDE 5.15
Frameworks 5.55
Qt 5.12.1

PCLinuxOS
KDE 5.15
Frameworks 5.55
Qt 5.12.1

Kubuntu 19.04 (dev. branch)
KDE 5.15
Frameworks 5.54
Qt 5.11.3

Results:

All three distros started with Dolphin and Kate, but not Conky.
Comment 3 David Edmundson 2019-02-14 22:39:42 UTC
The fact that dolphin restores implies ksmserver is working correctly. 
What's interesting from the logs is:

conky: desktop window (1a0000d) is subwindow of root window (9f)
conky: window type - normal
conky: drawing to created window (0x200002)
conky: drawing to double buffer
conky: can't open '/sys/class/hwmon/hwmon1/temp1_input': Arquivo ou diretório inexistente
please check your device or remove this var from conky
conky: can't open '/sys/class/hwmon/hwmon0/temp3_input': Arquivo ou diretório inexistente
please check your device or remove this var from conky
conky: can't open '/sys/class/hwmon/hwmon1/fan1_input': Arquivo ou diretório inexistente
please check your device or remove this var from conky
kdeinit5: Got EXT_EXEC '/usr/bin/dolphin' from launcher.


so conky *is* starting.


The comment about the rootwindow seems relevant. 
Do you get that when you manually start conky later?
Do you get that message if you "kquitapp5 plasmashell" and start conky?

I have a feeling that we're in a race condition, conky perhaps needs to start after plasmashell has created the DesktopView. 

In Plasma 5.15 I worked on removing some blocking slowdowns in ksmserver so it is probably getting to session restore quicker now.
Comment 4 frc_kde 2019-02-14 23:31:30 UTC
Created attachment 118090 [details]
~/.local/share/sddm/xorg-session.log (II)
Comment 5 frc_kde 2019-02-14 23:35:23 UTC
Sorry, 

I did manually run Conky before to upload:

~/.local/share/sddm/xorg-session.log

Non-manual part ends about #75 or #76 line, with something like:

kdeinit5: Got EXEC_NEW '/usr/lib/qt/plugins/kf5/kio/file.so' from launcher.
kdeinit5: preparing to launch '/usr/lib/qt/plugins/kf5/kio/file.so'
kio_http_cache_cleaner: Already running!

(immediately before Conky lines)

Please, consider only this new attachment:

~/.local/share/sddm/xorg-session.log (II)

where the only manual launch is Konsole (last 2 lines), to imediate copy of the log.

You can see that Dolphin and Kate launched as part of session startup, but not Conky.
Comment 6 David Edmundson 2019-02-15 00:31:06 UTC
Ok.

For some reason I'm not getting my ksmserver debug output.

Can I check your /etc/profile.d/log.sh

it should read

#!/bin/sh
export QT_LOGGING_RULES=org.kde.kf5.ksmserver.debug=true


If that still doesn't work, could you manually mod the startkde to export this somewhere before we launch ksmserver.

Can I also have your ~/.config/ksmserverrc
(this might contain personal info, give it a check before uploading)
Comment 7 frc_kde 2019-02-15 01:42:35 UTC
Created attachment 118094 [details]
~/.config/ksmserverrc

Attached: ~/.config/ksmserverrc

There is no /etc/profile.d/log.sh in any of my 12 distros. I still couldn't understand what do you ask me to do about it.
Comment 8 David Edmundson 2019-02-15 02:09:54 UTC
Urgh, I see it. 

Will fix ASAP.
Comment 9 frc_kde 2019-02-15 12:53:15 UTC
Excuse me for not to tell all I did search and try in order to do what you ask me to do about log.sh, but just make it executable was not enough to make any difference at all.
Comment 10 frc_kde 2019-02-15 12:56:48 UTC
Created attachment 118100 [details]
~/.local/share/sddm/xorg-session.log (openSUSE Leap)

Just for compare:

~/.local/share/sddm/xorg-session.log (openSUSE Leap)

from openSUSE Leap with KDE 5.12.6, whose "Restore saved session" keeps working fine to run Conky at startup.

This line is the first manual action after session startup:

** Message: Unable to use GNOME Shell's builtin screenshot interface, resorting to fallback X11.

(manual PrtScn to run gnome-screenshot)

Note that all previous attached logs came from Arch Linux.

I couldn't find useful xorg-session.log from the other distros with KDE 5.15, which present this problem:

1) Kubuntu 19.04 (db) - empty xorg-session.log file (0 b)

2) PCLinuxOS - doesn't exist folder:
/.local/share/sddm/
Comment 11 David Edmundson 2019-02-15 13:02:09 UTC
Git commit b4ddae94793644e51c503a2f5733b09c5586a5a8 by David Edmundson.
Committed on 15/02/2019 at 12:58.
Pushed by davidedmundson into branch 'Plasma/5.15'.

[ksmserver] Restore legacy sessions

Summary:
KSMServer has two modes, the slightly ancient mode (XSMP), and the
really ancient legacy mode (XSM).

When startup was rewritten in 96a595f1b8602838f065f312bd5b6ae24f8d6ac1
we accidentally dropped the call that invokes restore of the legacy
session as well as the normal mode.

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: broulik, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D19028

M  +1    -0    ksmserver/startup.cpp

https://commits.kde.org/plasma-workspace/b4ddae94793644e51c503a2f5733b09c5586a5a8
Comment 12 frc_kde 2019-02-15 13:02:16 UTC
Created attachment 118101 [details]
~/.config/ksmserverrc (Kubuntu 19.04 db)

~/.config/ksmserverrc (Kubuntu 19.04 db)

from Kubuntu 19.04 (development branch) with KDE 5.15
Comment 13 frc_kde 2019-02-15 13:04:14 UTC
Created attachment 118102 [details]
~/.config/ksmserverrc (PCLinuxOS)

~/.config/ksmserverrc (PCLinuxOS)

from PCLinuxOS with KDE 5.15
Comment 14 frc_kde 2019-02-15 13:10:35 UTC
Created attachment 118104 [details]
~/.config/ksmserverrc (openSUSE Leap)

~/.config/ksmserverrc (openSUSE Leap)

from openSUSE Leap with KDE 5.12.6, whose "Restore saved session" keeps working fine to run Conky at startup.
Comment 15 frc_kde 2019-02-19 19:12:32 UTC
I confirm it is fixed in Arch Linux with KDE 5.15.1, today.
Comment 16 frc_kde 2019-02-20 15:05:40 UTC
Fixed to PCLinuxOS too, with KDE 5.15.1, today.

Not so to Kubuntu 19.04 "development branch", upgraded to KDE 5.15.1 today, but now it is clearly an exception.