MIDI notes recorded too early on timeline

Why do the MIDI notes recorded with Ardour align slightly too early on the timeline? I have to manually correct this timing issue. I am using Ubuntu Studio 25.04. The same problem occurs with Mixbus as well.

I suspect File > Properties > Misc > Default time domain is set to Musical?

Have you measured and calibrated systemic latency of the system?

In Ardour Menu > Window > Audio/MIDI Setup (assuming you use Ardour’s ALSA backend).

I’ll check both of these when I continue working this evening.