I have got this wonderful M30, too. It works in x input,d input and switch mode with Batocera 5.22.
With select and d-pad up, you can configure the d pad as a real d pad. Eventually thats the problem.
One of my M30 controllers the d-pad was configured as fake analogstick and i had to configure it as real d-pad with pressing select and d-pad up for about 5 seconds or so.
After that procedure i could configure it.
The d pad options are written in the manual. You can find the button combos in the section "keymappings". I had overlooked them the first time.