If you have the range extender battery and are using the trek/bontrager bottle cage that comes with the bike to hold it, then it could be that, it knocks when hitting bigger bumps fast.I've been chasing a rattle/knocking sound for a while and I thought it was that. Local hardware store had some upholstery foam scrap blocks that were free- easy to remove the display and stuff a few of those into the void behind the head tube.
That did quiet my bike down some, but I still have a knocking sound that I think is my Ohlins shock (well due for a rebuild). I have a year on the bike now and my remote failed recently, picking it up today after warranty replacement. That's taken a week and I've done a few rides on my hardtail, OUCH.
I've ordered the fidlock holder to see if that sorts it out.
I have tried various bits of foam stuck to it,but no joy.