https://bugs.kde.org/show_bug.cgi?id=487912

--- Comment #46 from imagina...@mailbox.org ---
(In reply to zb4ng from comment #44)
> Some things I tried to avoid this mess and/or find out why this happens:
> Every login, I create a log: 
> journalctl /usr/bin/plasmashell
> 
> Whenever the bug happens, then this is in the log:
> plasmashell[2581]: Qt: Session management error: Authentication Rejected,
> reason : MIT-MAGIC-COOKIE-1 authentication rejected
> plasmashell[2581]: Aborting shell load: The activity manager daemon
> (kactivitymanagerd) is not running.
> plasmashell[2581]: If this Plasma has been installed into a custom prefix,
> verify that its D-Bus services dir is known to the system for the daemon to
> be activatable.
> see also here: https://bugs.kde.org/show_bug.cgi?id=491130#c1
> 
> Now the "magic cookie" is managed by the X-Server for authentication
> purposes (I don't really know what's going on there and I couldn't find very
> detailed info about this).
> What I presume now is that there are at least two possible things that could
> be the cause:
> Either: Sometimes, "activity manager daemon" doesn't start in time for the
> Xauthority/magic cookie stuff.
> Or: The activity manager daemon doesn't start because the authentication got
> rejected.
> 
> In the light of this, I tried the following workarounds, but wo success:
> 1. add xhost +local: to ~/.profile in the hope that the X-Server
> authentication gets skipped.
> 2. boot and then wait two minutes before logging into the X-Server

I haven't seen this for a while but if you encounter it often you could try to
avoid losing your session by switching to "Restore from manually saved session"
in systemsettings and then use the session-menu to manually save your session
or execute 

        dbus org.kde.ksmserver /KSMServer
org.kde.KSMServerInterface.saveCurrentSession

in a terminal while in a Plasma-session (for automation one could use fcron). 
This works for Plasma-5, not sure about Plasma-6.

This is based on the assumption/observation that the bug leads to a
corrupted/incomplete ~/.config/ksmserverrc and/or missing session-files in
~/.config/session when using the usual way of saving the session at logout and
that this does not happen when saving the session manually.

Unfortuately, the dbus-method doesn't seem to work at logout and thus cannot be
automated with a logout-script (I've tried; also see [1]).

HTH.

---
[1]
https://superuser.com/questions/699857/save-session-using-shell-command-in-kde

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to