Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 677752 - dev-qt/qtgui? with x11-base/xorg-server-1.20.3 - under specific configurations qt5 gui may become slow
Summary: dev-qt/qtgui? with x11-base/xorg-server-1.20.3 - under specific configuration...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-11 20:17 UTC by i.Dark_Templar
Modified: 2019-02-28 05:47 UTC (History)
1 user (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 i.Dark_Templar 2019-02-11 20:17:56 UTC
If /run/shm is missing and /var/tmp is located on encrypted partition (for example, on encrypted root), qt5 gui for qt5 >= 5.11.0 may become slow. Specifically, it may become noticeable if vm.dirty_bytes and vm.dirty_background_bytes sysctl settings are set, and value isn't too big. In my configuration it's set to 2097152 (2MB). MIT-SHM extension for xorg-server should be enabled too.

Reproducible: Always

Steps to Reproduce:
1. configure root partition as encrypted partition. Making just /var/tmp an encrypted partition might be enough, but I didn't test it.
2. ensure there is no /run/shm directory. It's said it shouldn't be present even during build of xorg-server, but I didn't test this since I don't have this directory anyway.
3. ensure MIT-SHM xorg extension is enabled. It should be present in output of xdpyinfo.
4. Apply vm.dirty_bytes and vm.dirty_background_bytes sysctl settings, set it to 2097152, for example. Note: to completely reset these settings it looks like reboot might be required.
5. Install graphical application which uses qt >= 5.11.0. Issue doesn't reproduce with qt 5.9.x. lxqt and kde5 applications are affected too since they're qt5-based. For example, kate, konsole and qterminal are all affected. You don't have to use full kde5 session to reproduce this bug, qterminal in openbox worked for me for bug reproduction.
6. Run the application.
Actual Results:  
Application's GUI is very slow, especially on resizing.

Expected Results:  
Qt5 application GUI for Qt5 >= 5.11.0 should be as fast as GUI for Qt5 = 5.9.x and earlier.

Tested with openrc. /dev/shm is present and mounted. One of proposed upstream solutions is to add build configuration option --with-shared-memory-dir=/dev/shm to xorg-server (see bug URL), and it works for me. Thus bug is created for xorg-server.




$ emerge --info xorg-server
Portage 2.3.51 (python 2.7.15-final-0, default/linux/amd64/17.0/desktop, gcc-7.3.0, glibc-2.27-r6, 4.14.83-gentoo.49 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.14.83-gentoo.49-x86_64-Intel-R-_Core-TM-_i5-6500_CPU_@_3.20GHz-with-gentoo-2.6
KiB Mem:    16379560 total,   8725316 free
KiB Swap:    4192252 total,   4192252 free
Timestamp of repository gentoo: Sun, 10 Feb 2019 00:45:01 +0000
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.30 p5) 2.30.0
app-shells/bash:          4.4_p23-r1::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.12.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.40.3::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.30-r4::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: webrsync
    sync-uri: https://mirror.yandex.ru/gentoo-distfiles/
    priority: -1000

dt-overlay-patches
    location: /var/lib/layman/dt-overlay-patches
    sync-type: laymansync
    sync-uri: https://github.com/iDarkTemplar/dt-overlay-patches.git
    masters: gentoo
    priority: 50

dt-overlay-private
    location: /var/lib/layman/dt-overlay-private
    sync-type: laymansync
    sync-uri: git://private-git.templar-local/private/dt-overlay-private
    masters: gentoo dt-overlay-public
    priority: 50

dt-overlay-public
    location: /var/lib/layman/dt-overlay-public
    sync-type: laymansync
    sync-uri: https://github.com/iDarkTemplar/dt-overlay-public.git
    masters: gentoo
    priority: 50

rion
    location: /var/lib/layman/rion
    sync-type: laymansync
    sync-uri: https://github.com/rion-overlay/rion-overlay.git
    masters: gentoo
    priority: 50

Installed sets: @archive-tools, @bootloader, @devel-packages, @devel-tools, @devel-tools-x11, @filesystem-tools, @filesystem-tools-android, @fonts, @fortune, @gstreamer, @hardware-tools, @hardware-tools-x11, @image-tools, @kde5, @lxc, @mail-server, @media, @media-converters, @network-analyzers, @network-extras, @network-tools, @network-tools-extra, @opengl-devel, @opengl-utils, @pidgin, @portage-tools, @portage-tools-dev, @portage-tools-extra, @power-utils, @printers, @psi, @qmmp, @qt5-meta, @splash, @system-admin-utils, @system-admin-utils-extra, @system-daemons, @system-daemons-extra, @system-utils, @system-utils-extra, @text-utils, @virtualbox, @vpn, @wine, @x11-core, @x11-extras, @x11-utils
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --binpkg-respect-use=y --autounmask=n --complete-graph=y --keep-going"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="binpkg-logs distlocks ebuild-locks fakeroot fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/ http://mirror.leaseweb.com/gentoo/ http://mirror.netcologne.de/gentoo/ http://trumpetti.atm.tut.fi/gentoo/ ftp://mirror.yandex.ru/gentoo-distfiles/ http://mirror.bytemark.co.uk/gentoo/ http://gentoo.supp.name/ http://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://mirrors.soeasyto.com/distfiles.gentoo.org/"
INSTALL_MASK=" /etc/systemd /lib*/systemd /usr/lib*/systemd /usr/lib*/python*/test "
LANG="ru_RU.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 amr apm ares bash-completion bidi bluray branding bzip2 c++0x cairo caps cdda cdio cdr cleartype cli consolekit cracklib crypt cue cups custom-cflags custom-optimization cxx dbus dga dirac dri dts dvd dvdr emboss encode exif faad fam fbcon ffmpeg filecaps flac fontconfig fontforge freetype fribidi gcrypt gif glamor gme gmp gnutls gpm gtk gtkstyle iconv icu idn imlib inotify ipv6 jadetex jpeg kde lcms libass libdvdcss libtirpc lzma lzo mad matroska midi mmap mng mp3 mp4 mpeg multilib ncurses network nfs nls nptl offensive ogg openal opengl openmp opus pango pch pcmcia pcntl pcre pdf pic plasma png policykit posix postproc ppds private-headers projectm qml qt5 raw readline schroedinger seccomp sftp sndfile sockets spell ssl startup-notification svg system-cairo system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-sqlite tcpd tga theora threads tiff truetype udev udisks unicode upower usb utils vaapi vdpau vorbis vpx wavpack wma wxwidgets x264 xattr xcb xcomposite xft xinerama xpm xscreensaver xv xvid zlib" ABI_X86="64 32" ALSA_CARDS="hda-intel" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 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" KERNEL="linux" L10N="ru en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby24" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="vesa vga nvidia" 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"
Unset:  CC, CPPFLAGS, CTARGET, CXX, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

x11-base/xorg-server-1.20.3::gentoo was built with the following:
USE="doc glamor ipv6 kdrive suid udev unwind xephyr xnest xorg xvfb -debug -dmx -libressl -minimal (-selinux) -static-libs -systemd -wayland -xcsecurity" ABI_X86="(64)"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,lazy"
Comment 1 Matt Turner gentoo-dev 2019-02-12 23:45:48 UTC
There's a patch going upstream (https://gitlab.freedesktop.org/xorg/xserver/merge_requests/120) to the Xserver that I suspect we'll want to backport. Seems that it's not a complete solution, but I haven't read the whole QT bug report.

Cc'ing x11@.
Comment 2 Alexander Volkov 2019-02-27 09:46:53 UTC
See also https://bugreports.qt.io/browse/QTBUG-72535
Comment 3 Larry the Git Cow gentoo-dev 2019-02-28 05:47:40 UTC
The bug has been closed via the following commit(s):

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

commit 4b03aab97013ea3cacb778956262dbf16e70fcdf
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2019-02-28 01:18:22 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2019-02-28 05:44:46 +0000

    x11-base/xorg-server: Version bump to 1.20.4
    
    Closes: https://bugs.gentoo.org/677752
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 x11-base/xorg-server/Manifest                      |   1 +
 ...ck-the-shm-dir-at-run-time-not-build-time.patch | 174 +++++++++++++++++
 ...1.20.4-shm-Use-memfd_create-when-possible.patch |  89 +++++++++
 ...ndent-shm_tmpfile-to-follow-our-standards.patch |  72 +++++++
 x11-base/xorg-server/xorg-server-1.20.4.ebuild     | 217 +++++++++++++++++++++
 5 files changed, 553 insertions(+)