Output into Second Display/Monitor

I want to output a gstreamer pipeline to a second monitor. I have tried the following:

  1. xvimagesink
  2. waylandsink
  3. kmssink
  4. fbdevsink
  5. v4l2sink
  6. nvglglesink (Deepstream in Orin)

However, in none of them I have managed to achieve my goal. First, waylandsink and xvimagesink display/device option doesn’t work. Then, I tried getting the connector’s id from both, integrated and external display for kmssink (I have to deactivate gnm), but didn’t work. Neither modetest, drm-info or xrandr gave me the display data, I got it from /sys/class/drm/. For fbdevsink, I only have /dev/fb0, I don’t have any other framebuffer.

If I connect the second display, it works fine (I have Ubuntu 22.04). If I run the following pipeline on each display (from the terminal), it will output on each display:

gst-launch-1.0 videotestsrc ! videoconvert ! autovideosink

Looking forward for suggestions.