How to read the content of the framebuffer

Is there a way to read the content of the framebuffer?
I tried:

cp /dev/fb0 test.dump

But it just has 0,0,0 for every pixel despite the fact that a graphical application is running.

Hi @mnano !

Could you please share the output of tdx-info? (reference: Getting Device Information with Tdx-Info | Toradex Developer Center)

I tried to do the same on an Apalis iMX8QM V1.1C running Reference Multimedia Image from BSP 6.5.0-devel-202312-build.16 and an HDMI display, but I didn’t find out how to convert the output to an image.

In my case, most of the content was 0, but it wasn’t everything.

Could you share a bit more about your use case and what you are trying to accomplish?

By default, we have Weston (Wayland) enabled both on Reference Multimedia Image and Torizon OS and this article shows how to grab a screenshot: Working with Weston on Torizon OS | Toradex Developer Center. Is it helpful?

Best regards,

Thank you for the feedback.

There is tools to convert the output to an image (e.g. GitHub - zqb-all/convertfb: python tool to adapt image to framebuffer or RAW Pixels). Essentially, I was just trying to see if the RGB pixel were set to the exact color that was coded by the application. So I am just interested in the raw content of the framebuffer.

tdx-info output:


Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           5.15.77-6.4.0-devel+git.ddc6ca4d76ea #1-TorizonCore SMP PREEMPT Thu Jun 29 10:14:22 UTC 2023
Kernel command line:      root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/90b35d6c1d7a7a6ac8273588e0fcd67ff96c4390fed95da4d873743e1d25c11f/0
Distro name:              NAME="TorizonCore"
Distro version:           VERSION_ID=6.4.0-devel-202308-build.9
Hostname:                 verdin-imx8mp-14772918
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex Verdin iMX8M Plus WB on Dahlia Board
Toradex version:          0058 V1.1A
Serial number:            14772918
Processor arch:           aarch64
------------------------------------------------------------

The last link you shared should be helpful for what I am trying to achieve. Thank you.

Hi @mnano !

Thanks for the clarification!

Glad to help!

Have a nice day :slight_smile:

Best regards,