LIS3MDL Compass on AltIMU-10 v5

Hello, I been trying to use the LIS3MDL compass from the altIMU-10 v5 on my pixhawk 2.1. The pixhawk doesn’t pick it up after compass calibration. I found a workaround thru mavlink console, I have to start the application “LIS3MDL start” and then run a compass calibration then it will get registered. However, after reboot the compass loses its offsets and needs to rerun the mavlink command then recalibrate it. Is there a way to keep the offsets? It seems to me that the LIS3MDL driver doesn’t run upon boot up. Has anybody encountered this issue?

just ran into this same issue. It looks like the v5 firmware’s rc.board_sensors doesn’t check for the lis3mdl.

I posted it as an issue:

An easy fix is to add the line “lis3mdl -X start” to boards/px4/fmu-v5/init/rc.board_sensors