Bug 484090 - plasmashell dies when creating virtual screens with xrandr
Summary: plasmashell dies when creating virtual screens with xrandr
Status: RESOLVED INTENTIONAL
Alias: None
Product: plasmashell
Classification: Plasma
Component: "Manage Desktop and Panels" window (other bugs)
Version First Reported In: 6.0.2
Platform: Neon Linux
: NOR major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-20 17:19 UTC by eduard
Modified: 2024-03-21 11:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description eduard 2024-03-20 17:19:26 UTC
SUMMARY
***
In order to use the computer with Meta Quest googles, I have a script that creates a couple of virtual screens (xrandr) and then calls the App that lets you remotely connect with the computer.
This week, this process hangs plasmashell as it seems uncapable to start if the number of phisical screens differ from the total one.

plasmashell
ASSERT: "allScreens.count() == m_sizeSortedScreens.count()" in file ./shell/screenpool.cpp, line 337
KCrash: Application 'plasmashell' crashing... crashRecursionCounter = 2
KCrash: Application Name = plasmashell path = /usr/bin pid = 4792
KCrash: Arguments: /usr/bin/plasmashell 
KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi
qt.qml.typeresolution.cycle: Cyclic dependency detected between "qrc:/qt/qml/org/kde/desktop/private/TextFieldContextMenu.qml" and "qrc:/qt/qml/org/kde/desktop/MenuItem.qml"
qrc:/ui/MainPage.qml:64:13: QML MainPageButton: Binding loop detected for property "icon.height"
qrc:/ui/MainPage.qml:48:13: QML MainPageButton: Binding loop detected for property "icon.height"
29      ../sysdeps/unix/sysv/linux/poll.c: No such file or directory.
QSocketNotifier: Invalid socket 5 and type 'Read', disabling...

***


STEPS TO REPRODUCE
1.  Open KDE with X11
2.  Use xrandr to create a virtual screen.

#!/bin/sh
xrandr --addmode HDMI-1 2560x1600 
xrandr --addmode HDMI-2 2560x1600
xrandr --output HDMI-1 --pos 0x0 --mode 2560x1600  --right-of eDP-1
xrandr --output HDMI-2 --pos 0x0 --mode 2560x1600  --left-of eDP-1 



3. plasmashell crashes and does not run again until I kill the virtual screens with
 xrandr --output HDMI-1 --off
xrandr --output HDMI-2 --off


OBSERVED RESULT

plasmashell dies and cannot be restarted

EXPECTED RESULT

plasmashell shouldn't die.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 
Operating System: KDE neon 6.0
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.5.0-26-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-8565U CPU @ 1.80GHz
Memory: 23.2 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Manufacturer: LG Electronics
Product Name: 17Z990-V.AA75B
System Version: 0.1


ADDITIONAL INFORMATION

It sure works in KDE 5.27 and I would bet it worked in KDE 6.0.0 or 6.0.1
Comment 1 fanzhuyifan 2024-03-20 22:30:38 UTC
In general using xrandr to manually manipulate the monitor config is not formally supported in Plasma.
Comment 2 eduard 2024-03-21 11:28:06 UTC
(In reply to fanzhuyifan from comment #1)
> In general using xrandr to manually manipulate the monitor config is not
> formally supported in Plasma.

I don't expect plasma to manage background of newly created virtual screens. Nor any other "unsuported" feature. Just it to not crash as it did not crash few weeks ago.
Converting a laptop into a full 3 monitors computer simply putting some glasses on is incredible convenient, and right now, wayland's virtual screens do not work well enough for it.

Just asking that, as I understand, there is a code that count screens and if they don't match it fails. It should consider the possibility that xrandr has been used and not fail. I think.

Anyway, for anybody that gets here only to find that the case has been closed "because it is not supported": I have a workaround. Install liquidshell, a plasmashell substitution.
Not as preatty or powerful, but at least it works with xrandr and you can call it after enabling xrandr virtual desktops.