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

            Bug ID: 503827
           Summary: When changing songs with screen blanked,
                    kscreenlocker_greet burns over 1 CPU core reloading
                    media control icon
    Classification: Plasma
           Product: plasmashell
           Version: 6.3.4
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Screen locking
          Assignee: plasma-b...@kde.org
          Reporter: nyanpas...@tuta.io
  Target Milestone: 1.0

Created attachment 180982
  --> https://bugs.kde.org/attachment.cgi?id=180982&action=edit
Terminal log of stack traces.

SUMMARY
If I let a computer running KDE idle until the screen locks and turns off, then
initiate song changes in mpd with mpd-mpris enabled, kscreenlocker_greet enters
an infinite loop of decoding the album image until you tap a key to wake the
screen.

STEPS TO REPRODUCE
This bug happens at random every few weeks on my server laptop with sleep
disabled. Here are instructions to replicate it at will.

1. Install and `systemctl enable` mpd and mpd-mpris.
2. Load some songs with album art (which will show in KDE's lock screen)
3. Stop mpd playback.
4. Press Win+L to lock the screen (spawning kscreenlocker_greet), then wait
until the screen goes black (or press Esc).
5. ssh into the machine and run:

sudo sh -c 'DEBUGINFOD_URLS=https://debuginfod.archlinux.org gdb -p `pgrep
kscreenlocker`' (you may not need the full command if you can run gdb -p
without root.) (replace DEBUGINFOD_URLS with distro of your choice)
b QQuickImageBase::loadPixmap
c

(When running gdb on system packages, watch for OOM errors, due to
https://sourceware.org/bugzilla/show_bug.cgi?id=23710#c24. I even got a kernel
panic once!)

6. Start a second ssh session to the machine and run htop to monitor CPU usage.
(When I initially discovered this bug without htop running, I discovered it
through fan noise.)
7. Using a mpd client of your choice, shuffle your song list, start playing a
song (should breakpoint kscreenlocker_greet, if LTO with considerable delay),
then press Next in the music player twice to begin playing 3 songs for a few
seconds eaach (the images may not have to be different since
kscreenlocker_greet decodes an image even when switching songs in the same
album).
8. In gdb, type c a few times, then dis, then c again.

OBSERVED RESULT
kscreenlocker_greet burns over an entire CPU core until you press a key to show
the UI.

EXPECTED RESULT
kscreenlocker_greet doesn't burn a CPU core.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.13.0
Qt Version: 6.9.0
Kernel Version: 6.14.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-6200U CPU @ 2.30GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 520
Manufacturer: LENOVO
Product Name: 80SA
System Version: Lenovo ideapad FLEX 4-1470

ADDITIONAL INFORMATION

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

Reply via email to