ReplaySorcery icon indicating copy to clipboard operation
ReplaySorcery copied to clipboard

KMSGrab recording device only captures one display at a time

Open melvyn2 opened this issue 5 years ago • 7 comments

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

melvyn2 avatar Dec 19 '20 19:12 melvyn2

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?

matanui159 avatar Dec 19 '20 20:12 matanui159

$ 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

melvyn2 avatar Dec 19 '20 20:12 melvyn2

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

matanui159 avatar Dec 19 '20 22:12 matanui159

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.

matanui159 avatar Dec 23 '20 03:12 matanui159

./replay-sorcery kms-devices
card0:48 (1920x1080x24)
card0:50 (1920x1080x24)

melvyn2 avatar Dec 23 '20 03:12 melvyn2

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.

matanui159 avatar Dec 23 '20 03:12 matanui159

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.

melvyn2 avatar Dec 23 '20 16:12 melvyn2