Mks genL pin weird problem

Your config seems not to match this board at all.

This is the pin-out and pin names of an ATMega2560:

This is the pin-out of your board. Unfortunately, it contains the old pin-numbering logic, and you will need to translate it:

Example:

[stepper_x]
step_pin: PF0 # Old name: A0
dir_pin: PF1 # Old name: A1
enable_pin: !PD7 # Old name: D38

For the translation, you can also cross-reference this: klipper/config/sample-aliases.cfg at b7233d1197d9a2158676ad39d02b80f787054e20 · Klipper3d/klipper · GitHub

Generally, it looks like MKS is following the RAMPS layout. If you are lucky, the config klipper/config/generic-ramps.cfg at master · Klipper3d/klipper · GitHub should at least match to a large extent, but I did not fully verify it.