Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 622174 - >=kde-plasma/plasma-workspace-5.10.1 causes ~20 second delay in KDE confirmation pop-up windows
Summary: >=kde-plasma/plasma-workspace-5.10.1 causes ~20 second delay in KDE confirmat...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo KDE team
URL: https://bugs.kde.org/show_bug.cgi?id=...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-18 21:23 UTC by J.Borme
Modified: 2017-11-06 16:26 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description J.Borme 2017-06-18 21:23:11 UTC
When using KDE software, pop-up windows asking a confirmation pop-up to the user results in a freeze for 20 seconds or so, at the first occurrence in a particular software instance.

For example: 

1. Launch kwrite
2. type a few characters so the document is in a changed state
3. press CTRL-Q 

Result: freeze of 20 seconds of the application before the save/discard/cancel pop-up appears. The delay only happens once per process. If pressing Cancel, then further calls to the pop-up within the same kwrite instance will be executed without delay.

The problem happens with plasma-workspace-5.10.0, 5.10.1, 5.10.2, 5.10.2-r1 and not with <=plasma-workspaces-5.9.5.1-r1.

The problem happens with many software using KDE frameworks (kwrite, gwenview, dolphin, okular, also labplot), but not plain Qt software and software based on other toolkits. The problem is not connected to a particular KDE configuration (same thing happens when creating a new user with empty home).

When changing to another user using su and launching the software (e.g. kwrite): 
* some messages about dbus are displayed, such as: "Session bus not found\nTo circumvent this problem try the following command (with Linux and bash)\nexport $(dbus-launch)"
* kwrite launches, problem does not happen (no delay in the pop-up)
* after executing export $(dbus-launch) and launching kwrite, the problem happens again.
* the problem does not happen when changing to root (using su) then launching kwrite.

Example content for $(dbus-launch) in this situation: DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-wBJsI49fNi,guid=f0e1c744ab01fcd6c227365d5946b15d DBUS_SESSION_BUS_PID=13053 DBUS_SESSION_BUS_WINDOWID=16777217

For information, upstream changelog is https://www.kde.org/announcements/plasma-5.9.5-5.10.0-changelog.php

There is fixed bug #614280 with somewhat similar symptoms but I think it is not related.

Reproducible: Always




Portage 2.3.5 (python 2.7.12-final-0, default/linux/amd64/13.0, gcc-5.4.0, glibc-2.23-r3, 4.11.5-gentoo x86_64)
=================================================================
System uname: Linux-4.11.5-gentoo-x86_64-Intel-R-_Core-TM-_i7-2600K_CPU_@_3.40GHz-with-gentoo-2.3
KiB Mem:    14357056 total,   2604744 free
KiB Swap:   17407996 total,  17407996 free
Timestamp of repository gentoo: Sun, 18 Jun 2017 17:00:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.26.3::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.14.1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.26.1::gentoo, 2.28-r2::gentoo
sys-devel/gcc:            4.9.3::gentoo, 5.4.0::gentoo, 6.3.0::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

personnel
    location: /usr/overlays/personnel
    masters: gentoo
    priority: 0

hardened-development
    location: /var/lib/layman/hardened-development
    masters: gentoo
    priority: 50

palemoon
    location: /var/lib/layman/palemoon
    masters: gentoo
    priority: 50

stuff
    location: /var/lib/layman/stuff
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -mtune=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -mtune=native"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --keep-going"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.rnl.tecnico.ulisboa.pt/pub/gentoo/gentoo-distfiles/ ftp://mirror.ovh.net/gentoo-distfiles/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://www.ibiblio.org/pub/Linux/distribution/gentoo http://distfiles.gentoo.org"
LANG="fr_FR.UTF-8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--itemize-changes --recursive --links --safe-links --perms --times --omit-dir-times --omit-link-times --compress --force --whole-file --delete --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp/portage"
USE="X acl alsa amd64 bash-completion berkdb bzip2 c++0x cli consolekit crypt cups cxx dbus dri exif flac fortran gdbm gpm hal iconv icu idn ipv6 jpeg jpeg2k kde lzma modules multilib ncurses nls nptl opengl openmp pam pch pcre pdf png readline seccomp session spell ssl svg tcpd threads tiff truetype udev unicode vim-syntax xattr xetex zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="braindump flow karbon krita sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" L10N="fr fr-FR" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr pt de pt_PT fr_FR" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="radeon intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.4"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Andreas Sturmlechner gentoo-dev 2017-06-24 10:46:51 UTC
How do you launch your Plasma session?

Did you properly configure your desktop, e.g. dbus and consolekit in default runlevel?
Comment 2 J.Borme 2017-06-24 15:01:21 UTC
(In reply to Andreas Sturmlechner from comment #1)

I do not use the plasma desktop. I use x11-misc/slim and x11-wm/fluxbox, then I launch the KDE apps.

Both dbus and consolekit appear in "rc-config list default".
Comment 3 Andreas Sturmlechner gentoo-dev 2017-06-24 15:05:22 UTC
But then what is plasma-workspace doing on your system and how would it influence applications on a foreign WM?
Comment 4 J.Borme 2017-06-24 16:03:59 UTC
plasma-workspace was a dependency of notification-daemon due to USE=kde. I now removed the kde keyword, which allowed me to uninstall plasma-workspace. This is indeed a workaround for my problem, but still I think it should be ok to have more than one desktop environments on a computer, for testing and for the fun.
Comment 5 bugtrack 2017-07-11 13:39:40 UTC
I can confirm this bug here on Fluxbox,
e.g. in dolphin and okular, 
and my observations suggest that it is connected to the notification sound that is played:


In Dolphin:
Normal behaviour:
When deleting a document permanently (Shift+Delete), 
a (blocking) popup dialog (or notification?) is opened, 
asking whether one really wants to delete the selected item.
This is accompanied by a system sound announcing the popup (a "blinggg").

Buggy behaviour while constructing the first such popup:
After creating the popup window frame but before drawing its content,
dolphin now hangs completely for approximately 25 seconds.
Then the content is drawn and the notification sound is played.

HOWEVER:
When opening another type of dialog, which is neither blocking nor accompanied by a system sound like the properties window (Alt+Return), this popup window is drawn instantly, even if it is the very first dialog window that was created by this instance of dolphin.
(The sound playing blocking popup window still locks up dolphin for some time the first time it is opened)



In Okular:
Normal behaviour:
When a search (not starting at the begin of the document) reaches the end of a document, okular (usually) shows a (blocking) popup dialog (or notification?) asking whether one wants to continue from the beginning.
This is accompanied by a system sound announcing the popup (a "blinggg").

Buggy behaviour while constructing the first such popup:
After creating the popup window frame but before drawing its content,
Okular now hangs completely for approximately 25 seconds.
Then the content is drawn and the notification sound is played.


HOWEVER:
When opening a blocking popup window, that does not play a sound on construction 
like "Settings -> Configure Okular", this popup window is drawn instantly, even if it is the very first dialog window that was created by this instance of okular.
(The sound playing blocking popup window still locks up dolphin for some time the first time it is opened)


This suggests, that the problem is related only to popup windows / notifications that play a system sound on construction.



Is this observation (that the bug only occurs on sound-playing popups) in accordance with the observation at kwrite?



Any ideas how to narrow down the search field for this bug even further?
Comment 6 Coacher 2017-08-12 19:24:27 UTC
Confirm with openbox and plasma-workspace-5.10.4-r2.
Comment 7 Alexey Min 2017-08-12 19:42:24 UTC
https://phabricator.kde.org/D5968 - can this be the reason..?
Comment 8 Alexey Min 2017-08-12 20:29:51 UTC
(In reply to Alexey Min from comment #7)
> https://phabricator.kde.org/D5968 - can this be the reason..?

Or, more precisely, this https://phabricator.kde.org/D5012 .
But looking at code seems that waiter.h has:

constexpr static const int dbusTimeoutSec = 60;

not 20 or 30...
Comment 9 Coacher 2017-08-18 20:20:01 UTC
(In reply to Alexey Min from comment #7)
> https://phabricator.kde.org/D5968 - can this be the reason..?

Reverting this change, i.e. plasma-workspace commit ab60c3b, doesn't help.
Comment 10 Coacher 2017-08-30 09:55:35 UTC
Supposedly fixed upstream in https://cgit.kde.org/knotifications.git/commit/?id=1c97e1d9741fd15962474f47932dd09728dae76b

Please backport into stable.
Comment 11 Michael Palimaka (kensington) gentoo-dev 2017-08-30 13:13:47 UTC
Thanks, backported in git.

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b868d154f825023aa7cab38852336e2c30d6d18e

Please test.
Comment 12 Coacher 2017-08-30 22:15:05 UTC
Haven't tested 5.34.0-r1, but tested 5.34.0 with the patch from commit on top and it helps a lot. There's still one observable issue with very slow tray icons appearance, but applications at least usable now.
Comment 13 J.Borme 2017-09-19 21:56:03 UTC
(In reply to Andreas Sturmlechner from comment #3)
> But then what is plasma-workspace doing on your system 

Actually, the presence of plasma-workspace on the system is necessary to enjoy the Open File dialog (editable location bar, tree view, etc.) instead of the simpler Qt dialog. (See also https://www.reddit.com/r/kde/comments/3526u9/how_to_force_all_programs_to_use_kdialogs_file/ )

The Open Dialog in kate came back to normal now immediately after I emerged plasma-workspace (without ever launching plasma). Dialogs work good now. (Cannot say for tray icons, I do not use them.)
Comment 14 Andreas Sturmlechner gentoo-dev 2017-11-06 16:26:27 UTC
Thanks for investigating and taking this upstream. The original issue seems to be solved, if there are remaining systray issues please open a new bug upstream.