Bug 472542 - Wrong monitor is primary on Wayland
Summary: Wrong monitor is primary on Wayland
Status: REPORTED
Alias: None
Product: KScreen
Classification: Plasma
Component: common (show other bugs)
Version: 5.27.6
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords: multiscreen, wayland
Depends on:
Blocks:
 
Reported: 2023-07-23 18:12 UTC by mashkal2000@gmail.com
Modified: 2023-11-29 13:57 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
display (179.01 KB, image/png)
2023-07-23 18:12 UTC, mashkal2000@gmail.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mashkal2000@gmail.com 2023-07-23 18:12:21 UTC
Created attachment 160477 [details]
display

SUMMARY
Wrong display is primary. This is fixed by making the other display primary, then switching back.


STEPS TO REPRODUCE
1. make 2nd screen primary
2. reboot
3. 

OBSERVED RESULT
2nd screen is primary in settings, 1st screen is primary in reality

EXPECTED RESULT
2nd screen is primary in settings, 2nd screen is primary in reality

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.27
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10
Kernel Version: 5.19.0-46-generic (64-bit)
Graphics Platform: X11
Processors: 20 × 13th Gen Intel® Core™ i5-13600K
Memory: 31.1 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2
Manufacturer: ASRock
Product Name: Z690M-ITX/ax
ADDITIONAL INFORMATION
Comment 1 mashkal2000@gmail.com 2023-07-23 18:13:49 UTC
The image shows the taskbar drawn on the non-primary display. Apps also launch on the non-primary display. That's what I mean by "the 1st screen is primary in reality"
Comment 2 David Edmundson 2023-07-23 18:18:14 UTC
Please include output of 'kscreem-doctor  bug' when in the broken state

And confirm if restarting plasmashell fixes it.
Comment 3 mashkal2000@gmail.com 2023-07-25 04:12:27 UTC
`kscreen-doctor  bug` hangs and doesn't print anything. How do I restart plasmashell? `kstart5 plasmashell` gives the following output: Checking screens: available: (QScreen(0x561a72b7a370, name="HDMI-0"), QScreen(0x561a72b7a460, name="DP-0")) redundant: QHash() fake: QSet() all: (QScreen(0x561a72b7a370, name="HDMI-0"), QScreen(0x561a72b7a460, name="DP-0"))
Checking screens: available: (QScreen(0x561a72b7a370, name="HDMI-0"), QScreen(0x561a72b7a460, name="DP-0")) redundant: QHash() fake: QSet() all: (QScreen(0x561a72b7a370, name="HDMI-0"), QScreen(0x561a72b7a460, name="DP-0"))
^C

and nothing changes.

I don't know if this is related, but I noticed that when the bug is active, Firefox drops many frames on Youtube videos until I restart Firefox.
Comment 4 Bug Janitor Service 2023-08-09 03:45:02 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 mashkal2000@gmail.com 2023-08-09 16:58:31 UTC
Changed to reported. Same issue (kind of) with the volume panel too
Comment 6 Nate Graham 2023-09-07 19:16:43 UTC
The correct command was `kscreen-console bug` sorry. Can you do that?

Also, can you try the Wayland session to see if the problem reproduces there?
Comment 7 mashkal2000@gmail.com 2023-09-08 16:38:07 UTC
(In reply to Nate Graham from comment #6)
> The correct command was `kscreen-console bug` sorry. Can you do that?
> 
> Also, can you try the Wayland session to see if the problem reproduces there?

This only happens on the wayland session. X11 works fine.

```
$ kscreen-console bug
libEGL warning: egl: failed to create dri2 screen
START: Requesting Config
Received config. Took 6 milliseconds

========================xrandr --verbose==========================
Screen 0: minimum 16 x 16, current 1920 x 1080, maximum 32767 x 32767
XWAYLAND0 connected primary 1920x1080+0+0 (0x41) normal (normal left inverted right x axis y axis) 480mm x 270mm
        Identifier: 0x21
        Timestamp:  63159
        Subpixel:   unknown
        Gamma:      inf:inf:inf
        Brightness: 0.38
        Clones:    
        CRTC:       0
        CRTCs:      0
        Transform:  1.000000 0.000000 0.000000
                    0.000000 1.000000 0.000000
                    0.000000 0.000000 1.000000
                   filter: 
        non-desktop: 0 
                supported: 0, 1
  1920x1080 (0x41) 220.750MHz -HSync +VSync *current +preferred
        h: width  1920 start 2064 end 2264 total 2608 skew    0 clock  84.64KHz
        v: height 1080 start 1083 end 1088 total 1130           clock  74.91Hz
  1440x1080 (0x42) 165.250MHz -HSync +VSync
        h: width  1440 start 1544 end 1696 total 1952 skew    0 clock  84.66KHz
        v: height 1080 start 1083 end 1087 total 1130           clock  74.92Hz
  1400x1050 (0x43) 156.000MHz -HSync +VSync
        h: width  1400 start 1504 end 1648 total 1896 skew    0 clock  82.28KHz
        v: height 1050 start 1053 end 1057 total 1099           clock  74.87Hz
  1280x1024 (0x44) 138.750MHz -HSync +VSync
        h: width  1280 start 1368 end 1504 total 1728 skew    0 clock  80.30KHz
        v: height 1024 start 1027 end 1034 total 1072           clock  74.90Hz
  1280x960 (0x45) 130.000MHz -HSync +VSync
        h: width  1280 start 1368 end 1504 total 1728 skew    0 clock  75.23KHz
        v: height  960 start  963 end  967 total 1005           clock  74.86Hz
  1152x864 (0x46) 104.000MHz -HSync +VSync
        h: width  1152 start 1224 end 1344 total 1536 skew    0 clock  67.71KHz
        v: height  864 start  867 end  871 total  905           clock  74.82Hz
  1024x768 (0x47) 81.750MHz -HSync +VSync
        h: width  1024 start 1088 end 1192 total 1360 skew    0 clock  60.11KHz
        v: height  768 start  771 end  775 total  805           clock  74.67Hz
  800x600 (0x48) 49.000MHz -HSync +VSync
        h: width   800 start  840 end  920 total 1040 skew    0 clock  47.12KHz
        v: height  600 start  603 end  607 total  629           clock  74.91Hz
  640x480 (0x49) 30.750MHz -HSync +VSync
        h: width   640 start  664 end  728 total  816 skew    0 clock  37.68KHz
        v: height  480 start  483 end  487 total  504           clock  74.77Hz
  320x240 (0x4a)  7.500MHz -HSync +VSync
        h: width   320 start  336 end  360 total  400 skew    0 clock  18.75KHz
        v: height  240 start  243 end  247 total  254           clock  73.82Hz
  1680x1050 (0x4b) 187.000MHz -HSync +VSync
        h: width  1680 start 1800 end 1976 total 2272 skew    0 clock  82.31KHz
        v: height 1050 start 1053 end 1059 total 1099           clock  74.89Hz
  1440x900 (0x4c) 136.500MHz -HSync +VSync
        h: width  1440 start 1536 end 1688 total 1936 skew    0 clock  70.51KHz
        v: height  900 start  903 end  909 total  942           clock  74.85Hz
  1280x800 (0x4d) 106.250MHz -HSync +VSync
        h: width  1280 start 1360 end 1488 total 1696 skew    0 clock  62.65KHz
        v: height  800 start  803 end  809 total  838           clock  74.76Hz
  720x480 (0x4e) 34.250MHz -HSync +VSync
        h: width   720 start  752 end  816 total  912 skew    0 clock  37.55KHz
        v: height  480 start  483 end  493 total  504           clock  74.51Hz
  640x400 (0x4f) 25.000MHz -HSync +VSync
        h: width   640 start  664 end  720 total  800 skew    0 clock  31.25KHz
        v: height  400 start  403 end  409 total  421           clock  74.23Hz
  320x200 (0x50)  6.250MHz -HSync +VSync
        h: width   320 start  336 end  360 total  400 skew    0 clock  15.62KHz
        v: height  200 start  203 end  209 total  212           clock  73.70Hz
  1600x900 (0x51) 151.250MHz -HSync +VSync
        h: width  1600 start 1704 end 1872 total 2144 skew    0 clock  70.55KHz
        v: height  900 start  903 end  908 total  942           clock  74.89Hz
  1368x768 (0x52) 109.250MHz -HSync +VSync
        h: width  1368 start 1448 end 1592 total 1816 skew    0 clock  60.16KHz
        v: height  768 start  771 end  781 total  805           clock  74.73Hz
  1280x720 (0x53) 95.750MHz -HSync +VSync
        h: width  1280 start 1360 end 1488 total 1696 skew    0 clock  56.46KHz
        v: height  720 start  723 end  728 total  755           clock  74.78Hz
  1024x576 (0x54) 60.000MHz -HSync +VSync
        h: width  1024 start 1072 end 1176 total 1328 skew    0 clock  45.18KHz
        v: height  576 start  579 end  584 total  604           clock  74.80Hz
  864x486 (0x55) 42.000MHz -HSync +VSync
        h: width   864 start  904 end  984 total 1104 skew    0 clock  38.04KHz
        v: height  486 start  489 end  494 total  511           clock  74.45Hz
  720x400 (0x56) 28.000MHz -HSync +VSync
        h: width   720 start  744 end  808 total  896 skew    0 clock  31.25KHz
        v: height  400 start  403 end  413 total  421           clock  74.23Hz
  640x350 (0x57) 22.000MHz -HSync +VSync
        h: width   640 start  664 end  720 total  800 skew    0 clock  27.50KHz
        v: height  350 start  353 end  363 total  369           clock  74.53Hz

========================Outputs===================================
Screen:
        maxSize: QSize(64000, 64000)
        minSize: QSize(0, 0)
        currentSize: QSize(1920, 1080)

-----------------------------------------------------

Id:  1
Name:  "HDMI-A-3"
Type:  "HDMI"
Connected:  true
Enabled:  true
Priority:  1
Rotation:  KScreen::Output::None
Pos:  QPoint(0,0)
MMSize:  QSize(480, 270)
FollowPreferredMode:  false
Size:  QSize(1920, 1080)
Scale:  1
Clones:  None
Mode:  "0"
Preferred Mode:  "0"
Preferred modes:  ("0")
Modes: 
         "0"    "1920x1080@75"   QSize(1920, 1080)   74.973
         "1"    "1920x1080@60"   QSize(1920, 1080)   60
         "10"    "1280x800@60"   QSize(1280, 800)   59.81
         "11"    "1152x864@75"   QSize(1152, 864)   75
         "12"    "1280x720@60"   QSize(1280, 720)   60
         "13"    "1280x720@60"   QSize(1280, 720)   59.943
         "14"    "1280x720@50"   QSize(1280, 720)   50
         "15"    "1024x768@75"   QSize(1024, 768)   75.029
         "16"    "1024x768@60"   QSize(1024, 768)   60.004
         "17"    "800x600@75"   QSize(800, 600)   75
         "18"    "800x600@60"   QSize(800, 600)   60.317
         "19"    "720x576@50"   QSize(720, 576)   50
         "2"    "1920x1080@60"   QSize(1920, 1080)   59.939
         "20"    "720x480@60"   QSize(720, 480)   59.94
         "21"    "640x480@75"   QSize(640, 480)   75
         "22"    "640x480@60"   QSize(640, 480)   59.94
         "23"    "640x480@60"   QSize(640, 480)   59.929
         "3"    "1920x1080@50"   QSize(1920, 1080)   50
         "4"    "1680x1050@60"   QSize(1680, 1050)   59.954
         "5"    "1400x1050@60"   QSize(1400, 1050)   59.978
         "6"    "1600x900@60"   QSize(1600, 900)   60
         "7"    "1280x1024@75"   QSize(1280, 1024)   75.025
         "8"    "1280x1024@60"   QSize(1280, 1024)   60.02
         "9"    "1440x900@60"   QSize(1440, 900)   59.887
EDID Info: 
        Device ID:  "xrandr-LG Electronics-LG FULL HD-153598"
        Name:  "LG FULL HD"
        Vendor:  "LG Electronics"
        Serial:  "153598"
        EISA ID:  ""
        Hash:  "c3e1b37716b90653989198d4b04b3a42"
        Width:  48
        Height:  27
        Gamma:  2.2
        Red:  QQuaternion(scalar:1, vector:(0.644531, 0.332031, 0))
        Green:  QQuaternion(scalar:1, vector:(0.304688, 0.629883, 0))
        Blue:  QQuaternion(scalar:1, vector:(0.148438, 0.0498047, 0))
        White:  QQuaternion(scalar:1, vector:(0.313477, 0.329102, 0))

-----------------------------------------------------

Id:  2
Name:  "DP-2"
Type:  "DisplayPort"
Connected:  true
Enabled:  false
Priority:  0
Rotation:  KScreen::Output::None
Pos:  QPoint(0,0)
MMSize:  QSize(600, 340)
FollowPreferredMode:  false
Size:  QSize(2560, 1440)
Scale:  1
Clones:  None
Mode:  "0"
Preferred Mode:  "0"
Preferred modes:  ("0")
Modes: 
         "0"    "2560x1440@60"   QSize(2560, 1440)   59.951
         "1"    "2048x1080@60"   QSize(2048, 1080)   59.998
         "10"    "1280x720@60"   QSize(1280, 720)   60
         "11"    "1280x720@60"   QSize(1280, 720)   59.943
         "12"    "1280x720@50"   QSize(1280, 720)   50
         "13"    "1024x768@75"   QSize(1024, 768)   75.029
         "14"    "1024x768@60"   QSize(1024, 768)   60.004
         "15"    "800x600@75"   QSize(800, 600)   75
         "16"    "800x600@60"   QSize(800, 600)   60.317
         "17"    "720x576@50"   QSize(720, 576)   50
         "18"    "720x480@60"   QSize(720, 480)   59.94
         "19"    "640x480@75"   QSize(640, 480)   75
         "2"    "2048x1080@24"   QSize(2048, 1080)   23.997
         "20"    "640x480@60"   QSize(640, 480)   59.94
         "21"    "640x480@60"   QSize(640, 480)   59.929
         "3"    "1920x1080@60"   QSize(1920, 1080)   60
         "4"    "1920x1080@60"   QSize(1920, 1080)   59.939
         "5"    "1920x1080@50"   QSize(1920, 1080)   50
         "6"    "1600x1200@60"   QSize(1600, 1200)   60
         "7"    "1280x1024@75"   QSize(1280, 1024)   75.025
         "8"    "1280x1024@60"   QSize(1280, 1024)   60.02
         "9"    "1152x864@75"   QSize(1152, 864)   75
EDID Info: 
        Device ID:  "xrandr-Dell Inc.-DELL C2722DE-9Q552H3"
        Name:  "DELL C2722DE"
        Vendor:  "Dell Inc."
        Serial:  "9Q552H3"
        EISA ID:  ""
        Hash:  "050cc73ff36beada223ffc418027d9b3"
        Width:  60
        Height:  34
        Gamma:  2.2
        Red:  QQuaternion(scalar:1, vector:(0.674805, 0.324219, 0))
        Green:  QQuaternion(scalar:1, vector:(0.30957, 0.620117, 0))
        Blue:  QQuaternion(scalar:1, vector:(0.144531, 0.0615234, 0))
        White:  QQuaternion(scalar:1, vector:(0.313477, 0.329102, 0))

========================Configurations============================
Configs in:  "/home/alex/.local/share/kscreen/"
Number of files:  2 

"53725266727f50a9db180811f02db824"
[
    {
        "enabled": true,
        "id": "c3e1b37716b90653989198d4b04b3a42",
        "metadata": {
            "fullname": "xrandr-LG Electronics-LG FULL HD-153598",
            "name": "HDMI-0"
        },
        "mode": {
            "refresh": 74.97250366210938,
            "size": {
                "height": 1080,
                "width": 1920
            }
        },
        "overscan": 0,
        "pos": {
            "x": 0,
            "y": 0
        },
        "priority": 1,
        "rgbrange": 0,
        "rotation": 1,
        "scale": 1,
        "vrrpolicy": 2
    }
]

"c2aa092167450d8e7a77c0fd00bf360a"
[
    {
        "enabled": true,
        "id": "c3e1b37716b90653989198d4b04b3a42",
        "metadata": {
            "fullname": "xrandr-LG Electronics-LG FULL HD-153598",
            "name": "HDMI-0"
        },
        "mode": {
            "refresh": 74.97250366210938,
            "size": {
                "height": 1080,
                "width": 1920
            }
        },
        "overscan": 0,
        "pos": {
            "x": 0,
            "y": 0
        },
        "priority": 1,
        "rgbrange": 0,
        "rotation": 1,
        "scale": 1,
        "vrrpolicy": 2
    },
    {
        "enabled": false,
        "id": "050cc73ff36beada223ffc418027d9b3",
        "metadata": {
            "fullname": "xrandr-Dell Inc.-DELL C2722DE-9Q552H3",
            "name": "DP-0"
        },
        "mode": {
            "refresh": 59.9505500793457,
            "size": {
                "height": 1440,
                "width": 2560
            }
        },
        "overscan": 0,
        "pos": {
            "x": 0,
            "y": 0
        },
        "priority": 0,
        "rgbrange": 0,
        "rotation": 1,
        "scale": 1,
        "vrrpolicy": 2
    }
]

```
Comment 8 Nate Graham 2023-09-08 18:05:41 UTC
Thanks!
Comment 9 mashkal2000@gmail.com 2023-09-08 20:52:41 UTC
I just noticed - when the screen gets disabled on Wayland, it affects X11 too on the next login. Looks like the screen just gets disabled whenever I log in to the Wayland session.
Comment 10 Nate Graham 2023-09-11 16:34:56 UTC
That reminds me of Bug 460341, but you're on Wayland and should have the commit that fixed the bug.