Bug 426952 - [NVIDIA][Wayland] kwin_wayland uses 100% of the CPU all the time
Summary: [NVIDIA][Wayland] kwin_wayland uses 100% of the CPU all the time
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: platform-wayland-nested (show other bugs)
Version: 5.19.5
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-25 10:14 UTC by Guilherme Silva
Modified: 2020-09-25 12:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
wayland-session.log (17.12 KB, text/x-log)
2020-09-25 10:14 UTC, Guilherme Silva
Details
kwin_wayland CPU usage (731.97 KB, image/png)
2020-09-25 10:16 UTC, Guilherme Silva
Details
perf.data.tar.xz (3.26 MB, application/x-xz)
2020-09-25 11:30 UTC, Guilherme Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guilherme Silva 2020-09-25 10:14:26 UTC
Created attachment 131925 [details]
wayland-session.log

SUMMARY
I'm trying to run Plasma on a Wayland session using a NVIDIA GPU, but after I log in, I can barely move the mouse cursor around, due to the kwin_wayland process hogging the CPU.

I have no idea how to debug this myself, but point me to the right direction and I'll gladly help!

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20200923
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.1
Kernel Version: 5.8.10-1-default
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-3570K CPU @ 3.40GHz
Memory: 7,7 GiB of RAM
Graphics Processor: GeForce GTX 660/PCIe/SSE2
Comment 1 Guilherme Silva 2020-09-25 10:16:22 UTC
Created attachment 131926 [details]
kwin_wayland CPU usage

It took me ages to take this screenshot.
Comment 2 David Edmundson 2020-09-25 10:28:04 UTC
sudo perf record --call-graph dwarf  —p `pidof kwin_wayland`


Record a snapshot for a few seconds and then see if we can open in hotspot
Comment 3 Guilherme Silva 2020-09-25 11:30:32 UTC
Created attachment 131928 [details]
perf.data.tar.xz

Thanks for the instructions! I recorded for about 3 seconds, so I hope it helps.
Comment 4 Guilherme Silva 2020-09-25 12:13:28 UTC
Actually, never mind. I found out what the problem was.

I had `KWIN_DRM_USE_EGL_STREAMS=1` set in my ~/.pam_environment, but after a systemd update, a PAM config file (more specifically, /etc/pam.d/common-session) got overwritten and removed the `user_readenv=1` option I had added there, which functionality is to set environment variables globally.

Long story short: The software rasterizer was being used instead of EGLStreams!

I'm so sorry for wasting your guys' time.