KMSGrab recording device only captures one display at a time
Describe the bug
When using kms or hwaccel as the videoInput values, only the second display is captured if the second display is enabled. When it is disabled, the first display is properly captured. Using x11 instead properly captures both (or one if I set an offset), but is undesirable because of its high CPU usage.
Desktop:
- Distro: Arch
- Desktop Environment: KDE
- Window Manager: SDDM
Configuration: replay-sorcery.txt
Logs: rslog.txt
My only theory right now is that each display is connected to different "cards" (or at the very least KMS treats them as different cards). Can you run echo /dev/dri/card* to see how many different card devices are on your system?
$ ls -l /dev/dri
total 0
drwxr-xr-x 2 root root 80 Dec 18 16:25 by-path
crw-rw----+ 1 root video 226, 0 Dec 19 12:21 card0
crw-rw-rw- 1 root render 226, 128 Dec 18 16:25 renderD128
Only other theory I can come up with is that it's using the wrong CRTC ID but I don't know any way to list those
I had a play around with this and I am experimenting with listing/selecting specific DRM cards and planes. Can you checkout and build latest master and run replay-sorcery kms-devices? You will need libdrm development libraries installed.
./replay-sorcery kms-devices
card0:48 (1920x1080x24)
card0:50 (1920x1080x24)
Looks like there's a plane for each display and no combined one. There's not really much I can do about that and I'm not sure if there's anyway to configure these. But at the very least you can specify which one you want now with the videoDevice option.
That should be good enough, thanks for giving this a look. I'll leave this issue open with a different title as a tracker in case a solution pops up.