https://bugs.kde.org/show_bug.cgi?id=512444

Alessandro Mazza <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #8 from Alessandro Mazza <[email protected]> ---
Reproduced on Plasma 6.8.2. I used Claude Sonnet 5.5 Medium to try and address
this bug and write the report, because I have no experience and I'd have no
idea where to start from otherwise. 

I can add to this report what triggers it on my machine: the EXTERNAL MONITOR
dropping its HDMI connection while in standby.

Here is the report, I hope it's useful.

SUMMARY
Same symptom as this report: with the session locked and the screens in
power-saving mode, plasmashell goes to ~100% CPU and kwin_wayland to
~55-60% until the screen is woken. On my laptop this only happens with an
external HDMI monitor connected. With the monitor unplugged, the same
settings do not trigger it.

REPRODUCTION RATE
7 of 7 idle runs with the HDMI monitor connected (5 on Fedora 44, 2 on
Fedora 45).

STEPS TO REPRODUCE
1. Laptop with eDP-1 plus an HDMI monitor (HDMI-A-1 is priority 1).
2. Lock after 1 minute, turn the screen off after 2 minutes.
3. Leave the machine idle.

OBSERVED
About 15-25 s after screen-off, plasmashell and kwin_wayland spin.
Tctl reaches 96 C and the fans reach ~4100 RPM. The load stops when the
screen is woken.

EXPECTED
No sustained CPU load after an output disappears and returns.

WHAT HAPPENS ON THE HDMI CONNECTOR
I logged /sys/class/drm/card1-HDMI-A-1/{status,enabled,dpms} (0.2 s
polling). One Fedora 45 run:
  18:21:03.7  screen off: enabled=disabled, dpms=Off, status=connected
  18:21:08.7  status=disconnected   (+5.0 s)
  18:21:09.5  status=connected      (0.8 s later)
  18:21:14.3  status=disconnected   (+10.6 s)
  18:21:14.9  status=connected      (0.6 s later)
  18:21:18    spike detected by my watcher
So the monitor drops and restores its hotplug signal twice in standby.
Timing varies between runs (another run: +8 s and +17 s) but the pattern
and the 0.6-0.8 s blip length are the same. The spike starts 2-4 s after
the second reconnect, in every run.

At exactly those seconds the journal shows bursts of plasmashell
"requesting unexisting screen geometry 1" (~36 lines per burst), KWin
LayerShellV1Window messages, and kscreenlocker_greet recreating its UI.
PowerDevil's libddcutil also re-probes the monitor (DDCRC_READ_ALL_ZERO).
I cannot tell which of these, if any, is the cause.

PROFILE DURING THE SPIKE (perf record, 15 s, attached)
- plasmashell's GUI thread is idle (0%).
- The load is in three threads: QSGRenderThread ~35%, Wayland event
  thread ~28%, QThread ~27% of cycles.
- ~90% of cycles are in the kernel (syscall entry, scheduler, poll).
  Mesa/EGL is ~0.1%, and gpu_busy stays at 0.
- strace -c over 5 s: ~19-21k sendmsg and ~19-21k ppoll calls, with half
  of the recvmsg calls failing. This looks like a request-and-wait loop
  with the compositor. The heaviest call chain sampled is
  QSGRenderThread -> swapBuffers -> Mesa framebuffer validation ->
  wl_display_roundtrip_queue.

TRIED
- The monitor (Lenovo T24i-10) has no OSD option to disable automatic
  input detection.
- Letting the laptop sleep before screen-off: no spike seen in one run
  (not verified in detail).

ENVIRONMENT
Fedora 45 (also seen on 44), Plasma/KWin 6.8.2, Wayland,
kernel 7.2.15-300.fc45, Mesa 26.2.5, qt6-qtwayland 6.11.2,
libwayland 1.26.0-3. ThinkPad P14s, Ryzen 7 PRO 8840HS, Radeon 780M.

I'd be happy to test patches or collect more data.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to