Bug 468975 - When machine wakes up with different number of screens than it fell asleep with, the screen locker can break ("wl_display@1: error 1: invalid arguments for wl_display@1.get_registry")
Summary: When machine wakes up with different number of screens than it fell asleep wi...
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.27.4
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-25 22:57 UTC by Nate Graham
Modified: 2024-04-08 01:08 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2023-04-25 22:57:16 UTC
STEPS TO REPRODUCE
1. Have a laptop and an external screen (in my case, an HDMI screen plugged into a Thunderbolt dock)
2. Put the machine to sleep with Kickoff > Sleep
3. Unplug the external screen
4. Wake the machine up


OBSERVED RESULT
Roughly 25% of the time, the screen locker breaks with the typical "the lock screen is broken" message.


EXPECTED RESULT
The lock screen appears.


SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 37
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Kernel Version: 6.2.11-200.fc37.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-10510U CPU @ 1.80GHz
Memory: 15.2 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Manufacturer: LENOVO
System Version: ThinkPad X1 Yoga 4th


ADDITIONAL INFORMATION
There are no crash logs in `coredumpctl`. Journal logs from kwin_wayland reveal the following:

Apr 25 16:40:14 Liberator kwin_wayland[1664]: kscreenlocker: Everything else failed. Need to put Greeter in emergency mode.
Apr 25 16:40:14 Liberator kwin_wayland[1664]: kscreenlocker: Greeter process exit unregular. Restarting lock.
Apr 25 16:40:14 Liberator kscreenlocker_greet[41400]: The Wayland connection broke. Did the Wayland compositor die?
Apr 25 16:40:14 Liberator kwin_wayland[1664]: kscreenlocker: Greeter process exit unregular. Restarting lock.
Apr 25 16:40:14 Liberator kscreenlocker_greet[41385]: The Wayland connection broke. Did the Wayland compositor die?
Apr 25 16:40:14 Liberator kwin_wayland[1664]: kscreenlocker: Greeter process exit unregular. Restarting lock.
Apr 25 16:40:14 Liberator kscreenlocker_greet[41367]: The Wayland connection experienced a fatal error: Invalid argument
Apr 25 16:40:14 Liberator kwin_wayland_wrapper[41367]: wl_display@1: error 1: invalid arguments for wl_display@1.get_registry
Apr 25 16:40:14 Liberator kwin_wayland_wrapper[41367]: error: received delete_id for unknown id (22)
Apr 25 16:40:14 Liberator kwin_wayland_wrapper[41367]: error: received delete_id for unknown id (23)
Apr 25 16:40:14 Liberator kwin_wayland_wrapper[41367]: error: received delete_id for unknown id (46)
Apr 25 16:40:14 Liberator kwin_wayland_wrapper[41367]: error: received delete_id for unknown id (45)
Apr 25 16:40:14 Liberator kwin_wayland_wrapper[41367]: error: received delete_id for unknown id (56)
Apr 25 16:40:14 Liberator kwin_wayland_wrapper[41367]: error: received delete_id for unknown id (47)
Apr 25 16:40:14 Liberator kwin_wayland_wrapper[41367]: error: received delete_id for unknown id (54)
Apr 25 16:40:14 Liberator kwin_wayland_wrapper[1664]: error in client communication (pid 1664)
Apr 25 16:40:14 Liberator kwin_wayland_wrapper[1664]: not a valid new object id (2), message get_registry(n)
Apr 25 16:40:14 Liberator kwin_wayland[1664]: kscreenlocker: Greeter process exit unregular. Restarting lock.
Apr 25 16:40:14 Liberator kwin_wayland[1664]: kscreenlocker: Greeter Process encountered an unhandled error: QProcess::Crashed
Comment 1 David Edmundson 2023-04-27 07:02:03 UTC
The last time this came up it was because deemed to be because layer-shell-qt was out of date in a binary incompatible way. A recompile fixed it.

That doesn't fully explain why you see it only 25% of the time though.

Can you double check your layer-shell-qt and kscreenlocker builds are up to date and then re-open
Comment 2 Nate Graham 2023-04-27 13:46:40 UTC
I can confirm that both layer-shell-qt and kscreenlocker were current  from the tip of the Plasma/5.27 branch at the time this happened. I have now manually recompiled both with clean builds and will try to make it happen again.
Comment 3 Nate Graham 2023-05-04 15:16:15 UTC
Have not been able to make it happen since then. Perhaps it was a local setup issue. I'll re-open this if and when it happens again.