Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 678420 - KDE greeter / unlock only displayed after significant long time delay when resuming from S3
Summary: KDE greeter / unlock only displayed after significant long time delay when re...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-20 14:01 UTC by Joe Breuer
Modified: 2020-07-14 17:11 UTC (History)
0 users

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


Attachments
Log of one typical resume event (wake.log,49.46 KB, text/plain)
2019-02-20 14:01 UTC, Joe Breuer
Details
emerge --info (emerge-info.txt,7.18 KB, text/plain)
2019-02-20 14:04 UTC, Joe Breuer
Details
Log of one resume event with screen locking disabled (wake-nolock.log,55.08 KB, text/plain)
2019-02-21 06:49 UTC, Joe Breuer
Details
dbus-monitor --session --profile of suspend/resume WITH screen locking (dbus-session.log,79.49 KB, text/plain)
2019-05-14 05:49 UTC, Joe Breuer
Details
dbus-monitor --system --profile of suspend/resume WITH screen locking (dbus-system.log,181.80 KB, text/plain)
2019-05-14 05:49 UTC, Joe Breuer
Details
dbus-monitor --session --profile of suspend/resume WITHOUT screen locking (dbus-session-nolock.log,124.75 KB, text/plain)
2019-05-14 05:50 UTC, Joe Breuer
Details
dbus-monitor --system --profile of suspend/resume WITHOUT screen locking (dbus-system-nolock.log,168.05 KB, text/plain)
2019-05-14 05:50 UTC, Joe Breuer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Breuer 2019-02-20 14:01:02 UTC
Created attachment 565942 [details]
Log of one typical resume event

Putting my laptop to sleep (S3, suspend-to-RAM) is near instantaneous.

Booting from NVMe also is - less than 10 seconds total to SDDM login screen. Logging in also feels fast, 5-10 seconds max.

However, it takes a loong time - 15 to 25 seconds - to display the greeter / unlock screen after resuming.

The X display is up near instantaneously, showing a black screen with a movable mouse cursor. Then there's the 15-25 second wait with no visible activity before the session unlock screen is displayed.

It would be really nice for resume to not take longer than a full boot...

Input events to the black screen (clicking the mouse, pressing Enter etc.) have no effect.

I've had a look at the logs but don't really see what's causing the delay specifically. Any ideas?

I see the Kerberos authentication problem, no idea why that's happening - I was authenticated to resume the session on first try. Also, by timestamp, it seems to have been logged after the session was already unlocked - I place that between 14:48:44 and 14:48:47.

Also, sys tray event notifications from eg plugging in a phone or USB storage are already displayed on the black screen, so it seems the desktop is very much functional way earlier - it just takes so long to bring up the unlock screen for some reason.
Comment 1 Joe Breuer 2019-02-20 14:04:19 UTC
Created attachment 565944 [details]
emerge --info
Comment 2 Joe Breuer 2019-02-21 06:49:46 UTC
Created attachment 565984 [details]
Log of one resume event with screen locking disabled

For further testing, I've disabled the "Lock screen on resume" KDE setting.

Resuming like this gives an interactive desktop within 2-5 seconds. It feels slightly sluggish for another 10 seconds while the Xorg process is consuming most CPU; after this lets off it's fully responsive as usual.

This behavior feels much better than having to wait at a black screen for 15+ seconds, but for everyday use I need the machine to lock when it's suspended.
Comment 3 Joe Breuer 2019-02-21 06:51:45 UTC
Oh, and just for reference: Locking without suspending gives the unlock screen / password prompt without any delays.
Comment 4 Andreas Sturmlechner gentoo-dev 2019-05-12 19:44:45 UTC
Please test with Plasma 5.15.5.
Comment 5 Joe Breuer 2019-05-13 07:19:52 UTC
Will do! 

Is there an easier / more convenient way to switch to testing of Plasma (and back) besides accepting the arch keyword on =kde-plasma/plasma-meta-5.15.5 and following dependencies?

... and possibly switch back again? ;-)
Comment 6 Andreas Sturmlechner gentoo-dev 2019-05-13 18:09:21 UTC
So first of all, kde overlay provides appropriate package.keywords files (you can download them without having to add the overlay yourself):

https://gitweb.gentoo.org/proj/kde.git/tree/Documentation/package.accept_keywords
(ignore the hidden dirs, just copy the file you need)

Then, here are the current bugs for stable candidates:
bug 684200 - Frameworks 5.57.0
bug 685372 - Plasma 5.15.5
bug 685260 - Qt 5.12.3

So there will be no need to downgrade them, because soon they will be the new stable packages.
Comment 7 Joe Breuer 2019-05-14 05:48:36 UTC
Thank you Andreas for the advice, installing Plasma 5.15.5 went very smoothly that way.

The delay is still there, this time I measured it exactly - 36.5 seconds with Plasma 5.14.5, 35 seconds with Plasma 5.15.5. That's from resume until the session lock screen is displayed, unlocking the session is quick (less than 2 seconds).

For comparison, time from boot manager to login screen is 11 seconds, from login to desktop session 6.5 seconds.

With "lock screen on resume" turned off, the graphical display is back within 3-5 seconds of resuming, and the desktop fully operational (KWin signals a graphics reset and it and compositing are apparently restarted) after a total of 15 seconds.


Shot in the dark:

I've recently experienced another delay on the same system related to DBus, see bug #685816

So I took some DBus profile traces of suspend/resume cycles with and without screen locking. I don't really understand them, but maybe they're of use to someone.


Anything else I can do to further analyze or narrow down this?
Comment 8 Joe Breuer 2019-05-14 05:49:22 UTC
Created attachment 576520 [details]
dbus-monitor --session --profile of suspend/resume WITH screen locking
Comment 9 Joe Breuer 2019-05-14 05:49:48 UTC
Created attachment 576524 [details]
dbus-monitor --system --profile of suspend/resume WITH screen locking
Comment 10 Joe Breuer 2019-05-14 05:50:10 UTC
Created attachment 576526 [details]
dbus-monitor --session --profile of suspend/resume WITHOUT screen locking
Comment 11 Joe Breuer 2019-05-14 05:50:39 UTC
Created attachment 576528 [details]
dbus-monitor --system --profile of suspend/resume WITHOUT screen locking
Comment 12 Andreas Sturmlechner gentoo-dev 2020-07-01 21:41:32 UTC
Meanwhile there is Plasma 5.18.5 stable, 5.19.2 in ~arch. Any changes?