4K 60fps video blinking and hang when playing with GL render and imxvideoconvert_g2d


We try to play 4k 60fps video on 4K monitor using GL render and imxvideoconvert_g2d but it is
blinking on left haft screen then hangs.
Does imx8 support for playing 4K 60fps video with GL render and imxvideoconvert_g2d?
Could you please check our steps and logs file then let me know if have any ideas about it?

Hardware: Apalis i.MX8QM
Linux Reference Multimedia
Downstream SoC vendor based kernel
Wayland/XWayland graphics back-end included
Quarterly release (2022-03-30 | 5.6.0+build.18 )


  1. Config weston to disable g2d-renderer
# vi root/.config/weston.ini
use-g2d = 0
shell = desktop-shell.so
  1. Restart weston to apply config
    # systemctl restart weston@root

  2. Run command

# gst-launch-1.0 -v filesrc location=videotestsrc_4k60_h265.mp4 \
                  ! qtdemux ! h265parse ! v4l2h265dec \
                  ! imxvideoconvert_g2d ! video/x-raw,width=3840,height=2160 \
                  ! fpsdisplaysink video-sink=waylandsink text-overlay=false
  1. Run command on step 3 several times
    (normally 1 time without weston debug, 3 times with enable weston debug)

Expectation: 4K video play smoothly
On step3, left half of screen is blinking
On step4, left half of screen is blinking then it becomes black and video in right half play slowly
Then entire screen becomes black
After that right half of screen is white and left half is black
Even restart weston, screen still displays with black left half and white right half

  1. Logs:
    weston debug log:
	    [repaint] trying planes-only build state
		[view] evaluating view 0xaaaad2af8100 for output HDMI-A-1 (0)
		[view] not assigning view 0xaaaad2af8100 to plane (no buffer available)
		[view] failing state generation: placing view 0xaaaad2af8100 to renderer not allowed
[atomic] drmModeAtomicCommit
			[overlay] not placing view 0xaaaad2b0cf00 on overlay 39 in mixed mode: kernel test failed

dmesg error:

[  319.903632] [drm] [CRTC:38:crtc-0] dpu_crtc_atomic_flush: wait for slave content shdld done timeout
[  319.912759] [drm] [CRTC:38:crtc-0] dpu_crtc_atomic_flush: slave FrameGen requests to read empty FIFO

dmesg.log (86.7 KB)
weston-debug.log (83.6 KB)


Hi @huongnt,

Thanks for contacting Toradex Community.

Have you already check below post? If not please check and let us know if solution works for you.

Best Regards
Ritesh Kumar

Hi @ritesh.tx

Thank you for your reply.

We have tried to add queue to pipeline as mentioned ticket, the playing is improved but there are still have issues:

  • Screen still has blinking
  • The frame rate is still low(~20fps)
  • Sometimes the half left black screen and half right white screen occurs (with lower ratio than before)

If we combine these steps

  1. Run piple with queue
# gst-launch-1.0 -v filesrc location=videotestsrc_4k60_h265.mp4 \
                  ! qtdemux ! h265parse ! v4l2h265dec \
                  ! imxvideoconvert_g2d ! video/x-raw,width=3840,height=2160 \
                  ! queue ! fpsdisplaysink video-sink=waylandsink text-overlay=false
  1. Restart weston
    # systemctl restart weston@root

The half left black screen and half right white screen occurs every time.
Sometimes screen has blinking in the left side as https://i.imgur.com/69zWDH2.mp4

Do you have any suggestions to fix it ?

Our target is creating an application which displays 4k video and some other GUI components. Should we use GL or g2d render?
If using g2d this issue does not happen but the frame rate is lower. Is anyway to improve performance incase using g2d?


Hi @huongnt , sorry for the late reply.

I was checking the
i.MX8GStreamerUserGuide(1).pdf (778.8 KB)
, and NXP uses a similar pipeline with g2d:

gst-launch-1.0 filesrc location=<filename.mkv> ! \
  qtdemux name=d d.video_0 ! queue ! h265parse ! v4l2h265dec ! \
  imxvideoconvert_g2d ! queue ! waylandsink

imxvideoconvert_g2d makes use of the HW accelaration (VPU) so you should definitely stick with g2d, more so if you mentioned the issue doesn’t happen. As for the lower FPS count, you can try with sync=false and see if this is satisfactory for you.

... ! fpsdisplaysink video-sink=waylandsink text-overlay=false sync=false

BTW, the origin of the issue with GL could be because the Amphion VPU IP included in the i.MX8QM uses a specific tiling format that requires the imxvideoconvert_g2d plugin.

Kind regards,

1 Like

Hi @alvaro.tx

Sorry for late reply.

I checked with your suggestion and the result as below:

  • 4K 60fps could be played with g2d without hang/blinking
  • Frame rate is about 30pfs
    The frame rate is still low but I would like to mark solved with solution using g2d instead GL for gstreamer pipeline.

If you have any ideas to improve frame rate or support cases of 4k video, please let me know.


Hi @huongnt , perfect, thanks for the feedback.

You can quickly try to set the CPU Governor to performance and see if that helps with the FPS:

Also, make sure to use a high speed device to save the video (Internal flash or RAM).

Other than that, I don’t think there is much you can do SW-wise.

Kind regards,


Thanks for your support, @alvaro.tx.

I set CPU Governor to performance and fps now increase a little bit, max rate is about 32fps.


Hey @huongnt, this might help on the FPS:


1 Like

Hello @alvaro.tx,

Thank you very much for the information.