The focus issue with dual monitors

Hello, everyone, I’m new to Discuss.

I’m using Arch Linux with Plasma 6 wayland, and I have two monitors: DP-1 and DP-2. In the system settings, I’ve set DP-1 as the primary display.

Since upgrading to version 6.1, I’ve been experiencing a minor issue: Yakuake always defaults to appearing on DP-2. I have to do something on DP-1 (like moving the mouse or opening a window) to fix the focus on DP-1 so that Yakuake appears there.

At first, I thought it was an issue with Yakuake, but I recently noticed that when I press the power button to open the logout window or on the SDDM screen right after booting, the focus is also on DP-2. I’ve encountered a similar issue on my laptop with an external HDMI monitor—the focus is always fixed on the internal screen.

It seems that since version 6.1, the focus in a dual-monitor setup is always fixed on a “default” monitor.

here is my ~/.config/kwinoutputconfig.json:

[
    {
        "data": [
            {
                "autoRotation": "InTabletMode",
                "brightness": 0.45,
                "colorProfileSource": "ICC",
                "connectorName": "DP-1",
                "edidHash": "2229aaf3a5f90e54f4a85e500199b16c",
                "edidIdentifier": "XMI 53253 3752 29 2023 0",
                "highDynamicRange": false,
                "iccProfilePath": "/usr/share/color/icc/colord/sRGB.icc",
                "mode": {
                    "height": 1440,
                    "refreshRate": 165002,
                    "width": 2560
                },
                "overscan": 0,
                "rgbRange": "Automatic",
                "scale": 1,
                "sdrBrightness": 400,
                "sdrGamutWideness": 0,
                "transform": "Normal",
                "vrrPolicy": "Automatic",
                "wideColorGamut": false
            },
            {
                "autoRotation": "InTabletMode",
                "brightness": 1,
                "colorProfileSource": "ICC",
                "connectorName": "DP-2",
                "edidHash": "ea2634edd3eb3525efab141ac414a652",
                "edidIdentifier": "HKC 4150 0 34 2023 0",
                "highDynamicRange": false,
                "iccProfilePath": "/usr/share/color/icc/colord/sRGB.icc",
                "mode": {
                    "height": 1080,
                    "refreshRate": 165001,
                    "width": 1920
                },
                "overscan": 0,
                "rgbRange": "Automatic",
                "scale": 1,
                "sdrBrightness": 391,
                "sdrGamutWideness": 0,
                "transform": "Rotated270",
                "vrrPolicy": "Automatic",
                "wideColorGamut": false
            }
        ],
        "name": "outputs"
    },
    {
        "data": [
            {
                "lidClosed": false,
                "outputs": [
                    {
                        "enabled": true,
                        "outputIndex": 0,
                        "position": {
                            "x": 0,
                            "y": 0
                        },
                        "priority": 0
                    }
                ]
            },
            {
                "lidClosed": false,
                "outputs": [
                    {
                        "enabled": true,
                        "outputIndex": 0,
                        "position": {
                            "x": 1080,
                            "y": 480
                        },
                        "priority": 0
                    },
                    {
                        "enabled": true,
                        "outputIndex": 1,
                        "position": {
                            "x": 0,
                            "y": 0
                        },
                        "priority": 1
                    }
                ]
            },
            {
                "lidClosed": false,
                "outputs": [
                    {
                        "enabled": true,
                        "outputIndex": 1,
                        "position": {
                            "x": 0,
                            "y": 0
                        },
                        "priority": 0
                    }
                ]
            }
        ],
        "name": "setups"
    }
]

perhaps I just need to delete a certain file and let it regenerate to return to normal?

I share your pain. Kwin does not seem to know what monitor it is supposed to use. This behavior is extremely annoying. When I boot, the bios uses the correct display, and the Nvidia driver uses the correct display, but not Kwin. The problem is, upon login, Kwin seems to think display 2 is the “mouse location” when it is not. Even opening the Display Configuration defaults to the secondary display as “selected” when the primary is set to the … umm… primary. And some apps like Kodi and Wine often get it wrong too.

Anyway, check the “open on” setting in Yakuake. It now defaults to “at mouse location”.

I did notice @nicolasfella made some efforts to fix it.
I can’t remember where it is supposed to be fixed or find a reference.

The related bugs don’t have any reference to MR either:
https://bugs.kde.org/show_bug.cgi?id=488467
https://bugs.kde.org/show_bug.cgi?id=383555

Me too have the same problem with two monitor. I have a HMDI and DP. The DP is the principal, but after login your signal down. I need goes to the configuration screen, activate him and set as principal. My video card is nvidia rtx 3070 ti.

My problem occur on power up. The configuration of screen is not save. Every time that power on pc, the principal screen lost signal and i need reactivate then and set as principal. This issue that you post, the problem occur when power save, right?