Bug 480722 - With Qt 6.7, clicking a GPU memory-used System Monitor freezes Plasmashell
Summary: With Qt 6.7, clicking a GPU memory-used System Monitor freezes Plasmashell
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Monitor (show other bugs)
Version: 6.0.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
: 486590 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-02-02 08:48 UTC by Kotori Itsuka
Modified: 2024-05-05 02:51 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0.5


Attachments
Screencast of clicking the system monitor, and its settings. (969.03 KB, video/webm)
2024-02-02 08:48 UTC, Kotori Itsuka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kotori Itsuka 2024-02-02 08:48:48 UTC
Created attachment 165466 [details]
Screencast of clicking the system monitor, and its settings.

SUMMARY
Plasmashell becomes non-interactive when clicking a VRAM memory used system monitor

STEPS TO REPRODUCE
1. Right click panel, add widgets, add system monitor sensor to plasmashell
2. Edit panel, reposition to the left of the system tray
3. Configure system monitor sensor, add GPU memory used to "Total Sensors" and "Sensors"
4. Hit Ok
5. Reopen system monitor sensor, change title to "VRAM".
6. Hit Ok
7. Click said system monitor sensor

OBSERVED RESULT
Popup partially opens. Plasmashell appears to be page flipping between two frames. Plasmashell becomes non-interactive and needs to be manually killed from the command line.

EXPECTED RESULT
Expanded view of the system monitor

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.93.0
KDE Frameworks Version: 5.249.0
Qt Version: 6.7.0
Kernel Version: 6.7.2-arch1-2 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 2700X Eight-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 6500 XT

ADDITIONAL INFORMATION
Two reboots ago, the system monitor had fixed itself. However I deleted and recreated it and the problem reappeared. This reboot it is bad from the get-go. Not sure why it seemed to have fixed itself that time.
Comment 1 mmc 2024-04-28 11:52:09 UTC
I recently started experiencing this issue on Plasma 6.0.3 and 6.0.4 on Arch Linux, but with the Total CPU Use and Memory Usage widgets when added to the panel. All I had to do was simply add them to the panel, exit edit mode, then click the widgets for the freeze to occur. Also in most cases, there would be no pop up and Plasmashell would simply freeze until the process is killed.

This issue occurred on my second PC with fresh installations of Arch Linux, with the Plasma versions mentioned above. I was also able to reproduce this in a virtual machine (on different hardware) using virt-manager, with Virtio and 3D Acceleration enabled, on both Arch and the latest KDE Neon User Edition.

I also want to note that my main desktop is also running Arch with Plasma 6.0.4 and does not have this problem. But on this machine, Plasma had been upgraded from 5.27. So this issue mainly concerns new installations.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Kernel Version: 6.8.7-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-4790S CPU @ 3.20GHz
Memory: 15.6 GiB of RAM
Graphics Processor: AMD Radeon RX 480 Graphics
Comment 2 mmc 2024-04-29 16:12:39 UTC
Hmm, if I add a System Monitor widget such as Total CPU Use to the panel in the Wayland session, then click on it, the freeze occurs. If I log out and log into the X11 session, then click the widget, it works and appears normally, no freezes. But, if I then log out of the X11 session and back into the Wayland session, then click the widget, it now works normally and there is no freeze. It will also continue to work after rebooting. However, if I remove the widget, add it back while in the Wayland session then click on it, the freeze will occur again.
Comment 3 mmc 2024-04-29 22:50:40 UTC
The Plasmashell freeze seems to only occur when the Pie Chart display style is set. There are two lines that often appear in the system journal relating to the Pie Chart when adding the widget. 
> plasmashell[1794]: file:///usr/share/ksysguard/sensorfaces/org.kde.ksysguard.piechart/contents/ui/CompactRepresentation.qml:22:1: QML CompactRepresentation: Binding loop detected for property "implicitHeight"
> plasmashell[1794]: file:///usr/share/ksysguard/sensorfaces/org.kde.ksysguard.piechart/contents/ui/FullRepresentation.qml:21:1: QML FullRepresentation: Binding loop detected for property "implicitHeight"

These lines also appear during the X11 session, where there is no freeze. So the only other errors that stand out to me are these Wayland errors. Not sure if they are related.
> plasmashell[1794]: kf.windowsystem.wayland: Failed to recreate shadow for PlasmaQuick::Dialog(0x587ebfb06610)
> plasmashell[1794]: qt.qpa.wayland: eglSwapBuffers failed with 0x300d, surface: 0x0
Comment 4 Arjen Hiemstra 2024-04-30 12:17:22 UTC
I actually have been experiencing this myself for a while. With some of the comments here I realised that this is actually a bug in Plasma that is being solved in https://invent.kde.org/plasma/libplasma/-/merge_requests/1109 . At least for me with that applied, I no longer get freezes.
Comment 5 mmc 2024-05-01 15:46:13 UTC
(In reply to Arjen Hiemstra from comment #4)
> I actually have been experiencing this myself for a while. With some of the
> comments here I realised that this is actually a bug in Plasma that is being
> solved in https://invent.kde.org/plasma/libplasma/-/merge_requests/1109 . At
> least for me with that applied, I no longer get freezes.

Good to know, thanks!

I can also confirm that after applying the patch, the freeze no longer occurs on my system.
Comment 6 Marco Martin 2024-05-02 09:51:08 UTC
Git commit a0949c6afcff4192ffcdf43c2ef305fb4b61f857 by Marco Martin.
Committed on 02/05/2024 at 09:50.
Pushed by mart into branch 'master'.

Workaround setMinimumSize not resizing

on wayland, setting  the  minimum size of a window, doesn't
resize it if its new minimum size is bigger then the current size
Related: bug 485456

M  +15   -5    src/plasmaquick/appletpopup.cpp

https://invent.kde.org/plasma/libplasma/-/commit/a0949c6afcff4192ffcdf43c2ef305fb4b61f857
Comment 7 Marco Martin 2024-05-02 12:50:09 UTC
Git commit 6ef5f23018f02eb7cdb2523adb224f34b7a8f22d by Marco Martin.
Committed on 02/05/2024 at 12:45.
Pushed by mart into branch 'Plasma/6.0'.

Workaround setMinimumSize not resizing

on wayland, setting  the  minimum size of a window, doesn't
resize it if its new minimum size is bigger then the current size
Related: bug 485456


(cherry picked from commit a0949c6afcff4192ffcdf43c2ef305fb4b61f857)

0404657c Workaround setMinimumSize not resizing
a82e4ca1 enforce bounds everywhere
e625482e Apply 1 suggestion(s) to 1 file(s)

M  +15   -5    src/plasmaquick/appletpopup.cpp

https://invent.kde.org/plasma/libplasma/-/commit/6ef5f23018f02eb7cdb2523adb224f34b7a8f22d
Comment 8 Nate Graham 2024-05-05 02:51:48 UTC
*** Bug 486590 has been marked as a duplicate of this bug. ***