Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 819459 - kde-apps/konsole-21.08.2 - unclean shutdown/broken session restore?
Summary: kde-apps/konsole-21.08.2 - unclean shutdown/broken session restore?
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo KDE team
URL: https://bugs.kde.org/show_bug.cgi?id=...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-22 13:37 UTC by peter@prh.myzen.co.uk
Modified: 2022-05-18 14:08 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info =kde-apps/konsole-21.08.2 (emerge.info,6.95 KB, application/x-info)
2021-10-22 13:37 UTC, peter@prh.myzen.co.uk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description peter@prh.myzen.co.uk 2021-10-22 13:37:45 UTC
Created attachment 746127 [details]
emerge --info  =kde-apps/konsole-21.08.2

I use sddm to log in and out and to reboot. I have three Konsole windows open on one desktop, and it used to be that, when I logged out, they would all close cleanly and then reappear when I next logged in, and in the same directories as before.

Now, they don't shut down when sddm (I assume it is) tells them to. Their window contents reappear after a few seconds, for a second or so, before disappearing. The windows themselves don't appear; just their contents.

On logging-in again, Konsole is absent from all desktops.

My impression, from watching the logout process, is that Konsole is not 
shutting itself down neatly, or at all, and eventually it just has the ground 
wrenched out from under it.
Comment 1 Johannes Hirte 2021-10-25 09:25:19 UTC
I can confirm this. Konsole isn't restoring after re-login. Downgrading konsole doesn't fixed this for me.
Comment 2 peter@prh.myzen.co.uk 2021-10-25 09:45:50 UTC
The impression I referred to is supported by the fact that the latest bash history is not being appended to ~/.bash_history at Konsole termination.
Comment 3 Andreas Sturmlechner gentoo-dev 2021-11-06 22:37:20 UTC
Did you switch to using Wayland sessions?
Comment 4 peter@prh.myzen.co.uk 2021-11-07 08:38:13 UTC
(In reply to Andreas Sturmlechner from comment #3)
> Did you switch to using Wayland sessions?

Nope. Just a straightforward Gentoo ~amd64 system here. Oh, except that I use bootctl from systemd-boot, not Grub. I think that's the only thing you might say is out of the ordinary.
Comment 5 Andreas Sturmlechner gentoo-dev 2021-11-07 08:52:34 UTC
(In reply to Johannes Hirte from comment #1)
> Downgrading konsole doesn't fixed this for me.
What versions did you test...?
Comment 6 Andreas Sturmlechner gentoo-dev 2021-11-08 18:32:55 UTC
I have so far not been able to reproduce your observations with konsole-21.04.3/KDE Frameworks 5.85 or 21.08.3/Future KDE Frameworks.
Comment 7 Johannes Hirte 2021-11-09 06:41:50 UTC
I still see this behavior with konsole-21.08.3/KDE Frameworks 5.87.0

All applications/windows but konsole are restored at login. I'll try with a new created user, in case some user specific config is causing this.
Comment 8 peter@prh.myzen.co.uk 2021-11-09 09:33:41 UTC
Could the problem be in sddm not issuing the shutdown signal properly? I'm on sddm-0.18.1-r5. I use it to log in and out.
Comment 9 Johannes Hirte 2021-11-10 11:08:21 UTC
Must be somehting user-specific. I wasn't able to reproduce this with a new user.
Comment 10 peter@prh.myzen.co.uk 2021-11-10 14:33:54 UTC
(In reply to Johannes Hirte from comment #9)
> Must be somehting user-specific. I wasn't able to reproduce this with a new
> user.

Seeing that, I created a new user, and the effect did not appear. Then I ran System Settings to set preferences to suit me and the effect reappeared. That's all I did. So the problem does evidently lie in an internal Plasma conflict of some sort.

Is there a file I can send to show what user settings I set, or do I have to list them myself?
Comment 11 Andreas Sturmlechner gentoo-dev 2021-11-10 17:29:14 UTC
You probably could but that is out of scope for a downstream bug. Please narrow down the settings you change as much as possible, then file a report at bugs.kde.org.
Comment 12 peter@prh.myzen.co.uk 2021-11-10 19:01:43 UTC
Roger. Wilco.
Comment 13 David Flogeras 2021-11-13 21:04:39 UTC
I'm also seeing this, but even more weirdly, some konsoles (the ones I've had open for months and prior to this weird behaviour showing up) seem to restore just fine.  However, the windows that I've opened recently seem to "get stuck while logging out" and those same konsoles are MIA when I log back in.

Any chance you narrowed down a specific setting to twiddle?
Comment 14 peter@prh.myzen.co.uk 2021-11-14 09:58:36 UTC
(In reply to David Flogeras from comment #13)

> Any chance you narrowed down a specific setting to twiddle?
Not quite, yet. I've been running detailed tests by creating new users and tweaking one thing at a time, logging out and in at each step. Strangely enough, Firefox now seems to be involved, because I finished setting up a new user yesterday, with no problems showing, and then I went to Firefox to set that up too and the fault appeared again. Maybe one of my three Firefox add-ons is writing where it shouldn't: Bit Warden, Ublock Origin and Startpage.

Still more testing to do...
Comment 15 David Flogeras 2021-11-14 11:51:46 UTC
(In reply to peter@prh.myzen.co.uk from comment #14)
> set that up too and the fault appeared again. Maybe one of my three Firefox
> add-ons is writing where it shouldn't: Bit Warden, Ublock Origin and
> Startpage.

Well that's really bizarre, but I too use Ublock origin, so maybe shine the light on that one?  I don't know how many times in my life I've said "well that can't possibly be the problem" then been proven wrong :)
Comment 16 peter@prh.myzen.co.uk 2021-11-20 15:24:23 UTC
It isn't Firefox after all.

I really don't know what's going on; I've run many tests and they come back with contradictory results. Sometimes the same test run twice gives different results. I can't go any further with this. The problem is still present after a bare-metal recompilation and installation of everything on the system.

Looks like I'll just have to wait until some other development exposes the real cause.
Comment 17 David Flogeras 2021-11-21 13:02:37 UTC
I filed https://bugs.kde.org/show_bug.cgi?id=445862, but cannot seem to add it to this bug properly.
Comment 18 peter@prh.myzen.co.uk 2021-11-21 16:01:00 UTC
Curiouser and curiouser. I've just finished setting up a new user for myself, for the umpteenth time, and towards the end of the process I started getting "There have been repeated failed attempts to access KWallet. An application may be misbehaving" whenever I log out of the desktop. (I may have misspelt KWallet.)

This began while I was setting up the System Settings to suit me, and now it happens every time I log out.

I'm getting a bit thin on top, what with all the head-scratching.
Comment 19 Johannes Hirte 2021-12-05 22:20:21 UTC
After switching to the live-ebuilds for frameworks and plasma, the problem seems to be gone. Konsole(s) are saved and restored correctly again.
Comment 20 peter@prh.myzen.co.uk 2021-12-06 09:30:08 UTC
(In reply to Johannes Hirte from comment #19)
> After switching to the live-ebuilds for frameworks and plasma, the problem
> seems to be gone. Konsole(s) are saved and restored correctly again.

I don't know what you mean by live ebuilds, but I'm on kde-frameworks/plasma-5.88.0-r1 and kde-plasma/plasma-meta-5.23.4, and the fault is still present. (The rest of kde-frameworks is at 5.88.0.)
Comment 21 Johannes Hirte 2021-12-09 20:48:12 UTC
(In reply to peter@prh.myzen.co.uk from comment #20)
> (In reply to Johannes Hirte from comment #19)
> > After switching to the live-ebuilds for frameworks and plasma, the problem
> > seems to be gone. Konsole(s) are saved and restored correctly again.
> 
> I don't know what you mean by live ebuilds, but I'm on
> kde-frameworks/plasma-5.88.0-r1 and kde-plasma/plasma-meta-5.23.4, and the
> fault is still present. (The rest of kde-frameworks is at 5.88.0.)

Live ebuilds are 9999 (from git). And I was wrong. I have one konsole that is restored correctly. Everything else is still missing after logout/login. This is really strange.
Comment 22 David Flogeras 2022-03-05 20:45:13 UTC
Anyone have any revelations on this?  Still affecting this one machine.

I did notice that if I manually kill kwalletmanager5 prior to logging out, the desktop doesn't seem to pause on logout (which is what I thought was causing it to not save konsole sessions).  However, it doesn't fix the issue for me.
Comment 23 peter@prh.myzen.co.uk 2022-03-05 21:03:28 UTC
I still see it here on two machines. One is an Intel i7-5820K and the other is a Ryzen M9 5900X. Both are running Gentoo ~amd64, and the Ryzen box also suffered the fault while running Gentoo amd64. Neither of them is over-clocked.

The fault is repeatable, and the only way to avoid it is to log in to a new user account, set up three (in my case) Konsole windows, then run the system settings app, changing only one thing at a time and logging out and in again before making another change. If the fault appears, start all over again.
Comment 24 David Flogeras 2022-03-06 13:26:56 UTC
Do you happen to use the "New Session" feature of plasma?  The one where you can log into a different account, but leave the current one running in the background?

I'm just trying to think of things that I do differently on this particular machine compared to the others that are not affected.
Comment 25 peter@prh.myzen.co.uk 2022-03-06 14:27:07 UTC
(In reply to David Flogeras from comment #24)
> Do you happen to use the "New Session" feature of plasma?  The one where you
> can log into a different account, but leave the current one running in the
> background?

I don't, no. I don't know how I might do it, as I haven't heard of it.
Comment 26 Andreas Sturmlechner gentoo-dev 2022-05-18 14:08:43 UTC
I don't think we can do anything here. Please follow-up with upstream on this matter.