Sometimes, it's just getting the drummer to lock in with something... anything.. 😂
I jest of course. I feel very lucky to work with some incredible kit technicians who have an understanding of what is needed in the song or part.
For me, locking in is about understanding first and foremost. Even before you think about the notes to play. Understand mutually what your roles within the song or piece is. Here's a great example: Often, those who dislike the genre whilst listening to Jazz think that drum solos are frenetic. However, with a bit of understanding, you can recognise the change of role in the band situation, it's easier to hear that the pulse is being held down elsewhere. Often, say the bassist will be holding it together rather than "the traditional role" of the drummer. The drummer could be laying down some crazy polyrhythms or displacing the groove such that to the uninitiated it "sounds wrong". The bassist knows where the ONE is and the drummer is probably relying on said person to remain rock solid. Understanding is the larger part of doing.