QT6.8 application running on Wayland run into kernel error

Dear,
I am running a QT6.8 program via wayland platform (weston). But get all kind of internal errors (see bottom of message), not sure what is the problem that seems to be appear in galcore. Is there information what could be causing or better solving this issue?

The program runs fine on linuxfb platform and also functions fine on a colibri imx6 via wayland.

Kind regards, Frank

Runs on:
Colibri imx8qxp 1.1e
TDX Wayland with XWayland BSP 7.1.0

→ Error:
[ 21.084214] ------------[ cut here ]------------
[ 21.088860] Kernel BUG at remap_pfn_range_internal+0x23c/0x2c8 [verbose debug info unavailable]
[ 21.097581] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
[ 21.104373] Modules linked in: can_raw can 8021q garp stp mrp llc onboard_usb_hub cfg80211 nls_iso8859_1 nls_cp437 iptable_nat nf_nat nf_conntrack libcrc32c nf_defrag_ipv6 nf_defrag_ipv4 cdns3 cdns_usb_common evdev caam_jr caamkeyblob_desc caamhash_desc caamalg_desc mcp251x crypto_engine authenc libdes aes_ce_cipher ghash_ce sha2_ce sha256_arm64 sha1_ce sha1_generic bluetooth snd_soc_simple_card rtc_imx_sc nvmem_imx_ocotp_scu imx_sc_thermal snd_soc_simple_card_utils ecdh_generic ecc rfkill ip6table_filter sec_enclave ip6_tables panel_simple gpio_keys xt_tcpudp phy_fsl_imx8q_pcie iptable_filter ip_tables fsl_imx8_ddr_perf x_tables ci_hdrc_imx ci_hdrc phy_cadence_salvo ehci_hcd cdns3_imx mxsfb usbmisc_imx phy_mxs_usb gpio_fxl6408 gpio_regmap usb3503 flexcan ad7879_i2c snd_soc_sgtl5000 ad7879 can_dev imx8qxp_adc pwm_imx27 spi_fsl_lpspi imx8_media_dev(C) snd_soc_fsl_sai snd_soc_fsl_utils imx_pcm_dma imx8qxp_pixel_combiner caam error pwm_bl amphion_vpu galcore(O) fuse ipv6 autofs4
[ 21.191200] CPU: 2 PID: 862 Comm: SysWindowSingle Tainted: G C O 6.6.54-7.1.0-devel-g3493ccd66900 #1
[ 21.201560] Hardware name: XXXXXXXXXXXXXXXXXXX
[ 21.208528] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=–)
[ 21.215493] pc : remap_pfn_range_internal+0x23c/0x2c8
[ 21.220559] lr : remap_pfn_range_internal+0x19c/0x2c8
[ 21.225625] sp : ffffffc0935db770
[ 21.228942] x29: ffffffc0935db7b0 x28: 0000007f7c200000 x27: 00000000e3800000
[ 21.236092] x26: 0040000000000041 x25: 0040000000000001 x24: 0000007f80000000
[ 21.243241] x23: ffffff8002042600 x22: ffffff801ae3bf00 x21: ffffffc081447000
[ 21.250391] x20: 0068000000000fcb x19: 0000007f7c000000 x18: 0000000000000000
[ 21.257541] x17: 00000000000000c0 x16: ffffffc080ce8868 x15: 0000007f94020fff
[ 21.264691] x14: 0000000000000000 x13: 1ffffff000dc2b21 x12: ffffffc0935db818
[ 21.271843] x11: ffffff8006e15900 x10: ffffff8006e15908 x9 : 0000007fbc000000
[ 21.278990] x8 : 0000007f7c000000 x7 : 0000000000000000 x6 : 0000000000000000
[ 21.286141] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000001
[ 21.293290] x2 : 00680000a7555fc3 x1 : 0000000000000000 x0 : ffffff80113b7000
[ 21.300441] Call trace:
[ 21.302894] remap_pfn_range_internal+0x23c/0x2c8
[ 21.307617] remap_pfn_range+0x24/0x58
[ 21.311378] dma_direct_mmap+0xf4/0x150
[ 21.315226] dma_mmap_attrs+0x18/0x3c
[ 21.318892] _CMAFSLMapUser+0x9c/0x150 [galcore]
[ 21.323601] gckOS_LockPages+0xe4/0x148 [galcore]
[ 21.328379] gckKERNEL_MapVideoMemory+0x90/0x1dc [galcore]
[ 21.333941] gckVIDMEM_NODE_LockCPU+0x1b4/0x250 [galcore]
[ 21.339412] _LockVideoMemory.isra.0+0x1f4/0x28c [galcore]
[ 21.344972] gckKERNEL_Dispatch+0x160/0x1594 [galcore]
[ 21.350185] gckDEVICE_Dispatch+0xcc/0x220 [galcore]
[ 21.355223] drv_ioctl+0x340/0x444 [galcore]
[ 21.359569] __arm64_sys_ioctl+0x2c0/0xc24
[ 21.363677] invoke_syscall.constprop.0+0x50/0xec
[ 21.368394] do_el0_svc+0x40/0xc4
[ 21.371712] el0_svc+0x48/0x148
[ 21.374866] el0t_64_sync_handler+0x120/0x12c
[ 21.379235] el0t_64_sync+0x190/0x194
[ 21.382908] Code: a90973fb 17ffff99 f942baa8 17ffffe1 (d4210000)
[ 21.389003] —[ end trace 0000000000000000 ]—
[ 21.393625] note: SysWindowSingle[862] exited with irqs disabled
[ 21.399710] note: SysWindowSingle[862] exited with preempt_count 2

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello Frank,

Thank you for your detailed message.

From your description and logs, the kernel panic in the galcore driver is likely because of an issue specific to the GPU drivers and memory mapping on the Colibri iMX8QXP, especially when running Qt/Wayland-based applications. Since your Qt 6.8 application works fine on linuxfb and on Colibri iMX6 via Wayland, but not on iMX8QXP, it strongly suggests this is related to the GPU software stack or container configuration on the iMX8QXP.

Here are some steps and checks you can do that often resolve such issues on Toradex hardware:

  1. Weston Container Version:

    • For Torizon OS 6 (and BSP 7.x), it is essential to use a Weston container specifically built with Vivante GPU support for i.MX8 modules. The documentation notes that, for Colibri iMX8X, the torizon/weston-vivante:3 container is typically required, as newer :4 containers may not be fully compatible with the Vivante GPU driver used by galcore.
    • Please follow this guide to ensure you use the correct Weston container: Working with Weston on Torizon.
  2. Device and Permission Mapping:

    • Make sure your container is started with the correct mounts for /dev/dri, /dev/galcore, and /dev/video* if your application uses them, and that the user inside the container has permission to access these devices. This is especially important for DMA and GPU memory operations performed by galcore.
    • Sometimes, permission problems can manifest as kernel panics or mapping errors. Check a recent community discussion for more on this: Weston containers on Colibri iMX8X.
  3. Kernel & Driver Compatibility:

    • Your kernel version and galcore.ko module must match the version and configuration expected by the container and userspace libraries. If you have upgraded/downgraded either the kernel or your containers, make sure they are properly in sync.
    • Booting with a mismatched or custom kernel (different from Torizon OS 6 BSP 7.1.0 release) can result in ABI differences, which cause GPU kernel drivers to break.
  4. Double-Check BSP & Qt Version Compatibility:

    • Qt 6.8 is rather new; not all distributions or containers might have been tested with this version yet. Torizon OS 6 supports Qt6, but you may want to see if the reference Qt containers work (or if any container customization is required): Qt on Torizon OS.

Steps to Try

  • Run your application in the recommended Vivante Weston container, ensuring you use the version suitable for Colibri iMX8QXP and your Torizon OS (BSP 7.1.0).
  • Verify all device nodes used by the GPU are mapped into the container, and proper udev rules or additional group privileges are set.
  • If the problem persists with the official containers and standard setup, try running a basic reference Qt application in the same environment, to rule out application-level issues.

If any of the above points seem out of place in your setup, correcting them should resolve the kernel panic. If you need step-by-step help adjusting your deployment or clarifying your setup, let me know!

Best regards,
Toradex AI Assistant.

Hi @Frank1!

Just to confirm, you are using our BSP images and not the Torizon OS, right?

Besides that, could you please detail the steps you took to run the application?

Best regards.