Created attachment 166575 [details] Situation where DP-0 is working as single screen SUMMARY When invoking kscreen-doctor to enable a secondary screen, the primary screen gets disabled. STEPS TO REPRODUCE 1. Write a script kscreen-switch with the following content : if [[ "$(xrandr --listactivemonitors | grep -c DVI-D-0)" == "0" ]]; then kscreen-doctor output.DVI-D-0.enable output.DVI-D-0.position.-1920,0 else kscreen-doctor output.DVI-D-0.disable fi 2. Invoke the script. 3. Invoke the script again. OBSERVED RESULT On first invocation, DVI-D-0 goes live and DP-0 goes blank. On second invocation, DVI-D-0 does blank. EXPECTED RESULT On first invocation, DP-0 should not go blank. SOFTWARE/OS VERSIONS Operating System: Kubuntu 22.04 KDE Plasma Version: 5.24.7 KDE Frameworks Version: 5.92.0 Qt Version: 5.15.3 Kernel Version: 5.15.0-97-generic (64-bit) Graphics Platform: X11 Processors: 8 × Intel® Xeon® CPU E3-1245 v5 @ 3.50GHz Memory: 15.5 Gio of RAM Graphics Processor: NVIDIA GeForce GTX 1650/PCIe/SSE2 ADDITIONAL INFORMATION Explicitly adding output.DP-0.enable to each line of the script makes DP-0 go live in second invocation, but does not prevent it from going blank in the first. On first invocation with that addition, the console shows Enabling output 444 kscreen.doctor: Output position QPoint(-1920,0) kscreen.doctor: Set output position QPoint(-1920,0) Enabling output 455 kscreen.doctor: setop exec returned KScreen::Config( KScreen::Output(444, "DVI-D-0", connected enabled, pos: QPoint(0,0), res: QSize(-1, -1), modeId: "", scale: 1, clone: no, rotation: KScreen::Output::None, followPreferredMode: false) KScreen::Output(455, "DP-0", connected enabled primary, pos: QPoint(1920,0), res: QSize(3840, 2160), modeId: "456", scale: 1, clone: no, rotation: KScreen::Output::None, followPreferredMode: false) ) Which is not consistent with the fact that DP-0 goes blank. However, the log produced by kscreen-console bug show that something pertaining to DP-0 is disabled. Setting up the dual screen configuration with the GUI from Plasma works properly.
Created attachment 166576 [details] Situation where both screens should be working but DP-0 is off
Created attachment 166577 [details] Situation after setting dual config with the GUI (works properly)
Still happens after upgrade to Operating System: Kubuntu 22.04 KDE Plasma Version: 5.27.10 KDE Frameworks Version: 5.104.0 Qt Version: 5.15.3 Kernel Version: 5.15.0-97-generic (64-bit) Graphics Platform: X11 Processors: 8 × Intel® Xeon® CPU E3-1245 v5 @ 3.50GHz Memory: 15.5 Gio of RAM Graphics Processor: NVIDIA GeForce GTX 1650/PCIe/SSE2
I seem to be able to have a functioning setup by splitting the command into two : if [[ "$(xrandr --listactivemonitors | grep -c DVI-D-0)" == "0" ]]; then kscreen-doctor output.DVI-D-0.enable kscreen-doctor output.DVI-D-0.position.-1920,0 else kscreen-doctor output.DVI-D-0.disable fi But that seems contrary to the intended goal of kscreen-doctor.
Update that this is still happening after an upgrade to Operating System: Kubuntu 24.04 KDE Plasma Version: 5.27.11 KDE Frameworks Version: 5.115.0 Qt Version: 5.15.13 Kernel Version: 6.8.0-45-generic (64-bit) Graphics Platform: X11 Processors: 8 × Intel® Xeon® CPU E3-1245 v5 @ 3.50GHz Memory: 31.2 Gio of RAM Graphics Processor: NVIDIA GeForce GTX 1650/PCIe/SSE2 Manufacturer: Dell Inc. Product Name: Precision Tower 3620 Fundamentally, doing kscreen-doctor A B does not yield the same result as kscreen-doctor A ; kscreen-doctor B.
Created attachment 173967 [details] Comparing two ways of interacting with kscreen-doctor