Bug 467092 - Some desktop icons disappear on wake-up from sleep and only re-appear when plasmashell is restarted ("Creating a fake screen in order for Qt not to crash")
Summary: Some desktop icons disappear on wake-up from sleep and only re-appear when pl...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Desktop icons & Folder View widget (show other bugs)
Version: 5.27.4
Platform: Arch Linux Linux
: HI major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression, wayland
: 466729 468615 468665 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-03-09 07:43 UTC by Pawel
Modified: 2023-11-17 06:08 UTC (History)
11 users (show)

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


Attachments
kscreen-console-bug (16.63 KB, text/plain)
2023-03-09 07:43 UTC, Pawel
Details
no manage desktops and panels (1.20 MB, video/x-matroska)
2023-03-14 18:50 UTC, Pawel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel 2023-03-09 07:43:31 UTC
Created attachment 157136 [details]
kscreen-console-bug

this is a follow-up from bug 465536

I have 5 files on my desktop - 3 folders and 2 PDF documents. After wake up from sleep the 3 folders would disappear (after 5.27.2); I have since added the 2 PDF documents and after wake-up the 3 folders disappear still, but the 2 new PDF files are present. So in a change to bug 465536 only *some* files disappear now, but the issue still persists.

Journal:

Mar 09 08:25:35 arch-Bednar kcminit[72968]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Mar 09 08:25:35 arch-Bednar plasmashell[57537]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Mar 09 08:25:35 arch-Bednar plasmashell[57537]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Mar 09 08:25:35 arch-Bednar kcminit[72968]: Initializing  "/usr/lib/qt/plugins/plasma/kcms/systemsettings/kcm_fonts.so"
Mar 09 08:25:35 arch-Bednar plasmashell[57537]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Mar 09 08:25:35 arch-Bednar kcminit[72982]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Mar 09 08:25:35 arch-Bednar plasmashell[57537]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:20: TypeError: Cannot read property 'pluginName' of null
Mar 09 08:25:35 arch-Bednar plasmashell[57537]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:75: TypeError: Cannot read property 'configuration' of null
Mar 09 08:25:35 arch-Bednar plasmashell[57537]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:78: TypeError: Cannot read property 'pluginName' of null
Mar 09 08:25:35 arch-Bednar plasmashell[57537]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:80: TypeError: Cannot read property 'configuration' of null
Mar 09 08:25:35 arch-Bednar plasmashell[57537]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:81: TypeError: Cannot read property 'configuration' of null
Mar 09 08:25:35 arch-Bednar plasmashell[57537]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:82: TypeError: Cannot read property 'configuration' of null
Mar 09 08:25:35 arch-Bednar plasmashell[57537]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:83: TypeError: Cannot read property 'configuration' of null
Mar 09 08:25:35 arch-Bednar plasmashell[57537]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:84: TypeError: Cannot read property 'configuration' of null
Mar 09 08:25:35 arch-Bednar plasmashell[57537]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:16: TypeError: Cannot read property 'configuration' of null
Mar 09 08:25:35 arch-Bednar plasmashell[57537]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:17: TypeError: Cannot read property 'configuration' of null
Mar 09 08:25:35 arch-Bednar plasmashell[57537]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:18: TypeError: Cannot read property 'configuration' of null
Mar 09 08:25:35 arch-Bednar kcminit[72982]: Initializing  "/usr/lib/qt/plugins/plasma/kcms/systemsettings/kcm_fonts.so"
Mar 09 08:25:36 arch-Bednar plasmashell[57537]: file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/main.qml: QML Containment (parent or ancestor of Wallpaper): grabToImage: item's window is not visible
Mar 09 08:25:36 arch-Bednar plasmashell[57537]: file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/main.qml: QML Containment (parent or ancestor of Wallpaper): grabToImage: item's window is not visible
Mar 09 08:25:36 arch-Bednar plasmashell[57537]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Mar 09 08:25:36 arch-Bednar plasmashell[57537]: Checking screens: available: (QScreen(0x5614bdbc90e0, name="DP-1")) redundant: QHash() fake: QSet(QScreen(0x5614bd166e80, name="")) all: (QScreen(0x5614bd166e80, name=""), QScreen(0x5614bdbc90e0, name="DP-1"))
Mar 09 08:25:36 arch-Bednar kcminit[73055]: Initializing  "/usr/lib/qt/plugins/plasma/kcms/systemsettings/kcm_fonts.so"
Mar 09 08:25:37 arch-Bednar plasmashell[57537]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Mar 09 08:25:37 arch-Bednar plasmashell[57537]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Mar 09 08:25:37 arch-Bednar plasmashell[57537]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Mar 09 08:25:37 arch-Bednar plasmashell[57537]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()

kscreen-doctor-o

Output: 1 DP-1 enabled connected priority 1 DisplayPort Modes: 0:2560x1440@144*! 1:2560x1440@120 2:2560x1440@100 3:2560x1440@60 4:1920x1200@144 5:1920x1080@120 6:1920x1080@120 7:1920x1080@60 8:1920x1080@60 9:1920x1080@60 10:1920x1080@50 11:1600x1200@144 12:1680x1050@60 13:1280x1024@75 14:1280x1024@60 15:1440x900@60 16:1280x960@60 17:1280x800@144 18:1152x864@75 19:1280x720@120 20:1280x720@120 21:1280x720@60 22:1280x720@60 23:1280x720@60 24:1280x720@50 25:1440x576@50 26:1440x576@50 27:1024x768@75 28:1024x768@70 29:1024x768@60 30:1440x480@60 31:1440x480@60 32:1440x480@60 33:1440x480@60 34:800x600@75 35:800x600@72 36:800x600@60 37:800x600@56 38:720x576@50 39:720x576@50 40:720x480@60 41:720x480@60 42:720x480@60 43:720x480@60 44:640x480@75 45:640x480@73 46:640x480@67 47:640x480@60 48:640x480@60 49:640x480@60 50:720x400@70 51:1600x1200@60 52:1280x1024@60 53:1024x768@60 54:1920x1200@60 55:1280x800@60 56:2560x1440@60 57:1920x1080@60 58:1600x900@60 59:1368x768@60 60:1280x720@60 Geometry: 0,0 2560x1440 Scale: 1 Rotation: 1 Overscan: 0 Vrr: Automatic RgbRange: unknown


Operating System: Arch Linux 
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.2.2-arch2-1 (64-bit)
Graphics Platform: Wayland
Processors: 24 × AMD Ryzen 9 5900X 12-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 6800 XT
Comment 1 Nate Graham 2023-03-13 22:57:02 UTC
If you use the "Manage Desktops and Panels" window to re-arrange your desktops and then get back to your current setup, does the issue stop happening?
Comment 2 Pawel 2023-03-14 18:31:15 UTC
hi Nate,

where do I find this window? Not sure what you are referring to by "Manage Desktops and Panels" window.

Thanks
Comment 3 Nate Graham 2023-03-14 18:45:46 UTC
Sorry, forgot to add instructions. You can access it like so:

Right-click on desktop > click on "Enter Edit Mode" > a toolbar pops down from the top of the screen > click on "Manage Desktops and Panels"
Comment 4 Pawel 2023-03-14 18:50:45 UTC
Created attachment 157282 [details]
no manage desktops and panels

I don't think I have that control - see the video
Comment 5 Nate Graham 2023-03-14 18:56:04 UTC
Darn. That means you only have one containment which means the icons and containments didn't get re-arranged (which is good!) and we need to figure out why they're disappearing on that one screen.
Comment 6 Nate Graham 2023-03-26 00:17:42 UTC
Any chance this is fixed in Plasma 5.27.3 for you?
Comment 7 Nate Graham 2023-04-09 20:24:05 UTC
Pawel, can you reproduce the issue in Plasma 5.27.4 which was just released? It has an additional change relevant to this use case.
Comment 8 Pawel 2023-04-11 17:03:28 UTC
Hi Nate,

sure, will check and report back. might take a few days though.
Comment 9 Pawel 2023-04-12 06:59:54 UTC
hi Nate,

The problem still persists I am afraid. The journal log does seem more verbose, though:

Apr 12 08:06:31 arch-Bednar bednar[110674]: [psd-suspend-sync] re-taking inhibit lock...
Apr 12 08:06:32 arch-Bednar kwin_wayland[1646]: kwin_core: Parse error in tiles configuration for monitor "92e842d7-5928-5c43-884a-4912e7cc82ed" : "illegal value" Creating default setup
Apr 12 08:06:32 arch-Bednar maliit-keyboard[1720]: maliit.connection.wayland: virtual void Maliit::Wayland::InputMethod::zwp_input_method_v1_deactivate(zwp_input_method_context_v1*)
Apr 12 08:06:32 arch-Bednar maliit-keyboard[1720]: maliit.connection.wayland: virtual Maliit::Wayland::InputMethodContext::~InputMethodContext()
Apr 12 08:06:32 arch-Bednar polkit-kde-authentication-agent-1[1830]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Apr 12 08:06:32 arch-Bednar DiscoverNotifier[2056]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Apr 12 08:06:32 arch-Bednar kdeconnectd[2034]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Apr 12 08:06:32 arch-Bednar xdg-desktop-portal-kde[1834]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Apr 12 08:06:32 arch-Bednar kwalletd5[1014]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Apr 12 08:06:32 arch-Bednar flameshot[2013]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Apr 12 08:06:32 arch-Bednar kactivitymanagerd[1778]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Apr 12 08:06:32 arch-Bednar yakuake[2036]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Apr 12 08:06:32 arch-Bednar kcalc[24111]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Apr 12 08:06:32 arch-Bednar plasma-discover[2664]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Apr 12 08:06:32 arch-Bednar maliit-keyboard[1720]: in clear preedit.. clearing word engine
Apr 12 08:06:32 arch-Bednar telegram-desktop[2039]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Apr 12 08:06:32 arch-Bednar dolphin[29752]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Apr 12 08:06:32 arch-Bednar okular[45059]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Apr 12 08:06:32 arch-Bednar dolphin[24653]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Apr 12 08:06:32 arch-Bednar kcalc[28307]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Apr 12 08:06:32 arch-Bednar okular[38222]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Apr 12 08:06:32 arch-Bednar okular[60322]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Apr 12 08:06:32 arch-Bednar okular[60591]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Apr 12 08:06:32 arch-Bednar okular[28083]: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Comment 10 Nate Graham 2023-04-13 18:17:34 UTC
Darn. Thanks. If you restart plasmashell with `plasmashell --replace` in a terminal window, do the missing icons come back, by any chance?
Comment 11 Pawel 2023-04-13 18:18:20 UTC
(In reply to Nate Graham from comment #10)
> Darn. Thanks. If you restart plasmashell with `plasmashell --replace` in a
> terminal window, do the missing icons come back, by any chance?

yes, they do.
Comment 12 Nate Graham 2023-04-13 18:26:41 UTC
Oh thank goodness.

The whole "Creating a fake screen in order for Qt not to crash" thing in the logs seems suspicious since I recall that you;re only using a single-screen setup, right?
Comment 13 Pawel 2023-04-13 18:30:15 UTC
yes that's correct. I only have one monitor hooked up (Display Port).
Comment 14 Nate Graham 2023-04-14 19:57:26 UTC
*** Bug 467951 has been marked as a duplicate of this bug. ***
Comment 15 Valerio Galdo 2023-04-16 13:31:32 UTC
I don't understand...
If th bug was only for a user config, with a fresh installation the problem shouldn't be there, right?
Comment 16 Nate Graham 2023-04-17 15:42:34 UTC
There isn't any evidence yet that this is caused by a local configuration issue; it could be a code issue. It needs investigation to determine the exact cause.
Comment 17 Valerio Galdo 2023-04-17 17:05:09 UTC
Sorry, i know you work hard and thank you for taking the time to improve kde. I hope everything can be sorted out soon
Comment 18 Nate Graham 2023-04-17 17:13:22 UTC
*** Bug 468615 has been marked as a duplicate of this bug. ***
Comment 19 Nate Graham 2023-04-19 16:54:09 UTC
*** Bug 468665 has been marked as a duplicate of this bug. ***
Comment 20 Nate Graham 2023-04-27 19:40:08 UTC
*** Bug 466729 has been marked as a duplicate of this bug. ***
Comment 21 Valerio Galdo 2023-05-17 07:54:59 UTC
I noticed that if i use Wayland insted of x-org there isn't the bug, but the pc doesn't wake up after suspension.

Sistema operativo: KDE neon 5.27
Versione di KDE Plasma: 5.27.5
Versione di KDE Frameworks: 5.106.0
Versione di Qt: 5.15.9
Versione del Kernel: 5.19.0-41-generic (64 bit)
Piattaforma grafica: Wayland
Comment 22 Valerio Galdo 2023-06-15 13:11:50 UTC
I don't know if it's my same problem, because in wayland my pc works fine
Comment 23 Jackson 2023-06-20 14:33:27 UTC
I'm not sure if this is useful, as my problems are rather outlined in bug 468665 and bug 466729 (desktop icons rearranging, desktop icons not refreshing).

But I did notice that these issues do not occur for me when I use my laptop on its own, but rather as soon as I connect it to an external monitor (via Thunderbolt). Sleeping and waking over and over doesn't matter, but once I connect to an external monitor, even if later disconnected, use `plasmashell --replace`. It also can occur if I change the display configuration (e.g., if I move from having both the laptop's screen and the external monitor on to just the external monitor, icons will rearrange & disappear).

Operating System: Kubuntu 23.04
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.2.0-20-generic (64-bit)
Graphics Platform: X11
Processors: 12 × 12th Gen Intel Core i5-1235U
Graphics Processor: Mesa Intel Graphics
System Version: ThinkPad T14 Gen 3
Comment 24 NicolasB 2023-07-20 20:20:58 UTC
I have a similar issue. After the screen wakes up from sleep sometimes the desktop icons are shuffled and I get this error message in the logs
kwin_x11[2350]: kwin_core: Parse error in tiles configuration for monitor "5b7a5ba4-43cc-5910-8e98-f358f9d54b43" : "illegal value" Creating default setup

All the icons are still there but they have been moved in a seemingly random order. This happen after the monitor went to sleep and wakes up, not the PC. I only have one monitor plugged in Display Port.

OS: Fedora Linux 37 (KDE Plasma) x86_64
Kernel: 6.3.12-100.fc37.x86_64
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9
X11
Comment 25 C. Kimna 2023-09-04 23:54:13 UTC
This bug is marked as duplicate in dozen of reports, about one year.
Why isn't it fixed ?
Comment 26 Nate Graham 2023-09-04 23:57:32 UTC
Because it's not easily reproducible by developers, challenging to fix, and the people with the most knowledge of how to fix it don't use the feature.

See also https://pointieststick.com/2023/07/16/where-bugfixes-and-new-features-come-from.

But it's marked as HI priority which means it will get fixed eventually.
Comment 27 NicolasB 2023-09-05 00:01:30 UTC
Not certain, but I think this might be linked to https://bugs.kde.org/show_bug.cgi?id=469445.
Even since I implemented the quick and dirty fix proposed by Federico Dossena (the sed script that clears the plasma-org.kde.plasma.desktop-appletsrc file) I didn't get this bug again.
Comment 28 Bug Janitor Service 2023-11-06 22:28:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1800
Comment 29 Nate Graham 2023-11-08 20:33:21 UTC
Git commit 1c8a4d1e46b9a519ab6576d3b9829eb611c5c9a5 by Nate Graham, on behalf of Harald Sitter.
Committed on 08/11/2023 at 21:27.
Pushed by ngraham into branch 'master'.

foldermodel: lift screen add/remove handling out of screenmapper

screenmapper is the wrong place for it because we don't know the url
inside the mapper. Instead handle events in the foldermodel and
correctly delegate the add/remove actions to the mapper with both our
screenId AND the activityId

notably the previous code would incorrectly invoke addScreen with empty
activityIds triggering fallback handling that resulted in incorrect
m_screensPerPath management (there would be no screen associated with
our url anymore after a screenAdded signal because our screen got
associated with no url) and consequently firstAvailableScreen would
return no screen for our url (remember: we are associated with no url)
making FolderModel::filterAcceptsRow return false and filtering
completely valid entries
Related: bug 467951

possibly also is the root cause behind

M  +11   -1    containments/desktop/plugins/folder/foldermodel.cpp
M  +1    -8    containments/desktop/plugins/folder/screenmapper.cpp
M  +1    -1    containments/desktop/plugins/folder/screenmapper.h

https://invent.kde.org/plasma/plasma-desktop/-/commit/1c8a4d1e46b9a519ab6576d3b9829eb611c5c9a5
Comment 30 Bug Janitor Service 2023-11-08 20:37:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1810
Comment 31 Nate Graham 2023-11-08 20:44:31 UTC
Git commit a6bc63103ed128ffe0fd843eb3c4416ede835fde by Nate Graham, on behalf of Harald Sitter.
Committed on 08/11/2023 at 21:36.
Pushed by ngraham into branch 'Plasma/5.27'.

foldermodel: lift screen add/remove handling out of screenmapper

screenmapper is the wrong place for it because we don't know the url
inside the mapper. Instead handle events in the foldermodel and
correctly delegate the add/remove actions to the mapper with both our
screenId AND the activityId

notably the previous code would incorrectly invoke addScreen with empty
activityIds triggering fallback handling that resulted in incorrect
m_screensPerPath management (there would be no screen associated with
our url anymore after a screenAdded signal because our screen got
associated with no url) and consequently firstAvailableScreen would
return no screen for our url (remember: we are associated with no url)
making FolderModel::filterAcceptsRow return false and filtering
completely valid entries
Related: bug 467951

possibly also is the root cause behind

M  +11   -1    containments/desktop/plugins/folder/foldermodel.cpp
M  +1    -8    containments/desktop/plugins/folder/screenmapper.cpp
M  +1    -1    containments/desktop/plugins/folder/screenmapper.h

https://invent.kde.org/plasma/plasma-desktop/-/commit/a6bc63103ed128ffe0fd843eb3c4416ede835fde
Comment 32 Nate Graham 2023-11-17 06:08:03 UTC
All who were affected, please test again with the upcoming Plasma 5.27.10 bugfix release, which includes those changes. Thanks a lot!