Bug 466516

Summary: Since Plasma 5.27, Plasma no longer remembers which display is "primary"
Product: [Plasma] KScreen Reporter: Vorpal <kdebugs>
Component: commonAssignee: kscreen-bugs-null <kscreen-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: nate
Priority: NOR    
Version First Reported In: 5.27.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Vorpal 2023-02-27 10:25:37 UTC
SUMMARY
After updating to KDE 5.27, Plasma no longer remembers which monitor is supposed to be the primary display when I connect an external monitor. Instead it is always the internal monitor that is set to primary.


STEPS TO REPRODUCE
1. Connect external monitor (I'm using DisplayPort via the Thinkpad Thunderbolt Dock).
2. Press Fn+F7 to bring up OSD and select extend to right (this laptop never auto-enables external displays for some reason).
3. Observe that the setting of which display was primary has been forgotten since last time.

OBSERVED RESULT
Primary display forgotten even though I checked to save display properties "for any display arrangement".

EXPECTED RESULT
Like with Plasma 5.26, it should remember which display is primary since last time I used this setup.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 5.27.1
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Nvidia drivers used as external displays are connected directly to the nvidia card (not to the intel card). Thus I can only test this in nvidia or hybrid mode. And hybrid mode is super-laggy and unstable, so I'm not using that.
Comment 1 Vorpal 2023-02-27 10:27:11 UTC
I forgot to mention, this is a ThinkPad P15 Gen1 with a Quadro RTX 3000 GPU and Intel i9-10885H CPU.
Comment 2 Nate Graham 2023-03-01 16:43:26 UTC
Can you paste the output of `kscreen-doctor -o` before plugging in the external screen, and afterwards?

Also, when the external screen is plugged in, can you run `kscreen-console bug` and paste the contents of the "EDID" sections for each detected screen? Thanks!
Comment 3 Vorpal 2023-03-03 10:08:04 UTC
(In reply to Nate Graham from comment #2)
> Can you paste the output of `kscreen-doctor -o` before plugging in the
> external screen, and afterwards?
> 
> Also, when the external screen is plugged in, can you run `kscreen-console
> bug` and paste the contents of the "EDID" sections for each detected screen?
> Thanks!

I will do so next time I'm at work and using that dock. Auto detection seems to work fine when connecting directly to the built in HDMI (like I do at home), rather than through the dock.
Comment 4 Vorpal 2023-03-09 11:05:26 UTC
Hm, the issue of the screen not being detected automatically appears to have fixed itself. Such is the life of rolling release distros, oh well.

However, now "extend to right" and "extend to left" appears to have swapped meaning. Now it indicates which side the laptop monitor goes of the main screen!

I don't know if it is useful any more, but here is the output you asked for:

$ kscreen-doctor -o # Laptop only
Output: 540 DP-0.2 disabled disconnected priority 0 Unknown Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 563 DP-0 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 564 DP-1 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 565 DP-2 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 566 HDMI-0 disabled disconnected priority 0 HDMI Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 567 DP-3 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 601 eDP-1-1 enabled connected priority 1 Panel Modes: 541:2560x1440@60 547:1600x1200@60 549:1280x1024@60 555:1024x768@60 557:800x600@60 561:640x480@60 608:3840x2160@60! 609:3840x2160@60 610:3840x2160@60 611:3200x1800@60 612:3200x1800@60 613:2880x1620@60 614:2880x1620@60 615:2560x1600@60 616:2560x1600@60 617:2560x1440@60 618:2560x1440@60 619:2560x1440@60 620:2048x1536@60 621:1920x1440@60 622:1856x1392@60 623:1792x1344@60 624:2048x1152@60 625:2048x1152@60 626:2048x1152@60 627:2048x1152@60 628:1920x1200@60 629:1920x1200@60 630:1920x1080@60* 631:1920x1080@60 632:1920x1080@60 633:1920x1080@60 634:1680x1050@60 635:1680x1050@60 636:1400x1050@60 637:1600x900@60 638:1600x900@60 639:1600x900@60 640:1600x900@60 641:1400x900@60 642:1400x900@60 643:1280x960@60 644:1440x810@60 645:1440x810@60 646:1368x768@60 647:1368x768@60 648:1280x800@60 649:1280x800@60 650:1280x800@60 651:1280x800@60 652:1280x720@60 653:1280x720@60 654:1280x720@60 655:1280x720@60 656:1024x768@60 657:960x720@60 658:928x696@60 659:896x672@60 660:1024x576@60 661:1024x576@60 662:1024x576@60 663:1024x576@60 664:960x600@60 665:960x600@60 666:960x540@60 667:960x540@60 668:960x540@60 669:960x540@60 670:800x600@60 671:800x600@56 672:840x525@60 673:840x525@60 674:864x486@60 675:864x486@60 676:700x525@60 677:800x450@60 678:800x450@60 679:640x512@60 680:700x450@60 681:700x450@60 682:640x480@60 683:720x405@60 684:720x405@59 685:684x384@60 686:684x384@60 687:640x400@60 688:640x400@60 689:640x360@60 690:640x360@60 691:640x360@60 692:640x360@59 693:512x384@60 694:512x288@60 695:512x288@60 696:480x270@60 697:480x270@60 698:400x300@60 699:400x300@56 700:432x243@60 701:432x243@60 702:320x240@60 703:360x202@60 704:360x202@59 705:320x180@60 706:320x180@59 Geometry: 0,0 1920x1080 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 602 DP-1-1 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 603 HDMI-1-1 disabled disconnected priority 0 HDMI Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 604 DP-1-2 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 605 HDMI-1-2 disabled disconnected priority 0 HDMI Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 606 DP-1-3 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown

$ kscreen-doctor -o # External monitor plugged in (DP into dock connected via thunderbolt)
Output: 540 DP-0.2 enabled connected priority 1 DisplayPort Modes: 541:2560x1440@60*! 542:2048x1080@60 543:2048x1080@24 544:1920x1080@60 545:1920x1080@60 546:1920x1080@50 547:1600x1200@60 548:1280x1024@75 549:1280x1024@60 550:1280x720@60 551:1280x720@60 552:1280x720@50 553:1152x864@75 554:1024x768@75 555:1024x768@60 556:800x600@75 557:800x600@60 558:720x576@50 559:720x480@60 560:640x480@75 561:640x480@60 562:640x480@60 Geometry: 1920,0 2560x1440 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 563 DP-0 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 564 DP-1 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 565 DP-2 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 566 HDMI-0 disabled disconnected priority 0 HDMI Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 567 DP-3 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 601 eDP-1-1 enabled connected priority 2 Panel Modes: 541:2560x1440@60 547:1600x1200@60 549:1280x1024@60 555:1024x768@60 557:800x600@60 561:640x480@60 608:3840x2160@60! 609:3840x2160@60 610:3840x2160@60 611:3200x1800@60 612:3200x1800@60 613:2880x1620@60 614:2880x1620@60 615:2560x1600@60 616:2560x1600@60 617:2560x1440@60 618:2560x1440@60 619:2560x1440@60 620:2048x1536@60 621:1920x1440@60 622:1856x1392@60 623:1792x1344@60 624:2048x1152@60 625:2048x1152@60 626:2048x1152@60 627:2048x1152@60 628:1920x1200@60 629:1920x1200@60 630:1920x1080@60* 631:1920x1080@60 632:1920x1080@60 633:1920x1080@60 634:1680x1050@60 635:1680x1050@60 636:1400x1050@60 637:1600x900@60 638:1600x900@60 639:1600x900@60 640:1600x900@60 641:1400x900@60 642:1400x900@60 643:1280x960@60 644:1440x810@60 645:1440x810@60 646:1368x768@60 647:1368x768@60 648:1280x800@60 649:1280x800@60 650:1280x800@60 651:1280x800@60 652:1280x720@60 653:1280x720@60 654:1280x720@60 655:1280x720@60 656:1024x768@60 657:960x720@60 658:928x696@60 659:896x672@60 660:1024x576@60 661:1024x576@60 662:1024x576@60 663:1024x576@60 664:960x600@60 665:960x600@60 666:960x540@60 667:960x540@60 668:960x540@60 669:960x540@60 670:800x600@60 671:800x600@56 672:840x525@60 673:840x525@60 674:864x486@60 675:864x486@60 676:700x525@60 677:800x450@60 678:800x450@60 679:640x512@60 680:700x450@60 681:700x450@60 682:640x480@60 683:720x405@60 684:720x405@59 685:684x384@60 686:684x384@60 687:640x400@60 688:640x400@60 689:640x360@60 690:640x360@60 691:640x360@60 692:640x360@59 693:512x384@60 694:512x288@60 695:512x288@60 696:480x270@60 697:480x270@60 698:400x300@60 699:400x300@56 700:432x243@60 701:432x243@60 702:320x240@60 703:360x202@60 704:360x202@59 705:320x180@60 706:320x180@59 Geometry: 0,0 1920x1080 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 602 DP-1-1 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 603 HDMI-1-1 disabled disconnected priority 0 HDMI Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 604 DP-1-2 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 605 HDMI-1-2 disabled disconnected priority 0 HDMI Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 606 DP-1-3 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown

EDIDs:

Internal montior:
		00ffffffffffff004c83414100000000
		131d0104b5221378029491ae513eb724
		0b505400000001010101010101010101
		010101010101f0d40040f17018803020
		440058c21000001bf0d40040f1701880
		3020440058c21000001b0000000f00ff
		093cff093c2c800000000000000000fe
		0041544e413536575230382d30200115
		02030f00e3058000e6060501736d0700
		00000000000000000000000000000000
		00000000000000000000000000000000
		00000000000000000000000000000000
		00000000000000000000000000000000
		00000000000000000000000000000000
		00000000000000000000000000000000
		000000000000000000000000000000ab

External monitor:
		00ffffffffffff0010ac5a41574c5144
		301e0104a53c22783eee95a3544c9926
		0f5054a54b00714f8180a940d1c00101
		010101010101565e00a0a0a029503020
		350055502100001a000000ff00385a39
		353632330a2020202020000000fc0044
		454c4c205532373139440a20000000fd
		00384c1e5a19010a2020202020200199
		02031cf14f9005040302071601061112
		1513141f23097f0783010000023a8018
		71382d40582c450055502100001e7e39
		00a080381f4030203a0055502100001a
		011d007251d01e206e28550055502100
		001ebf1600a08038134030203a005550
		2100001a000000000000000000000000
		00000000000000000000000000000012


By the way: I intentionally run the built in monitor at 1080p instead of 4k. This is to match DPI with the external monitor, avoid non-integer scaling, and because X apparently dislikes mixing and matching DPIs across monitors. Also it helps with older (scientific) software that does not properly support high-DPI.
Comment 5 Nate Graham 2023-03-09 14:34:39 UTC
Since the original issue appears to be fixed now (could be a migration issue that doesn't happen anymore now that the migration is done) then could you please submit a new bug report for this new issue? Thanks a lot!