Bug 468408 - On Wayland with Plasma 6, plasmashell sometimes fails to load with "The Wayland connection experienced a fatal error: Resource temporarily unavailable"
Summary: On Wayland with Plasma 6, plasmashell sometimes fails to load with "The Wayla...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Startup process (show other bugs)
Version: master
Platform: Other Linux
: NOR crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6, wayland
Depends on:
Blocks:
 
Reported: 2023-04-12 00:16 UTC by Nate Graham
Modified: 2023-09-29 03:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27.5


Attachments
Full plasmashell log output (7.54 KB, text/plain)
2023-04-12 00:16 UTC, Nate Graham
Details
WAYLAND_DEBUG=1 log output (1.29 MB, text/plain)
2023-05-08 10:08 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2023-04-12 00:16:15 UTC
Created attachment 158026 [details]
Full plasmashell log output

With current git master of Plasma 6, plasmashell frequently fails to load for me on Wayland. When this happens, its console log terminates in the following:

> Error sending request: Resource temporarily unavailable
> The Wayland connection experienced a fatal error: Resource temporarily unavailable

Unfortunately when running `WAYLAND_DEBUG=1 plasmashell` the issue never happens. :/

When this happens, I simply try again. Usually after 2 or 3 tries, plasmashell finally loads. Full plasmashell output attached.
Comment 1 Nate Graham 2023-05-08 10:08:04 UTC
Created attachment 158768 [details]
WAYLAND_DEBUG=1 log output
Comment 2 Nate Graham 2023-05-08 10:17:33 UTC
This seems to be the relevant part:


[3424745.793]  -> wl_registry@2.bind(24, "org_kde_kwin_server_decoration_palette_manager", 1, new id [unknown]@216)
[3424746.109]  -> org_kde_kwin_server_decoration_palette_manager@216.create(new id org_kde_kwin_server_decoration_palette@197, wl_surface@44)
[3424746.501]  -> org_kde_kwin_server_decoration_palette@197.set_palette("")
[3424746.634]  -> org_kde_kwin_server_decoration_palette_manager@216.create(new id org_kde_kwin_server_decoration_palette@195, wl_surface@47)
[3424746.844]  -> org_kde_kwin_server_decoration_palette@195.set_palette("")
[3424746.961]  -> org_kde_kwin_server_decoration_palette_manager@216.create(new id org_kde_kwin_server_decoration_palette@177, wl_surface@94)
[3424747.166]  -> org_kde_kwin_server_decoration_palette@177.set_palette("")
[3424747.287]  -> org_kde_kwin_server_decoration_palette_manager@216.create(new id org_kde_kwin_server_decoration_palette@187, wl_surface@135)
[3424747.483]  -> org_kde_kwin_server_decoration_palette@187.set_palette("")
[3424747.605]  -> org_kde_kwin_server_decoration_palette_manager@216.create(new id org_kde_kwin_server_decoration_palette@185, wl_surface@175)
[3424747.804]  -> org_kde_kwin_server_decoration_palette@185.set_palette("")
[3424747.910]  -> org_kde_kwin_server_decoration_palette_manager@216.create(new id org_kde_kwin_server_decoration_palette@139, wl_surface@183)
[3424748.096]  -> org_kde_kwin_server_decoration_palette@139.set_palette("")
[3424748.223]  -> org_kde_kwin_server_decoration_palette_manager@216.create(new id org_kde_kwin_server_decoration_palette@137, wl_surface@148)
[3424748.406]  -> org_kde_kwin_server_decoration_palette@137.set_palette("")
[3424749.234] wl_display@1.delete_id(140)
[3424749.311] wl_display@1.delete_id(204)
[3424749.334] wl_display@1.delete_id(217)
[3424749.353] wl_callback@140.done(4003964)
[3424749.394] wl_callback@217.done(4004047)
[3424749.674]  -> wl_surface@44.frame(new id wl_callback@217)
[3424749.767] wl_callback@204.done(12179)
[3424749.809]  -> wl_surface@44.attach(wl_buffer@122, 0, 0)
[3424749.836]  -> wl_surface@44.damage(0, 0, 2147483647, 2147483647)
[3424749.869]  -> wl_surface@44.commit()
[3424749.888]  -> wl_display@1.sync(new id wl_callback@204)
[3424761.059]  -> org_kde_kwin_server_decoration_palette@197.set_palette("")
[3424761.300]  -> org_kde_kwin_server_decoration_palette@195.set_palette("")
[3424761.412]  -> org_kde_kwin_server_decoration_palette@177.set_palette("")
[3424761.506]  -> org_kde_kwin_server_decoration_palette@187.set_palette("")
[3424761.626]  -> org_kde_kwin_server_decoration_palette@185.set_palette("")
[3424761.716]  -> org_kde_kwin_server_decoration_palette@139.set_palette("")
[3424761.804]  -> org_kde_kwin_server_decoration_palette@137.set_palette("")
[3424764.567]  -> org_kde_kwin_server_decoration_palette@197.set_palette("")



And then there are 14,000 more lines like that. perhaps it's overloading the bus or something.
Comment 3 Bug Janitor Service 2023-05-09 08:09:48 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-integration/-/merge_requests/86
Comment 4 Nate Graham 2023-05-09 08:39:51 UTC
Git commit 058ae55b7980eacaecf6ed3c37c050a10cf1a6a0 by Nate Graham, on behalf of David Redondo.
Committed on 09/05/2023 at 08:27.
Pushed by davidre into branch 'master'.

wayland: Only set decoration palette once for each change

Because we filter events on the app, we receive palette change events for
every widget and item, each causing a setPalette call for every window
which can eventually overflow the wayland connection buffer.
FIXED-IN:5.27.5

M  +3    -0    src/platformtheme/kwaylandintegration.cpp

https://invent.kde.org/plasma/plasma-integration/commit/058ae55b7980eacaecf6ed3c37c050a10cf1a6a0
Comment 5 Nate Graham 2023-05-09 08:43:12 UTC
Git commit 2b04981039bbd0fd2ee8303d0d4539208f651b0a by Nate Graham, on behalf of David Redondo.
Committed on 09/05/2023 at 08:43.
Pushed by ngraham into branch 'Plasma/5.27'.

wayland: Only set decoration palette once for each change

Because we filter events on the app, we receive palette change events for
every widget and item, each causing a setPalette call for every window
which can eventually overflow the wayland connection buffer.
FIXED-IN:5.27.5


(cherry picked from commit 058ae55b7980eacaecf6ed3c37c050a10cf1a6a0)

M  +3    -0    src/platformtheme/kwaylandintegration.cpp

https://invent.kde.org/plasma/plasma-integration/commit/2b04981039bbd0fd2ee8303d0d4539208f651b0a
Comment 6 Fushan Wen 2023-09-29 02:32:45 UTC
Still reproducible on yesterday's master
Comment 7 Fushan Wen 2023-09-29 03:40:31 UTC
Git commit 8cb13a178913011ac9b9da24fa60ad90843b3c9e by Fushan Wen.
Committed on 29/09/2023 at 05:37.
Pushed by fusionfuture into branch 'master'.

wayland: only set decoration palette once for each change (Qt6)

Because we filter events on the app, we receive palette change events for
every widget and item, each causing a setPalette call for every window
which can eventually overflow the wayland connection buffer.

(cherry picked from commit 058ae55b7980eacaecf6ed3c37c050a10cf1a6a0)

M  +3    -0    qt6/src/platformtheme/kwaylandintegration.cpp

https://invent.kde.org/plasma/plasma-integration/-/commit/8cb13a178913011ac9b9da24fa60ad90843b3c9e