How to find out on which card Wayland runs?

Hi everyone,
Back to my original question - how to find on which card Wayland runs.

I did a bit of research and it turned out it is the Wayland compositor that decides which GPU is going to be used in the case of multiple GPUs system; to decide which one is going to be the “primary GPU”.

Quoting from the response:
…The compositor/server (or its logs) would be the more appropriate place to tell what card it is using and driving which outputs, by looking at what driver it’s loading/using on its own.

In my case the compositor is KDE’s KWin. And I found the place which makes the decision. It was changed recently:

494749 – Heuristic for selecting primary GPU - Heuristic for selecting primary GPU
Sign in · GitLab commit/5133842717679787074682aa8eebbf92e41f48da - backends/drm: make a smarter default choice about the primary GPU

Quoting:
By default, we want the primary GPU to be one that displays are connected to, and if we’re on a laptop, one that the internal display is connected to.

I guess this means this behaviour has been there since KDE Plasma 6.3.
I suspect, in previous versions, the compositor simply picked whichever card was first on the PCI bus.
Other Wayland compositors may have other strategies, so you can end up with a different GPU as the primary one.

There is no communication about which GPU card was chosen with Wayland server or wayland-info :frowning:
There is no GUI tool in KDE Plasma showing this information :frowning:
KWin simply prints it to a debug log. Look for string:
chose <DRM device> as the primary GPU

So, I need to change which card the monitor is connected to. I cannot do that in BIOS.
So it is down to the kernel, hopefully settable with parameters like KMS, modesetting or ACPI. I’ll open a separate thread for that. Thank you everyone for helping me here!

P.S.
Few tips here: