Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 746038 - kde-plasma/kwin-5.19.5 using 1000% CPU Wayland/KDE/Nvidia
Summary: kde-plasma/kwin-5.19.5 using 1000% CPU Wayland/KDE/Nvidia
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL: https://i.imgur.com/7mAq1uD.png
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-01 18:49 UTC by SimplyCorbett
Modified: 2020-10-15 17:01 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 SimplyCorbett 2020-10-01 18:49:17 UTC
After reading https://community.kde.org/Plasma/Wayland/Nvidia and seeing the updated status as of September 15th I gave wayland another try with Nvidia.

The desktop loads in and seems to work fine, but the mouse/keyboard have several second delays. After checking into things it appears Kwin-5.19.5 is using 1000%+ CPU.

I'm not seeing any errors but I've never used wayland and don't know where to look. Nothing recent in /var/log.

Reproducible: Always

Steps to Reproduce:
Login to KDE desktop with wayland/nvidia enabled.
Actual Results:  
1000%+ CPU on kwin

Expected Results:  
Normal CPU usage

Portage 3.0.8 (python 3.7.9-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-9.3.0, glibc-2.32-r2, 5.8.12-gentoo x86_64)
=================================================================
System uname: Linux-5.8.12-gentoo-x86_64-Intel-R-_Core-TM-_i7-8700K_CPU_@_3.70GHz-with-gentoo-2.7
KiB Mem:    32815668 total,  30656240 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Thu, 01 Oct 2020 11:00:01 +0000
Head commit of repository gentoo: 460618e1545612f0b8f52631ef64f4025ccdac25
Head commit of repository nvidia-vulkan: b01c38a3e5fd247736a68fab42c3aadf853e2b71

Head commit of repository steam-overlay: 9b344386364381390a2418299779ba7fea9225c3

sh bash 5.0_p18
ld GNU ld (Gentoo 2.34 p4) 2.34.0
app-shells/bash:          5.0_p18::gentoo
dev-lang/perl:            5.30.3-r1::gentoo
dev-lang/python:          2.7.18::gentoo, 3.6.12::gentoo, 3.7.9::gentoo, 3.8.6::gentoo, 3.9.0_rc2::gentoo
dev-util/cmake:           3.18.3::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.2::gentoo
sys-devel/binutils:       2.34-r1::gentoo, 2.35.1::gentoo
sys-devel/gcc:            9.3.0::gentoo, 10.2.0-r1::gentoo
sys-devel/gcc-config:     2.3.2::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.8::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r2::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes

nvidia-vulkan
    location: /var/db/repos/nvidia-vulkan
    sync-type: git
    sync-uri: https://github.com/kakra/nvidia-vulkan.git
    masters: gentoo

steam-overlay
    location: /usr/local/portage/steam-overlay
    sync-type: git
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

Installed sets: @steam
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -falign-functions=32 -pipe"
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/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -falign-functions=32 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 6 --load-average=10 --autounmask=y --keep-going"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH 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="-march=native -O2 -falign-functions=32 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -falign-functions=32 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="/lib/systemd /usr/lib/systemd"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US"
MAKEOPTS="-j10 -l10"
PKGDIR="/build-packages"
PORTAGE_COMPRESS="lz4"
PORTAGE_COMPRESS_FLAGS="-c"
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 activities aes alsa amd64 avx avx2 berkdb branding bzip2 cairo cdda cdr cli crypt cups dbus declarative dri dts dvd dvdr elogind emboss encode eudev exif f16c flac fma3 fortran gdbm gif gles2 gpm gtk gui hevc iconv icu ipv6 jpeg kde kipi kwallet lcms libglvnd libnotify libtirpc mad mmx mmxext mng mp3 mp4 mpeg multilib ncurses nls nptl nvdec nvenc ogg opengl openmp pam pango pclmul pcre pdf phonon plasma png policykit popcnt ppds pulseaudio qml qt5 readline sdl seccomp semantic-desktop spell split-usr sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vaapi vdpau vorbis wayland widgets wxwidgets x264 x265 xattr xcb xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2018" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7" QEMU_SOFTMMU_TARGETS="x86_64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby25 ruby26" USERLAND="GNU" VIDEO_CARDS="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, LANG, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Andreas Sturmlechner gentoo-dev 2020-10-02 18:41:34 UTC
Please go straight to upstream for such bugs. We are not going to fix Nvidia on the downstream side.

If you ask me, just use X with Nvidia for the foreseeable future, it is not going to work.
Comment 2 SimplyCorbett 2020-10-02 19:53:06 UTC
But it does work and the desktop is functional.

I'll file a bug report upstream as requested.
Comment 3 Andreas Sturmlechner gentoo-dev 2020-10-02 19:54:57 UTC
Also keep in mind that an edit in the midst of September may already refer to upcoming Plasma 5.20.
Comment 4 Vasco Steinmetz 2020-10-15 06:49:51 UTC
Set KWIN_DRM_USE_EGL_STREAMS=1 somewhere in /etc/env.d to enable EGLStreams instead of GBM with DRM in Kwin.

Wayland+KWin+NVIDIA works on my box without 100% CPU.
Funnily I'm having the exact contrary problem that Xorg X11 server is running at 100% CPU with kwin almost none since the last KDE/Qt update.